├── .gitignore
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── codeforany
│ │ │ │ └── taxidriver
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── font
│ ├── NunitoSans-Bold.ttf
│ ├── NunitoSans-ExtraBold.ttf
│ ├── NunitoSans-Medium.ttf
│ ├── NunitoSans-Regular.ttf
│ └── NunitoSans-SemiBold.ttf
└── img
│ ├── acceptance.png
│ ├── app_logo.png
│ ├── back.png
│ ├── bank_logo.png
│ ├── call.png
│ ├── cancel_trip.png
│ ├── cancelleation.png
│ ├── car_1.png
│ ├── chat.png
│ ├── check_list.png
│ ├── check_tick.png
│ ├── close.png
│ ├── close_btn.png
│ ├── current_location.png
│ ├── doller.png
│ ├── drop_pin.png
│ ├── drop_pin_1.png
│ ├── earnings.png
│ ├── email.png
│ ├── home.png
│ ├── info.png
│ ├── language.png
│ ├── logout.png
│ ├── message.png
│ ├── more.png
│ ├── my_subscription.png
│ ├── next.png
│ ├── notification.png
│ ├── open_btn.png
│ ├── password_show.png
│ ├── phone.png
│ ├── pickup_pin.png
│ ├── pickup_pin_1.png
│ ├── question_mark.png
│ ├── rate.png
│ ├── rate_profile.png
│ ├── rate_tip.png
│ ├── ride_user_profile.png
│ ├── service.png
│ ├── setting.png
│ ├── sm_bank.png
│ ├── sm_document.png
│ ├── sm_my_vehicle.png
│ ├── sm_password.png
│ ├── sm_profile.png
│ ├── summary.png
│ ├── trips_cut.png
│ ├── u1.png
│ ├── uncheck_list.png
│ ├── user_car.png
│ ├── wallet.png
│ ├── wallet_add.png
│ ├── welcome_bg.png
│ └── withdraw.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ ├── Runner-Bridging-Header.h
│ └── Runner.entitlements
└── RunnerTests
│ └── RunnerTests.swift
├── lib
├── common
│ ├── color_extension.dart
│ ├── common_extension.dart
│ ├── db_helper.dart
│ ├── globs.dart
│ ├── location_helper.dart
│ ├── my_http_overrides.dart
│ ├── service_call.dart
│ └── socket_manager.dart
├── common_widget
│ ├── Icon_title_subtitle_button.dart
│ ├── bank_row.dart
│ ├── car_document_row.dart
│ ├── document_row.dart
│ ├── drop_down_button.dart
│ ├── icon_title_button.dart
│ ├── icon_title_cell.dart
│ ├── icon_title_row.dart
│ ├── image_picker_view.dart
│ ├── line_text_field.dart
│ ├── location_select_button.dart
│ ├── menu_row.dart
│ ├── my_car_row.dart
│ ├── plan_row.dart
│ ├── popup_layout.dart
│ ├── price_list_view.dart
│ ├── rating_row.dart
│ ├── round_button.dart
│ ├── setting_row.dart
│ ├── support_user_row.dart
│ ├── switch_row.dart
│ ├── tag_button.dart
│ ├── title_subtitle_cell.dart
│ ├── title_subtitle_row.dart
│ ├── today_summary_row.dart
│ ├── wallet_row.dart
│ └── weekly_summary_row.dart
├── cubit
│ ├── login_cubit.dart
│ └── login_state.dart
├── main.dart
├── model
│ ├── document_model.dart
│ ├── price_detail_mode.dart
│ ├── service_detail_model.dart
│ ├── zone_document_model.dart
│ └── zone_list_model.dart
└── view
│ ├── home
│ ├── driver_my_rides_view.dart
│ ├── home_view.dart
│ ├── reason_view.dart
│ ├── run_ride_view.dart
│ ├── support
│ │ ├── support_list_view.dart
│ │ └── support_message_view.dart
│ ├── tip_detail_view.dart
│ └── tip_request_view.dart
│ ├── login
│ ├── add_vehicle_view.dart
│ ├── bank_detail_view.dart
│ ├── change_language_view.dart
│ ├── document_upload_view.dart
│ ├── driver_edit_profile_view.dart
│ ├── mobile_number_view.dart
│ ├── otp_view.dart
│ ├── profile_image_view.dart
│ ├── sign_in_view.dart
│ ├── sign_up_view.dart
│ ├── splash_view.dart
│ ├── subscription_plan_view.dart
│ ├── vehicle_document_view.dart
│ └── welcome_view.dart
│ ├── menu
│ ├── add_momey_view.dart
│ ├── change_password_view.dart
│ ├── contact_us_view.dart
│ ├── earning_view.dart
│ ├── edit_profile_view.dart
│ ├── menu_view.dart
│ ├── my_car_details_view.dart
│ ├── my_profile_view.dart
│ ├── my_vehicle_view.dart
│ ├── ratings_view.dart
│ ├── service_type_view.dart
│ ├── settings_view.dart
│ ├── summary_view.dart
│ └── wallet_view.dart
│ └── user
│ ├── car_service_select_view.dart
│ ├── user_home_view.dart
│ ├── user_my_rides_view.dart
│ └── user_run_ride_view.dart
├── pubspec.lock
└── pubspec.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Complete Taxi App Development in Flutter
2 |
3 | 🚖 Join us on a journey to create a full-featured Taxi App! In this comprehensive tutorial, we'll guide you through building a Taxi App from scratch, using both Flutter for cross-platform mobile development and SwiftUI for native iOS. We'll also set up the backend using Angular Material and Node.js Express.js REST APIs. Get ready to learn the entire app development process!
4 |
5 | 🔥 Key Highlights:
6 |
7 | - Flutter & SwiftUI: Create a cross-platform and native iOS version of the Taxi App.
8 | - Angular Material Backend: Set up the server-side logic and user interface with Angular Material.
9 | - Node.js Express.js REST API: Develop robust and efficient APIs to power your Taxi App.
10 |
11 | 📊 App Features Covered:
12 |
13 | - User Registration & Authentication
14 | - Real-time Location Tracking
15 | - Ride Booking & Management
16 | - Cash Payment Processing
17 | - Driver Matching & Ratings
18 | - Customer Support & Notifications
19 |
20 | 📢 Like, Share, and Subscribe:
21 |
22 | If you find this tutorial valuable, show your support by liking, sharing it with fellow developers, and subscribing to our channel. Join our community of developers and master the art of creating complex, real-world apps!
23 |
24 | UI UX App Design by: Zikar Patel
25 | https://www.behance.net/patelzikar?ref=uistore.design
26 |
27 | #FlutterDevelopment #SwiftUIDevelopment #TaxiApp #AngularMaterialBackend #NodejsExpressAPI #CompleteAppDevelopment #MobileAppDevelopment #CrossPlatformApp #iOSAppDevelopment #FlutterVsSwiftUI #BackendDevelopment #RESTAPI #RealTimeTracking #PaymentProcessing #RideBooking #LocationTracking #AppDesign #AppTutorial #FullStackDevelopment #DeveloperCommunity #CodingTutorial #AppDevelopmentTutorial #MobileApp #ProgrammingTutorial
28 |
29 |
30 | # codeforany @codeforany
31 |
32 | - [Youtube Full Playlist:Complete Taxi App Development in Flutter with Angular Material Backend | Node.js Express.js REST API Playlist](https://www.youtube.com/playlist?list=PLzcRC7PA0xWQ-hxjfD8gMFy7ciFWSIl-G)
33 | - [Youtube Channel: @codeforany](https://www.youtube.com/channel/UCdQTp9wRK5vAOlEQZf9PHSg)
34 | - [Youtube Channel Subscribe: @codeforany](https://www.youtube.com/channel/UCdQTp9wRK5vAOlEQZf9PHSg?sub_confirmation=1)
35 |
36 |
37 | A new Flutter project.
38 |
39 | ## Getting Started
40 |
41 | This project is a starting point for a Flutter application.
42 |
43 | A few resources to get you started if this is your first Flutter project:
44 |
45 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
46 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
47 |
48 | For help getting started with Flutter development, view the
49 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
50 | samples, guidance on mobile development, and a full API reference.
51 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | id "com.google.gms.google-services"
6 | }
7 |
8 | def localProperties = new Properties()
9 | def localPropertiesFile = rootProject.file('local.properties')
10 | if (localPropertiesFile.exists()) {
11 | localPropertiesFile.withReader('UTF-8') { reader ->
12 | localProperties.load(reader)
13 | }
14 | }
15 |
16 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
17 | if (flutterVersionCode == null) {
18 | flutterVersionCode = '1'
19 | }
20 |
21 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
22 | if (flutterVersionName == null) {
23 | flutterVersionName = '1.0'
24 | }
25 |
26 | android {
27 | namespace "com.codeforany.taxidriver"
28 | compileSdkVersion 34
29 | ndkVersion flutter.ndkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 |
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | defaultConfig {
45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46 | applicationId "com.codeforany.taxidriver"
47 | // You can update the following values to match your application needs.
48 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
49 | minSdkVersion 23
50 | targetSdkVersion flutter.targetSdkVersion
51 | versionCode flutterVersionCode.toInteger()
52 | versionName flutterVersionName
53 | multiDexEnabled true
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {}
70 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "442094658019",
4 | "project_id": "codeforany-80c1e",
5 | "storage_bucket": "codeforany-80c1e.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:442094658019:android:9cb0b5b052bdb3f9fd00d6",
11 | "android_client_info": {
12 | "package_name": "com.codeforany.push_notification_demo"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyAfcYBkks0IHg0bZ3PxSWaydBdGJ7qZq_Q"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
31 | "client_type": 3
32 | },
33 | {
34 | "client_id": "442094658019-2iu8tv96jmspf3je6c8r6l1i3m63preo.apps.googleusercontent.com",
35 | "client_type": 2,
36 | "ios_info": {
37 | "bundle_id": "com.codeforany.pushNotificationDemo"
38 | }
39 | }
40 | ]
41 | }
42 | }
43 | },
44 | {
45 | "client_info": {
46 | "mobilesdk_app_id": "1:442094658019:android:518a130eb1bba54efd00d6",
47 | "android_client_info": {
48 | "package_name": "com.codeforany.socket_io_demo"
49 | }
50 | },
51 | "oauth_client": [
52 | {
53 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
54 | "client_type": 3
55 | }
56 | ],
57 | "api_key": [
58 | {
59 | "current_key": "AIzaSyAfcYBkks0IHg0bZ3PxSWaydBdGJ7qZq_Q"
60 | }
61 | ],
62 | "services": {
63 | "appinvite_service": {
64 | "other_platform_oauth_client": [
65 | {
66 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
67 | "client_type": 3
68 | },
69 | {
70 | "client_id": "442094658019-2iu8tv96jmspf3je6c8r6l1i3m63preo.apps.googleusercontent.com",
71 | "client_type": 2,
72 | "ios_info": {
73 | "bundle_id": "com.codeforany.pushNotificationDemo"
74 | }
75 | }
76 | ]
77 | }
78 | }
79 | },
80 | {
81 | "client_info": {
82 | "mobilesdk_app_id": "1:442094658019:android:70109d59f12db630fd00d6",
83 | "android_client_info": {
84 | "package_name": "com.codeforany.taxidriver"
85 | }
86 | },
87 | "oauth_client": [
88 | {
89 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
90 | "client_type": 3
91 | }
92 | ],
93 | "api_key": [
94 | {
95 | "current_key": "AIzaSyAfcYBkks0IHg0bZ3PxSWaydBdGJ7qZq_Q"
96 | }
97 | ],
98 | "services": {
99 | "appinvite_service": {
100 | "other_platform_oauth_client": [
101 | {
102 | "client_id": "442094658019-7j17subch89hif2e5bj3b82r46a1s9tb.apps.googleusercontent.com",
103 | "client_type": 3
104 | },
105 | {
106 | "client_id": "442094658019-2iu8tv96jmspf3je6c8r6l1i3m63preo.apps.googleusercontent.com",
107 | "client_type": 2,
108 | "ios_info": {
109 | "bundle_id": "com.codeforany.pushNotificationDemo"
110 | }
111 | }
112 | ]
113 | }
114 | }
115 | }
116 | ],
117 | "configuration_version": "1"
118 | }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
26 |
30 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/codeforany/taxidriver/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.codeforany.taxidriver
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.8.22'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.15'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | tasks.register("clean", Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | plugins {
14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15 | }
16 | }
17 |
18 | include ":app"
19 |
20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
21 |
--------------------------------------------------------------------------------
/assets/font/NunitoSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/font/NunitoSans-Bold.ttf
--------------------------------------------------------------------------------
/assets/font/NunitoSans-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/font/NunitoSans-ExtraBold.ttf
--------------------------------------------------------------------------------
/assets/font/NunitoSans-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/font/NunitoSans-Medium.ttf
--------------------------------------------------------------------------------
/assets/font/NunitoSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/font/NunitoSans-Regular.ttf
--------------------------------------------------------------------------------
/assets/font/NunitoSans-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/font/NunitoSans-SemiBold.ttf
--------------------------------------------------------------------------------
/assets/img/acceptance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/acceptance.png
--------------------------------------------------------------------------------
/assets/img/app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/app_logo.png
--------------------------------------------------------------------------------
/assets/img/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/back.png
--------------------------------------------------------------------------------
/assets/img/bank_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/bank_logo.png
--------------------------------------------------------------------------------
/assets/img/call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/call.png
--------------------------------------------------------------------------------
/assets/img/cancel_trip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/cancel_trip.png
--------------------------------------------------------------------------------
/assets/img/cancelleation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/cancelleation.png
--------------------------------------------------------------------------------
/assets/img/car_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/car_1.png
--------------------------------------------------------------------------------
/assets/img/chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/chat.png
--------------------------------------------------------------------------------
/assets/img/check_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/check_list.png
--------------------------------------------------------------------------------
/assets/img/check_tick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/check_tick.png
--------------------------------------------------------------------------------
/assets/img/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/close.png
--------------------------------------------------------------------------------
/assets/img/close_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/close_btn.png
--------------------------------------------------------------------------------
/assets/img/current_location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/current_location.png
--------------------------------------------------------------------------------
/assets/img/doller.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/doller.png
--------------------------------------------------------------------------------
/assets/img/drop_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/drop_pin.png
--------------------------------------------------------------------------------
/assets/img/drop_pin_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/drop_pin_1.png
--------------------------------------------------------------------------------
/assets/img/earnings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/earnings.png
--------------------------------------------------------------------------------
/assets/img/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/email.png
--------------------------------------------------------------------------------
/assets/img/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/home.png
--------------------------------------------------------------------------------
/assets/img/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/info.png
--------------------------------------------------------------------------------
/assets/img/language.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/language.png
--------------------------------------------------------------------------------
/assets/img/logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/logout.png
--------------------------------------------------------------------------------
/assets/img/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/message.png
--------------------------------------------------------------------------------
/assets/img/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/more.png
--------------------------------------------------------------------------------
/assets/img/my_subscription.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/my_subscription.png
--------------------------------------------------------------------------------
/assets/img/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/next.png
--------------------------------------------------------------------------------
/assets/img/notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/notification.png
--------------------------------------------------------------------------------
/assets/img/open_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/open_btn.png
--------------------------------------------------------------------------------
/assets/img/password_show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/password_show.png
--------------------------------------------------------------------------------
/assets/img/phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/phone.png
--------------------------------------------------------------------------------
/assets/img/pickup_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/pickup_pin.png
--------------------------------------------------------------------------------
/assets/img/pickup_pin_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/pickup_pin_1.png
--------------------------------------------------------------------------------
/assets/img/question_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/question_mark.png
--------------------------------------------------------------------------------
/assets/img/rate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/rate.png
--------------------------------------------------------------------------------
/assets/img/rate_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/rate_profile.png
--------------------------------------------------------------------------------
/assets/img/rate_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/rate_tip.png
--------------------------------------------------------------------------------
/assets/img/ride_user_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/ride_user_profile.png
--------------------------------------------------------------------------------
/assets/img/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/service.png
--------------------------------------------------------------------------------
/assets/img/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/setting.png
--------------------------------------------------------------------------------
/assets/img/sm_bank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/sm_bank.png
--------------------------------------------------------------------------------
/assets/img/sm_document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/sm_document.png
--------------------------------------------------------------------------------
/assets/img/sm_my_vehicle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/sm_my_vehicle.png
--------------------------------------------------------------------------------
/assets/img/sm_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/sm_password.png
--------------------------------------------------------------------------------
/assets/img/sm_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/sm_profile.png
--------------------------------------------------------------------------------
/assets/img/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/summary.png
--------------------------------------------------------------------------------
/assets/img/trips_cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/trips_cut.png
--------------------------------------------------------------------------------
/assets/img/u1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/u1.png
--------------------------------------------------------------------------------
/assets/img/uncheck_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/uncheck_list.png
--------------------------------------------------------------------------------
/assets/img/user_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/user_car.png
--------------------------------------------------------------------------------
/assets/img/wallet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/wallet.png
--------------------------------------------------------------------------------
/assets/img/wallet_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/wallet_add.png
--------------------------------------------------------------------------------
/assets/img/welcome_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/welcome_bg.png
--------------------------------------------------------------------------------
/assets/img/withdraw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/assets/img/withdraw.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codeforany/taxi_driver_flutter/18a4f37be11b8f7ae06fd95d78e14b95a683f5b3/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 442094658019-66cpgrerbteo37buvommsjre4ccgv2u0.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.442094658019-66cpgrerbteo37buvommsjre4ccgv2u0
9 | ANDROID_CLIENT_ID
10 | 442094658019-4fc0pj5b3l5gb5pur4bu5qns3ok7eppb.apps.googleusercontent.com
11 | API_KEY
12 | AIzaSyAkyw8Fto-HFwouIepDQu1fzSy-D3oNW7g
13 | GCM_SENDER_ID
14 | 442094658019
15 | PLIST_VERSION
16 | 1
17 | BUNDLE_ID
18 | com.codeforany.taxidriver
19 | PROJECT_ID
20 | codeforany-80c1e
21 | STORAGE_BUCKET
22 | codeforany-80c1e.appspot.com
23 | IS_ADS_ENABLED
24 |
25 | IS_ANALYTICS_ENABLED
26 |
27 | IS_APPINVITE_ENABLED
28 |
29 | IS_GCM_ENABLED
30 |
31 | IS_SIGNIN_ENABLED
32 |
33 | GOOGLE_APP_ID
34 | 1:442094658019:ios:ee1147875691818afd00d6
35 |
36 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Taxi Driver
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | taxi_driver
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleURLTypes
26 |
27 |
28 | CFBundleTypeRole
29 | Editor
30 | CFBundleURLSchemes
31 |
32 | com.googleusercontent.apps.442094658019-66cpgrerbteo37buvommsjre4ccgv2u0
33 |
34 |
35 |
36 | CFBundleVersion
37 | $(FLUTTER_BUILD_NUMBER)
38 | LSRequiresIPhoneOS
39 |
40 | NSCameraUsageDescription
41 | This app needs camera access to get profile image
42 | NSLocationAlwaysUsageDescription
43 | Please allow location for current location get on map
44 | NSLocationWhenInUseUsageDescription
45 | Please allow location for current location get on map
46 | NSPhotoLibraryUsageDescription
47 | This app needs photos access to get profile image from photo library
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 | UIBackgroundModes
51 |
52 | fetch
53 | location
54 | remote-notification
55 |
56 | UILaunchStoryboardName
57 | LaunchScreen
58 | UIMainStoryboardFile
59 | Main
60 | UISupportedInterfaceOrientations
61 |
62 | UIInterfaceOrientationPortrait
63 | UIInterfaceOrientationLandscapeLeft
64 | UIInterfaceOrientationLandscapeRight
65 |
66 | UISupportedInterfaceOrientations~ipad
67 |
68 | UIInterfaceOrientationPortrait
69 | UIInterfaceOrientationPortraitUpsideDown
70 | UIInterfaceOrientationLandscapeLeft
71 | UIInterfaceOrientationLandscapeRight
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/common/color_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TColor {
4 | static Color get primary => const Color(0xff3DB24B);
5 | static Color get secondary => const Color(0xff3369FF);
6 |
7 | static Color get primaryText => const Color(0xff282F39);
8 | static Color get primaryTextW => const Color(0xffFFFFFF);
9 | static Color get secondaryText => const Color(0xff7F7F7F);
10 | static Color get placeholder => const Color(0xffBBBBBB);
11 | static Color get lightGray => const Color(0xffDADEE3);
12 | static Color get lightWhite => const Color(0xffF2F5F7);
13 |
14 | static Color get red => const Color(0xffF4586C);
15 |
16 | static Color get bg => Colors.white;
17 | }
18 |
19 | extension HexColor on Color {
20 | /// String is in the format "aabbcc" or "ffaabbcc" with an optional leading "#".
21 | static Color fromHex(String hexString) {
22 | final buffer = StringBuffer();
23 | if (hexString.length == 6 || hexString.length == 7) buffer.write('ff');
24 | buffer.write(hexString.replaceFirst('#', ''));
25 | return Color(int.parse(buffer.toString(), radix: 16));
26 | }
27 |
28 | /// Prefixes a hash sign if [leadingHashSign] is set to `true` (default is `true`).
29 | String toHex({bool leadingHashSign = true}) => '${leadingHashSign ? '#' : ''}'
30 | '${alpha.toRadixString(16).padLeft(2, '0')}'
31 | '${red.toRadixString(16).padLeft(2, '0')}'
32 | '${green.toRadixString(16).padLeft(2, '0')}'
33 | '${blue.toRadixString(16).padLeft(2, '0')}';
34 | }
35 |
36 | extension AppContext on BuildContext {
37 | Size get size => MediaQuery.sizeOf(this);
38 | double get width => size.width;
39 | double get height => size.height;
40 |
41 | Future push(Widget widget) async {
42 | return Navigator.push(
43 | this,
44 | MaterialPageRoute(
45 | builder: (context) => widget,
46 | ),
47 | );
48 | }
49 |
50 | void pop() async {
51 | return Navigator.pop(this);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/common/common_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:intl/intl.dart';
4 | import 'package:timeago/timeago.dart' as timeago;
5 |
6 | extension MDExtensionState on State {
7 | void mdShowAlert(String title, String message, VoidCallback onPressed,
8 | {String buttonTitle = "Ok",
9 | TextAlign mainAxisAlignment = TextAlign.center, isForce = false }) {
10 | showDialog(
11 | context: context,
12 | barrierDismissible: !isForce,
13 | builder: (context) => CupertinoAlertDialog(
14 | title: Text(title),
15 | content: Text(message),
16 | actions: [
17 | CupertinoDialogAction(
18 | child: Text(buttonTitle),
19 | isDefaultAction: true,
20 | onPressed: () {
21 | Navigator.pop(context);
22 | onPressed();
23 | },
24 | )
25 | ],
26 | ));
27 | }
28 |
29 | void endEditing() {
30 | FocusScope.of(context).requestFocus(FocusNode());
31 | }
32 | }
33 |
34 | extension StringExtension on String {
35 | bool get isEmail {
36 | return RegExp(
37 | r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
38 | .hasMatch(this);
39 | }
40 |
41 | DateTime dataFormat(
42 | {String format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", int addMin = 0}) {
43 | var date = (DateFormat(format).parseUTC(this));
44 | return date.add(Duration(minutes: addMin));
45 | }
46 |
47 | String timeAgo() {
48 | if (this == "") {
49 | return "";
50 | }
51 |
52 | return timeago.format(dataFormat());
53 | }
54 |
55 |
56 | String stringFormatToOtherFormat({
57 | String format = "yyyy-MM-dd",
58 | String newFormat = 'dd/MM/yyyy',
59 | int addMin = 0
60 | }) {
61 | try {
62 | var date = DateFormat(format).parse(this);
63 | if(date == null) {
64 | return "";
65 | }
66 |
67 | return date.add(Duration(minutes: addMin)).stringFormat(format: newFormat);
68 | } catch (e) {
69 |
70 | return "";
71 | }
72 | }
73 |
74 | DateTime get date {
75 | return DateFormat('yyyy/MM/dd').parse(this);
76 | }
77 |
78 | DateTime get dateTime {
79 | return DateFormat('yyyy/MM/dd HH:mm').parse(this);
80 | }
81 |
82 | }
83 |
84 | extension DateTimeExtension on DateTime {
85 | String stringFormat({String format = "yyyy-MM-dd"}) {
86 | return DateFormat(format).format(this);
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/lib/common/db_helper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:sqflite/sqflite.dart';
3 | import 'package:path/path.dart';
4 |
5 | class DBHelper {
6 | static final DBHelper singleton = DBHelper.internal();
7 | factory DBHelper() => singleton;
8 | static Database? _db;
9 | DBHelper.internal();
10 | static DBHelper shared() => singleton;
11 |
12 | static const String tbZoneList = 'zone_list';
13 | static const String tbServiceDetail = 'service_detail';
14 | static const String tbPriceDetail = 'price_detail';
15 | static const String tbDocument = 'document';
16 | static const String tbZoneDocument = 'zone_detail';
17 |
18 | static const String zoneId = "zone_id";
19 | static const String zoneName = "zone_name";
20 | static const String zoneJson = "zone_json";
21 | static const String city = "city";
22 | static const String tax = "tax";
23 | static const String status = "status";
24 | static const String createdDate = "created_date";
25 | static const String modifyDate = "modify_date";
26 |
27 | static const String serviceId = "service_id";
28 | static const String serviceName = "service_name";
29 | static const String seat = "seat";
30 | static const String color = "color";
31 | static const String icon = "icon";
32 | static const String topIcon = "top_icon";
33 | static const String gender = "gender";
34 | static const String description = "description";
35 |
36 | static const String priceId = "price_id";
37 | static const String baseCharge = "base_charge";
38 | static const String perKmCharge = "per_km_charge";
39 | static const String perMinCharge = "per_min_charge";
40 | static const String bookingCharge = "booking_charge";
41 | static const String miniFair = "mini_fair";
42 | static const String miniKm = "mini_km";
43 | static const String cancelCharge = "cancel_charge";
44 |
45 | static const String docId = "doc_id";
46 | static const String name = "name";
47 | static const String type = "type";
48 |
49 | static const String zoneDocId = "zone_doc_id";
50 | static const String personalDoc = "personal_doc";
51 | static const String carDoc = "car_doc";
52 | static const String requiredPersonalDoc = "required_personal_doc";
53 | static const String requiredCarDoc = "required_car_doc";
54 |
55 | Future get db async {
56 | if (_db != null) {
57 | return _db;
58 | }
59 | _db = await initDB();
60 |
61 | return _db;
62 | }
63 |
64 | initDB() async {
65 | String databasePath = await getDatabasesPath();
66 | String path = join(databasePath, 'data.db');
67 | var isDBExists = await databaseExists(path);
68 | if (kDebugMode) {
69 | print(isDBExists);
70 | print(path);
71 | }
72 | return await openDatabase(path, version: 1, onCreate: onCreate);
73 | }
74 |
75 | void onCreate(Database db, int newVersion) async {
76 |
77 |
78 | await db.execute(
79 | 'CREATE TABLE $tbZoneList ($zoneId TEXT PRIMARY KEY, $zoneName TEXT, $zoneJson TEXT, $city TEXT, $tax TEXT, $status Text, $createdDate Text, $modifyDate Text)');
80 |
81 | await db.execute(
82 | 'CREATE TABLE $tbServiceDetail ($serviceId TEXT PRIMARY KEY, $serviceName TEXT, $seat TEXT, $color TEXT, $icon TEXT, $topIcon TEXT, $gender TEXT, $description TEXT, $status TEXT, $createdDate TEXT, $modifyDate TEXT)');
83 |
84 | await db.execute(
85 | 'CREATE TABLE $tbPriceDetail ($priceId TEXT PRIMARY KEY, $zoneId TEXT, $serviceId TEXT, $baseCharge TEXT, $perKmCharge TEXT, $perMinCharge TEXT,$bookingCharge TEXT,$miniFair TEXT,$miniKm TEXT,$cancelCharge TEXT, $tax TEXT, $status TEXT, $createdDate TEXT, $modifyDate TEXT)');
86 |
87 | await db.execute(
88 | 'CREATE TABLE $tbDocument ($docId TEXT PRIMARY KEY, $name TEXT, $type TEXT,$status TEXT, $createdDate TEXT, $modifyDate TEXT)');
89 |
90 | await db.execute(
91 | 'CREATE TABLE $tbZoneDocument ($zoneDocId TEXT PRIMARY KEY, $zoneId TEXT, $serviceId TEXT, $personalDoc TEXT, $carDoc TEXT, $requiredPersonalDoc TEXT, $requiredCarDoc TEXT, $status TEXT, $createdDate TEXT, $modifyDate TEXT)');
92 |
93 | debugPrint("db create table");
94 | }
95 |
96 | static Future dbClearAll() async {
97 | if(_db == null) {
98 | return;
99 | }
100 |
101 | await _db?.execute('DELETE FROM $tbZoneList');
102 | await _db?.execute('DELETE FROM $tbServiceDetail');
103 | await _db?.execute('DELETE FROM $tbPriceDetail');
104 | await _db?.execute('DELETE FROM $tbDocument');
105 | await _db?.execute('DELETE FROM $tbZoneDocument');
106 | }
107 |
108 | static Future dbClearTable(String table) async {
109 | if (_db == null) {
110 | return;
111 | }
112 |
113 | await _db?.execute('DELETE FROM $table');
114 | }
115 |
116 | Future close() async {
117 | var dbClient = await db;
118 | return dbClient?.close();
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/lib/common/globs.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'dart:convert';
3 |
4 | import 'package:flutter_easyloading/flutter_easyloading.dart';
5 | import 'package:flutter_timezone/flutter_timezone.dart';
6 | import 'package:taxi_driver/main.dart';
7 |
8 | class Globs {
9 | static const appName = "Taxi Driver";
10 |
11 | static const userPayload = "user_payload";
12 | static const userLogin = "user_login";
13 |
14 | static void showHUD({String status = "loading ...."}) async {
15 | await Future.delayed(const Duration(milliseconds: 1));
16 | EasyLoading.show(status: status);
17 | }
18 |
19 | static void hideHUD(){
20 | EasyLoading.dismiss();
21 | }
22 |
23 | static void udSet(dynamic data, String key) {
24 | var jsonStr = json.encode(data);
25 | prefs?.setString(key, jsonStr);
26 | }
27 |
28 | static void udStringSet(String data, String key) {
29 | prefs?.setString(key, data);
30 | }
31 |
32 | static void udBoolSet(bool data, String key) {
33 | prefs?.setBool(key, data);
34 | }
35 |
36 | static void udIntSet(int data, String key) {
37 | prefs?.setInt(key, data);
38 | }
39 |
40 | static void udDoubleSet(double data, String key) {
41 | prefs?.setDouble(key, data);
42 | }
43 |
44 | static dynamic udValue(String key) {
45 | return json.decode(prefs?.get(key) as String? ?? "{}" );
46 | }
47 |
48 | static String udValueString(String key) {
49 | return prefs?.getString(key) ?? "";
50 | }
51 |
52 | static bool udValueBool(String key) {
53 | return prefs?.getBool(key) ?? false;
54 | }
55 | static bool udValueTrueBool(String key) {
56 | return prefs?.getBool(key) ?? true;
57 | }
58 |
59 | static int udValueInt(String key) {
60 | return prefs?.getInt(key) ?? 0;
61 | }
62 |
63 | static double udValueDouble(String key) {
64 | return prefs?.getDouble(key) ?? 0.0;
65 | }
66 |
67 | static void udRemove(String key) {
68 | prefs?.remove(key);
69 | }
70 |
71 | static Future timeZone() async {
72 | try {
73 | return await FlutterTimezone.getLocalTimezone();
74 | } catch (e) {
75 | return "";
76 | }
77 | }
78 |
79 | }
80 |
81 | class SVKey {
82 | static const mainUrl = "http://localhost:3001";
83 | static const baseUrl ='$mainUrl/api/';
84 | static const nodeUrl = mainUrl;
85 |
86 | static const svLogin = "${baseUrl}login";
87 | static const svProfileImageUpload = "${baseUrl}profile_image";
88 | static const svServiceAndZoneList = "${baseUrl}service_and_zone_list";
89 | static const svProfileUpdate = "${baseUrl}profile_update";
90 |
91 | static const svBankDetail = "${baseUrl}bank_detail";
92 | static const svDriverBankDetailUpdate = "${baseUrl}driver_bank_update";
93 |
94 | static const svBrandList = "${baseUrl}brand_list";
95 | static const svModelList = "${baseUrl}model_list";
96 | static const svSeriesList = "${baseUrl}series_list";
97 | static const svAddCar = "${baseUrl}add_car";
98 | static const svCarList = "${baseUrl}car_list";
99 |
100 | static const svDeleteCar = "${baseUrl}car_delete";
101 | static const svSetRunningCar = "${baseUrl}set_running_car";
102 |
103 | static const svSupportList = "${baseUrl}support_user_list";
104 | static const svSupportConnect = "${baseUrl}support_connect";
105 | static const svSupportSendMessage = "${baseUrl}support_message";
106 | static const svSupportClear = "${baseUrl}support_clear";
107 |
108 | static const svStaticData = "${baseUrl}static_data";
109 |
110 | static const svBookingRequest = "${baseUrl}booking_request";
111 | static const svUpdateLocationDriver = "${baseUrl}update_location";
112 | static const svDriverGoOnline = "${baseUrl}driver_online";
113 |
114 | static const svDriverRideAccept = "${baseUrl}ride_request_accept";
115 | static const svDriverRideDecline = "${baseUrl}ride_request_decline";
116 |
117 | static const svHome = "${baseUrl}home";
118 | static const svDriverWaitUser = "${baseUrl}driver_wait_user";
119 | static const svRideStart = "${baseUrl}ride_start";
120 | static const svRideStop = "${baseUrl}ride_stop";
121 | static const svRideCancel = "${baseUrl}driver_cancel_ride";
122 | static const svUserRideCancel = "${baseUrl}user_cancel_ride";
123 |
124 | static const svUserAllRides = "${baseUrl}user_all_ride_list";
125 | static const svDriverAllRides = "${baseUrl}driver_all_ride_list";
126 |
127 | static const svRideRating = "${baseUrl}ride_rating";
128 | static const svBookingDetail = "${baseUrl}booking_detail";
129 |
130 | static const svDriverSummary = "${baseUrl}driver_summary";
131 |
132 | static const svPersonalDocumentList = "${baseUrl}personal_document_list";
133 | static const svDriverUploadDocument = "${baseUrl}driver_update_document";
134 | static const svCarDocumentList = "${baseUrl}car_document_list";
135 |
136 | static const svChangePassword = "${baseUrl}change_password";
137 | static const svContactUs = "${baseUrl}contact_us";
138 |
139 | }
140 |
141 | class KKey {
142 | static const payload = "payload";
143 | static const status = "status";
144 | static const message = "message";
145 |
146 | static const authToken = "auth_token";
147 | }
148 |
149 | class MSG {
150 | static const success = "success";
151 | static const fail = "fail";
152 | }
--------------------------------------------------------------------------------
/lib/common/my_http_overrides.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | class MyHttpOverrides extends HttpOverrides {
4 | @override
5 | HttpClient createHttpClient(SecurityContext? context){
6 | return super.createHttpClient(context)
7 | ..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
8 | }
9 | }
--------------------------------------------------------------------------------
/lib/common/socket_manager.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/foundation.dart';
4 | import 'package:socket_io_client/socket_io_client.dart' as IO;
5 | import 'package:taxi_driver/common/globs.dart';
6 | import 'package:taxi_driver/common/service_call.dart';
7 |
8 | class SocketManager {
9 | static final SocketManager sigleton = SocketManager._internal();
10 | SocketManager._internal();
11 | IO.Socket? socket;
12 | static SocketManager get shared => sigleton;
13 |
14 | void initSocket() {
15 | socket = IO.io(SVKey.mainUrl, {
16 | "transports": ['websocket'],
17 | "autoConnect": true
18 | });
19 |
20 | socket?.on("connect", (data) {
21 | if (kDebugMode) {
22 | print("Socket Connect Done");
23 | }
24 |
25 | //Emit Method
26 |
27 | if(Globs.udValueBool(Globs.userLogin)) {
28 | updateSocketIdApi();
29 | }
30 | });
31 |
32 | socket?.on("connect_error", (data) {
33 | if (kDebugMode) {
34 | print("Socket Connect Error");
35 | print(data);
36 | }
37 | });
38 |
39 | socket?.on("error", (data) {
40 | if (kDebugMode) {
41 | print("Socket Error");
42 | print(data);
43 | }
44 | });
45 |
46 | socket?.on("disconnect", (data) {
47 | if (kDebugMode) {
48 | print("Socket disconnect");
49 | print(data);
50 | }
51 | });
52 |
53 | // Out Socket Emit Listener
54 |
55 | socket?.on("UpdateSocket", (data) {
56 | print(" UpdateSocket : ---------------- ");
57 | print(data);
58 | });
59 | }
60 |
61 | Future updateSocketIdApi() async {
62 | try {
63 | socket?.emit("UpdateSocket", jsonEncode( {'access_token' : ServiceCall.userObj["auth_token"].toString()} ));
64 | } catch (e) {
65 | if(kDebugMode) {
66 | print(e.toString());
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/common_widget/Icon_title_subtitle_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../common/color_extension.dart';
4 |
5 | class IconTitleSubtitleButton extends StatelessWidget {
6 | final String title;
7 | final String subtitle;
8 | final String icon;
9 | final VoidCallback onPressed;
10 |
11 | const IconTitleSubtitleButton(
12 | {super.key,
13 | required this.title,
14 | required this.subtitle,
15 | required this.icon,
16 | required this.onPressed});
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return InkWell(
21 | onTap: onPressed,
22 | child: Column(
23 | children: [
24 | Image.asset(
25 | icon,
26 | width: 20,
27 | height: 20,
28 | ),
29 | const SizedBox(
30 | height: 8,
31 | ),
32 | Text(
33 | title,
34 | style: TextStyle(
35 | color: TColor.primaryText,
36 | fontSize: 18,
37 | fontWeight: FontWeight.w800),
38 | ),
39 | Text(
40 | subtitle,
41 | style: TextStyle(
42 | color: TColor.secondaryText,
43 | fontSize: 16,
44 | ),
45 | ),
46 | ],
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/common_widget/bank_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class BankRow extends StatelessWidget {
5 | final Map bObj;
6 | const BankRow({super.key, required this.bObj});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Padding(
11 | padding: const EdgeInsets.symmetric(vertical: 10),
12 | child: Row(
13 | crossAxisAlignment: CrossAxisAlignment.center,
14 | children: [
15 | Image.asset(
16 | bObj["icon"],
17 | width: 50,
18 | height: 50,
19 | ),
20 | const SizedBox(
21 | width: 8,
22 | ),
23 | Expanded(
24 | child: Column(
25 |
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | Text(
29 | bObj["name"],
30 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
31 | ),
32 | Text(
33 | bObj["number"],
34 | style: TextStyle(color: TColor.secondaryText, fontSize: 14),
35 | ),
36 | ],
37 | ),
38 | ),
39 | ],
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/common_widget/car_document_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class CarDocumentRow extends StatelessWidget {
5 | final String title;
6 | final String date;
7 | final String status;
8 | final Color statusColor;
9 |
10 | final VoidCallback onPressed;
11 |
12 | const CarDocumentRow({
13 | super.key,
14 | required this.title,
15 | required this.date,
16 | required this.status,
17 | required this.statusColor,
18 | required this.onPressed,
19 | });
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Container(
24 | padding: const EdgeInsets.symmetric(horizontal: 25),
25 | child: InkWell(
26 | onTap: onPressed,
27 | child: Column(
28 | crossAxisAlignment: CrossAxisAlignment.start,
29 | children: [
30 | const SizedBox(
31 | height: 20,
32 | ),
33 | Row(
34 | children: [
35 | Expanded(
36 | child: Text(
37 | title,
38 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
39 | ),
40 | ),
41 | Container(
42 | padding:
43 | const EdgeInsets.symmetric(vertical: 4, horizontal: 10),
44 | decoration: BoxDecoration(
45 | color: statusColor.withOpacity(0.1),
46 | borderRadius: BorderRadius.circular(5),
47 | border: Border.all(color: statusColor, width: 0.5)),
48 | child: Text(
49 | status,
50 | style: TextStyle(
51 | color: statusColor,
52 | fontSize: 10,
53 | fontWeight: FontWeight.w600,
54 | ),
55 | ),
56 | )
57 | ],
58 | ),
59 | const SizedBox(
60 | height: 6,
61 | ),
62 | Text(
63 | date,
64 | style: TextStyle(color: TColor.secondaryText, fontSize: 15),
65 | ),
66 | const SizedBox(
67 | height: 20,
68 | ),
69 | const Divider(
70 | height: 1,
71 | )
72 | ],
73 | ),
74 | ),
75 | );
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/lib/common_widget/document_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class DocumentRow extends StatelessWidget {
5 | final Map dObj;
6 | final VoidCallback onPressed;
7 | final VoidCallback onInfo;
8 | final VoidCallback onUpload;
9 | final VoidCallback onAction;
10 |
11 | const DocumentRow(
12 | {super.key,
13 | required this.dObj,
14 | required this.onPressed,
15 | required this.onInfo,
16 | required this.onUpload,
17 | required this.onAction});
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | var status = dObj["status"] as int? ?? -1;
22 |
23 | return InkWell(
24 | onTap: onPressed,
25 | child: Column(
26 | children: [
27 | Padding(
28 | padding: const EdgeInsets.symmetric(vertical: 10),
29 | child: Row(
30 | children: [
31 | Expanded(
32 | child: Column(
33 | mainAxisSize: MainAxisSize.min,
34 | crossAxisAlignment: CrossAxisAlignment.start,
35 | children: [
36 | Row(
37 | mainAxisAlignment: MainAxisAlignment.start,
38 | children: [
39 | Text(
40 | dObj["name"] as String? ?? "",
41 | style: TextStyle(
42 | color: TColor.primaryText,
43 | fontSize: 16,
44 | ),
45 | ),
46 | const SizedBox(
47 | width: 8,
48 | ),
49 | InkWell(
50 | onTap: onInfo,
51 | child: Image.asset(
52 | "assets/img/info.png",
53 | width: 15,
54 | height: 15,
55 | ),
56 | )
57 | ],
58 | ),
59 | // const SizedBox(
60 | // height: 4,
61 | // ),
62 | // Text(
63 | // dObj["detail"] as String? ?? "",
64 | // style: TextStyle(
65 | // color: TColor.secondaryText,
66 | // fontSize: 15,
67 | // ),
68 | // ),
69 | ],
70 | ),
71 | ),
72 | if (status == 2)
73 | Row(
74 | mainAxisSize: MainAxisSize.min,
75 | children: [
76 | Image.asset(
77 | "assets/img/check_tick.png",
78 | width: 20,
79 | height: 20,
80 | ),
81 | InkWell(
82 | onTap: onAction,
83 | child: Image.asset(
84 | "assets/img/more.png",
85 | width: 20,
86 | height: 20,
87 | ),
88 | )
89 | ],
90 | )
91 | else if (status == -1)
92 | TextButton(
93 | onPressed: onUpload,
94 | child: Text(
95 | "UPLOAD",
96 | style: TextStyle(
97 | color: TColor.primary,
98 | fontSize: 15,
99 | fontWeight: FontWeight.w700),
100 | ),
101 | )
102 | else if (status == 0)
103 | const Text(
104 | "Pending",
105 | style: TextStyle(
106 | color: Colors.blue,
107 | fontSize: 15,
108 | fontWeight: FontWeight.w500),
109 | )
110 | else
111 | Text(
112 | status == 3
113 | ? "Unapproved"
114 | : status == 4
115 | ? "Expiry in 15 days"
116 | : "Expired",
117 | style: const TextStyle(
118 | color: Colors.red,
119 | fontSize: 15,
120 | fontWeight: FontWeight.w500),
121 | ),
122 | ],
123 | ),
124 | ),
125 | const Divider(),
126 | ],
127 | ),
128 | );
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/lib/common_widget/drop_down_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class LineDropDownButton extends StatelessWidget {
5 | final String title;
6 | final String hintText;
7 | final Map? selectVal;
8 | final String displayKey;
9 | final List itemsArr;
10 | final Function(dynamic) didChanged;
11 |
12 | const LineDropDownButton({
13 | super.key,
14 | required this.title,
15 | required this.hintText,
16 | required this.itemsArr,
17 | required this.didChanged,
18 | this.selectVal,
19 | required this.displayKey,
20 | });
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return Column(
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | mainAxisSize: MainAxisSize.min,
27 | children: [
28 | Text(
29 | title,
30 | style: TextStyle(color: TColor.placeholder, fontSize: 14),
31 | ),
32 | DropdownButtonHideUnderline(
33 |
34 | child: DropdownButton(
35 | isExpanded: true,
36 | hint: Text(
37 | hintText,
38 | style: TextStyle(
39 | color: TColor.secondaryText,
40 | fontSize: 16,
41 | ),
42 | ),
43 | value: selectVal,
44 | items: itemsArr.map((itemObj) {
45 | return DropdownMenuItem(
46 | value: itemObj,
47 | child: Text(itemObj[displayKey] as String? ?? ""),
48 | );
49 | }).toList(),
50 | onChanged: didChanged),
51 | ),
52 | Container(
53 | color: TColor.lightGray,
54 | height: 0.5,
55 | width: double.maxFinite,
56 | ),
57 | ],
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/common_widget/icon_title_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../common/color_extension.dart';
4 |
5 | class IconTitleButton extends StatelessWidget {
6 | final String title;
7 | final String icon;
8 | final VoidCallback onPressed;
9 |
10 | const IconTitleButton(
11 | {super.key,
12 | required this.title,
13 | required this.icon,
14 | required this.onPressed});
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return InkWell(
19 | onTap: onPressed,
20 | child: Column(
21 | children: [
22 | Image.asset(
23 | icon,
24 | width: 35,
25 | height: 35,
26 | ),
27 | const SizedBox(
28 | height: 4,
29 | ),
30 | Text(
31 | title,
32 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
33 | ),
34 | ],
35 | ),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/common_widget/icon_title_cell.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class IconTitleCell extends StatelessWidget {
5 | final String title;
6 | final String icon;
7 | final double width;
8 | final VoidCallback onPressed;
9 |
10 | const IconTitleCell({super.key, required this.title, required this.icon, required this.onPressed, this.width = 50});
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return InkWell(
15 | onTap: onPressed,
16 | child: Column(
17 | mainAxisSize: MainAxisSize.min,
18 |
19 | children: [
20 | Image.asset(
21 | icon,
22 | width: width,
23 | height: width,
24 | ),
25 | const SizedBox(
26 | height: 4,
27 | ),
28 | Text(
29 | title,
30 | style: TextStyle(
31 | color: TColor.primaryTextW,
32 | fontSize: 16,
33 | ),
34 | )
35 | ],
36 | ),
37 | );
38 | }
39 | }
--------------------------------------------------------------------------------
/lib/common_widget/icon_title_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class IconTitleRow extends StatelessWidget {
5 | final String icon;
6 | final String title;
7 | final VoidCallback onPressed;
8 |
9 | const IconTitleRow(
10 | {super.key,
11 | required this.icon,
12 | required this.title,
13 | required this.onPressed});
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return InkWell(
18 | onTap: onPressed,
19 | child: Container(
20 | padding: const EdgeInsets.symmetric(vertical: 10),
21 | child: Row(
22 | children: [
23 | Image.asset(
24 | icon,
25 | width: 40,
26 | height: 40,
27 | ),
28 | const SizedBox(
29 | width: 15,
30 | ),
31 | Text(
32 | title,
33 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
34 | ),
35 | ],
36 | ),
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/common_widget/image_picker_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:image_picker/image_picker.dart';
3 | import 'package:taxi_driver/common/color_extension.dart';
4 |
5 | class ImagePickerView extends StatefulWidget {
6 | final Function(String) didSelect;
7 | const ImagePickerView({super.key, required this.didSelect});
8 |
9 | @override
10 | State createState() => _ImagePickerViewState();
11 | }
12 |
13 | class _ImagePickerViewState extends State {
14 | final picker = ImagePicker();
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | var media = MediaQuery.sizeOf(context);
19 | return Container(
20 | width: media.width * 0.9,
21 | height: media.width * 0.7,
22 | padding: const EdgeInsets.all(15),
23 | decoration: BoxDecoration(
24 | color: Colors.white,
25 | borderRadius: BorderRadius.circular(15),
26 | boxShadow: const [
27 | BoxShadow(color: Colors.black54, blurRadius: 4, spreadRadius: 4)
28 | ]),
29 | child: Column(
30 | mainAxisAlignment: MainAxisAlignment.center,
31 | children: [
32 | Text(
33 | "Image Picker",
34 | style: TextStyle(
35 | fontWeight: FontWeight.bold,
36 | fontSize: 20,
37 | color: TColor.primaryText,
38 | ),
39 | ),
40 | SizedBox(
41 | height: media.width * 0.04,
42 | ),
43 | Row(
44 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
45 | children: [
46 | Expanded(
47 | child: TextButton(
48 | onPressed: () {
49 | getImageCamera();
50 | },
51 | child: Icon(
52 | Icons.camera_alt,
53 | size: 100,
54 | color: TColor.primaryText,
55 | ),
56 | ),
57 | ),
58 | Expanded(
59 | child: TextButton(
60 | onPressed: () {
61 | getImageGallery();
62 | },
63 | child: Icon(
64 | Icons.image,
65 | size: 100,
66 | color: TColor.primaryText,
67 | ),
68 | ),
69 | )
70 | ],
71 | ),
72 | Row(
73 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
74 | children: [
75 | Expanded(
76 | child: Text(
77 | "Take Photo",
78 | textAlign: TextAlign.center,
79 | style: TextStyle(color: TColor.primaryText, fontSize: 17),
80 | ),
81 | ),
82 | Expanded(
83 | child: Text(
84 | "Gallery",
85 | textAlign: TextAlign.center,
86 | style: TextStyle(color: TColor.primaryText, fontSize: 17),
87 | ),
88 | ),
89 | ],
90 | ),
91 | SizedBox(
92 | height: media.width * 0.01,
93 | ),
94 | Row(
95 | mainAxisAlignment: MainAxisAlignment.end,
96 | children: [
97 | TextButton(
98 | onPressed: () {
99 | dismiss();
100 | },
101 | child: Text(
102 | "Close",
103 | style: TextStyle(
104 | color: TColor.primary,
105 | fontSize: 20,
106 | fontWeight: FontWeight.w600,
107 | ),
108 | ),
109 | )
110 | ],
111 | )
112 | ],
113 | ),
114 | );
115 | }
116 |
117 | void dismiss() {
118 | Navigator.pop(context);
119 | }
120 |
121 | Future getImageCamera() async {
122 | try {
123 | final pickedFile = await picker.pickImage(source: ImageSource.camera);
124 | if (pickedFile != null) {
125 | widget.didSelect(pickedFile.path);
126 | dismiss();
127 | }
128 | } catch (err) {
129 | debugPrint(err.toString());
130 | }
131 | }
132 |
133 | Future getImageGallery() async {
134 | try {
135 | final pickedFile = await picker.pickImage(source: ImageSource.gallery);
136 | if (pickedFile != null) {
137 | widget.didSelect(pickedFile.path);
138 | dismiss();
139 | }
140 | } catch (err) {
141 | debugPrint(err.toString());
142 | }
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/lib/common_widget/line_text_field.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class LineTextField extends StatelessWidget {
5 | final String title;
6 | final String hintText;
7 | final TextEditingController? controller;
8 | final TextInputType? keyboardType;
9 | final bool? obscureText;
10 | final Widget? right;
11 | final int minLines;
12 | final int maxLines;
13 |
14 | const LineTextField(
15 | {super.key,
16 | required this.title,
17 | required this.hintText,
18 | this.controller,
19 | this.keyboardType,
20 | this.obscureText,
21 | this.right,
22 | this.minLines = 1,
23 | this.maxLines = 1});
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Column(
28 | crossAxisAlignment: CrossAxisAlignment.start,
29 | mainAxisSize: MainAxisSize.min,
30 | children: [
31 | Text(
32 | title,
33 | style: TextStyle(color: TColor.placeholder, fontSize: 14),
34 | ),
35 | TextField(
36 | controller: controller,
37 | keyboardType: keyboardType,
38 | obscureText: obscureText ?? false,
39 | minLines: minLines,
40 | maxLines: maxLines,
41 | style: TextStyle(
42 | color: TColor.primaryText,
43 | fontSize: 16,
44 | ),
45 | decoration: InputDecoration(
46 | enabledBorder: InputBorder.none,
47 | focusedBorder: InputBorder.none,
48 | hintText: hintText,
49 | suffixIcon: right,
50 | hintStyle: TextStyle(
51 | color: TColor.secondaryText,
52 | fontSize: 16,
53 | ),
54 | ),
55 | ),
56 | Container(
57 | color: TColor.lightGray,
58 | height: 0.5,
59 | width: double.maxFinite,
60 | ),
61 | ],
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/common_widget/location_select_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class LocationSelectButton extends StatelessWidget {
5 | final String title;
6 | final String placeholder;
7 | final Color color;
8 | final String value;
9 | final bool isSelect;
10 | final VoidCallback onPressed;
11 |
12 | const LocationSelectButton(
13 | {super.key,
14 | required this.title,
15 | required this.placeholder,
16 | required this.color,
17 | required this.value,
18 | this.isSelect = false,
19 | required this.onPressed});
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Column(
24 | mainAxisSize: MainAxisSize.min,
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | children: [
27 | Row(
28 | children: [
29 | Text(
30 | title,
31 | style: TextStyle(
32 | color: color,
33 | fontSize: 15,
34 | fontWeight: FontWeight.w700,
35 | ),
36 | ),
37 | ],
38 | ),
39 | InkWell(
40 | onTap: onPressed,
41 | child: Container(
42 | height: 50,
43 | margin: const EdgeInsets.symmetric(vertical: 8),
44 | padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10),
45 | decoration: BoxDecoration(
46 | color: Colors.white,
47 | border: isSelect ? Border.all(color: color, width: 2) : null,
48 | borderRadius: BorderRadius.circular(10),
49 | boxShadow: [
50 | BoxShadow(
51 | color: isSelect ? color.withOpacity(0.2) : Colors.black12,
52 | blurRadius: 2,
53 | spreadRadius: 2)
54 | ]),
55 | child: Row(
56 | children: [
57 | Container(
58 | width: 20,
59 | height: 20,
60 | decoration: BoxDecoration(
61 | color: color, borderRadius: BorderRadius.circular(10)),
62 | ),
63 | const SizedBox(
64 | width: 15,
65 | ),
66 | Expanded(
67 | child: Text(
68 | value == "" ? placeholder : value,
69 | textAlign: TextAlign.left,
70 | maxLines: 1,
71 | style: TextStyle(
72 | color:
73 | value == "" ? TColor.placeholder : TColor.primaryText,
74 | fontSize: 15,
75 | ),
76 | ),
77 | ),
78 | Icon(
79 | Icons.arrow_forward_ios_sharp,
80 | color: TColor.secondaryText,
81 | size: 20,
82 | )
83 | ],
84 | ),
85 | ),
86 | ),
87 | ],
88 | );
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/lib/common_widget/menu_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class MenuRow extends StatelessWidget {
5 | final String title;
6 | final String icon;
7 | final VoidCallback onPressed;
8 |
9 | const MenuRow(
10 | {super.key,
11 | required this.title,
12 | required this.icon,
13 | required this.onPressed});
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return InkWell(
18 | onTap: onPressed,
19 | child: Container(
20 | padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
21 | child: Row(
22 | crossAxisAlignment: CrossAxisAlignment.center,
23 | children: [
24 | const SizedBox(
25 | width: 12.5,
26 | ),
27 | Image.asset(
28 | icon,
29 | width: 30,
30 | height: 30,
31 | ),
32 | const SizedBox(
33 | width: 12.5,
34 | ),
35 | Expanded(
36 | child: Text(
37 | title,
38 | style: TextStyle(
39 | color: TColor.primaryText,
40 | fontSize: 18,
41 | ),
42 | ),
43 | ),
44 | ],
45 | ),
46 | ),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/common_widget/my_car_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:taxi_driver/common/color_extension.dart';
4 |
5 | class MyCarRow extends StatelessWidget {
6 | final Map cObj;
7 | final VoidCallback onPressed;
8 |
9 | const MyCarRow({super.key, required this.cObj, required this.onPressed});
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | var imageUrl = cObj["car_image"] as String? ?? "";
14 |
15 | return Container(
16 | padding: const EdgeInsets.symmetric(vertical: 15),
17 | child: InkWell(
18 | onTap: onPressed,
19 | child: Row(
20 | children: [
21 | Expanded(
22 | child: Column(
23 | crossAxisAlignment: CrossAxisAlignment.start,
24 | children: [
25 | Text(
26 | "${cObj["brand_name"] ?? ""} - ${cObj["model_name"] ?? ""} - ${cObj["series_name"] ?? ""}",
27 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
28 | ),
29 | Text(
30 | "${cObj["car_number"] ?? ""}",
31 | style: TextStyle(color: TColor.secondaryText, fontSize: 15),
32 | ),
33 | ],
34 | ),
35 | ),
36 | const SizedBox(
37 | width: 8,
38 | ),
39 |
40 | if( "${cObj["is_set_running"]}" == "1" )
41 | Padding(
42 | padding: const EdgeInsets.only(right: 8),
43 | child: Icon(
44 | Icons.pin_drop_outlined,
45 | color: TColor.primary,
46 | size: 25,
47 | ),
48 | ),
49 |
50 | if (imageUrl != "")
51 | CachedNetworkImage(
52 | imageUrl: imageUrl,
53 | width: 50,
54 | height: 50,
55 | fit: BoxFit.cover,
56 | ),
57 |
58 | // Image.asset(
59 | // cObj["image"] as String? ?? "",
60 | // width: 50,
61 | // height: 50,
62 | // fit: BoxFit.cover,
63 | // )
64 | ],
65 | ),
66 | ),
67 | );
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/lib/common_widget/plan_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class PlanRow extends StatelessWidget {
5 | final Map pObj;
6 | final VoidCallback onPressed;
7 |
8 | const PlanRow({super.key, required this.pObj, required this.onPressed});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | margin: const EdgeInsets.symmetric(vertical: 4),
14 | padding: const EdgeInsets.all(15),
15 | decoration: BoxDecoration(
16 | color: Colors.white,
17 | borderRadius: BorderRadius.circular(5),
18 | boxShadow: const [BoxShadow(color: Colors.black12, blurRadius: 1)]),
19 | child: Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | Text(
23 | pObj["name"] as String? ?? "",
24 | style: TextStyle(
25 | color: TColor.primaryText,
26 | fontSize: 18,
27 | ),
28 | ),
29 |
30 | const SizedBox(height: 4,),
31 | Text(
32 | pObj["time"] as String? ?? "",
33 | style: TextStyle(
34 | color: TColor.secondaryText,
35 | fontSize: 15,
36 | ),
37 | ),
38 | const SizedBox(height: 4,),
39 | Text(
40 | pObj["rides"] as String? ?? "",
41 | style: TextStyle(
42 | color: TColor.secondaryText,
43 | fontSize: 16,
44 | ),
45 | ),
46 | const SizedBox(
47 | height: 4,
48 | ),
49 | Text(
50 | pObj["cash_rides"] as String? ?? "",
51 | style: TextStyle(
52 | color: TColor.secondaryText,
53 | fontSize: 16,
54 | ),
55 | ),
56 | const SizedBox(
57 | height: 4,
58 | ),
59 | Text(
60 | pObj["km"] as String? ?? "",
61 | style: TextStyle(
62 | color: TColor.secondaryText,
63 | fontSize: 16,
64 | ),
65 | ),
66 | Row(
67 | mainAxisAlignment: MainAxisAlignment.end,
68 | children: [
69 | TextButton(
70 | onPressed: onPressed,
71 | child: Text(
72 | pObj["price"] as String? ?? "",
73 | style: TextStyle(
74 | color: TColor.primary,
75 | fontSize: 16,
76 | fontWeight: FontWeight.w700,
77 | ),
78 | ),
79 | )
80 | ],
81 | )
82 | ],
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/common_widget/popup_layout.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | class PopupLayout extends ModalRoute {
7 |
8 | EdgeInsets? margin;
9 | Color? bgColor;
10 | final Widget child;
11 |
12 |
13 | PopupLayout({Key? key, this.bgColor, required this.child, this.margin});
14 |
15 | @override
16 | // TODO: implement barrierColor
17 | Color? get barrierColor => bgColor ?? Colors.black.withOpacity(0.5);
18 |
19 | @override
20 | // TODO: implement barrierDismissible
21 | bool get barrierDismissible => false;
22 |
23 | @override
24 | // TODO: implement barrierLabel
25 | String? get barrierLabel => null;
26 |
27 | @override
28 | Widget buildPage(BuildContext context, Animation animation, Animation secondaryAnimation) {
29 | margin ??= const EdgeInsets.all(0);
30 |
31 | return GestureDetector(
32 | onTap: (){
33 | SystemChannels.textInput.invokeMethod("TextInput.hide");
34 | },
35 | child: Material(
36 | type: MaterialType.transparency,
37 | child: BackdropFilter(filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5,), child: buildOverlayContent(context), ),
38 | ),
39 | );
40 | }
41 |
42 | @override
43 | // TODO: implement maintainState
44 | bool get maintainState => false;
45 |
46 | @override
47 | // TODO: implement opaque
48 | bool get opaque => false;
49 |
50 | @override
51 | // TODO: implement transitionDuration
52 | Duration get transitionDuration => const Duration(milliseconds: 100);
53 |
54 | Widget buildOverlayContent(BuildContext context) {
55 | return Container(
56 | margin: margin,
57 | alignment: Alignment.center,
58 | child: child,
59 | );
60 | }
61 |
62 | @override
63 | Widget buildTransitions(BuildContext context, Animation animation,
64 | Animation secondaryAnimation, Widget child) {
65 | // You can add your own animations for the overlay content
66 | return FadeTransition(
67 | opacity: animation,
68 | child: ScaleTransition(
69 | scale: animation,
70 | child: child,
71 | ),
72 | );
73 | }
74 |
75 | }
--------------------------------------------------------------------------------
/lib/common_widget/price_list_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 | import 'package:taxi_driver/common_widget/title_subtitle_cell.dart';
4 | import 'package:taxi_driver/common_widget/title_subtitle_row.dart';
5 |
6 | class PriceListView extends StatelessWidget {
7 | final Map dObj;
8 | const PriceListView({super.key, required this.dObj});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Column(
13 | children: [
14 | const SizedBox(
15 | height: 15,
16 | ),
17 | Container(
18 | width: double.maxFinite,
19 | height: 0.5,
20 | color: TColor.lightGray,
21 | ),
22 | Row(
23 | children: [
24 | Expanded(
25 | child: TitleSubtitleCell(
26 | title: dObj["trips"],
27 | subtitle: "Trips",
28 | ),
29 | ),
30 | Container(
31 | height: 80,
32 | width: 0.5,
33 | color: TColor.lightGray,
34 | ),
35 | Expanded(
36 | child: TitleSubtitleCell(
37 | title: dObj["hrs"],
38 | subtitle: "Online hrs",
39 | ),
40 | ),
41 | Container(
42 | height: 80,
43 | width: 0.5,
44 | color: TColor.lightGray,
45 | ),
46 | Expanded(
47 | child: TitleSubtitleCell(
48 | title: dObj["cash_trip"],
49 | subtitle: "Cash Trip",
50 | ),
51 | )
52 | ],
53 | ),
54 | Container(
55 | width: double.maxFinite,
56 | height: 0.5,
57 | color: TColor.lightGray,
58 | ),
59 | Padding(
60 | padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
61 | child: Column(
62 | children: [
63 | TitleSubtitleRow(
64 | title: "Trip fares",
65 | subtitle: dObj["trips"],
66 | color: TColor.secondaryText,
67 | ),
68 | TitleSubtitleRow(
69 | title: "Fee",
70 | subtitle: dObj["fee"],
71 | color: TColor.secondaryText,
72 | ),
73 | TitleSubtitleRow(
74 | title: "+Tax",
75 | subtitle: dObj["tax"],
76 | color: TColor.secondaryText,
77 | ),
78 | TitleSubtitleRow(
79 | title: "+Tolls",
80 | subtitle: dObj["tolls"],
81 | color: TColor.secondaryText,
82 | ),
83 | TitleSubtitleRow(
84 | title: "Surge",
85 | subtitle: dObj["surge"],
86 | color: TColor.secondaryText,
87 | ),
88 | TitleSubtitleRow(
89 | title: "Discount(-)",
90 | subtitle: dObj["discount"],
91 | color: TColor.secondaryText,
92 | ),
93 | const Divider(),
94 | TitleSubtitleRow(
95 | title: "Total Earnings",
96 | subtitle: dObj["total"],
97 | color: TColor.primary,
98 | weight: FontWeight.w800,
99 | ),
100 | ],
101 | ),
102 | ),
103 | const SizedBox(
104 | height: 8,
105 | )
106 | ],
107 | );
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/lib/common_widget/rating_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_rating_bar/flutter_rating_bar.dart';
3 | import 'package:taxi_driver/common/color_extension.dart';
4 |
5 | class RatingRow extends StatelessWidget {
6 | final Map rObj;
7 |
8 | const RatingRow({super.key, required this.rObj});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | padding: const EdgeInsets.symmetric(vertical: 8),
14 | child: Column(
15 | crossAxisAlignment: CrossAxisAlignment.start,
16 | children: [
17 |
18 | RatingBar.builder(
19 | initialRating: rObj["rate"] as double? ?? 5.0,
20 | minRating: 1,
21 | direction: Axis.horizontal,
22 | allowHalfRating: true,
23 | itemCount: 5,
24 | itemSize: 20,
25 | itemPadding: const EdgeInsets.symmetric(horizontal: 1.0),
26 | itemBuilder: (context, _) => Icon(
27 | Icons.star,
28 | color: TColor.primary,
29 | ),
30 | onRatingUpdate: (rating) {
31 | print(rating);
32 | },
33 | ),
34 |
35 | const SizedBox(
36 | height: 8,
37 | ),
38 |
39 | if( (rObj["message"] as String? ?? "") != "" )
40 | Text(
41 | rObj["message"] as String? ?? "",
42 | style: TextStyle(
43 | color: TColor.primaryText,
44 | fontSize: 16,
45 | ),
46 | ),
47 |
48 | ],
49 | ),
50 | );
51 | }
52 | }
--------------------------------------------------------------------------------
/lib/common_widget/round_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | enum RoundButtonType { primary, secondary, red, boarded }
5 |
6 | class RoundButton extends StatelessWidget {
7 | final String title;
8 | final RoundButtonType type;
9 | final VoidCallback onPressed;
10 |
11 | const RoundButton(
12 | {super.key,
13 | required this.title,
14 | this.type = RoundButtonType.primary,
15 | required this.onPressed});
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialButton(
20 | onPressed: onPressed,
21 | minWidth: double.maxFinite,
22 | elevation: 0,
23 | color: type == RoundButtonType.primary
24 | ? TColor.primary
25 | : type == RoundButtonType.secondary
26 | ? TColor.secondary
27 | : type == RoundButtonType.red
28 | ? TColor.red
29 | : Colors.transparent,
30 | height: 45,
31 | shape: RoundedRectangleBorder(
32 | side: type == RoundButtonType.boarded
33 | ? BorderSide(color: TColor.secondaryText)
34 | : BorderSide.none,
35 | borderRadius: BorderRadius.circular(25)),
36 | child: Text(
37 | title,
38 | style: TextStyle(
39 | color: type == RoundButtonType.boarded
40 | ? TColor.secondaryText
41 | : TColor.primaryTextW,
42 | fontSize: 16,
43 | ),
44 | ),
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/common_widget/setting_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class SettingRow extends StatelessWidget {
5 | final String title;
6 | final String icon;
7 | final VoidCallback onPressed;
8 |
9 | const SettingRow(
10 | {super.key,
11 | required this.title,
12 | required this.icon,
13 | required this.onPressed});
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return InkWell(
18 | onTap: onPressed,
19 | child: Container(
20 | color: Colors.white,
21 | padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 20),
22 | child: Row(
23 | children: [
24 | Image.asset(
25 | icon,
26 | width: 30,
27 | height: 30,
28 | ),
29 | const SizedBox(
30 | width: 15,
31 | ),
32 | Expanded(
33 | child: Text(
34 | title,
35 | style: TextStyle(color: TColor.primaryText, fontSize: 18),
36 | ),
37 | )
38 | ],
39 | ),
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/common_widget/support_user_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 | import 'package:taxi_driver/common/common_extension.dart';
4 |
5 | class SupportUserRow extends StatelessWidget {
6 | final Map uObj;
7 | final VoidCallback onPressed;
8 | const SupportUserRow(
9 | {super.key, required this.uObj, required this.onPressed});
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | var baseCount = int.tryParse("${uObj["base_count"] ?? ""}") ?? 0;
14 |
15 | return Padding(
16 | padding: const EdgeInsets.only(bottom: 2),
17 | child: InkWell(
18 | onTap: onPressed,
19 | child: Container(
20 | padding: const EdgeInsets.all(15),
21 | decoration: BoxDecoration(
22 | color: Colors.white,
23 | borderRadius: BorderRadius.circular(5)
24 | ),
25 | child: Row(
26 | children: [
27 | ClipRRect(
28 | borderRadius: BorderRadius.circular(25),
29 | child: Image.asset(
30 | "assets/img/u1.png",
31 | width: 50,
32 | height: 50,
33 | ),
34 | ),
35 | const SizedBox(
36 | width: 15,
37 | ),
38 | Expanded(
39 | child: Column(
40 | crossAxisAlignment: CrossAxisAlignment.start,
41 | children: [
42 | Row(
43 | children: [
44 | Expanded(
45 | child: Text(
46 | uObj["name"] as String? ?? "",
47 | style: TextStyle(
48 | color: TColor.primaryText,
49 | fontWeight: FontWeight.w700),
50 | ),
51 | ),
52 | Text(
53 | (uObj["created_date"] as String? ?? "").timeAgo(),
54 | style: TextStyle(color: TColor.secondaryText, fontSize: 13),
55 | )
56 | ],
57 | ),
58 | Row(
59 | children: [
60 | Expanded(
61 | child: Text(
62 | uObj["message"] as String? ?? "",
63 | maxLines: 1,
64 | overflow: TextOverflow.ellipsis,
65 | style:
66 | TextStyle(color: TColor.secondaryText, fontSize: 14),
67 | ),
68 | ),
69 | if (baseCount > 0)
70 | Container(
71 | padding: const EdgeInsets.all(2),
72 | constraints:
73 | const BoxConstraints(minWidth: 20, minHeight: 10),
74 | decoration: BoxDecoration(
75 | color: TColor.primary,
76 | borderRadius: BorderRadius.circular(10)
77 | ),
78 | alignment: Alignment.center,
79 | child: Text(
80 | baseCount.toString() ,
81 | textAlign: TextAlign.center,
82 | style: TextStyle(
83 | color: TColor.primaryTextW,
84 | fontSize: 11,
85 | fontWeight: FontWeight.w600,
86 | ),
87 | ),
88 | )
89 | ],
90 | )
91 | ],
92 | ))
93 | ],
94 | ),
95 | ),
96 | ),
97 | );
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/lib/common_widget/switch_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:taxi_driver/common/color_extension.dart';
4 |
5 | class SwitchRow extends StatelessWidget {
6 | final Map sObj;
7 | final Function(bool) didChange;
8 |
9 | const SwitchRow({super.key, required this.sObj, required this.didChange});
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Container(
14 | padding: const EdgeInsets.symmetric(vertical: 15),
15 | child: Row(
16 | crossAxisAlignment: CrossAxisAlignment.center,
17 | children: [
18 | Expanded(
19 | child: Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | Text(
23 | sObj["name"] as String? ?? "",
24 | style: TextStyle(
25 | color: TColor.primaryText,
26 | fontSize: 16,
27 | ),
28 | ),
29 | const SizedBox(
30 | height: 4,
31 | ),
32 | Text(
33 | sObj["detail"] as String? ?? "",
34 | style: TextStyle(
35 | color: TColor.secondaryText,
36 | fontSize: 15,
37 | ),
38 | ),
39 | ],
40 | ),
41 | ),
42 |
43 | CupertinoSwitch(value: sObj["value"] as bool? ?? false , onChanged: didChange)
44 | ],
45 | ),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/common_widget/tag_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class TagButton extends StatelessWidget {
5 | final String title;
6 | final VoidCallback onPressed;
7 |
8 | const TagButton({super.key, required this.title, required this.onPressed});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Padding(
13 | padding: const EdgeInsets.only(right: 8),
14 | child: InkWell(
15 | onTap: onPressed,
16 | borderRadius: BorderRadius.circular(10),
17 | child: Container(
18 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
19 | decoration: BoxDecoration(
20 | border: Border.all(color: TColor.primary, width: 1),
21 | borderRadius: BorderRadius.circular(10),
22 | ),
23 | child: Text(
24 | title,
25 | style: TextStyle(color: TColor.primary, fontSize: 16),
26 | ),
27 | ),
28 | ),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/common_widget/title_subtitle_cell.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class TitleSubtitleCell extends StatelessWidget {
5 | final String title;
6 | final String subtitle;
7 |
8 | const TitleSubtitleCell({super.key, required this.title, required this.subtitle});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | padding: const EdgeInsets.symmetric(vertical: 15),
14 | child: Column(
15 | children: [
16 |
17 | Text(
18 | title,
19 | style: TextStyle(
20 | color: TColor.primaryText,
21 | fontSize: 18,
22 | fontWeight: FontWeight.w800),
23 | ),
24 | Text(
25 | subtitle,
26 | style: TextStyle(
27 | color: TColor.secondaryText,
28 | fontSize: 16),
29 | ),
30 |
31 | ],
32 | ),
33 | );
34 | }
35 | }
--------------------------------------------------------------------------------
/lib/common_widget/title_subtitle_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../common/color_extension.dart';
4 |
5 | class TitleSubtitleRow extends StatelessWidget {
6 | final String title;
7 | final String subtitle;
8 | final Color? color;
9 | final FontWeight? weight;
10 | const TitleSubtitleRow(
11 | {super.key, required this.title, required this.subtitle, this.color, this.weight});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Padding(
16 | padding: const EdgeInsets.symmetric(vertical: 8),
17 | child: Row(
18 | children: [
19 | Expanded(
20 | child: Text(
21 | title,
22 | style: TextStyle(
23 | color: color ?? TColor.primaryText,
24 | fontSize: 15,
25 | fontWeight: weight ?? FontWeight.w400
26 | ),
27 | ),
28 | ),
29 | Text(
30 | subtitle,
31 | style: TextStyle(
32 | color: color ?? TColor.primaryText,
33 | fontSize: 15,
34 | fontWeight: weight ?? FontWeight.w600,
35 | ),
36 | )
37 | ],
38 | ),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/common_widget/today_summary_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 | import 'package:taxi_driver/common/common_extension.dart';
4 |
5 | class TodaySummaryRow extends StatelessWidget {
6 | final Map sObj;
7 | const TodaySummaryRow({super.key, required this.sObj});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | var price = double.tryParse( sObj["amt"].toString() ) ?? 0.0;
12 | return Padding(
13 | padding: const EdgeInsets.symmetric(vertical: 10),
14 | child: Row(
15 | children: [
16 | Column(
17 | children: [
18 | Text(
19 | sObj["start_time"]
20 | .toString()
21 | .dataFormat()
22 | .stringFormat(format: "hh:mm"),
23 | style: TextStyle(color: TColor.primaryText, fontSize: 15),
24 | ),
25 | Container(
26 | padding: const EdgeInsets.symmetric(horizontal: 10),
27 | decoration: BoxDecoration(
28 | color: TColor.lightWhite,
29 | borderRadius: BorderRadius.circular(20),
30 | ),
31 | child: Text(
32 | sObj["start_time"]
33 | .toString()
34 | .dataFormat()
35 | .stringFormat(format: "aa"),
36 | style: TextStyle(
37 | color: TColor.secondaryText,
38 | fontSize: 11,
39 | fontWeight: FontWeight.w700,
40 | ),
41 | ),
42 | )
43 | ],
44 | ),
45 | const SizedBox(
46 | width: 8,
47 | ),
48 | Expanded(
49 | child: Column(
50 | crossAxisAlignment: CrossAxisAlignment.start,
51 | children: [
52 | Text(
53 | sObj["pickup_address"] as String? ?? "",
54 | maxLines: 1,
55 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
56 | ),
57 | Text(
58 | "Paid by ${ sObj["payment_type"] == 1 ? "cash" : "online" }",
59 | style: TextStyle(color: TColor.secondaryText, fontSize: 15),
60 | ),
61 | ],
62 | ),
63 | ),
64 | const SizedBox(
65 | width: 8,
66 | ),
67 | Text(
68 | "\$${price.toStringAsFixed(2)}" ,
69 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
70 | ),
71 | ],
72 | ),
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/common_widget/wallet_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 |
4 | class WalletRow extends StatelessWidget {
5 | final Map wObj;
6 | const WalletRow({super.key, required this.wObj});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Padding(
11 | padding: const EdgeInsets.symmetric(vertical: 10),
12 | child: Row(
13 | children: [
14 | Image.asset( wObj["icon"] , width: 35, height: 35, ),
15 | const SizedBox(
16 | width: 8,
17 | ),
18 | Expanded(
19 | child: Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | Text(
23 | wObj["name"],
24 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
25 | ),
26 | Text(
27 | wObj["time"],
28 | style: TextStyle(color: TColor.secondaryText, fontSize: 15),
29 | ),
30 | ],
31 | ),
32 | ),
33 | const SizedBox(
34 | width: 8,
35 | ),
36 | Text(
37 | wObj["price"],
38 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
39 | ),
40 | ],
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/common_widget/weekly_summary_row.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:taxi_driver/common/color_extension.dart';
3 | import 'package:taxi_driver/common/common_extension.dart';
4 |
5 | class WeeklySummaryRow extends StatelessWidget {
6 | final Map sObj;
7 | const WeeklySummaryRow({super.key, required this.sObj});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | var price = double.tryParse(sObj["total_amt"].toString()) ?? 0.0;
12 | return Padding(
13 | padding: const EdgeInsets.symmetric(vertical: 10),
14 | child: Row(
15 | children: [
16 |
17 | Expanded(
18 | child: Column(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: [
21 | Text(
22 | sObj["date"]
23 | .toString()
24 | .stringFormatToOtherFormat(newFormat: "dd, MMM yyyy"),
25 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
26 | ),
27 | Text(
28 | "Trips ${ sObj["trips_count"] }",
29 | style: TextStyle(color: TColor.secondaryText, fontSize: 15),
30 | ),
31 | ],
32 | ),
33 | ),
34 | const SizedBox(
35 | width: 8,
36 | ),
37 | Text(
38 | "\$${price.toStringAsFixed(2)}",
39 | style: TextStyle(color: TColor.primaryText, fontSize: 16),
40 | ),
41 | ],
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/cubit/login_cubit.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:bloc/bloc.dart';
4 | import 'package:equatable/equatable.dart';
5 | import 'package:taxi_driver/common/globs.dart';
6 | import 'package:taxi_driver/common/service_call.dart';
7 |
8 | part 'login_state.dart';
9 |
10 | class LoginCubit extends Cubit {
11 | LoginCubit() : super(LoginInitialState());
12 |
13 | void submitLogin( String mobileCode, String mobile, String userType ) {
14 | try {
15 |
16 | emit(LoginHUDState());
17 | ServiceCall.post({
18 | "user_type": userType,
19 | "mobile_code": mobileCode,
20 | "mobile": mobile,
21 | "os_type": Platform.isIOS ? "i" : Platform.isAndroid ? "a" : "w",
22 | "push_token":"",
23 | "socket_id":"",
24 | }, SVKey.svLogin, withSuccess: (responseObj) async {
25 |
26 | if( ( responseObj[KKey.status] as String? ?? "" ) == "1" ) {
27 | ServiceCall.userObj = responseObj[KKey.payload] as Map? ?? {};
28 | ServiceCall.userType = ServiceCall.userObj["user_type"] as int? ?? 1;
29 |
30 |
31 | Globs.udSet(ServiceCall.userObj, Globs.userPayload);
32 | Globs.udBoolSet(false,"is_online");
33 | Globs.udBoolSet(true, Globs.userLogin);
34 | emit(LoginApiResultState());
35 | emit(LoginInitialState());
36 | }else{
37 | emit(LoginErrorState(responseObj[KKey.message] ?? MSG.fail ),);
38 | }
39 |
40 | }, failure: (err) async {
41 | emit(LoginErrorState(err));
42 | }, );
43 |
44 | } catch (e) {
45 | emit(LoginErrorState(e.toString()));
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/cubit/login_state.dart:
--------------------------------------------------------------------------------
1 | part of 'login_cubit.dart';
2 |
3 | sealed class LoginState extends Equatable {
4 | const LoginState();
5 |
6 | @override
7 | List