Posts

Showing posts with the label #taxibooking

A Taxi Booking App Built with Flutter: All you should know

Image
  A Taxi Booking App Built with Flutter Introduction: In our fast-paced world, getting from point A to point B has never been easier, all thanks to the wonders of technology. Taxi booking apps have made the once-daunting task of hailing a cab as easy as pie, with just a few taps on your smartphone. In this comprehensive guide, we'll take a deep dive into the world of taxi booking apps, exploring what they are, how they work, and how you can create your very own using Flutter, a user-friendly toolkit developed by Google. What Exactly is a Taxi Booking App? Convenience at Your Fingertips: Taxi booking apps act as your personal transportation assistant, making it incredibly convenient to find and book rides wherever you are.     Effortless Navigation: Say goodbye to the hassle of flagging down taxis on the street. With a taxi booking app, navigation becomes a breeze, with intuitive interfaces guiding you every step of the way.     Time-Saving Solutions: No more was...

Taxi Booking Project - AppDelegate.Swift

Image
Please, support my blog by clicking on our sponsors ad!   import UIKit import Flutter import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GMSServices.provideAPIKey( "Your Key" ) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } Go to Main project

Taxi booking Project - AndroidManifest.xml

Image
Please, support my blog by clicking on our sponsors ad!   < manifest xmlns: android ="http://schemas.android.com/apk/res/android" > < application android :label ="myfirstproject" android :name ="${applicationName}" android :icon ="@mipmap/ic_launcher" > < activity android :name =".MainActivity" android :exported ="true" android :launchMode ="singleTop" android :theme ="@style/LaunchTheme" android :configChanges ="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android :hardwareAccelerated ="true" android :windowSoftInputMode ="adjustResize" > <!-- Specifies an Android theme to apply to this Activity as soon as the Android process...

Taxi booking in flutter - pubspec.yaml

Image
Please, support my blog by clicking on our sponsors ad!   dependencies : font_awesome_flutter : ^10.6.0 provider : ^6.1.1 flutter : sdk : flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons : ^1.0.2 google_maps_flutter : ^2.5.3 cached_network_image : ^3.3.1 Go to Main project

Taxi Booking in Flutter - vehicle.dart

Image
  import 'package:cached_network_image/cached_network_image.dart' ; import 'package:flutter/material.dart' ; import 'package:font_awesome_flutter/font_awesome_flutter.dart' ; import 'package:google_maps_flutter/google_maps_flutter.dart' ; import 'package:myfirstproject/Dashboard.dart' ; import 'package:myfirstproject/ViewModels/vehicleviewmodel.dart' ; import 'package:myfirstproject/cards/areaspot_card.dart' ; import 'package:myfirstproject/cards/location_card.dart' ; import 'package:myfirstproject/common/bottomnavigationbar.dart' ; import 'package:myfirstproject/common/constants.dart' ; import 'package:myfirstproject/ViewModels/locationviewmodel.dart' ; import 'package:provider/provider.dart' ; class Vehicle extends StatefulWidget { const Vehicle({Key? key}) : super (key: key); @override VehicleState createState() => VehicleState (); } class VehicleState extends State<Vehicle...

Create a Taxi Booking Project in flutter

Image
Introduction: In today's fast-paced world, the demand for efficient transportation solutions is ever-growing. Taxi booking apps have emerged as indispensable tools, offering users convenience and reliability in navigating urban landscapes. Leveraging the power of Flutter, a versatile and efficient cross-platform framework, developers can craft robust and feature-rich taxi booking apps that meet the needs of modern travelers. In this guide, we'll explore how to build a taxi booking app with Flutter, incorporating essential features like a dashboard, maps integration, online payment, and route selection, all while adhering to the MVVM architecture. Building the Taxi Booking App with Flutter Project Setup: Begin by creating a new Flutter project and setting up the necessary dependencies, including packages for state management and maps integration. Model Definition: Define the data model for the app, encompassing classes to represent rides, user information, payment details, and ...

Taxi Booking in Flutter - RideDetail dart

Image
 Create a file named as 'RideDetail.dart' in Lib Folder and paste following code: Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:myfirstproject/Dashboard.dart'; import 'package:myfirstproject/cards/areaspot_card.dart'; import 'package:myfirstproject/cards/location_card.dart'; import 'package:myfirstproject/common/bottomnavigationbar.dart'; import 'package:myfirstproject/common/constants.dart'; import 'package:myfirstproject/ViewModels/locationviewmodel.dart'; import 'package:provider/provider.dart'; class RideDetail extends StatefulWidget { const RideDetail({Key? key}) : super(key: key); @override RideDetailState createState() => RideDetailState(); } class RideDetailState extends State { final LocationViewModel locationViewModel = LocationViewModel(); ...

Taxi Booking in Flutter - Main.dart file

Image
 paste following code in 'main.dart': Please, support my blog by clicking on our sponsors ad! import 'dart:html'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:myfirstproject/Dashboard.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: Dashboard(), ); } } Go to Main project

Taxi Booking in Flutter - Constant Dart file

Image
Create a file called 'constant.dart' in lib -> common folder where you will write following code Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; const Color PrimaryColor = Color(0xFF156EE6); const Color SecondaryColor = Color(0xFFF8F9FD); const Color RegentGray = Color(0xFF868F9E); const Color Navy = Color(0xFF0C1F3D); const Color GhostWhite = Color(0xFFF7F9FC); const Color GreenTeal = Color(0xFF0AB75B); const Color LightGreenTeal = Color(0xFFF2FDF5); Go to Main project

Taxi Booking in flutter - BottomNavigationBar dart file

Image
 Create a dart file named as 'bottomnavigationbar.dart' in lib -> common folder. It will create bottom menu Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; import 'package:myfirstproject/Dashboard.dart'; import 'constants.dart'; class CommonBottomNavigationBar extends StatefulWidget { const CommonBottomNavigationBar({super.key, required this.pages}); final List<Widget> pages; @override State<CommonBottomNavigationBar> createState() => _CommonBottomNavigationBarState(); } class _CommonBottomNavigationBarState extends State<CommonBottomNavigationBar> { int _selectedIndex = 0; void _onItemTapped(int index) { setState(() { _selectedIndex = index; }); } @override Widget build(BuildContext context) { return BottomNavigationBar( items: const <BottomNavigationBarItem>[ BottomNavigationBarItem( ic...

Taxi booking in Flutter - locationviewmodel.dart

Image
 Create a new dart file named as 'locationviewmodel.dart in lib -> viewmodels folder and paste following code. Please, support my blog by clicking on our sponsors ad! import 'package:flutter/cupertino.dart'; import 'package:myfirstproject/models/AreaSpotModel.dart'; import 'package:myfirstproject/models/locationmodel.dart'; class LocationViewModel extends ChangeNotifier { List<LocationModel> _list = []; List<LocationModel> get locationList => _list; set locationList(List<LocationModel> value) { _list = value; } void GetData() { locationList = [ LocationModel( Name: 'Mugal Garden', Img: 'https://images.hindustantimes.com/img/2022/12/03/original/fbdf0039359861ef8026921ab8fd5382_1670055785607.jpg', Distance: '25 km', Rate: '80.0', Address: '1A, Bombay Market-Punagam Rd, Krishnakunj Society, Punagam, Varachha, Surat...

Taxi Booking in Flutter - LocationModel dart file

Image
 Create a file named as 'locationmodel.dart' in lib -> models folder and paste following code: Please, support my blog by clicking on our sponsors ad! import 'package:myfirstproject/models/AreaSpotModel.dart'; class LocationModel { late final String Name; late final String Img ; late final String Distance; late final String Rate; late final String Address; late final String Spot1; late final String Spot2; LocationModel({ required this.Name,required this.Img,required this.Distance, required this.Rate, required this.Address, required this.Spot1,required this.Spot2}); } Go to Main project

Taxi booking in flutter - Location_Cart.dart

Image
 Create a file named as 'location_card.dart' in lib -> cards folder and paste following code: Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:myfirstproject/common/constants.dart'; import 'package:myfirstproject/models/locationmodel.dart'; class LocationCard extends StatelessWidget { late final LocationModel locationModel; LocationCard({required this.locationModel}); @override Widget build(BuildContext context) { return Card(elevation: 0, child: Container( width: 150,height: 180, decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: Colors.white), child: Padding( padding: const EdgeInsets.all(10), child: Column( children: [ ClipRRect(borderRadius: BorderRadius.circular(20.0), child: Image.network(location...

Taxi Booking in Flutter - AreaSpot_Card dart file

Image
 Create a file named as 'areaspot_card.dart' in lib -> cards folder and paste following code: Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:myfirstproject/models/locationmodel.dart'; import 'package:myfirstproject/common/constants.dart'; class AreaSpotCard extends StatelessWidget { late final LocationModel locationModel; AreaSpotCard({required this.locationModel}); @override Widget build(BuildContext context) { return Card(color: SecondaryColor,elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0)), child: Padding( padding: const EdgeInsets.only(top: 20.0,left: 20.0,right: 20.0,bottom: 0.0), child: Container(decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20)), child: Padding( padding: const EdgeInsets.all(...

Taxi Booking in Flutter - Dashboart.dart

Image
 Create a file named as 'Dashboard.dart' in LibFolder and paste following code: Please, support my blog by clicking on our sponsors ad! import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:myfirstproject/RideDetail.dart'; import 'package:myfirstproject/ViewModels/locationviewmodel.dart'; import 'package:myfirstproject/cards/location_card.dart'; import 'package:provider/provider.dart'; import 'common/constants.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'common/bottomnavigationbar.dart'; class Dashboard extends StatefulWidget { const Dashboard({Key? key}) : super(key: key); @override DashboardState createState() => DashboardState(); } class DashboardState extends State { final LocationViewModel locationViewModel = LocationViewModel(); @override void initState() { locationViewModel.GetData(); ...