├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
├── manifest.json
└── index.html
├── Assets
└── Car_Spleash.flr
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── 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
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── values-night
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── car_rendal_app
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── .metadata
├── .vscode
└── launch.json
├── lib
├── Widgets
│ ├── CarSpcificationcard.dart
│ ├── FiliterTitle.dart
│ ├── rentdetail.dart
│ ├── BouncingButton.dart
│ └── CarRentType.dart
├── Screens
│ ├── Nointernet.dart
│ ├── InterNetChecker.dart
│ ├── Spleash_Screen.dart
│ ├── Aboutus.dart
│ ├── Login.dart
│ ├── TopDeals.dart
│ ├── Settings.dart
│ ├── Home.dart
│ └── DetailPage.dart
└── main.dart
├── .gitignore
├── test
└── widget_test.dart
├── README.md
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/Assets/Car_Spleash.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/Assets/Car_Spleash.flr
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/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/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/car_rendal_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.car_rendal_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deepak07082/car-rental-management-system-flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 198df796aa80073ef22bdf249e614e2ff33c6895
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 |
8 | {
9 | "name": "car_rendal_app",
10 | "request": "launch",
11 | "type": "dart"
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "car_rendal_app",
3 | "short_name": "car_rendal_app",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.4'
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
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 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/lib/Widgets/CarSpcificationcard.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:velocity_x/velocity_x.dart';
3 |
4 | class CarSpecCard extends StatelessWidget {
5 | final String title;
6 | final String spec;
7 |
8 | const CarSpecCard({Key key, this.title, this.spec}) : super(key: key);
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | width: 100,
13 | decoration: BoxDecoration(
14 | color: Vx.white,
15 |
16 | borderRadius: BorderRadius.circular(10),
17 | ),
18 | padding: EdgeInsets.all(10),
19 | child: Column(
20 | children: [
21 | "$title".text.gray900.wider.bold.size(15).make(),
22 | "$spec".text.extraBold.gray900.size(17).heightLoose.make().py4(),
23 | ],
24 | ),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/lib/Widgets/FiliterTitle.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:velocity_x/velocity_x.dart';
3 |
4 | class FiliterCard extends StatelessWidget {
5 | final String name;
6 | final bool enabled;
7 | final Function ontap;
8 |
9 | const FiliterCard({Key key, this.name, this.enabled, this.ontap})
10 | : super(key: key);
11 | @override
12 | Widget build(BuildContext context) {
13 | return InkWell(
14 | onTap: ontap,
15 | child: Container(
16 | decoration: BoxDecoration(
17 | color: enabled == true ? Colors.blue : Colors.white,
18 | borderRadius: BorderRadius.circular(4),
19 | border: enabled == true
20 | ? Border.all(color: Colors.white)
21 | : Border.all(color: Colors.black),
22 | ),
23 | child: enabled == true
24 | ? "$name".text.semiBold.size(16).white.make().p(4)
25 | : "$name".text.semiBold.size(16).gray900.make().p(4),
26 | ),
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:car_rendal_app/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/lib/Widgets/rentdetail.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:velocity_x/velocity_x.dart';
4 |
5 | class RentDetail extends StatelessWidget {
6 | final int rent;
7 | final int amt;
8 | final Function ontap;
9 | final bool enabled;
10 |
11 | const RentDetail({Key key, this.rent, this.enabled, this.amt, this.ontap})
12 | : super(key: key);
13 | @override
14 | Widget build(BuildContext context) {
15 | return InkWell(
16 | onTap: ontap,
17 | child: Container(
18 | decoration: BoxDecoration(
19 | color: enabled == true ? Vx.blue500 : Vx.white,
20 | border: enabled == true
21 | ? Border.all(color: Colors.white)
22 | : Border.all(color: Colors.black),
23 | borderRadius: BorderRadius.circular(10),
24 | ),
25 | padding: EdgeInsets.all(10),
26 | child: Column(
27 | children: [
28 | enabled == true
29 | ? "$rent Month".text.bold.white.size(18).make()
30 | : "$rent Month".text.bold.gray900.size(18).make(),
31 | enabled == true
32 | ? "RS.$amt".text.semiBold.white.heightLoose.make().py4()
33 | : "RS.$amt".text.semiBold.black.heightLoose.make().py4(),
34 | ],
35 | ),
36 | ),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "306461401182",
4 | "project_id": "car-rendal-app",
5 | "storage_bucket": "car-rendal-app.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:306461401182:android:80bbbd809cf5fa9b6754cf",
11 | "android_client_info": {
12 | "package_name": "com.example.car_rendal_app"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "306461401182-fbagq0ovrecll9t1bkj5bu1gjalr5ods.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "com.example.car_rendal_app",
21 | "certificate_hash": "aeeddf3669bba70d871ffa1d33adbdd27ca0742b"
22 | }
23 | },
24 | {
25 | "client_id": "306461401182-ufm5p78n3uhja8ghjc87frue9frq1a3p.apps.googleusercontent.com",
26 | "client_type": 3
27 | }
28 | ],
29 | "api_key": [
30 | {
31 | "current_key": "AIzaSyBfaASlrIBxTUFjvAfAfnsRcJ4MlubXJkw"
32 | }
33 | ],
34 | "services": {
35 | "appinvite_service": {
36 | "other_platform_oauth_client": [
37 | {
38 | "client_id": "306461401182-ufm5p78n3uhja8ghjc87frue9frq1a3p.apps.googleusercontent.com",
39 | "client_type": 3
40 | }
41 | ]
42 | }
43 | }
44 | }
45 | ],
46 | "configuration_version": "1"
47 | }
--------------------------------------------------------------------------------
/lib/Widgets/BouncingButton.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Bouncing extends StatefulWidget {
4 | final Widget child;
5 | final VoidCallback onPress;
6 |
7 | Bouncing({@required this.child, Key key, this.onPress})
8 | : assert(child != null),
9 | super(key: key);
10 |
11 | @override
12 | _BouncingState createState() => _BouncingState();
13 | }
14 |
15 | class _BouncingState extends State
16 | with SingleTickerProviderStateMixin {
17 | double _scale;
18 | AnimationController _controller;
19 |
20 | @override
21 | void initState() {
22 | super.initState();
23 | _controller = AnimationController(
24 | vsync: this,
25 | duration: Duration(milliseconds: 100),
26 | lowerBound: 0.0,
27 | upperBound: 0.1,
28 | );
29 | _controller.addListener(() {
30 | setState(() {});
31 | });
32 | }
33 |
34 | @override
35 | void dispose() {
36 | super.dispose();
37 | _controller.dispose();
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | _scale = 1 - _controller.value;
43 | return Listener(
44 | onPointerDown: (PointerDownEvent event) {
45 | if (widget.onPress != null) {
46 | _controller.forward();
47 | }
48 | },
49 | onPointerUp: (PointerUpEvent event) {
50 | if (widget.onPress != null) {
51 | _controller.reverse();
52 | widget.onPress();
53 | }
54 | },
55 | child: Transform.scale(
56 | scale: _scale,
57 | child: widget.child,
58 | ),
59 | );
60 | }
61 | }
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | car_rendal_app
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/lib/Widgets/CarRentType.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:velocity_x/velocity_x.dart';
4 |
5 | class RentType extends StatelessWidget {
6 | final String type;
7 | final bool enabled;
8 | final Function ontap;
9 |
10 | const RentType({Key key, this.type, this.enabled, this.ontap})
11 | : super(key: key);
12 | @override
13 | Widget build(BuildContext context) {
14 | return InkWell(
15 | onTap: ontap,
16 | child: Container(
17 | width: MediaQuery.of(context).size.width * 0.4,
18 | decoration: BoxDecoration(
19 | color: enabled == true ? Vx.blue500 : Vx.white,
20 | borderRadius: BorderRadius.circular(10),
21 | ),
22 | padding: EdgeInsets.all(10),
23 | child: Column(
24 | children: [
25 | enabled == true
26 | ? "$type"
27 | .text
28 | .wider
29 | .bold
30 | .gray900
31 | .maxLines(1)
32 | .size(15)
33 | .make()
34 | .pOnly(
35 | top: 25,
36 | bottom: 25,
37 | )
38 | : "$type"
39 | .text
40 | .wider
41 | .bold
42 | .gray900
43 | .maxLines(1)
44 | .size(15)
45 | .make()
46 | .pOnly(
47 | top: 25,
48 | bottom: 25,
49 | ),
50 | ],
51 | ),
52 | ).p(20),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/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/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | car_rendal_app
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Car Rental management system App UI Flutter | Velocity X |Backend Firebase
2 | Flutter based Car Rental management system App | Flutter | Velocity X | Backend Firebase
3 |
4 | Custom Splash Screen with flare animation
5 |
6 | Google login
7 |
8 | Texts are animated with Shimmer
9 |
10 | Animated Bottom Navigation Bar
11 |
12 | Custom Animations
13 |
14 | Custom Grid View
15 |
16 | Dark Theme mode
17 |
18 | Save The Application state (If you close the application it save the application state For Example dark theme enable or not and User login or not)
19 |
20 | ## Demo
21 | Demo available on YouTube.
22 |
23 | Link:
24 | https://youtu.be/mWFOnzAi4-w
25 |
26 | ## Screenshot
27 |
28 |
29 | 
30 |
31 |
32 | 
33 |
34 |
35 | 
36 |
37 |
38 | 
39 |
40 |
41 | 
42 |
43 |
44 | 
45 |
46 |
47 | ## dark Mode
48 |
49 |
50 | 
51 |
52 |
53 | 
54 |
55 |
56 |
57 | ## Inspiration
58 |
59 | 
60 |
61 |
62 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'com.google.gms.google-services'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 | android {
30 | compileSdkVersion 29
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.car_rendal_app"
43 | multiDexEnabled true
44 | minSdkVersion 21
45 | targetSdkVersion 29
46 | versionCode flutterVersionCode.toInteger()
47 | versionName flutterVersionName
48 | }
49 |
50 | buildTypes {
51 | release {
52 | // TODO: Add your own signing config for the release build.
53 | // Signing with the debug keys for now, so `flutter run --release` works.
54 | signingConfig signingConfigs.debug
55 | }
56 | }
57 | }
58 |
59 | flutter {
60 | source '../..'
61 | }
62 |
63 | dependencies {
64 | implementation 'com.android.support:multidex:2.0.1'
65 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
66 | implementation platform('com.google.firebase:firebase-bom:26.1.1')
67 | }
68 |
--------------------------------------------------------------------------------
/lib/Screens/Nointernet.dart:
--------------------------------------------------------------------------------
1 | import 'package:car_rendal_app/Screens/InterNetChecker.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:get/get.dart';
4 |
5 | class NoConnectionImage extends StatefulWidget {
6 | static const routeName = '/NoConnectionImage';
7 | @override
8 | _NoConnectionImageState createState() => _NoConnectionImageState();
9 | }
10 |
11 | class _NoConnectionImageState extends State {
12 | @override
13 | void initState() {
14 | super.initState();
15 | }
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | double width = MediaQuery.of(context).size.width;
20 | double height = MediaQuery.of(context).size.height - 150;
21 | return Scaffold(
22 | backgroundColor: Colors.white,
23 | body: SingleChildScrollView(
24 | physics: BouncingScrollPhysics(),
25 | child: Container(
26 | width: width,
27 | height: height,
28 | child: Column(
29 | mainAxisAlignment: MainAxisAlignment.center,
30 | crossAxisAlignment: CrossAxisAlignment.center,
31 | children: [
32 | Text('Whoops!',
33 | style: TextStyle(
34 | color: Colors.redAccent,
35 | fontSize: 40,
36 | fontWeight: FontWeight.w500)),
37 | Text(
38 | 'No internet connections found \n Check your connection or try again',
39 | style: TextStyle(
40 | fontSize: 18,
41 | color: Colors.redAccent,
42 | fontWeight: FontWeight.w400),
43 | textAlign: TextAlign.center,
44 | ),
45 | Padding(
46 | padding: const EdgeInsets.all(8.0),
47 | child: RaisedButton(
48 | child: Text(
49 | "RETRY",
50 | style: TextStyle(color: Colors.white),
51 | ),
52 | color: Colors.red,
53 | onPressed: () {
54 | Get.to(InternetChecker());
55 | },
56 | ),
57 | ),
58 | ],
59 | ),
60 | ),
61 | ),
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/lib/Screens/InterNetChecker.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:connectivity/connectivity.dart';
3 | import 'package:flutter/foundation.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter/services.dart';
6 | import 'package:get/get.dart';
7 |
8 | import 'Nointernet.dart';
9 | import 'Spleash_Screen.dart';
10 |
11 | class InternetChecker extends StatefulWidget {
12 | InternetChecker({Key key, this.title}) : super(key: key);
13 |
14 | final String title;
15 |
16 | @override
17 | _InternetCheckerState createState() => _InternetCheckerState();
18 | }
19 |
20 | class _InternetCheckerState extends State {
21 | String _connectionStatus = 'Unknown';
22 | final Connectivity _connectivity = Connectivity();
23 | StreamSubscription _connectivitySubscription;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | initConnectivity();
29 |
30 | _connectivitySubscription =
31 | _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
32 | }
33 |
34 | nxtpge() {
35 | if (_connectionStatus == "ConnectivityResult.none") {
36 | Get.to(NoConnectionImage());
37 | } else {
38 | Get.to(StatusChecker());
39 | }
40 | }
41 |
42 | @override
43 | void dispose() {
44 | _connectivitySubscription.cancel();
45 | super.dispose();
46 | }
47 |
48 | Future initConnectivity() async {
49 | ConnectivityResult result;
50 | try {
51 | result = await _connectivity.checkConnectivity();
52 | } on PlatformException catch (e) {
53 | print(e.toString());
54 | }
55 | if (!mounted) {
56 | return Future.value(null);
57 | }
58 | print(result);
59 | return _updateConnectionStatus(result);
60 | }
61 |
62 | @override
63 | Widget build(BuildContext context) {
64 | return Scaffold(
65 | body: Center(child: CircularProgressIndicator(
66 | backgroundColor: Colors.black12,
67 |
68 | )),
69 | );
70 | }
71 |
72 | Future _updateConnectionStatus(ConnectivityResult result) async {
73 | switch (result) {
74 | case ConnectivityResult.wifi:
75 | case ConnectivityResult.mobile:
76 | case ConnectivityResult.none:
77 | setState(() => _connectionStatus = result.toString());
78 | nxtpge();
79 | break;
80 | default:
81 | setState(() => _connectionStatus = 'Failed to get connectivity.');
82 | break;
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: car_rendal_app
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.1+1
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 | cloud_firestore: ^0.14.4
27 | cupertino_icons: ^1.0.0
28 | firebase_auth: ^0.18.4+1
29 | firebase_core: ^0.5.3
30 | get: ^3.24.0
31 | google_fonts: ^1.1.1
32 | google_sign_in: ^4.5.6
33 | velocity_x: ^1.3.1
34 | flutter_staggered_grid_view: ^0.3.3
35 | share: ^0.6.5+4
36 | ars_progress_dialog: ^0.1.2
37 | animated_onboarding: ^0.0.2
38 | bouncing_widget: ^1.2.0
39 | curved_navigation_bar: ^0.3.7
40 | animated_search_bar: ^1.2.0
41 | animate_do: ^1.7.5
42 | flare_flutter: ^2.0.6
43 | flutter_signin_button: ^1.1.0
44 | connectivity: ^2.0.2
45 | shared_preferences: ^0.5.12+4
46 | awesome_dialog: ^1.3.0
47 |
48 | dev_dependencies:
49 | flutter_test:
50 | sdk: flutter
51 |
52 | # For information on the generic Dart part of this file, see the
53 | # following page: https://dart.dev/tools/pub/pubspec
54 | # The following section is specific to Flutter.
55 | flutter:
56 |
57 | # The following line ensures that the Material Icons font is
58 | # included with your application, so that you can use the icons in
59 | # the material Icons class.
60 | uses-material-design: true
61 |
62 | # To add assets to your application, add an assets section, like this:
63 | assets:
64 | - Assets/
65 | # - images/a_dot_ham.jpeg
66 | # An image asset can refer to one or more resolution-specific "variants", see
67 | # https://flutter.dev/assets-and-images/#resolution-aware.
68 | # For details regarding adding assets from package dependencies, see
69 | # https://flutter.dev/assets-and-images/#from-packages
70 | # To add custom fonts to your application, add a fonts section here,
71 | # in this "flutter" section. Each entry in this list should have a
72 | # "family" key with the font family name, and a "fonts" key with a
73 | # list giving the asset and other descriptors for the font. For
74 | # example:
75 | # fonts:
76 | # - family: Schyler
77 | # fonts:
78 | # - asset: fonts/Schyler-Regular.ttf
79 | # - asset: fonts/Schyler-Italic.ttf
80 | # style: italic
81 | # - family: Trajan Pro
82 | # fonts:
83 | # - asset: fonts/TrajanPro.ttf
84 | # - asset: fonts/TrajanPro_Bold.ttf
85 | # weight: 700
86 | #
87 | # For details regarding fonts from package dependencies,
88 | # see https://flutter.dev/custom-fonts/#from-packages
89 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/lib/Screens/Spleash_Screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:animate_do/animate_do.dart';
3 | import 'package:car_rendal_app/Screens/Login.dart';
4 | import 'package:flare_flutter/flare_actor.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:get/get.dart';
8 | import 'package:shared_preferences/shared_preferences.dart';
9 | import 'package:velocity_x/velocity_x.dart';
10 | import '../main.dart';
11 | import 'InterNetChecker.dart';
12 |
13 | class SpleashScreen extends StatefulWidget {
14 | @override
15 | _SpleashScreenState createState() => _SpleashScreenState();
16 | }
17 |
18 | class _SpleashScreenState extends State {
19 | @override
20 | void initState() {
21 | Timer(
22 | Duration(
23 | seconds: 10,
24 | ),
25 | nextpge);
26 | super.initState();
27 |
28 | SystemChrome.setEnabledSystemUIOverlays([]);
29 | }
30 |
31 | nextpge() {
32 | Get.to((InternetChecker()));
33 | }
34 |
35 | @override
36 | Widget build(BuildContext context) {
37 | return Scaffold(
38 | body: Center(
39 | child: VStack(
40 | [
41 | SlideInRight(
42 | // duration: Duration(seconds: 1),
43 | child: Center(
44 | child: Container(
45 | height: MediaQuery.of(context).size.height * 0.1,
46 | width: MediaQuery.of(context).size.width * 0.8,
47 | child: FlareActor(
48 | "Assets/Car_Spleash.flr",
49 | animation: "start",
50 | fit: BoxFit.fill,
51 | ),
52 | ),
53 | ),
54 | ),
55 | SlideInLeft(
56 | child: "DD Car Rendal"
57 | .text
58 | .extraBold
59 | .extraBlack
60 | .italic
61 | .blue600
62 | .size(25)
63 | .lineHeight(3)
64 | .makeCentered()),
65 | ],
66 | ),
67 | ),
68 | );
69 | }
70 | }
71 |
72 | class StatusChecker extends StatefulWidget {
73 | StatusChecker({Key key}) : super(key: key);
74 |
75 | @override
76 | _StatusCheckerState createState() => _StatusCheckerState();
77 | }
78 |
79 | class _StatusCheckerState extends State {
80 | String userid, user;
81 | bool onboard, onboard1;
82 | Future getUserID() async {
83 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
84 | userid = myPrefs.getString("userid");
85 | setState(() {
86 | user = userid;
87 | print("$user-$userid");
88 | });
89 | print(userid);
90 | }
91 |
92 | Future onboardingpref() async {
93 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
94 | myPrefs.setBool("onboardingopened", false);
95 | onboard = myPrefs.getBool("onboardingopened");
96 | setState(() {
97 | onboard1 = (onboard == null || onboard == false) ? false : true;
98 | print("$onboard1-$onboard");
99 | });
100 | print(onboard1);
101 | }
102 |
103 | @override
104 | void initState() {
105 | getUserID();
106 | onboardingpref();
107 | super.initState();
108 | }
109 |
110 | @override
111 | Widget build(BuildContext context) {
112 | return Scaffold(
113 | body: StreamBuilder(
114 | builder: (BuildContext context, AsyncSnapshot snapshot) {
115 | if (snapshot.hasData == null) {
116 | return Login();
117 | } else {
118 | return ((userid == null) ? Login() : BottomNavBar());
119 | }
120 | },
121 | ),
122 | );
123 | }
124 |
125 |
126 | }
127 |
--------------------------------------------------------------------------------
/lib/Screens/Aboutus.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:velocity_x/velocity_x.dart';
3 |
4 | class AboutUs extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 |
8 | return Scaffold(
9 | body: SingleChildScrollView(
10 | physics: BouncingScrollPhysics(),
11 | child: Column(
12 | children: [
13 | _buildInfo1(),
14 | _buildInfo2(),
15 | ],
16 | ),
17 | ),
18 | );
19 | }
20 |
21 | Widget _buildInfo1() {
22 | return Container(
23 | padding: EdgeInsets.all(10),
24 | child: Card(
25 | child: Container(
26 | alignment: Alignment.topLeft,
27 | padding: EdgeInsets.all(15),
28 | child: Column(
29 | children: [
30 | Row(
31 | children: [
32 | CircleAvatar(
33 | radius: 30,
34 | backgroundColor: Colors.white,
35 | backgroundImage: AssetImage('Assets/ob2.png',),
36 |
37 | ),
38 | SizedBox(width: 10),
39 | Column(
40 | mainAxisSize: MainAxisSize.min,
41 | children: [
42 | Text('DD Car Rendal').text.size(17).bold.make(),
43 | ],
44 | ),
45 | ],
46 | ),
47 | SizedBox(height: 8),
48 | ListTile(
49 | leading: Icon(
50 | Icons.info,
51 | size: 23,
52 | ),
53 | title: Text("Version").text.size(13).bold.make(),
54 | subtitle: Text("1.0").text.size(12).make(),
55 | onTap: () {},
56 | ),
57 | Divider(),
58 | ListTile(
59 | leading: Icon(
60 | Icons.cached,
61 | size: 23,
62 | ),
63 | title: Text("Changelog").text.size(13).bold.make(),
64 | onTap: () {},
65 | ),
66 | Divider(),
67 | ListTile(
68 | leading: Icon(
69 | Icons.offline_pin,
70 | size: 23,
71 | ),
72 | title: Text("License").text.size(13).bold.make(),
73 | onTap: () {},
74 | ),
75 | ],
76 | )),
77 | ));
78 | }
79 |
80 | Widget _buildInfo2() {
81 | return Container(
82 | padding: EdgeInsets.all(10),
83 | child: Card(
84 | child: Container(
85 | alignment: Alignment.topLeft,
86 | padding: EdgeInsets.all(15),
87 | child: Column(
88 | crossAxisAlignment: CrossAxisAlignment.start,
89 | children: [
90 | Text('Author').text.size(17).bold.make(),
91 | HeightBox(10),
92 | ListTile(
93 | leading: Icon(
94 | Icons.person,
95 | size: 23,
96 | ),
97 | title: Text("Deepakkumar").text.size(13).bold.make(),
98 | subtitle: Text("Coimbatore,TamilNadu").text.size(12).make(),
99 | onTap: () {},
100 | ),
101 | Divider(),
102 | ListTile(
103 | leading: Icon(
104 | Icons.file_download,
105 | size: 23,
106 | ),
107 | title:
108 | Text("Download From Cloud").text.size(13).bold.make(),
109 | onTap: () {},
110 | ),
111 | ],
112 | )),
113 | ));
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/lib/Screens/Login.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:car_rendal_app/Widgets/BouncingButton.dart';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:firebase_core/firebase_core.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:flutter_signin_button/flutter_signin_button.dart';
9 | import 'package:google_sign_in/google_sign_in.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 | import 'package:velocity_x/velocity_x.dart';
12 | import '../main.dart';
13 |
14 | class Login extends StatefulWidget {
15 | @override
16 | _LoginState createState() => _LoginState();
17 | }
18 |
19 | class _LoginState extends State {
20 | @override
21 | void initState() {
22 | Firebase.initializeApp();
23 | SystemChrome.setEnabledSystemUIOverlays([]);
24 | super.initState();
25 | }
26 |
27 | final firestoreInstance = FirebaseFirestore.instance;
28 | final FirebaseAuth _auth = FirebaseAuth.instance;
29 | final GoogleSignIn googleSignIn = GoogleSignIn();
30 |
31 | Future signInWithGoogle() async {
32 | await Firebase.initializeApp();
33 |
34 | final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn();
35 | final GoogleSignInAuthentication googleSignInAuthentication =
36 | await googleSignInAccount.authentication;
37 |
38 | final AuthCredential credential = GoogleAuthProvider.credential(
39 | accessToken: googleSignInAuthentication.accessToken,
40 | idToken: googleSignInAuthentication.idToken,
41 | );
42 |
43 | final UserCredential authResult =
44 | await _auth.signInWithCredential(credential);
45 | final User user = authResult.user;
46 |
47 | if (user != null) {
48 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
49 | myPrefs.setString("userid", user.uid);
50 |
51 | firestoreInstance.collection("users").doc(user.uid).set({
52 | "username": user.displayName,
53 | "photourl": user.photoURL,
54 | "email": user.email,
55 | "Balance": "0",
56 | "img":
57 | "https://firebasestorage.googleapis.com/v0/b/car-rendal-app.appspot.com/o/Land-Rover-Range-Rover.jpg?alt=media&token=f725ce01-9df3-4d34-9ebb-4c7b32e0c7ee",
58 | "model": "E-Series",
59 | "name": "Land Rover",
60 | });
61 | Navigator.of(context).push(
62 | MaterialPageRoute(
63 | builder: (context) {
64 | return BottomNavBar();
65 | },
66 | ),
67 | );
68 | return user;
69 | }
70 |
71 | return null;
72 | }
73 | @override
74 | Widget build(BuildContext context) {
75 | return Scaffold(
76 | body: Container(
77 | color: Colors.white,
78 | child: Center(
79 | child: Column(
80 | mainAxisSize: MainAxisSize.max,
81 | mainAxisAlignment: MainAxisAlignment.center,
82 | children: [
83 | SlideInUp(
84 | child: "DD CAR RENDAL"
85 | .text
86 | .bold
87 | .extraBlack
88 | .size(25)
89 | .wide
90 | .make()
91 | .shimmer(
92 | secondaryColor: Vx.randomColor,
93 | primaryColor: Vx.purple400,
94 | showAnimation: true,
95 | gradient: LinearGradient(colors: [
96 | Colors.green,
97 | Colors.blue,
98 | Colors.cyan,
99 | Colors.indigoAccent,
100 | ]))),
101 | SizedBox(height: 50),
102 | Bouncing(
103 | onPress: () {},
104 | child: SignInButton(
105 | Buttons.Google,
106 | onPressed: () async {
107 | signInWithGoogle();
108 | },
109 | )),
110 | ],
111 | ),
112 | ),
113 | ),
114 | );
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:car_rendal_app/Screens/Aboutus.dart';
3 | import 'package:car_rendal_app/Screens/Home.dart';
4 | import 'package:car_rendal_app/Screens/Settings.dart';
5 | import 'package:car_rendal_app/Screens/Spleash_Screen.dart';
6 | import 'package:car_rendal_app/Screens/TopDeals.dart';
7 | import 'package:curved_navigation_bar/curved_navigation_bar.dart';
8 | import 'package:firebase_core/firebase_core.dart';
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter/services.dart';
11 | import 'package:get/get.dart';
12 | import 'package:get/get_navigation/src/root/get_material_app.dart';
13 | import 'package:google_fonts/google_fonts.dart';
14 | import 'package:shared_preferences/shared_preferences.dart';
15 | import 'package:velocity_x/velocity_x.dart';
16 |
17 |
18 | Future main() async {
19 | WidgetsFlutterBinding.ensureInitialized();
20 | await Firebase.initializeApp();
21 | SystemChrome.setEnabledSystemUIOverlays([]);
22 | runApp(MyApp());
23 | }
24 |
25 | class MyApp extends StatefulWidget {
26 | @override
27 | _MyAppState createState() => _MyAppState();
28 | }
29 |
30 | class _MyAppState extends State {
31 | @override
32 | void initState() {
33 | Firebase.initializeApp();
34 | getDarkValue();
35 | super.initState();
36 | }
37 |
38 | getDarkValue() async {
39 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
40 | dark = myPrefs.getBool("isdarktheme");
41 | setState(() {
42 | theme = dark;
43 | });
44 | }
45 |
46 | bool dark, theme;
47 | @override
48 | Widget build(BuildContext context) {
49 | return GetMaterialApp(
50 | title: 'DD Car Rendal',
51 | theme: ThemeData(
52 | brightness: (theme == true) ? Brightness.dark : Brightness.light,
53 | fontFamily: GoogleFonts.notoSerif().fontFamily,
54 | primarySwatch: Colors.blue,
55 | ),
56 | home: SpleashScreen(),
57 | );
58 | }
59 | }
60 |
61 | class BottomNavBar extends StatefulWidget {
62 | @override
63 | _BottomNavBarState createState() => _BottomNavBarState();
64 | }
65 |
66 | int pos = 0;
67 |
68 | class _BottomNavBarState extends State {
69 | GlobalKey _bottomNavigationKey = GlobalKey();
70 |
71 | darkTheme(String key, bool value) async {
72 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
73 | myPrefs.setBool(key, value);
74 | }
75 |
76 | @override
77 | void initState() {
78 | SystemChrome.setEnabledSystemUIOverlays([]);
79 | super.initState();
80 | }
81 |
82 | DateTime currentBackPressTime;
83 | @override
84 | Widget build(BuildContext context) {
85 | Future onWillPop() {
86 | DateTime now = DateTime.now();
87 | if (currentBackPressTime == null ||
88 | now.difference(currentBackPressTime) > Duration(seconds: 2)) {
89 | currentBackPressTime = now;
90 | VxToast.show(context, msg: "Again Press to Exit");
91 | return Future.value(false);
92 | }
93 | return Future.value(true);
94 | }
95 |
96 | List _buildScreens = [
97 | Home(),
98 | TopDeals(),
99 | Container(
100 | height: double.infinity,
101 | width: double.infinity,
102 | color: Vx.randomPrimaryColor,
103 | ),
104 | AboutUs(),
105 | Settings(),
106 | ];
107 | return Scaffold(
108 | bottomNavigationBar: WillPopScope(
109 | onWillPop: onWillPop,
110 | child: SlideInDown(
111 | child: CurvedNavigationBar(
112 | key: _bottomNavigationKey,
113 | index: 0,
114 | height: 50.0,
115 | items: [
116 | Icon(Icons.home, size: 30, color: Vx.gray900),
117 | Icon(Icons.list, size: 30, color: Vx.gray900),
118 | Icon(Icons.compare_arrows, size: 30, color: Vx.gray900),
119 | Icon(Icons.call_split, size: 30, color: Vx.gray900),
120 | Icon(Icons.settings, size: 30, color: Vx.gray900),
121 | ],
122 | color: Colors.white,
123 | buttonBackgroundColor: Colors.blueAccent,
124 | backgroundColor: Colors.white,
125 | animationCurve: Curves.easeInOut,
126 | animationDuration: Duration(milliseconds: 600),
127 | onTap: (index) {
128 | setState(() {
129 | pos = index;
130 | });
131 | },
132 | letIndexChange: (index) => true,
133 | ),
134 | ),
135 | ),
136 | body: Container(
137 | //color: Colors.blueAccent,
138 | child: _buildScreens[pos],
139 | ));
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/lib/Screens/TopDeals.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:animated_search_bar/animated_search_bar.dart';
3 | import 'package:car_rendal_app/Widgets/FiliterTitle.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
8 | import 'package:get/get.dart';
9 | import 'package:velocity_x/velocity_x.dart';
10 | import 'DetailPage.dart';
11 |
12 | class TopDeals extends StatefulWidget {
13 | @override
14 | _TopDealsState createState() => _TopDealsState();
15 | }
16 |
17 | class _TopDealsState extends State {
18 | bool filiterenabled = false;
19 |
20 | bool filitertype = false;
21 | String searchText = "";
22 | String ftype;
23 |
24 | @override
25 | void initState() {
26 | SystemChrome.setEnabledSystemUIOverlays([]);
27 | super.initState();
28 | }
29 | @override
30 | Widget build(BuildContext context) {
31 | return new Scaffold(
32 | appBar: AppBar(
33 | title: AnimatedSearchBar(
34 | label: "Search",
35 | labelStyle: TextStyle(fontSize: 16),
36 | searchStyle: TextStyle(color: Colors.white),
37 | cursorColor: Colors.black,
38 | searchDecoration: InputDecoration(
39 | hintText: "Search",
40 | alignLabelWithHint: true,
41 | fillColor: Colors.white,
42 | focusColor: Colors.white,
43 | hintStyle: TextStyle(color: Colors.white70),
44 | border: InputBorder.none,
45 | ),
46 | onChanged: (value) {
47 | print("value on Change");
48 | setState(() {
49 | searchText = value;
50 | });
51 | },
52 | ),
53 | ),
54 | body: Container(
55 | color: Colors.grey.withOpacity(0.1),
56 | child: new Padding(
57 | padding: const EdgeInsets.all(7.0),
58 | child: StreamBuilder(
59 | stream: FirebaseFirestore.instance.collection('cars').snapshots(),
60 | builder: (context, snapshot) {
61 | if (!snapshot.hasData) return CircularProgressIndicator();
62 | return StaggeredGridView.countBuilder(
63 | crossAxisCount: 4,
64 | itemCount: snapshot.data.documents.length,
65 | itemBuilder: (BuildContext context, int index) {
66 | DocumentSnapshot ds = snapshot.data.documents[index];
67 | return SlideInDown(
68 | child: Container(
69 | // color: Colors.blue,
70 | height: MediaQuery.of(context).size.height * 0.25,
71 | width: MediaQuery.of(context).size.width * 0.5,
72 | child: Card(
73 | shape: RoundedRectangleBorder(
74 | borderRadius: BorderRadius.circular(10.0),
75 | ),
76 | elevation: 3.0,
77 | child: Center(
78 | child: Column(
79 | children: [
80 | Container(
81 | height: 140,
82 | decoration: BoxDecoration(
83 | //color: Colors.blue,
84 | image: DecorationImage(
85 | image: NetworkImage(
86 | ds['img'],
87 | ),
88 | fit: BoxFit.fill,
89 | ),
90 | borderRadius: BorderRadius.circular(14),
91 | ),
92 | ),
93 | "${ds["name"]}"
94 | .text
95 | .bold
96 | .size(17)
97 | .make()
98 | .shimmer(
99 | primaryColor: Colors.blue,
100 | secondaryColor: Colors.pink,
101 | ),
102 | "Rent: Rs.${ds["1monthrent"]}"
103 | .text
104 | .semiBold
105 | .make()
106 | .py8(),
107 | ],
108 | ),
109 | ),
110 | ).onInkTap(() {
111 | Get.to(CarDetailPage(
112 | name: ds['name'],
113 | model: ds['model'],
114 | ));
115 | })),
116 | );
117 | },
118 | staggeredTileBuilder: (int index) =>
119 | new StaggeredTile.count(2, index.isEven ? 2.5 : 2.7),
120 | mainAxisSpacing: 4.0,
121 | crossAxisSpacing: 4.0,
122 | );
123 | },
124 | ),
125 | ),
126 | ),
127 | bottomNavigationBar: SlideInDown(
128 | child: Container(
129 | //color: Colors.grey[900].withOpacity(0.2),
130 | height: MediaQuery.of(context).size.height * 0.085,
131 | child: SlideInRight(
132 | child: Row(
133 | children: [
134 | filiterenabled == false
135 | ? Container(
136 | decoration: BoxDecoration(
137 | color: Colors.white,
138 | border: Border.all(),
139 | borderRadius: BorderRadius.circular(10),
140 | ),
141 | child: Icon(
142 | Icons.filter_list_alt,
143 | color: Colors.black,
144 | ).p(4),
145 | ).p(15)
146 | : Container(
147 | decoration: BoxDecoration(
148 | color: Colors.blue,
149 | border: Border.all(),
150 | borderRadius: BorderRadius.circular(10),
151 | ),
152 | child: Icon(
153 | Icons.filter_list_alt,
154 | color: Colors.white,
155 | ).p(4),
156 | ).p(15),
157 | WidthBox(10),
158 | FiliterCard(
159 | enabled: ftype == "newest"
160 | ? filitertype = true
161 | : filitertype = false,
162 | name: "Newest",
163 | ontap: () {
164 | setState(() {
165 | filiterenabled == false
166 | ? filiterenabled = true
167 | : filiterenabled = false;
168 |
169 | ftype == "newest" ? ftype = null : ftype = "newest";
170 | });
171 | },
172 | ),
173 | WidthBox(10),
174 | FiliterCard(
175 | enabled: ftype == "bestmatch"
176 | ? filitertype = true
177 | : filitertype = false,
178 | name: "Best Match",
179 | ontap: () {
180 | setState(() {
181 | filiterenabled == false
182 | ? filiterenabled = true
183 | : filiterenabled = false;
184 |
185 | ftype == "bestmatch" ? ftype = null : ftype = "bestmatch";
186 | });
187 | },
188 | ),
189 | WidthBox(10),
190 | FiliterCard(
191 | enabled: ftype == "lowestprice"
192 | ? filitertype = true
193 | : filitertype = false,
194 | name: "Lowest Price",
195 | ontap: () {
196 | setState(() {
197 | filiterenabled == false
198 | ? filiterenabled = true
199 | : filiterenabled = false;
200 |
201 | ftype == "lowestprice"
202 | ? ftype = null
203 | : ftype = "lowestprice";
204 | });
205 | },
206 | ),
207 | WidthBox(10),
208 | FiliterCard(
209 | enabled: ftype == "highestprice"
210 | ? filitertype = true
211 | : filitertype = false,
212 | name: "Highest Price",
213 | ontap: () {
214 | setState(() {
215 | filiterenabled == false
216 | ? filiterenabled = true
217 | : filiterenabled = false;
218 |
219 | ftype == "highestprice"
220 | ? ftype = null
221 | : ftype = "highestprice";
222 | });
223 | },
224 | ),
225 | ],
226 | ).scrollHorizontal(),
227 | ),
228 | ),
229 | ),
230 | );
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/lib/Screens/Settings.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:get/get.dart';
3 | import 'package:google_sign_in/google_sign_in.dart';
4 | import 'package:velocity_x/velocity_x.dart';
5 | import 'package:animate_do/animate_do.dart';
6 | import 'package:cloud_firestore/cloud_firestore.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter/services.dart';
9 | import 'package:shared_preferences/shared_preferences.dart';
10 |
11 | import 'Login.dart';
12 |
13 | class Settings extends StatefulWidget {
14 | static const routeName = '/SettingsPage_3';
15 |
16 | @override
17 | _SettingsState createState() => _SettingsState();
18 | }
19 |
20 | class _SettingsState extends State {
21 | String userid, user;
22 | bool enable = false;
23 | Future getUserID() async {
24 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
25 | userid = myPrefs.getString("userid");
26 | setState(() {
27 | user = userid;
28 | print("$user-$userid");
29 | });
30 | print(userid);
31 | }
32 |
33 | getDarkValue() async {
34 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
35 | dark = myPrefs.getBool("isdarktheme");
36 | setState(() {
37 | enable = dark;
38 | });
39 | }
40 |
41 | bool dark;
42 | @override
43 | void initState() {
44 | getUserID();
45 | getDarkValue();
46 | SystemChrome.setEnabledSystemUIOverlays([]);
47 | super.initState();
48 | }
49 |
50 | darkTheme(String key, bool value) async {
51 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
52 | myPrefs.setBool(key, value);
53 | }
54 |
55 | final GoogleSignIn googleSignIn = GoogleSignIn();
56 | @override
57 | Widget build(BuildContext context) {
58 | return Scaffold(
59 | backgroundColor: Colors.grey.shade200,
60 | body: StreamBuilder(
61 | stream: FirebaseFirestore.instance
62 | .collection('users')
63 | .doc(user)
64 | .snapshots(),
65 | builder: (context, snapshot) {
66 | if (!snapshot.hasData)
67 | return Center(child: CircularProgressIndicator());
68 | var userDocument = snapshot.data;
69 | return SingleChildScrollView(
70 | padding: const EdgeInsets.all(16.0),
71 | child: Column(
72 | crossAxisAlignment: CrossAxisAlignment.start,
73 | children: [
74 | const SizedBox(height: 10.0),
75 | SlideInUp(
76 | child: Card(
77 | elevation: 0.5,
78 | margin: const EdgeInsets.symmetric(
79 | vertical: 4.0,
80 | horizontal: 0,
81 | ),
82 | child: Column(
83 | children: [
84 | Container(
85 | child: Row(
86 | children: [
87 | Padding(
88 | padding: const EdgeInsets.all(12.0),
89 | child: SlideInLeft(
90 | child: CircleAvatar(
91 | backgroundImage: NetworkImage(
92 | userDocument['photourl']),
93 | radius: 22.0,
94 | ),
95 | ),
96 | ),
97 | SlideInRight(
98 | child: Padding(
99 | padding: const EdgeInsets.only(left: 8.0),
100 | child: "${userDocument['username']}"
101 | .text
102 | .semiBold
103 | .make()
104 | .shimmer(
105 | primaryColor: Colors.blue[600],
106 | secondaryColor: Colors.cyan,
107 | ),
108 | ),
109 | ),
110 | ],
111 | ),
112 | ),
113 | _buildDivider(),
114 | Padding(
115 | padding: const EdgeInsets.all(8.0),
116 | child: Container(
117 | child: Text('Show Profile'),
118 | ),
119 | ).onInkTap(() {})
120 | ],
121 | ),
122 | ),
123 | ),
124 | const SizedBox(height: 20.0),
125 | ZoomIn(
126 | child: Text(
127 | "General Settings".toUpperCase(),
128 | style: TextStyle(
129 | color: Colors.grey.shade800,
130 | fontWeight: FontWeight.bold,
131 | fontSize: 20.0,
132 | ),
133 | ),
134 | ),
135 | const SizedBox(height: 10.0),
136 | SlideInLeft(
137 | child: Card(
138 | margin: const EdgeInsets.symmetric(
139 | vertical: 8.0,
140 | horizontal: 0,
141 | ),
142 | child: Column(
143 | children: [
144 | ListTile(
145 | leading: Icon(
146 | Icons.email,
147 | color: Colors.lightGreen,
148 | ),
149 | title: Text("Change E-Mail"),
150 | trailing: Icon(Icons.keyboard_arrow_right),
151 | onTap: () {
152 | //open change password
153 | },
154 | ),
155 | _buildDivider(),
156 | ListTile(
157 | leading: Icon(
158 | Icons.phone,
159 | color: Colors.lightGreen,
160 | ),
161 | title: Text("Change Phone Number"),
162 | trailing: Icon(Icons.keyboard_arrow_right),
163 | onTap: () {
164 | //open change location
165 | },
166 | ),
167 | _buildDivider(),
168 | ListTile(
169 | leading: Icon(
170 | Icons.lock_outline,
171 | color: Colors.lightGreen,
172 | ),
173 | title: Text("Change Password"),
174 | trailing: Icon(Icons.keyboard_arrow_right),
175 | onTap: () {
176 | //open change password
177 | },
178 | ),
179 | _buildDivider(),
180 | ListTile(
181 | leading: Icon(
182 | Icons.language,
183 | color: Colors.lightGreen,
184 | ),
185 | title: Text("Change Language"),
186 | trailing: Icon(Icons.keyboard_arrow_right),
187 | onTap: () {
188 | //open change language
189 | },
190 | ),
191 | ],
192 | ),
193 | ),
194 | ),
195 | const SizedBox(height: 20.0),
196 | SlideInLeft(
197 | child: Text(
198 | "Notification Settings".toUpperCase(),
199 | style: TextStyle(
200 | color: Colors.grey.shade800,
201 | fontWeight: FontWeight.bold,
202 | fontSize: 20.0,
203 | ),
204 | ),
205 | ),
206 | const SizedBox(height: 10.0),
207 | SlideInLeft(
208 | child: Card(
209 | margin: const EdgeInsets.symmetric(
210 | vertical: 8.0,
211 | horizontal: 0,
212 | ),
213 | child: Column(
214 | children: [
215 | RaisedButton(
216 | child: Text("Theme"),
217 | onPressed: () {
218 | setState(() {
219 | if (enable == true) {
220 | enable = false;
221 | Get.changeTheme(ThemeData.light());
222 | darkTheme("isdarktheme", false);
223 | } else {
224 | enable = false;
225 | Get.changeTheme(ThemeData.dark());
226 | darkTheme("isdarktheme", true);
227 | }
228 | });
229 | },
230 | ),
231 | Container(
232 | child: SwitchListTile(
233 | activeColor: Colors.lightGreen,
234 | value: true,
235 | title: Text("Theme"),
236 | onChanged: (val) {},
237 | ),
238 | ),
239 | _buildDivider(),
240 | SwitchListTile(
241 | activeColor: Colors.lightGreen,
242 | value: false,
243 | title: Text("Notifications"),
244 | onChanged: (val) {},
245 | ),
246 | _buildDivider(),
247 | SwitchListTile(
248 | activeColor: Colors.lightGreen,
249 | value: false,
250 | title: Text("Alerts"),
251 | onChanged: (val) {},
252 | ),
253 | ],
254 | ),
255 | ),
256 | ),
257 | SlideInRight(
258 | child: Card(
259 | margin: const EdgeInsets.symmetric(
260 | vertical: 8.0,
261 | horizontal: 0,
262 | ),
263 | child: ListTile(
264 | leading: Icon(Icons.exit_to_app),
265 | title: SlideInLeft(child: Text("Logout")),
266 | onTap: () async {
267 | SharedPreferences pref =
268 | await SharedPreferences.getInstance();
269 | pref.remove("userid");
270 |
271 | await FirebaseAuth.instance.signOut();
272 | await googleSignIn.disconnect();
273 | Get.to(Login());
274 | },
275 | ),
276 | ),
277 | ),
278 | const SizedBox(height: 60.0),
279 | ],
280 | ),
281 | );
282 | }));
283 | }
284 |
285 | Container _buildDivider() {
286 | return Container(
287 | margin: const EdgeInsets.symmetric(
288 | horizontal: 8.0,
289 | ),
290 | width: double.infinity,
291 | height: 1.0,
292 | color: Colors.grey.shade300,
293 | );
294 | }
295 | }
296 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | animate_do:
5 | dependency: "direct main"
6 | description:
7 | name: animate_do
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "1.7.5"
11 | animated_onboarding:
12 | dependency: "direct main"
13 | description:
14 | name: animated_onboarding
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "0.0.2"
18 | animated_search_bar:
19 | dependency: "direct main"
20 | description:
21 | name: animated_search_bar
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.2.0"
25 | animator:
26 | dependency: transitive
27 | description:
28 | name: animator
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "2.0.2"
32 | ars_progress_dialog:
33 | dependency: "direct main"
34 | description:
35 | name: ars_progress_dialog
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | async:
40 | dependency: transitive
41 | description:
42 | name: async
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "2.5.0-nullsafety.1"
46 | auto_size_text:
47 | dependency: transitive
48 | description:
49 | name: auto_size_text
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "2.1.0"
53 | awesome_dialog:
54 | dependency: "direct main"
55 | description:
56 | name: awesome_dialog
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.3.0"
60 | boolean_selector:
61 | dependency: transitive
62 | description:
63 | name: boolean_selector
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.1.0-nullsafety.1"
67 | bouncing_widget:
68 | dependency: "direct main"
69 | description:
70 | name: bouncing_widget
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.2.0"
74 | characters:
75 | dependency: transitive
76 | description:
77 | name: characters
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.1.0-nullsafety.3"
81 | charcode:
82 | dependency: transitive
83 | description:
84 | name: charcode
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "1.2.0-nullsafety.1"
88 | clock:
89 | dependency: transitive
90 | description:
91 | name: clock
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "1.1.0-nullsafety.1"
95 | cloud_firestore:
96 | dependency: "direct main"
97 | description:
98 | name: cloud_firestore
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "0.14.4"
102 | cloud_firestore_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: cloud_firestore_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "2.2.1"
109 | cloud_firestore_web:
110 | dependency: transitive
111 | description:
112 | name: cloud_firestore_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "0.2.1+2"
116 | collection:
117 | dependency: transitive
118 | description:
119 | name: collection
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.15.0-nullsafety.3"
123 | connectivity:
124 | dependency: "direct main"
125 | description:
126 | name: connectivity
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "2.0.2"
130 | connectivity_for_web:
131 | dependency: transitive
132 | description:
133 | name: connectivity_for_web
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "0.3.1+4"
137 | connectivity_macos:
138 | dependency: transitive
139 | description:
140 | name: connectivity_macos
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "0.1.0+7"
144 | connectivity_platform_interface:
145 | dependency: transitive
146 | description:
147 | name: connectivity_platform_interface
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "1.0.6"
151 | convert:
152 | dependency: transitive
153 | description:
154 | name: convert
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "2.1.1"
158 | crypto:
159 | dependency: transitive
160 | description:
161 | name: crypto
162 | url: "https://pub.dartlang.org"
163 | source: hosted
164 | version: "2.1.5"
165 | cupertino_icons:
166 | dependency: "direct main"
167 | description:
168 | name: cupertino_icons
169 | url: "https://pub.dartlang.org"
170 | source: hosted
171 | version: "1.0.0"
172 | curved_navigation_bar:
173 | dependency: "direct main"
174 | description:
175 | name: curved_navigation_bar
176 | url: "https://pub.dartlang.org"
177 | source: hosted
178 | version: "0.3.7"
179 | fake_async:
180 | dependency: transitive
181 | description:
182 | name: fake_async
183 | url: "https://pub.dartlang.org"
184 | source: hosted
185 | version: "1.2.0-nullsafety.1"
186 | ffi:
187 | dependency: transitive
188 | description:
189 | name: ffi
190 | url: "https://pub.dartlang.org"
191 | source: hosted
192 | version: "0.1.3"
193 | file:
194 | dependency: transitive
195 | description:
196 | name: file
197 | url: "https://pub.dartlang.org"
198 | source: hosted
199 | version: "5.2.1"
200 | firebase_auth:
201 | dependency: "direct main"
202 | description:
203 | name: firebase_auth
204 | url: "https://pub.dartlang.org"
205 | source: hosted
206 | version: "0.18.4+1"
207 | firebase_auth_platform_interface:
208 | dependency: transitive
209 | description:
210 | name: firebase_auth_platform_interface
211 | url: "https://pub.dartlang.org"
212 | source: hosted
213 | version: "2.1.4"
214 | firebase_auth_web:
215 | dependency: transitive
216 | description:
217 | name: firebase_auth_web
218 | url: "https://pub.dartlang.org"
219 | source: hosted
220 | version: "0.3.2+3"
221 | firebase_core:
222 | dependency: "direct main"
223 | description:
224 | name: firebase_core
225 | url: "https://pub.dartlang.org"
226 | source: hosted
227 | version: "0.5.3"
228 | firebase_core_platform_interface:
229 | dependency: transitive
230 | description:
231 | name: firebase_core_platform_interface
232 | url: "https://pub.dartlang.org"
233 | source: hosted
234 | version: "2.1.0"
235 | firebase_core_web:
236 | dependency: transitive
237 | description:
238 | name: firebase_core_web
239 | url: "https://pub.dartlang.org"
240 | source: hosted
241 | version: "0.2.1+1"
242 | flare_dart:
243 | dependency: transitive
244 | description:
245 | name: flare_dart
246 | url: "https://pub.dartlang.org"
247 | source: hosted
248 | version: "2.3.4"
249 | flare_flutter:
250 | dependency: "direct main"
251 | description:
252 | name: flare_flutter
253 | url: "https://pub.dartlang.org"
254 | source: hosted
255 | version: "2.0.6"
256 | flutter:
257 | dependency: "direct main"
258 | description: flutter
259 | source: sdk
260 | version: "0.0.0"
261 | flutter_signin_button:
262 | dependency: "direct main"
263 | description:
264 | name: flutter_signin_button
265 | url: "https://pub.dartlang.org"
266 | source: hosted
267 | version: "1.1.0"
268 | flutter_staggered_grid_view:
269 | dependency: "direct main"
270 | description:
271 | name: flutter_staggered_grid_view
272 | url: "https://pub.dartlang.org"
273 | source: hosted
274 | version: "0.3.3"
275 | flutter_test:
276 | dependency: "direct dev"
277 | description: flutter
278 | source: sdk
279 | version: "0.0.0"
280 | flutter_web_plugins:
281 | dependency: transitive
282 | description: flutter
283 | source: sdk
284 | version: "0.0.0"
285 | font_awesome_flutter:
286 | dependency: transitive
287 | description:
288 | name: font_awesome_flutter
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "8.11.0"
292 | get:
293 | dependency: "direct main"
294 | description:
295 | name: get
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "3.24.0"
299 | google_fonts:
300 | dependency: "direct main"
301 | description:
302 | name: google_fonts
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "1.1.1"
306 | google_sign_in:
307 | dependency: "direct main"
308 | description:
309 | name: google_sign_in
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "4.5.6"
313 | google_sign_in_platform_interface:
314 | dependency: transitive
315 | description:
316 | name: google_sign_in_platform_interface
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "1.1.2"
320 | google_sign_in_web:
321 | dependency: transitive
322 | description:
323 | name: google_sign_in_web
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "0.9.2"
327 | http:
328 | dependency: transitive
329 | description:
330 | name: http
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "0.12.2"
334 | http_parser:
335 | dependency: transitive
336 | description:
337 | name: http_parser
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "3.1.4"
341 | intl:
342 | dependency: transitive
343 | description:
344 | name: intl
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "0.16.1"
348 | js:
349 | dependency: transitive
350 | description:
351 | name: js
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "0.6.3-nullsafety.1"
355 | matcher:
356 | dependency: transitive
357 | description:
358 | name: matcher
359 | url: "https://pub.dartlang.org"
360 | source: hosted
361 | version: "0.12.10-nullsafety.1"
362 | meta:
363 | dependency: transitive
364 | description:
365 | name: meta
366 | url: "https://pub.dartlang.org"
367 | source: hosted
368 | version: "1.3.0-nullsafety.4"
369 | mime:
370 | dependency: transitive
371 | description:
372 | name: mime
373 | url: "https://pub.dartlang.org"
374 | source: hosted
375 | version: "0.9.7"
376 | path:
377 | dependency: transitive
378 | description:
379 | name: path
380 | url: "https://pub.dartlang.org"
381 | source: hosted
382 | version: "1.8.0-nullsafety.1"
383 | path_provider:
384 | dependency: transitive
385 | description:
386 | name: path_provider
387 | url: "https://pub.dartlang.org"
388 | source: hosted
389 | version: "1.6.24"
390 | path_provider_linux:
391 | dependency: transitive
392 | description:
393 | name: path_provider_linux
394 | url: "https://pub.dartlang.org"
395 | source: hosted
396 | version: "0.0.1+2"
397 | path_provider_macos:
398 | dependency: transitive
399 | description:
400 | name: path_provider_macos
401 | url: "https://pub.dartlang.org"
402 | source: hosted
403 | version: "0.0.4+6"
404 | path_provider_platform_interface:
405 | dependency: transitive
406 | description:
407 | name: path_provider_platform_interface
408 | url: "https://pub.dartlang.org"
409 | source: hosted
410 | version: "1.0.4"
411 | path_provider_windows:
412 | dependency: transitive
413 | description:
414 | name: path_provider_windows
415 | url: "https://pub.dartlang.org"
416 | source: hosted
417 | version: "0.0.4+3"
418 | pedantic:
419 | dependency: transitive
420 | description:
421 | name: pedantic
422 | url: "https://pub.dartlang.org"
423 | source: hosted
424 | version: "1.9.2"
425 | platform:
426 | dependency: transitive
427 | description:
428 | name: platform
429 | url: "https://pub.dartlang.org"
430 | source: hosted
431 | version: "2.2.1"
432 | plugin_platform_interface:
433 | dependency: transitive
434 | description:
435 | name: plugin_platform_interface
436 | url: "https://pub.dartlang.org"
437 | source: hosted
438 | version: "1.0.3"
439 | process:
440 | dependency: transitive
441 | description:
442 | name: process
443 | url: "https://pub.dartlang.org"
444 | source: hosted
445 | version: "3.0.13"
446 | quiver:
447 | dependency: transitive
448 | description:
449 | name: quiver
450 | url: "https://pub.dartlang.org"
451 | source: hosted
452 | version: "2.1.5"
453 | sa_v1_migration:
454 | dependency: transitive
455 | description:
456 | name: sa_v1_migration
457 | url: "https://pub.dartlang.org"
458 | source: hosted
459 | version: "1.1.2"
460 | share:
461 | dependency: "direct main"
462 | description:
463 | name: share
464 | url: "https://pub.dartlang.org"
465 | source: hosted
466 | version: "0.6.5+4"
467 | shared_preferences:
468 | dependency: "direct main"
469 | description:
470 | name: shared_preferences
471 | url: "https://pub.dartlang.org"
472 | source: hosted
473 | version: "0.5.12+4"
474 | shared_preferences_linux:
475 | dependency: transitive
476 | description:
477 | name: shared_preferences_linux
478 | url: "https://pub.dartlang.org"
479 | source: hosted
480 | version: "0.0.2+4"
481 | shared_preferences_macos:
482 | dependency: transitive
483 | description:
484 | name: shared_preferences_macos
485 | url: "https://pub.dartlang.org"
486 | source: hosted
487 | version: "0.0.1+11"
488 | shared_preferences_platform_interface:
489 | dependency: transitive
490 | description:
491 | name: shared_preferences_platform_interface
492 | url: "https://pub.dartlang.org"
493 | source: hosted
494 | version: "1.0.4"
495 | shared_preferences_web:
496 | dependency: transitive
497 | description:
498 | name: shared_preferences_web
499 | url: "https://pub.dartlang.org"
500 | source: hosted
501 | version: "0.1.2+7"
502 | shared_preferences_windows:
503 | dependency: transitive
504 | description:
505 | name: shared_preferences_windows
506 | url: "https://pub.dartlang.org"
507 | source: hosted
508 | version: "0.0.1+3"
509 | simple_animations:
510 | dependency: transitive
511 | description:
512 | name: simple_animations
513 | url: "https://pub.dartlang.org"
514 | source: hosted
515 | version: "2.4.2"
516 | sky_engine:
517 | dependency: transitive
518 | description: flutter
519 | source: sdk
520 | version: "0.0.99"
521 | source_span:
522 | dependency: transitive
523 | description:
524 | name: source_span
525 | url: "https://pub.dartlang.org"
526 | source: hosted
527 | version: "1.8.0-nullsafety.2"
528 | stack_trace:
529 | dependency: transitive
530 | description:
531 | name: stack_trace
532 | url: "https://pub.dartlang.org"
533 | source: hosted
534 | version: "1.10.0-nullsafety.2"
535 | states_rebuilder:
536 | dependency: transitive
537 | description:
538 | name: states_rebuilder
539 | url: "https://pub.dartlang.org"
540 | source: hosted
541 | version: "3.2.0"
542 | stream_channel:
543 | dependency: transitive
544 | description:
545 | name: stream_channel
546 | url: "https://pub.dartlang.org"
547 | source: hosted
548 | version: "2.1.0-nullsafety.1"
549 | string_scanner:
550 | dependency: transitive
551 | description:
552 | name: string_scanner
553 | url: "https://pub.dartlang.org"
554 | source: hosted
555 | version: "1.1.0-nullsafety.1"
556 | supercharged:
557 | dependency: transitive
558 | description:
559 | name: supercharged
560 | url: "https://pub.dartlang.org"
561 | source: hosted
562 | version: "1.12.0"
563 | supercharged_dart:
564 | dependency: transitive
565 | description:
566 | name: supercharged_dart
567 | url: "https://pub.dartlang.org"
568 | source: hosted
569 | version: "1.4.0"
570 | term_glyph:
571 | dependency: transitive
572 | description:
573 | name: term_glyph
574 | url: "https://pub.dartlang.org"
575 | source: hosted
576 | version: "1.2.0-nullsafety.1"
577 | test_api:
578 | dependency: transitive
579 | description:
580 | name: test_api
581 | url: "https://pub.dartlang.org"
582 | source: hosted
583 | version: "0.2.19-nullsafety.2"
584 | typed_data:
585 | dependency: transitive
586 | description:
587 | name: typed_data
588 | url: "https://pub.dartlang.org"
589 | source: hosted
590 | version: "1.3.0-nullsafety.3"
591 | vector_math:
592 | dependency: transitive
593 | description:
594 | name: vector_math
595 | url: "https://pub.dartlang.org"
596 | source: hosted
597 | version: "2.1.0-nullsafety.3"
598 | velocity_x:
599 | dependency: "direct main"
600 | description:
601 | name: velocity_x
602 | url: "https://pub.dartlang.org"
603 | source: hosted
604 | version: "1.3.1"
605 | win32:
606 | dependency: transitive
607 | description:
608 | name: win32
609 | url: "https://pub.dartlang.org"
610 | source: hosted
611 | version: "1.7.4"
612 | xdg_directories:
613 | dependency: transitive
614 | description:
615 | name: xdg_directories
616 | url: "https://pub.dartlang.org"
617 | source: hosted
618 | version: "0.1.2"
619 | sdks:
620 | dart: ">=2.10.0 <=2.11.0-213.1.beta"
621 | flutter: ">=1.20.0 <2.0.0"
622 |
--------------------------------------------------------------------------------
/lib/Screens/Home.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 | import 'package:animate_do/animate_do.dart';
3 | import 'package:bouncing_widget/bouncing_widget.dart';
4 | import 'package:car_rendal_app/Screens/DetailPage.dart';
5 | import 'package:cloud_firestore/cloud_firestore.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:get/get.dart';
9 | import 'package:shared_preferences/shared_preferences.dart';
10 | import 'package:velocity_x/velocity_x.dart';
11 | import 'TopDeals.dart';
12 |
13 | class Home extends StatefulWidget {
14 | @override
15 | _HomeState createState() => _HomeState();
16 | }
17 |
18 | class _HomeState extends State {
19 | String userid, user;
20 | Future getUserID() async {
21 | SharedPreferences myPrefs = await SharedPreferences.getInstance();
22 | userid = myPrefs.getString("userid");
23 | setState(() {
24 | user = userid;
25 | print("$user-$userid");
26 | });
27 | print(userid);
28 | }
29 |
30 | @override
31 | void initState() {
32 | getUserID();
33 | SystemChrome.setEnabledSystemUIOverlays([]);
34 | super.initState();
35 | }
36 |
37 | DateTime currentBackPressTime;
38 | @override
39 | Widget build(BuildContext context) {
40 | Future onWillPop() {
41 | DateTime now = DateTime.now();
42 | if (currentBackPressTime == null ||
43 | now.difference(currentBackPressTime) > Duration(seconds: 2)) {
44 | currentBackPressTime = now;
45 | VxToast.show(context, msg: "Again Press to Exit");
46 | return Future.value(false);
47 | }
48 | return Future.value(true);
49 | }
50 |
51 | if (user == null) {
52 | return Scaffold(
53 | body: "No Internet Connection \n please Try again!"
54 | .text
55 | .makeCentered());
56 | } else {
57 | //Size size = MediaQuery.of(context).size;
58 |
59 | return Scaffold(
60 | body: WillPopScope(
61 | onWillPop: onWillPop,
62 | child: StreamBuilder(
63 | stream: FirebaseFirestore.instance
64 | .collection('users')
65 | .doc(user)
66 | .snapshots(),
67 | builder: (context, snapshot) {
68 | if (!snapshot.hasData)
69 | return Center(child: CircularProgressIndicator());
70 | var userDocument = snapshot.data;
71 | return Container(
72 | color: Colors.grey.withOpacity(0.1),
73 | child: VStack(
74 | [
75 | ZoomIn(
76 | child: Container(
77 | padding: EdgeInsets.only(
78 | bottom: 20,
79 | ),
80 | decoration: BoxDecoration(
81 | color: Colors.white,
82 | borderRadius: BorderRadius.only(
83 | bottomLeft: Radius.circular(30),
84 | bottomRight: Radius.circular(30),
85 | )),
86 | child: VStack([
87 | Row(
88 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
89 | children: [
90 | Row(
91 | children: [
92 | SlideInLeft(
93 | child: CircleAvatar(
94 | backgroundImage: NetworkImage(
95 | userDocument['photourl']),
96 | radius: 22.0,
97 | ),
98 | ),
99 | SlideInRight(
100 | child: Padding(
101 | padding: const EdgeInsets.only(left: 8.0),
102 | child: "${userDocument['username']}"
103 | .text
104 | .semiBold
105 | .make()
106 | .shimmer(
107 | primaryColor: Colors.blue[600],
108 | secondaryColor: Colors.cyan,
109 | ),
110 | ),
111 | ),
112 | ],
113 | ),
114 | Row(
115 | children: [
116 | "Rs. ".text.gray900.bold.make(),
117 | SlideInLeft(
118 | child:
119 | "${userDocument["Balance"].toString()}"
120 | .text
121 | .bold
122 | .size(20)
123 | .make()
124 | .shimmer(
125 | primaryColor: Colors.blue,
126 | secondaryColor: Colors.indigo,
127 | showAnimation: true,
128 | ),
129 | ),
130 | BouncingWidget(
131 | duration: Duration(milliseconds: 80),
132 | scaleFactor: 2,
133 | onPressed: () {
134 | print("Amt add buttton");
135 | },
136 | child: SlideInRight(
137 | child: Container(
138 | padding: EdgeInsets.all(5),
139 | decoration: BoxDecoration(
140 | color: Colors.blue,
141 | borderRadius:
142 | BorderRadius.circular(10)),
143 | child: Icon(
144 | Icons.add,
145 | size: 17,
146 | ),
147 | ).px4(),
148 | ),
149 | ),
150 | ],
151 | ),
152 | ],
153 | ).px32().py24(),
154 | ZoomIn(
155 | child: Container(
156 | height: MediaQuery.of(context).size.height * 0.3,
157 | width: double.infinity,
158 | // color: Colors.green,
159 | decoration: BoxDecoration(
160 | borderRadius: BorderRadius.circular(10),
161 | ),
162 | child: Image.network(
163 | userDocument['img'],
164 | fit: BoxFit.fill,
165 | ).onTap(() {}),
166 | ).px12().py1(),
167 | ),
168 | Row(
169 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
170 | children: [
171 | Column(
172 | crossAxisAlignment: CrossAxisAlignment.start,
173 | children: [
174 | FadeIn(
175 | child: "${userDocument["name"]}"
176 | .text
177 | .semiBold
178 | .wide
179 | .size(20)
180 | .black
181 | .make(),
182 | ),
183 | FadeIn(
184 | child: "${userDocument["model"]}"
185 | .text
186 | .gray900
187 | .heightLoose
188 | .make(),
189 | ),
190 | ],
191 | ),
192 | BouncingWidget(
193 | duration: Duration(milliseconds: 50),
194 | scaleFactor: 1.5,
195 | onPressed: () {
196 | print("onPressed");
197 | },
198 | child: Row(
199 | children: [
200 | SlideInLeft(
201 | child: "My Garage"
202 | .text
203 | .semiBold
204 | .size(18)
205 | .blue700
206 | .make(),
207 | ),
208 | Icon(
209 | Icons.arrow_forward,
210 | size: 20,
211 | color: Colors.blue[700],
212 | ).px4(),
213 | ],
214 | ))
215 | ],
216 | ).px32().py12(),
217 | ]),
218 | ),
219 | ),
220 | BouncingWidget(
221 | duration: Duration(milliseconds: 100),
222 | scaleFactor: 1.5,
223 | onPressed: () {
224 | print("onPressed");
225 | },
226 | child: FadeInUp(
227 | child: Container(
228 | decoration: BoxDecoration(
229 | color: Vx.blue500,
230 | borderRadius: BorderRadius.circular(15),
231 | ),
232 | child: VStack([
233 | Row(
234 | mainAxisAlignment:
235 | MainAxisAlignment.spaceBetween,
236 | children: [
237 | Column(
238 | crossAxisAlignment:
239 | CrossAxisAlignment.start,
240 | children: [
241 | "Available Cars"
242 | .text
243 | .bold
244 | .size(20)
245 | .white
246 | .make(),
247 | Container(
248 | child:
249 | "Long Term And Short Term"
250 | .text
251 | .semiBold
252 | .size(14)
253 | .white
254 | .make())
255 | .py4(),
256 | ],
257 | ),
258 | InkWell(
259 | onTap: () {},
260 | child: Container(
261 | padding: EdgeInsets.all(8),
262 | decoration: BoxDecoration(
263 | color: Colors.white,
264 | borderRadius:
265 | BorderRadius.circular(10)),
266 | child: Icon(
267 | Icons.forward,
268 | size: 17,
269 | color: Vx.blue700,
270 | ),
271 | ).px8(),
272 | )
273 | ],
274 | ).p16(),
275 | ])),
276 | )).px24().py24(),
277 | Container(
278 | child: Row(
279 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
280 | children: [
281 | SlideInLeft(
282 | child: Container(
283 | child: "Top Deals"
284 | .text
285 | .black
286 | .size(19)
287 | .bold
288 | .make()
289 | .shimmer()),
290 | ),
291 | Row(
292 | children: [
293 | SlideInRight(
294 | child: "More".text.semiBold.blue700.make()),
295 | SlideInRight(
296 | child: Icon(
297 | Icons.arrow_forward_ios,
298 | size: 17,
299 | color: Vx.blue700,
300 | ).px8(),
301 | ),
302 | ],
303 | ),
304 | ],
305 | ).onInkTap(() {
306 | Get.to(
307 | TopDeals(),
308 | );
309 | }),
310 | ).px20(),
311 | SizedBox(
312 | height: 20,
313 | ),
314 | Container(
315 | height: MediaQuery.of(context).size.height * 0.3,
316 | child: StreamBuilder(
317 | stream: FirebaseFirestore.instance
318 | .collection('cars')
319 | .snapshots(),
320 | builder: (context, snapshot) {
321 | if (!snapshot.hasData)
322 | return Center(child: CircularProgressIndicator());
323 | return ListView.builder(
324 | scrollDirection: Axis.horizontal,
325 | itemCount: snapshot.data.documents.length,
326 | itemBuilder: (context, index) {
327 | DocumentSnapshot ds =
328 | snapshot.data.documents[index];
329 | return Container(
330 | // color: Colors.blue,
331 | height:
332 | MediaQuery.of(context).size.height * 0.27,
333 | width:
334 | MediaQuery.of(context).size.width * 0.5,
335 | child: SlideInRight(
336 | child: Card(
337 | shape: RoundedRectangleBorder(
338 | borderRadius:
339 | BorderRadius.circular(10.0),
340 | ),
341 | elevation: 3.0,
342 | child: Column(
343 | children: [
344 | SlideInLeft(
345 | child: SlideInRight(
346 | child: Container(
347 | height: 140,
348 | decoration: BoxDecoration(
349 | //color: Colors.blue,
350 | image: DecorationImage(
351 | image: NetworkImage(
352 | ds['img'],
353 | ),
354 | fit: BoxFit.fill,
355 | ),
356 | borderRadius:
357 | BorderRadius.circular(14),
358 | ),
359 | ),
360 | ),
361 | ),
362 | "${ds["name"]}"
363 | .text
364 | .bold
365 | .size(18)
366 | .make()
367 | .shimmer(
368 | primaryColor: Colors.blue,
369 | secondaryColor: Colors.pink,
370 | ),
371 | "Rent: Rs.${ds["1monthrent"]}"
372 | .text
373 | .semiBold
374 | .make()
375 | .py8(),
376 | ],
377 | ),
378 | ).onInkTap(() {
379 | Get.to(CarDetailPage(
380 | name: ds['name'],
381 | model: ds['model'],
382 | ));
383 | }),
384 | ));
385 | },
386 | );
387 | },
388 | ),
389 | ),
390 | SizedBox(
391 | height: 40,
392 | ),
393 | ],
394 | ).scrollVertical(),
395 | );
396 | },
397 | ),
398 | ),
399 | );
400 | }
401 | }
402 | }
403 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.carRendalApp;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.carRendalApp;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.carRendalApp;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/lib/Screens/DetailPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:awesome_dialog/awesome_dialog.dart';
3 | import 'package:car_rendal_app/Widgets/BouncingButton.dart';
4 | import 'package:car_rendal_app/Widgets/CarRentType.dart';
5 | import 'package:car_rendal_app/Widgets/CarSpcificationcard.dart';
6 | import 'package:car_rendal_app/Widgets/rentdetail.dart';
7 | import 'package:cloud_firestore/cloud_firestore.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:share/share.dart';
10 |
11 | import 'package:velocity_x/velocity_x.dart';
12 |
13 | class CarDetailPage extends StatefulWidget {
14 | final String name;
15 | final String model;
16 |
17 | const CarDetailPage({Key key, this.name, this.model}) : super(key: key);
18 |
19 | @override
20 | _CarDetailPageState createState() => _CarDetailPageState();
21 | }
22 |
23 | class _CarDetailPageState extends State {
24 | bool bookmark = false;
25 | String rent = "Please Select";
26 | int amt = 0;
27 | String type = "monthlykm";
28 | DateTime date = DateTime.now();
29 | bool bookingstatus = false;
30 | final firestoreInstance = FirebaseFirestore.instance;
31 | @override
32 | Widget build(BuildContext context) {
33 | return Scaffold(
34 | //backgroundColor: Colors.black12.withOpacity(0.5),
35 | body: StreamBuilder(
36 | stream: FirebaseFirestore.instance
37 | .collection('cars')
38 | .doc(widget.name)
39 | .snapshots(),
40 | builder: (context, snapshot) {
41 | if (!snapshot.hasData)
42 | return Center(
43 | child: CircularProgressIndicator(),
44 | );
45 | var cardetail = snapshot.data;
46 |
47 | return Container(
48 | color: Colors.grey.withOpacity(0.1),
49 | child: VStack([
50 | Container(
51 | decoration: BoxDecoration(
52 | color: Colors.white,
53 | borderRadius: BorderRadius.only(
54 | bottomRight: Radius.circular(40),
55 | bottomLeft: Radius.circular(40),
56 | ),
57 | ),
58 | child: VStack(
59 | [
60 | Row(
61 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
62 | children: [
63 | Bouncing(
64 | onPress: () {},
65 | child: SlideInLeft(
66 | child: Container(
67 | decoration: BoxDecoration(
68 | border: Border.all(),
69 | borderRadius: BorderRadius.circular(10),
70 | ),
71 | child: Icon(
72 | Icons.arrow_back_ios,
73 | color: Colors.black,
74 | size: 18,
75 | ).p(6),
76 | ),
77 | ),
78 | ),
79 | SlideInRight(
80 | child: Row(
81 | children: [
82 | bookmark == false
83 | ? Bouncing(
84 | onPress: () {
85 | setState(() {
86 | bookmark = true;
87 | });
88 | },
89 | child: Container(
90 | decoration: BoxDecoration(
91 | border: Border.all(),
92 | borderRadius:
93 | BorderRadius.circular(10),
94 | ),
95 | child: Icon(
96 | Icons.bookmark_outline,
97 | color: Colors.black,
98 | size: 22,
99 | ).p(9),
100 | )).px8()
101 | : Container(
102 | decoration: BoxDecoration(
103 | color: Vx.blue500,
104 | border: Border.all(
105 | color: Colors.white,
106 | ),
107 | borderRadius:
108 | BorderRadius.circular(10),
109 | ),
110 | child: Icon(
111 | Icons.bookmark,
112 | color: Colors.white,
113 | size: 22,
114 | ).p(9),
115 | ).onInkTap(() {
116 | setState(() {
117 | bookmark = false;
118 | });
119 | }).px8(),
120 | Bouncing(
121 | onPress: () {
122 | setState(() {});
123 | },
124 | child: Container(
125 | decoration: BoxDecoration(
126 | border: Border.all(),
127 | borderRadius:
128 | BorderRadius.circular(10),
129 | ),
130 | child: Icon(
131 | Icons.share,
132 | color: Colors.black,
133 | size: 22,
134 | ).p(9),
135 | )).px4().onInkTap(() {
136 | Share.share(
137 | 'check this car ${cardetail['img']}');
138 | }),
139 | ],
140 | ),
141 | ),
142 | ],
143 | ).p(20),
144 | Column(
145 | crossAxisAlignment: CrossAxisAlignment.start,
146 | children: [
147 | SlideInLeft(
148 | child: "${cardetail['name']}"
149 | .text
150 | .extraBold
151 | .extraBlack
152 | .wide
153 | .size(30)
154 | .black
155 | .make()
156 | .shimmer(
157 | primaryColor: Colors.indigo[700],
158 | secondaryColor: Vx.blue500),
159 | ),
160 | SlideInLeft(
161 | child: "${cardetail['model']}"
162 | .text
163 | .extraBlack
164 | .heightLoose
165 | .make(),
166 | ),
167 | ],
168 | ).px20(),
169 | Container(
170 | height: MediaQuery.of(context).size.height * 0.3,
171 | width: double.infinity,
172 | // color: Colors.green,
173 | decoration: BoxDecoration(
174 | borderRadius: BorderRadius.circular(10),
175 | ),
176 | child: ZoomIn(
177 | child: Image.network(
178 | cardetail['img'],
179 | fit: BoxFit.fill,
180 | ).onTap(() {}),
181 | ),
182 | ).px12().py1(),
183 | SlideInRight(
184 | child: Row(
185 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
186 | children: [
187 | rent == "1month"
188 | ? RentDetail(
189 | amt: cardetail['1monthrent'],
190 | rent: 1,
191 | enabled: true,
192 | ontap: () {
193 | setState(() {
194 | rent = "1month";
195 | amt = cardetail['1monthrent'];
196 | });
197 | },
198 | )
199 | : RentDetail(
200 | amt: cardetail['1monthrent'],
201 | rent: 1,
202 | enabled: false,
203 | ontap: () {
204 | setState(() {
205 | rent = "1month";
206 | amt = cardetail['1monthrent'];
207 | });
208 | },
209 | ),
210 | rent == "6month"
211 | ? RentDetail(
212 | amt: cardetail['6monthrent'],
213 | rent: 6,
214 | enabled: true,
215 | ontap: () {
216 | setState(() {
217 | rent = "6month";
218 | amt = cardetail['6monthrent'];
219 | });
220 | },
221 | )
222 | : RentDetail(
223 | amt: cardetail['6monthrent'],
224 | rent: 6,
225 | enabled: false,
226 | ontap: () {
227 | setState(() {
228 | rent = "6month";
229 | amt = cardetail['6monthrent'];
230 | });
231 | },
232 | ),
233 | rent == "12month"
234 | ? RentDetail(
235 | amt: cardetail['12monthrent'],
236 | rent: 12,
237 | enabled: true,
238 | ontap: () {
239 | setState(() {
240 | rent = "12month";
241 | amt = cardetail['12monthrent'];
242 | });
243 | },
244 | )
245 | : RentDetail(
246 | amt: cardetail['12monthrent'],
247 | rent: 12,
248 | enabled: false,
249 | ontap: () {
250 | setState(() {
251 | rent = "12month";
252 | amt = cardetail['12monthrent'];
253 | });
254 | },
255 | ),
256 | ],
257 | ).p24(),
258 | ),
259 | ],
260 | ),
261 | ),
262 | SlideInLeft(
263 | child: "Specifications"
264 | .text
265 | .bold
266 | .extraBlack
267 | .size(18)
268 | .wider
269 | .make()
270 | .px32()
271 | .py20()
272 | .shimmer(
273 | primaryColor: Colors.indigo[700],
274 | secondaryColor: Vx.blue500,
275 | ),
276 | ),
277 | SlideInLeft(
278 | child: Row(
279 | children: [
280 | CarSpecCard(
281 | spec: cardetail['color'],
282 | title: "Color",
283 | ),
284 | WidthBox(25),
285 | CarSpecCard(
286 | spec: cardetail['seat'],
287 | title: "Seat",
288 | ),
289 | WidthBox(25),
290 | CarSpecCard(
291 | spec: cardetail['gear'],
292 | title: "Gear",
293 | ),
294 | WidthBox(25),
295 | CarSpecCard(
296 | spec: "${cardetail['fuel']} L",
297 | title: "Fuel",
298 | ),
299 | ],
300 | ).pLTRB(25, 15, 0, 15).scrollHorizontal(),
301 | ),
302 | SlideInRight(
303 | child: Row(
304 | children: [
305 | type == "monthlykm"
306 | ? RentType(
307 | enabled: true,
308 | type: "Monthly KM",
309 | ontap: () {
310 | setState(() {
311 | type = "monthlykm";
312 | });
313 | },
314 | )
315 | : RentType(
316 | enabled: false,
317 | type: "Monthly KM",
318 | ontap: () {
319 | setState(() {
320 | type = "monthlykm";
321 | });
322 | },
323 | ),
324 | type == "exceedingmonthly"
325 | ? RentType(
326 | enabled: true,
327 | type: "Unlimited KM'S",
328 | ontap: () {
329 | setState(() {
330 | type = "exceedingmonthly";
331 | });
332 | },
333 | )
334 | : RentType(
335 | enabled: false,
336 | type: "Limited KM",
337 | ontap: () {
338 | setState(() {
339 | type = "exceedingmonthly";
340 | });
341 | },
342 | ),
343 | ],
344 | ).scrollHorizontal(),
345 | ),
346 | ]).scrollVertical());
347 | }),
348 | bottomNavigationBar: StreamBuilder(
349 | stream: FirebaseFirestore.instance
350 | .collection('cars')
351 | .doc(widget.name)
352 | .snapshots(),
353 | builder: (context, snapshot) {
354 | if (!snapshot.hasData)
355 | return Center(
356 | child: CircularProgressIndicator(),
357 | );
358 | var cardetail = snapshot.data;
359 |
360 | return Container(
361 | height: MediaQuery.of(context).size.height * 0.13,
362 | child: Row(
363 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
364 | children: [
365 | SlideInLeft(
366 | child: Column(
367 | crossAxisAlignment: CrossAxisAlignment.start,
368 | children: [
369 | "$rent".text.semiBold.wide.size(17).make(),
370 | "RS. $amt"
371 | .text
372 | .heightLoose
373 | .bold
374 | .extraBlack
375 | .size(18)
376 | .make(),
377 | ],
378 | ),
379 | ),
380 | Bouncing(
381 | onPress: () {
382 | if (rent != "" && amt != 0) {
383 | firestoreInstance
384 | .collection("users")
385 | .doc("booked cars")
386 | .set({
387 | "rentmonth": rent,
388 | "rentamt": amt,
389 | "seat": cardetail['seat'],
390 | "date": date.day,
391 | "time":
392 | "${date.hour}.${date.minute}.${date.second}",
393 | "color": cardetail['color'],
394 | "model": cardetail['model'],
395 | "name": cardetail['name'],
396 | });
397 | AwesomeDialog(
398 | context: context,
399 | animType: AnimType.LEFTSLIDE,
400 | headerAnimationLoop: false,
401 | dialogType: DialogType.SUCCES,
402 | title: 'Succes',
403 | desc: 'Car Booked Successfully..',
404 | btnOkOnPress: () {
405 | debugPrint('OnClcik');
406 | },
407 | btnOkIcon: Icons.check_circle,
408 | onDissmissCallback: () {
409 | debugPrint('Dialog Dissmiss from callback');
410 | })
411 | ..show();
412 | setState(() {
413 | bookingstatus = true;
414 | });
415 | } else {
416 | bookingstatus = false;
417 | toast();
418 | }
419 | },
420 | child: SlideInRight(
421 | child: Container(
422 | decoration: BoxDecoration(
423 | color: Colors.indigo,
424 | borderRadius: BorderRadius.circular(8),
425 | ),
426 | child: "Select this car"
427 | .text
428 | .white
429 | .wide
430 | .semiBold
431 | .size(18)
432 | .make()
433 | .shimmer(
434 | primaryColor: Colors.white,
435 | secondaryColor: Colors.green,
436 | )
437 | .px12()
438 | .py16(),
439 | ),
440 | ),
441 | ),
442 | ],
443 | ).p20());
444 | }),
445 | );
446 | }
447 |
448 | toast() {
449 | AwesomeDialog(
450 | context: context,
451 | dialogType: DialogType.ERROR,
452 | animType: AnimType.RIGHSLIDE,
453 | headerAnimationLoop: false,
454 | title: 'Error',
455 | desc: 'Please Select Data',
456 | btnOkOnPress: () {},
457 | btnOkIcon: Icons.cancel,
458 | btnOkColor: Colors.red)
459 | ..show();
460 | }
461 | }
462 |
--------------------------------------------------------------------------------