Merge branch 'faiz_development' into 'main'
Faiz development See merge request mirza.shafique/car_customer_app!2main
@ -0,0 +1,46 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 18116933e77adc82f80866c928266a5b4f1ed645
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
@ -0,0 +1,29 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
@ -0,0 +1,13 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
@ -0,0 +1,68 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.car_customer_app"
|
||||
minSdkVersion 20
|
||||
targetSdkVersion 31
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.car_customer_app">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -0,0 +1,44 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.car_customer_app">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application
|
||||
android:label="car_customer_app"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
@ -0,0 +1,6 @@
|
||||
package com.example.car_customer_app
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 721 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.car_customer_app">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -0,0 +1,29 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
@ -0,0 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
@ -0,0 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
@ -0,0 +1,34 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
@ -0,0 +1,539 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
F385BE1E015F5F197DDC457E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CA04DE821BC910C56C29F5B /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3643750A79F4A25346F39B6F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
4F0574D3DCBBF0F35A33896D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
9CA04DE821BC910C56C29F5B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C74C73D850C4D4FC94940060 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F385BE1E015F5F197DDC457E /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
83F33F395D7AA87F2A896F35 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4F0574D3DCBBF0F35A33896D /* Pods-Runner.debug.xcconfig */,
|
||||
C74C73D850C4D4FC94940060 /* Pods-Runner.release.xcconfig */,
|
||||
3643750A79F4A25346F39B6F /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
96061B8FD0BBF121A96FFCF3 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9CA04DE821BC910C56C29F5B /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
83F33F395D7AA87F2A896F35 /* Pods */,
|
||||
96061B8FD0BBF121A96FFCF3 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
F3B998BE4409F6FFB76727BB /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
9A2045E27F192C87BCD2FA50 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
9A2045E27F192C87BCD2FA50 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
F3B998BE4409F6FFB76727BB /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.carCustomerApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.carCustomerApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.carCustomerApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,13 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
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.
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>car_customer_app</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
@ -0,0 +1,8 @@
|
||||
import 'package:mc_common_app/config/dependencies.dart';
|
||||
|
||||
class CustomerDependencies {
|
||||
static void addDependencies() {
|
||||
AppDependencies.addDependencies();
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
import 'package:car_customer_app/views/appointments/appointment_detail_view.dart';
|
||||
import 'package:car_customer_app/views/appointments/book_appointment_services_view.dart';
|
||||
import 'package:car_customer_app/views/appointments/pick_items_view.dart';
|
||||
import 'package:car_customer_app/views/dashboard/dashboard_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/models/advertisment_models/ad_details_model.dart';
|
||||
import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart';
|
||||
import 'package:mc_common_app/views/advertisement/ads_detail_view.dart';
|
||||
import 'package:mc_common_app/views/advertisement/create_ad_view.dart';
|
||||
import 'package:mc_common_app/views/payments/payment_methods_view.dart';
|
||||
|
||||
class CustomerAppRoutes {
|
||||
static final Map<String, WidgetBuilder> routes = {
|
||||
AppRoutes.dashboard: (context) => DashboardPage(),
|
||||
AppRoutes.bookProviderAppView: (context) => BookProviderAppView(),
|
||||
AppRoutes.appointmentDetailView: (context) => AppointmentDetailView(appointmentListModel: ModalRoute.of(context)!.settings.arguments as AppointmentListModel),
|
||||
AppRoutes.adsDetailView: (context) => AdsDetailView(adDetails: ModalRoute.of(context)!.settings.arguments as AdDetailsModel),
|
||||
AppRoutes.createAdView: (context) => CreateAdView(),
|
||||
AppRoutes.bookAppointmenServicesView: (context) => BookAppointmentServicesView(),
|
||||
AppRoutes.paymentMethodsView: (context) => PaymentMethodsView(),
|
||||
};
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
import 'package:car_customer_app/config/customer_dependencies.dart';
|
||||
import 'package:car_customer_app/config/customer_routes.dart';
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/providers_view_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/app_state.dart';
|
||||
import 'package:mc_common_app/config/dependencies.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/models/post_params_model.dart';
|
||||
import 'package:mc_common_app/repositories/ads_repo.dart';
|
||||
import 'package:mc_common_app/repositories/common_repo.dart';
|
||||
import 'package:mc_common_app/repositories/payments_repo.dart';
|
||||
import 'package:mc_common_app/repositories/user_repo.dart';
|
||||
import 'package:mc_common_app/services/common_services.dart';
|
||||
import 'package:mc_common_app/services/payments_service.dart';
|
||||
import 'package:mc_common_app/theme/app_theme.dart';
|
||||
import 'package:mc_common_app/utils/enums.dart';
|
||||
import 'package:mc_common_app/view_models/ad_view_model.dart';
|
||||
import 'package:mc_common_app/view_models/base_view_model.dart';
|
||||
import 'package:mc_common_app/view_models/payment_view_model.dart';
|
||||
import 'package:mc_common_app/view_models/user_view_model.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:provider/single_child_widget.dart';
|
||||
import 'package:sizer/sizer.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
CustomerDependencies.addDependencies();
|
||||
await EasyLocalization.ensureInitialized();
|
||||
CustomerAppRoutes.routes.addAll(AppRoutes.routes);
|
||||
|
||||
runApp(
|
||||
MultiProvider(
|
||||
providers: <SingleChildWidget>[
|
||||
ChangeNotifierProvider<BaseVM>(create: (_) => BaseVM()),
|
||||
ChangeNotifierProvider<DashboardVM>(
|
||||
create: (_) => DashboardVM(
|
||||
commonServices: injector.get<CommonAppServices>(),
|
||||
userRepo: injector.get<UserRepo>(),
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<UserVM>(
|
||||
create: (_) => UserVM(userRepo: injector.get<UserRepo>()),
|
||||
),
|
||||
ChangeNotifierProvider<AdVM>(
|
||||
create: (_) => AdVM(
|
||||
commonServices: injector.get<CommonAppServices>(),
|
||||
commonRepo: injector.get<CommonRepo>(),
|
||||
adsRepo: injector.get<AdsRepo>(),
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<ProvidersVM>(
|
||||
create: (_) => ProvidersVM(
|
||||
commonServices: injector.get<CommonAppServices>(),
|
||||
commonRepo: injector.get<CommonRepo>(),
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<AppointmentsVM>(
|
||||
create: (_) => AppointmentsVM(
|
||||
commonServices: injector.get<CommonAppServices>(),
|
||||
commonRepo: injector.get<CommonRepo>(),
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider<PaymentVM>(
|
||||
create: (_) => PaymentVM(paymentService: injector.get<PaymentService>(), paymentRepo: injector.get<PaymentsRepo>()),
|
||||
),
|
||||
],
|
||||
child: const MyApp(),
|
||||
).setupLocale(),
|
||||
);
|
||||
}
|
||||
|
||||
// todo terminal command to generate translation files
|
||||
// flutter pub run easy_localization:generate --source-dir ./assets/langs
|
||||
// todo terminal command to generate translation keys
|
||||
// flutter pub run easy_localization:generate --source-dir ./assets/langs -f keys -o locale_keys.g.dart
|
||||
// command to generate languages data from json
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Sizer(
|
||||
builder: (context, orientation, deviceType) {
|
||||
injector.get<AppState>().setAppType(AppType.customer);
|
||||
AppState().setPostParamsModel(
|
||||
PostParamsModel(
|
||||
languageID: EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2,
|
||||
),
|
||||
);
|
||||
return MaterialApp(
|
||||
theme: AppTheme.getTheme(
|
||||
isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar",
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: context.localizationDelegates,
|
||||
supportedLocales: context.supportedLocales,
|
||||
locale: context.locale,
|
||||
initialRoute: AppRoutes.initialRoute,
|
||||
routes: CustomerAppRoutes.routes,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart';
|
||||
import 'package:mc_common_app/models/provider_category_model.dart';
|
||||
import 'package:mc_common_app/models/provider_service_model.dart';
|
||||
import 'package:mc_common_app/models/widgets_models.dart';
|
||||
import 'package:mc_common_app/repositories/common_repo.dart';
|
||||
import 'package:mc_common_app/services/common_services.dart';
|
||||
|
||||
class AppointmentsVM extends ChangeNotifier {
|
||||
final CommonRepo commonRepo;
|
||||
final CommonAppServices commonServices;
|
||||
|
||||
AppointmentsVM({required this.commonServices, required this.commonRepo});
|
||||
|
||||
bool isFetchingLists = false;
|
||||
|
||||
List<AppointmentListModel> myAppointments = [];
|
||||
List<FilterListModel> appointmentsFilterOptions = [];
|
||||
|
||||
bool isFetchingServices = false;
|
||||
|
||||
List<ProviderCategoryModel> providerCategories = [];
|
||||
|
||||
bool isHomeTapped = false;
|
||||
|
||||
void updateIsHomeTapped(bool value) {
|
||||
isHomeTapped = value;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
String pickedHomeLocation = "";
|
||||
|
||||
void updatePickedHomeLocation(String value) {
|
||||
pickedHomeLocation = value;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
SelectionModel providerCategoryId = SelectionModel(selectedOption: "", selectedId: -1, errorValue: "");
|
||||
|
||||
void updateProviderCategoryId(SelectionModel id) async {
|
||||
providerCategoryId = id;
|
||||
await getProviderServices(id.selectedId);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
List<ProviderServiceModel> providerServices = [];
|
||||
|
||||
SelectionModel providerServiceId = SelectionModel(selectedOption: "", selectedId: -1, errorValue: "");
|
||||
|
||||
void updateProviderServiceId(SelectionModel id) async {
|
||||
providerServiceId = id;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void getProviderCategories() async {
|
||||
notifyListeners();
|
||||
providerCategories = await commonRepo.getProviderServiceCategories();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
getProviderServices(int categoryId) async {
|
||||
providerServiceId = SelectionModel(selectedOption: "", selectedId: -1, errorValue: "");
|
||||
isHomeTapped = false;
|
||||
pickedHomeLocation = "";
|
||||
if (categoryId != -1) {
|
||||
isFetchingServices = true;
|
||||
notifyListeners();
|
||||
providerServices = await commonRepo.getProviderServices(categoryId: categoryId);
|
||||
isFetchingServices = false;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
populateAppointmentsFilterList() {
|
||||
appointmentsFilterOptions.clear();
|
||||
appointmentsFilterOptions = [
|
||||
FilterListModel(title: "All Appointments", isSelected: true, id: -1),
|
||||
FilterListModel(title: "Booked", isSelected: false, id: 1),
|
||||
FilterListModel(title: "Confirmed", isSelected: false, id: 2),
|
||||
FilterListModel(title: "Arrived", isSelected: false, id: 3),
|
||||
FilterListModel(title: "Cancelled", isSelected: false, id: 4),
|
||||
];
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
applyFilterOnAppointmentsVM({required int index}) {
|
||||
if (appointmentsFilterOptions.isEmpty) return;
|
||||
for (var value in appointmentsFilterOptions) {
|
||||
value.isSelected = false;
|
||||
}
|
||||
appointmentsFilterOptions[index].isSelected = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> getMyAppointments() async {
|
||||
isFetchingLists = true;
|
||||
myAppointments = await commonRepo.getMyAppointments();
|
||||
isFetchingLists = false;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
import 'dart:io';
|
||||
import 'package:mc_common_app/classes/app_state.dart';
|
||||
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||
import 'package:mc_common_app/models/user/image_response.dart';
|
||||
import 'package:mc_common_app/repositories/user_repo.dart';
|
||||
import 'package:mc_common_app/services/common_services.dart';
|
||||
import 'package:mc_common_app/utils/utils.dart';
|
||||
import 'package:mc_common_app/view_models/base_view_model.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class DashboardVM extends BaseVM {
|
||||
final CommonAppServices commonServices;
|
||||
final UserRepo userRepo;
|
||||
|
||||
DashboardVM({required this.commonServices, required this.userRepo});
|
||||
|
||||
String pickedImage = "";
|
||||
|
||||
int selectedNavbarBarIndex = 2;
|
||||
|
||||
void onNavbarTapped(int index) {
|
||||
selectedNavbarBarIndex = index;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void pickImageFromPhone(BuildContext context, int sourceFlag) async {
|
||||
final File? pickedImageFile = await commonServices.pickImageFromPhone(sourceFlag);
|
||||
if (pickedImageFile == null) {
|
||||
return;
|
||||
}
|
||||
int sizeInBytes = pickedImageFile.lengthSync();
|
||||
if (sizeInBytes > 1000) {
|
||||
Utils.showToast(LocaleKeys.fileLarger.tr());
|
||||
return;
|
||||
} else {
|
||||
String image64 = Utils.convertFileToBase64(pickedImageFile);
|
||||
|
||||
Utils.showLoading(context);
|
||||
ImageResponse response = await userRepo.updateUserImage(image64);
|
||||
Utils.hideLoading(context);
|
||||
Navigator.pop(context);
|
||||
if (response.messageStatus == 1) {
|
||||
Utils.showToast(LocaleKeys.imageUploaded.tr());
|
||||
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
|
||||
} else {
|
||||
Utils.showToast(response.message ?? "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ImageResponse> updateUserImage(String image) async {
|
||||
return await userRepo.updateUserImage(image);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:mc_common_app/models/widgets_models.dart';
|
||||
import 'package:mc_common_app/repositories/common_repo.dart';
|
||||
import 'package:mc_common_app/services/common_services.dart';
|
||||
|
||||
class ProvidersVM extends ChangeNotifier {
|
||||
final CommonRepo commonRepo;
|
||||
final CommonAppServices commonServices;
|
||||
|
||||
ProvidersVM({required this.commonServices, required this.commonRepo});
|
||||
|
||||
List<FilterListModel> providersFilterOptions = [];
|
||||
|
||||
populateProvidersFilterList() {
|
||||
providersFilterOptions.clear();
|
||||
providersFilterOptions = [
|
||||
FilterListModel(title: "All Providers", isSelected: true, id: -1),
|
||||
FilterListModel(title: "Maintenance", isSelected: false, id: 0),
|
||||
FilterListModel(title: "Oil Service", isSelected: false, id: 1),
|
||||
FilterListModel(title: "Accessories", isSelected: false, id: 2),
|
||||
FilterListModel(title: "Tire Service", isSelected: false, id: 3),
|
||||
FilterListModel(title: "Dent and Paint", isSelected: false, id: 4),
|
||||
];
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
applyFilterOnProviders({required int index}) {
|
||||
if (providersFilterOptions.isEmpty) return;
|
||||
for (var value in providersFilterOptions) {
|
||||
value.isSelected = false;
|
||||
}
|
||||
providersFilterOptions[index].isSelected = true;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/card_button_with_icon.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
|
||||
class AppointmentDetailView extends StatelessWidget {
|
||||
AppointmentListModel appointmentListModel;
|
||||
|
||||
AppointmentDetailView({Key? key, required this.appointmentListModel}) : super(key: key);
|
||||
|
||||
final List<String> servicesList = [
|
||||
"Mechanic",
|
||||
"Electrician",
|
||||
" Car Denting",
|
||||
"Oil Change",
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
title: "Appointment",
|
||||
profileImageUrl: MyAssets.bnCar,
|
||||
isRemoveBackButton: false,
|
||||
isDrawerEnabled: false,
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
appointmentListModel.providerName!.toText(fontSize: 18, isBold: true),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
MyAssets.miniClockDark.buildSvg(
|
||||
height: 10,
|
||||
width: 10,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
10.width,
|
||||
"${appointmentListModel.duration ?? ""} ${appointmentListModel.appointmentDate!.toFormattedDateWithoutTime()}".toText(fontSize: 12, isBold: true, color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
13.height,
|
||||
Row(
|
||||
children: [
|
||||
MyAssets.maintenanceIcon.buildSvg(
|
||||
height: 10,
|
||||
width: 10,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
10.width,
|
||||
"Maintenance".toText(fontSize: 18, isBold: true),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: servicesList
|
||||
.map((e) => e
|
||||
.toText(
|
||||
textAlign: TextAlign.start,
|
||||
fontSize: 13,
|
||||
isBold: true,
|
||||
color: MyColors.lightTextColor,
|
||||
)
|
||||
.paddingOnly(bottom: 5))
|
||||
.toList(),
|
||||
).paddingOnly(left: 15),
|
||||
15.height,
|
||||
Row(
|
||||
children: [
|
||||
CardButtonWithIcon(
|
||||
title: "Reschedule Appointment",
|
||||
onCardTapped: () {},
|
||||
icon: MyAssets.scheduleAppointmentIcon.buildSvg(),
|
||||
),
|
||||
10.width,
|
||||
CardButtonWithIcon(
|
||||
title: "Pay for Appointment",
|
||||
onCardTapped: () {},
|
||||
icon: MyAssets.creditCardIcon.buildSvg(),
|
||||
),
|
||||
],
|
||||
),
|
||||
15.height,
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
maxHeight: 55,
|
||||
title: "Cancel",
|
||||
onPressed: () {},
|
||||
backgroundColor: MyColors.redColor,
|
||||
),
|
||||
),
|
||||
if (appointmentListModel.appointmentStatusID == 1) ...[
|
||||
12.width,
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
maxHeight: 55,
|
||||
title: "Confirm",
|
||||
onPressed: () {},
|
||||
backgroundColor: MyColors.greenColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,325 @@
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/models/widgets_models.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/views/advertisement/custom_add_button.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:mc_common_app/widgets/txt_field.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class BookAppointmentServicesView extends StatelessWidget {
|
||||
const BookAppointmentServicesView({Key? key}) : super(key: key);
|
||||
|
||||
void openTheAddServiceBottomSheet(BuildContext context) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
enableDrag: true,
|
||||
builder: (BuildContext context) {
|
||||
AppointmentsVM appointmentsVM = context.watch<AppointmentsVM>();
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.85,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
height: 8,
|
||||
width: 60,
|
||||
decoration: const BoxDecoration(color: MyColors.lightTextColor, borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||
),
|
||||
12.height,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Select Category".toText(fontSize: 24, isBold: true),
|
||||
],
|
||||
),
|
||||
30.height,
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
List<DropValue> serviceCategories = [];
|
||||
for (var element in appointmentsVM.providerCategories) {
|
||||
if (!element.isSelected!) {
|
||||
serviceCategories.add(DropValue(element.id?.toInt() ?? 0, element.categoryName ?? "", ""));
|
||||
}
|
||||
}
|
||||
return DropdownField(
|
||||
(DropValue value) => appointmentsVM.updateProviderCategoryId(SelectionModel(selectedId: value.id, selectedOption: value.value, itemPrice: value.subValue)),
|
||||
list: serviceCategories,
|
||||
hint: "Select Category",
|
||||
dropdownValue: appointmentsVM.providerCategoryId.selectedId != -1
|
||||
? DropValue(appointmentsVM.providerCategoryId.selectedId, appointmentsVM.providerCategoryId.selectedOption, "")
|
||||
: null,
|
||||
);
|
||||
},
|
||||
),
|
||||
if (appointmentsVM.isFetchingServices) ...[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [const CircularProgressIndicator().paddingAll(10)],
|
||||
),
|
||||
] else if (appointmentsVM.providerServices.isNotEmpty) ...[
|
||||
8.height,
|
||||
Builder(
|
||||
builder: (context) {
|
||||
List<DropValue> serviceCategories = [];
|
||||
for (var element in appointmentsVM.providerServices) {
|
||||
if (!element.isSelected!) {
|
||||
serviceCategories.add(DropValue(element.id?.toInt() ?? 0, element.id.toString(), ""));
|
||||
}
|
||||
}
|
||||
return DropdownField(
|
||||
(DropValue value) => appointmentsVM.updateProviderServiceId(SelectionModel(selectedId: value.id, selectedOption: value.value, itemPrice: value.subValue)),
|
||||
list: serviceCategories,
|
||||
hint: "Select Services",
|
||||
dropdownValue: appointmentsVM.providerServiceId.selectedId != -1
|
||||
? DropValue(appointmentsVM.providerServiceId.selectedId, appointmentsVM.providerServiceId.selectedOption, "")
|
||||
: null,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
if (appointmentsVM.providerServiceId.selectedId != -1 && !appointmentsVM.isFetchingServices) ...[
|
||||
16.height,
|
||||
Row(
|
||||
children: [
|
||||
"Select Service Location".toText(
|
||||
fontSize: 16,
|
||||
isBold: true,
|
||||
color: MyColors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
8.height,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
isFilled: appointmentsVM.isHomeTapped,
|
||||
maxHeight: 48,
|
||||
title: "Home",
|
||||
txtColor: appointmentsVM.isHomeTapped ? MyColors.white : MyColors.darkTextColor,
|
||||
onPressed: () => appointmentsVM.updateIsHomeTapped(true),
|
||||
),
|
||||
),
|
||||
12.width,
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
isFilled: !appointmentsVM.isHomeTapped,
|
||||
txtColor: !appointmentsVM.isHomeTapped ? MyColors.white : MyColors.darkTextColor,
|
||||
maxHeight: 48,
|
||||
title: "Workshop",
|
||||
onPressed: () => appointmentsVM.updateIsHomeTapped(false),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (appointmentsVM.isHomeTapped) ...[
|
||||
8.height,
|
||||
TxtField(
|
||||
hint: 'Pick Home Location',
|
||||
value: appointmentsVM.pickedHomeLocation,
|
||||
isNeedClickAll: true,
|
||||
postfixData: Icons.location_on,
|
||||
postFixDataColor: MyColors.darkTextColor,
|
||||
onTap: () {
|
||||
//TODO: open the place picked to pick the location and save it in provider.
|
||||
appointmentsVM.updatePickedHomeLocation("PM58+F97, Al Olaya, Riyadh 12333");
|
||||
},
|
||||
),
|
||||
14.height,
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.warning,
|
||||
color: MyColors.adPendingStatusColor,
|
||||
size: 19,
|
||||
).paddingOnly(bottom: 2),
|
||||
3.width,
|
||||
"Some services are not available on home location.".toText(
|
||||
color: MyColors.adPendingStatusColor,
|
||||
fontSize: 12,
|
||||
isItalic: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
if (appointmentsVM.isHomeTapped && !appointmentsVM.isFetchingServices) ...[
|
||||
const Divider(thickness: 1, height: 1),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
// TODO: This Price will be decided according to the service selected
|
||||
150.toString().toText(fontSize: 30, isBold: true),
|
||||
"SAR".toText(fontSize: 15, isBold: true, color: MyColors.lightTextColor).paddingOnly(bottom: 5),
|
||||
],
|
||||
),
|
||||
"These charges are additional to the actual service charges. For heavy items the charges may vary.".toText(fontSize: 12, color: MyColors.lightTextColor),
|
||||
22.height,
|
||||
],
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ShowFillButton(
|
||||
maxHeight: 55,
|
||||
title: "Next",
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
).paddingOnly(bottom: 20)
|
||||
],
|
||||
)).horPaddingMain();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
title: "Book Appointment",
|
||||
isRemoveBackButton: false,
|
||||
isDrawerEnabled: false,
|
||||
actions: [MyAssets.searchIcon.buildSvg().paddingOnly(right: 21)],
|
||||
onBackButtonTapped: () => Navigator.pop(context),
|
||||
),
|
||||
body: Consumer(
|
||||
builder: (BuildContext context, AppointmentsVM appointmentsVM, Widget? child) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
21.height,
|
||||
CustomAddButton(
|
||||
onTap: () => {openTheAddServiceBottomSheet(context)},
|
||||
text: "Add Services",
|
||||
icon: Container(
|
||||
height: 24,
|
||||
width: 24,
|
||||
decoration: const BoxDecoration(shape: BoxShape.circle, color: MyColors.darkTextColor),
|
||||
child: const Icon(Icons.add, color: MyColors.white),
|
||||
),
|
||||
),
|
||||
// 20.height,
|
||||
// ListView.builder(
|
||||
// physics: const NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap: true,
|
||||
// itemCount: adVM.specialServiceCards.length,
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// SpecialServiceCard specialServicesCard = adVM.specialServiceCards[index];
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Column(
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: specialServicesCard.serviceSelectedId!.selectedOption.toText(fontSize: 16, isBold: true),
|
||||
// ),
|
||||
// Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child: MyAssets.closeWithOrangeBg.buildSvg(
|
||||
// fit: BoxFit.fill,
|
||||
// height: 30,
|
||||
// width: 30,
|
||||
// ),
|
||||
// ).onPress(() => adVM.removeSpecialServiceCard(index))
|
||||
// ],
|
||||
// ),
|
||||
// Builder(builder: (context) {
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// if (specialServicesCard.serviceSelectedId!.selectedId != 1 && specialServicesCard.serviceSelectedId!.selectedId != 3) ...[
|
||||
// // Row(
|
||||
// // crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// // children: [
|
||||
// // "Duration: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
||||
// // (specialServicesCard.duration ?? "").toText(fontSize: 12, isBold: true).expand(),
|
||||
// // ],
|
||||
// // ),
|
||||
// 8.height,
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// "Description: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
||||
// (specialServicesCard.description ?? "").toText(fontSize: 12, isBold: true).expand(),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// if (specialServicesCard.serviceSelectedId!.selectedId == 1 || specialServicesCard.serviceSelectedId!.selectedId == 3) ...[
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// const Icon(
|
||||
// weight: 2,
|
||||
// Icons.location_on_outlined,
|
||||
// color: MyColors.primaryColor,
|
||||
// size: 17,
|
||||
// ),
|
||||
// "${specialServicesCard.duration} km".toText(fontSize: 10, color: MyColors.primaryColor),
|
||||
// ],
|
||||
// ),
|
||||
// 8.height,
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// "Branch Address: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
||||
// (specialServicesCard.address ?? "").toText(fontSize: 12, isBold: true).expand(),
|
||||
// ],
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// "Appointment Time: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
||||
// "${specialServicesCard.serviceDate} - ${specialServicesCard.serviceTime}".toText(fontSize: 12, isBold: true).expand(),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// 6.height,
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// (specialServicesCard.serviceSelectedId!.itemPrice).toText(fontSize: 20, isBold: true),
|
||||
// 2.width,
|
||||
// "SAR".toText(color: MyColors.lightTextColor, fontSize: 14),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }),
|
||||
// 3.height,
|
||||
// const Divider(thickness: 1.5)
|
||||
// ],
|
||||
// ),
|
||||
// 10.height,
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
);
|
||||
},
|
||||
).horPaddingMain());
|
||||
}
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/provider_details_card.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/time_slots.dart';
|
||||
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
|
||||
class BookProviderAppView extends StatefulWidget {
|
||||
const BookProviderAppView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<BookProviderAppView> createState() => _BookProviderAppViewState();
|
||||
}
|
||||
|
||||
class _BookProviderAppViewState extends State<BookProviderAppView> {
|
||||
bool isReview = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
title: "Appointment",
|
||||
profileImageUrl: MyAssets.bnCar,
|
||||
isRemoveBackButton: false,
|
||||
isDrawerEnabled: false,
|
||||
),
|
||||
body: Container(
|
||||
color: MyColors.backgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
ProviderDetailsCard(
|
||||
onCardTapped: () {},
|
||||
providerImageUrl: MyAssets.bnCar,
|
||||
providerLocation: "3km",
|
||||
providerName: "Al Ahmed Maintenance",
|
||||
providerRatings: "4.9",
|
||||
),
|
||||
12.height,
|
||||
isReview ? ReviewAppointmentSection() : ServicesSelectionSection(),
|
||||
10.height,
|
||||
],
|
||||
),
|
||||
),
|
||||
10.height,
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: ShowFillButton(
|
||||
title: "Book Appointment",
|
||||
maxWidth: double.infinity,
|
||||
onPressed: () {
|
||||
isReview = !isReview;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ServicesSelectionSection extends StatelessWidget {
|
||||
const ServicesSelectionSection({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<DropValue> dropList = [
|
||||
DropValue(0, "Maintenance", ""),
|
||||
DropValue(1, "Car Wash", ""),
|
||||
DropValue(2, "Monthly Checkup", ""),
|
||||
DropValue(3, "Friendly Visit", ""),
|
||||
DropValue(4, "Muftaa", ""),
|
||||
];
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Select services you want".toText(fontSize: 18, isBold: true),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: "Select service type",
|
||||
),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: "Select service type",
|
||||
),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: "Select service type",
|
||||
),
|
||||
22.height,
|
||||
"Select date and time".toText(fontSize: 18, isBold: true),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: "Select service type",
|
||||
),
|
||||
22.height,
|
||||
"Available slots".toText(fontSize: 15, isBold: true),
|
||||
8.height,
|
||||
BuildTimeSlots(onPressed: (index) {}, timeSlots: []),
|
||||
22.height,
|
||||
"Total Amount".toText(fontSize: 18, isBold: true),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"3000".toText(fontSize: 20, isBold: true),
|
||||
"SAR".toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
10.height,
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ReviewAppointmentSection extends StatelessWidget {
|
||||
const ReviewAppointmentSection({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Review Appointment".toText(fontSize: 18, isBold: true),
|
||||
15.height,
|
||||
"Services".toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
"Car Engine Check".toText(fontSize: 18, isBold: true),
|
||||
13.height,
|
||||
"Date and Time".toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
"2 Feb, 2023 at 09:00am".toText(fontSize: 18, isBold: true),
|
||||
13.height,
|
||||
"Total Amount".toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"3000".toText(fontSize: 20, isBold: true),
|
||||
"SAR".toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
100.height,
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,199 @@
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/models/appointments_models/appointment_list_model.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/utils/navigator.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
|
||||
class CustomerAppointmentSliderWidget extends StatelessWidget {
|
||||
final List<AppointmentListModel> myUpComingAppointments;
|
||||
|
||||
const CustomerAppointmentSliderWidget({Key? key, required this.myUpComingAppointments}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (myUpComingAppointments.isEmpty) {
|
||||
return InkWell(
|
||||
child: Container(
|
||||
height: 86,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 24,
|
||||
width: 24,
|
||||
decoration: BoxDecoration(shape: BoxShape.circle, color: MyColors.darkTextColor),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: MyColors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
"Add New Appointment".toText(
|
||||
fontSize: 15,
|
||||
isBold: true,
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
).toWhiteContainer(width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 21, vertical: 10));
|
||||
}
|
||||
return CarouselSlider.builder(
|
||||
options: CarouselOptions(
|
||||
height: 140,
|
||||
viewportFraction: 1.0,
|
||||
enlargeCenterPage: false,
|
||||
enableInfiniteScroll: false,
|
||||
),
|
||||
itemCount: myUpComingAppointments.length,
|
||||
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => BuildAppointmentContainerForCustomer(
|
||||
isForHome: true,
|
||||
appointmentListModel: myUpComingAppointments[itemIndex],
|
||||
onTapped: () => navigateWithName(context, AppRoutes.appointmentDetailView, arguments: myUpComingAppointments[itemIndex]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class BuildAppointmentContainerForCustomer extends StatelessWidget {
|
||||
final bool? isForHome;
|
||||
final AppointmentListModel? appointmentListModel;
|
||||
final Function() onTapped;
|
||||
|
||||
const BuildAppointmentContainerForCustomer({Key? key, this.isForHome = false, required this.onTapped, required this.appointmentListModel}) : super(key: key);
|
||||
|
||||
Widget showServices(String title, String icon, {bool isMoreText = false}) {
|
||||
return Row(
|
||||
children: [
|
||||
if (icon != "") ...[
|
||||
SvgPicture.asset(icon),
|
||||
8.width,
|
||||
],
|
||||
Flexible(
|
||||
child: title.toText(
|
||||
fontSize: 12,
|
||||
isBold: true,
|
||||
color: isMoreText ? MyColors.primaryColor : MyColors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> buildServicesFromAppointment({required AppointmentListModel appointmentListModel}) {
|
||||
if (appointmentListModel.serviceAppointmentItems == null || appointmentListModel.serviceAppointmentItems!.isEmpty) {
|
||||
return [SizedBox()];
|
||||
}
|
||||
|
||||
if (appointmentListModel.serviceAppointmentItems!.length == 1) {
|
||||
return [
|
||||
showServices(
|
||||
appointmentListModel.serviceAppointmentItems![0].serviceItemName!,
|
||||
MyAssets.modificationsIcon,
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
List<Widget> servicesList = List.generate(
|
||||
2,
|
||||
(index) => showServices(
|
||||
appointmentListModel.serviceAppointmentItems![index].serviceItemName!,
|
||||
MyAssets.modificationsIcon,
|
||||
),
|
||||
);
|
||||
|
||||
if (appointmentListModel.serviceAppointmentItems!.length > 1) {
|
||||
servicesList.add(
|
||||
showServices(
|
||||
"+ ${appointmentListModel.serviceAppointmentItems!.length - 1} More",
|
||||
"",
|
||||
isMoreText: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
return servicesList;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
isForHome != null && isForHome!
|
||||
? Image.asset(
|
||||
MyAssets.bnCar,
|
||||
width: 56,
|
||||
height: 56,
|
||||
fit: BoxFit.fill,
|
||||
).toCircle(borderRadius: 100)
|
||||
: Image.asset(
|
||||
MyAssets.bnCar,
|
||||
width: 80,
|
||||
height: 85,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
8.width,
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
(appointmentListModel!.providerName ?? "").toText(color: MyColors.black, isBold: true, fontSize: 16),
|
||||
Row(
|
||||
children: [
|
||||
MyAssets.miniClock.buildSvg(height: 12),
|
||||
2.width,
|
||||
"${appointmentListModel!.duration ?? ""} ${appointmentListModel!.appointmentDate!.toFormattedDateWithoutTime()}".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
fontSize: 12,
|
||||
),
|
||||
],
|
||||
),
|
||||
9.height,
|
||||
isForHome != null && isForHome!
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"Appointment Details".toText(
|
||||
color: MyColors.primaryColor,
|
||||
isUnderLine: true,
|
||||
isBold: true,
|
||||
fontSize: 14,
|
||||
),
|
||||
const Icon(Icons.arrow_forward),
|
||||
],
|
||||
)
|
||||
: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: buildServicesFromAppointment(appointmentListModel: appointmentListModel!),
|
||||
),
|
||||
),
|
||||
const Icon(
|
||||
Icons.arrow_forward,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).onPress(onTapped).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/providers_view_model.dart';
|
||||
import 'package:car_customer_app/views/dashboard/fragments/ads_fragment.dart';
|
||||
import 'package:car_customer_app/views/dashboard/fragments/appointments_fragment.dart';
|
||||
import 'package:car_customer_app/views/dashboard/fragments/home_fragment.dart';
|
||||
import 'package:car_customer_app/views/dashboard/fragments/providers_fragment.dart';
|
||||
import 'package:car_customer_app/views/dashboard/fragments/settings_fragment.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/bottom_nav_bar.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/drawer_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/view_models/ad_view_model.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class DashboardPage extends StatefulWidget {
|
||||
const DashboardPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<DashboardPage> createState() => _DashboardPageState();
|
||||
}
|
||||
|
||||
class _DashboardPageState extends State<DashboardPage> {
|
||||
// late DashboardVM dashboardVM;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// dashboardVM = Provider.of<DashboardVM>(context, listen: false);
|
||||
fetchUsername();
|
||||
scheduleMicrotask(() {
|
||||
context.read<AppointmentsVM>().populateAppointmentsFilterList();
|
||||
context.read<ProvidersVM>().populateProvidersFilterList();
|
||||
context.read<AdVM>().populateAdsFilterList();
|
||||
_onRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _onRefresh() async {
|
||||
AdVM adVm = Provider.of<AdVM>(context, listen: false);
|
||||
AppointmentsVM appointmentsVM = Provider.of<AppointmentsVM>(context, listen: false);
|
||||
if (appointmentsVM.myAppointments.isEmpty) {
|
||||
await appointmentsVM.getMyAppointments();
|
||||
}
|
||||
if (adVm.myAds.isEmpty) {
|
||||
await adVm.getMyAds();
|
||||
}
|
||||
if (adVm.exploreAds.isEmpty) {
|
||||
await adVm.getExploreAds();
|
||||
}
|
||||
}
|
||||
|
||||
fetchUsername() async {}
|
||||
|
||||
List<Widget> fragments = [
|
||||
const ProvidersFragment(),
|
||||
const AppointmentsFragment(),
|
||||
const HomeFragment(),
|
||||
AdsFragment(),
|
||||
const SettingsFragment(),
|
||||
];
|
||||
|
||||
String getPageTitle(int index) {
|
||||
if (index == 0) {
|
||||
return "Providers";
|
||||
}
|
||||
if (index == 1) {
|
||||
return "Appointments";
|
||||
}
|
||||
if (index == 2) {
|
||||
return "";
|
||||
}
|
||||
if (index == 3) {
|
||||
return "Ads";
|
||||
}
|
||||
if (index == 4) {
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isHomePage = context.watch<DashboardVM>().selectedNavbarBarIndex == 2;
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
backgroundColor: null,
|
||||
leadingWidth: 100,
|
||||
title: getPageTitle(context.watch<DashboardVM>().selectedNavbarBarIndex),
|
||||
profileImageUrl: MyAssets.bnCar,
|
||||
isRemoveBackButton: true,
|
||||
isDrawerEnabled: isHomePage ? true : false,
|
||||
actions: [(isHomePage ? MyAssets.notificationsBellIcon : MyAssets.searchIcon).buildSvg().paddingOnly(right: 21)],
|
||||
),
|
||||
drawer: CustomDrawer(dashboardVM: context.watch<DashboardVM>()),
|
||||
bottomNavigationBar: CustomBottomNavbar(),
|
||||
body: fragments[context.watch<DashboardVM>().selectedNavbarBarIndex],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/app_state.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/utils/navigator.dart';
|
||||
import 'package:mc_common_app/view_models/ad_view_model.dart';
|
||||
import 'package:mc_common_app/views/advertisement/ads_list.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/categories_list.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AdsFragment extends StatelessWidget {
|
||||
AdsFragment({Key? key}) : super(key: key);
|
||||
|
||||
Future<void> onRefreshAds(BuildContext context) async {
|
||||
AdVM adVM = context.read<AdVM>();
|
||||
await adVM.getExploreAds();
|
||||
await adVM.getMyAds();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
color: MyColors.backgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
16.height,
|
||||
Consumer(
|
||||
builder: (BuildContext context, AdVM adVM, Widget? child) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
isFilled: adVM.isExploreAdsTapped,
|
||||
maxHeight: 55,
|
||||
title: "Explore Ads",
|
||||
txtColor: adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor,
|
||||
onPressed: () {
|
||||
print("ads: ${AppState().getUser.data!.accessToken}");
|
||||
adVM.updateIsExploreAds(true);
|
||||
},
|
||||
),
|
||||
),
|
||||
12.width,
|
||||
Expanded(
|
||||
child: ShowFillButton(
|
||||
isFilled: !adVM.isExploreAdsTapped,
|
||||
txtColor: !adVM.isExploreAdsTapped ? MyColors.white : MyColors.darkTextColor,
|
||||
maxHeight: 55,
|
||||
title: "My Ads",
|
||||
onPressed: () {
|
||||
adVM.updateIsExploreAds(false);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
).horPaddingMain(),
|
||||
if (adVM.isExploreAdsTapped && adVM.exploreAds.isNotEmpty) ...[
|
||||
16.height,
|
||||
FiltersList(filterList: adVM.exploreAdsFilterOptions, onFilterTapped: (index, selectedFilterId) => adVM.applyFilterOnExploreAds(index: index), needLeftPadding: false)
|
||||
.paddingOnly(left: 21),
|
||||
],
|
||||
if (!adVM.isExploreAdsTapped && adVM.myAds.isNotEmpty) ...[
|
||||
16.height,
|
||||
FiltersList(
|
||||
filterList: adVM.myAdsFilterOptions,
|
||||
onFilterTapped: (index, selectedFilterId) => adVM.applyFilterOnMyAds(index: index, selectedFilterId: selectedFilterId),
|
||||
needLeftPadding: false)
|
||||
.paddingOnly(left: 21),
|
||||
],
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
16.height,
|
||||
Expanded(
|
||||
child: RefreshIndicator(
|
||||
onRefresh: () => onRefreshAds(context),
|
||||
child: Consumer(
|
||||
builder: (BuildContext context, AdVM adVM, Widget? child) {
|
||||
return BuildAdsList(
|
||||
isAdsFragment: true,
|
||||
shouldShowAdStatus: !adVM.isExploreAdsTapped,
|
||||
adsList: adVM.isExploreAdsTapped && adVM.exploreAdsFilteredList.isNotEmpty
|
||||
? adVM.exploreAdsFilteredList
|
||||
: !adVM.isExploreAdsTapped && adVM.myAdsFilteredList.isNotEmpty
|
||||
? adVM.myAdsFilteredList
|
||||
: [],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
context.read<AdVM>().getVehicleTypes();
|
||||
|
||||
navigateWithName(context, AppRoutes.createAdView);
|
||||
},
|
||||
backgroundColor: MyColors.darkPrimaryColor,
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: MyColors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:car_customer_app/views/appointments/widgets/customer_appointment_slider_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/utils/navigator.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/categories_list.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AppointmentsFragment extends StatelessWidget {
|
||||
const AppointmentsFragment({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: MyColors.backgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Consumer(
|
||||
builder: (BuildContext context, AppointmentsVM appointmentsVM, Widget? child) {
|
||||
return Column(
|
||||
children: [
|
||||
16.height,
|
||||
FiltersList(
|
||||
filterList: appointmentsVM.appointmentsFilterOptions,
|
||||
onFilterTapped: (index, selectedFilterId) => appointmentsVM.applyFilterOnAppointmentsVM(index: index),
|
||||
),
|
||||
16.height,
|
||||
Expanded(
|
||||
child: appointmentsVM.myAppointments.isEmpty
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
"No Appointments to show.".toText(fontSize: 16, color: MyColors.lightTextColor),
|
||||
],
|
||||
)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: appointmentsVM.myAppointments.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return BuildAppointmentContainerForCustomer(
|
||||
onTapped: () => navigateWithName(context, AppRoutes.appointmentDetailView, arguments: appointmentsVM.myAppointments[index]),
|
||||
appointmentListModel: appointmentsVM.myAppointments[index],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/providers_view_model.dart';
|
||||
import 'package:car_customer_app/views/appointments/widgets/customer_appointment_slider_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/app_state.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/view_models/ad_view_model.dart';
|
||||
import 'package:mc_common_app/views/advertisement/ads_list.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/my_service_provider.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/view_all_widget.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class HomeFragment extends StatelessWidget {
|
||||
const HomeFragment({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
16.height,
|
||||
ViewAllWidget(
|
||||
title: "Upcoming Appointment".toUpperCase(),
|
||||
subTitle: "View All",
|
||||
onSubtitleTapped: () {
|
||||
context.read<DashboardVM>().onNavbarTapped(1);
|
||||
context.read<AppointmentsVM>().applyFilterOnAppointmentsVM(index: 0);
|
||||
},
|
||||
).horPaddingMain(),
|
||||
CustomerAppointmentSliderWidget(myUpComingAppointments: context.watch<AppointmentsVM>().myAppointments),
|
||||
7.height,
|
||||
ViewAllWidget(
|
||||
title: "My Recent Service Providers".toUpperCase(),
|
||||
subTitle: "View All",
|
||||
onSubtitleTapped: () {
|
||||
print("value: ${AppState().getUser.data!.accessToken}");
|
||||
context.read<DashboardVM>().onNavbarTapped(0);
|
||||
context.read<ProvidersVM>().applyFilterOnProviders(index: 0);
|
||||
}).horPaddingMain(),
|
||||
const ServiceProviderWidget().horPaddingMain(),
|
||||
Consumer(
|
||||
builder: (BuildContext context, AdVM adVM, Widget? child) {
|
||||
return Column(
|
||||
children: [
|
||||
if (adVM.myActiveAdsForHome.isNotEmpty) ...[
|
||||
Column(
|
||||
children: [
|
||||
15.height,
|
||||
ViewAllWidget(
|
||||
title: "My Active Ads".toUpperCase(),
|
||||
subTitle: "View All",
|
||||
onSubtitleTapped: () {
|
||||
context.read<DashboardVM>().onNavbarTapped(3);
|
||||
context.read<AdVM>().updateIsExploreAds(false);
|
||||
}).horPaddingMain(),
|
||||
BuildAdsList(
|
||||
shouldShowAdStatus: true,
|
||||
isAdsFragment: false,
|
||||
adsList: adVM.myActiveAdsForHome,
|
||||
scrollPhysics: NeverScrollableScrollPhysics(),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
if (adVM.exploreAds.isNotEmpty) ...[
|
||||
Column(
|
||||
children: [
|
||||
15.height,
|
||||
ViewAllWidget(
|
||||
title: "My Recommended Ads".toUpperCase(),
|
||||
subTitle: "View All",
|
||||
onSubtitleTapped: () {
|
||||
context.read<DashboardVM>().onNavbarTapped(3);
|
||||
context.read<AdVM>().updateIsExploreAds(true);
|
||||
context.read<AdVM>().applyFilterOnExploreAds(index: 0);
|
||||
},
|
||||
).horPaddingMain(),
|
||||
BuildAdsList(
|
||||
shouldShowAdStatus: false,
|
||||
adsList: adVM.exploreAds.length >= 3 ? adVM.exploreAds.take(3).toList() : adVM.exploreAds,
|
||||
isAdsFragment: false,
|
||||
scrollPhysics: NeverScrollableScrollPhysics(),
|
||||
),
|
||||
],
|
||||
)
|
||||
]
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
20.height,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
import 'package:car_customer_app/view_models/appointments_view_model.dart';
|
||||
import 'package:car_customer_app/view_models/providers_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/utils/navigator.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/categories_list.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/provider_details_card.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ProvidersFragment extends StatelessWidget {
|
||||
const ProvidersFragment({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: MyColors.backgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Consumer(
|
||||
builder: (BuildContext context, ProvidersVM providersVM, Widget? child) {
|
||||
return Column(
|
||||
children: [
|
||||
16.height,
|
||||
FiltersList(
|
||||
filterList: providersVM.providersFilterOptions,
|
||||
onFilterTapped: (index, selectedFilterId) => providersVM.applyFilterOnProviders(index: index),
|
||||
),
|
||||
16.height,
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: 30,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return ProviderDetailsCard(
|
||||
onCardTapped: () {
|
||||
if (context.read<AppointmentsVM>().providerCategories.isEmpty) {
|
||||
context.read<AppointmentsVM>().getProviderCategories();
|
||||
}
|
||||
navigateWithName(context, AppRoutes.bookAppointmenServicesView);
|
||||
},
|
||||
providerImageUrl: MyAssets.bnCar,
|
||||
providerLocation: " 3km",
|
||||
providerName: "Al Ahmed Maintenance",
|
||||
providerRatings: "4.9",
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingsFragment extends StatelessWidget {
|
||||
const SettingsFragment({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class CustomBottomNavbar extends StatelessWidget {
|
||||
const CustomBottomNavbar({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
DashboardVM dashboardVM = context.watch<DashboardVM>();
|
||||
return BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.providersIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.providersIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.providers.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.appointmentsIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.appointmentsIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.appointments.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(
|
||||
MyAssets.homeIcon,
|
||||
color: MyColors.lightIconColor,
|
||||
).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.homeIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.home.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.announcementIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.announcementIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.ads.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.settingsIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.settingsIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.settings.tr(),
|
||||
),
|
||||
],
|
||||
currentIndex: dashboardVM.selectedNavbarBarIndex,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
selectedItemColor: MyColors.darkIconColor,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
unselectedItemColor: MyColors.lightTextColor,
|
||||
unselectedFontSize: 11,
|
||||
selectedFontSize: 11,
|
||||
selectedLabelStyle: const TextStyle(fontFamily: "Poppins"),
|
||||
unselectedLabelStyle: const TextStyle(fontFamily: "Poppins"),
|
||||
onTap: (index) => dashboardVM.onNavbarTapped(index),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,194 @@
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mc_common_app/classes/app_state.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/config/routes.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||
import 'package:mc_common_app/models/user/image_response.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/utils/navigator.dart';
|
||||
import 'package:mc_common_app/utils/utils.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
|
||||
class CustomDrawer extends StatefulWidget {
|
||||
final DashboardVM dashboardVM;
|
||||
|
||||
const CustomDrawer({Key? key, required this.dashboardVM}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CustomDrawer> createState() => _CustomDrawerState();
|
||||
}
|
||||
|
||||
class _CustomDrawerState extends State<CustomDrawer> {
|
||||
void _openImagePicker() {
|
||||
showDialog<ImageSource>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
content: const Text("Choose image source"),
|
||||
actions: [
|
||||
TextButton(child: const Text("Camera"), onPressed: () => widget.dashboardVM.pickImageFromPhone(context, 0)),
|
||||
TextButton(child: const Text("Gallery"), onPressed: () => widget.dashboardVM.pickImageFromPhone(context, 1)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Drawer(
|
||||
child: Column(
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 200,
|
||||
color: MyColors.darkPrimaryColor.withOpacity(0.01),
|
||||
child: Image.network(
|
||||
ApiConsts.baseUrlServices + AppState().getUser.data!.userInfo!.userImageUrl.toString(),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 10,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[200],
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.edit,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
).onPress(() {
|
||||
_openImagePicker();
|
||||
// _handleURLButtonPress(context, ImageSourceType.camera);
|
||||
}),
|
||||
),
|
||||
12.height,
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[200],
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.delete,
|
||||
color: Colors.red,
|
||||
).onPress(() async {
|
||||
Utils.showLoading(context);
|
||||
ImageResponse response = await widget.dashboardVM.updateUserImage("");
|
||||
if (response.messageStatus == 1) {
|
||||
Utils.showToast("Image is Deleted");
|
||||
setState(() {
|
||||
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
|
||||
});
|
||||
}
|
||||
Utils.hideLoading(context);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
color: MyColors.darkPrimaryColor.withOpacity(0.1),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"userName".toText(
|
||||
isBold: true,
|
||||
fontSize: 20,
|
||||
letterSpacing: -1.44,
|
||||
),
|
||||
AppState().getUser.data!.userInfo!.roleName!.toText(fontSize: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
ShowFillButton(
|
||||
title: LocaleKeys.edit.tr(),
|
||||
fontSize: 12,
|
||||
maxHeight: 35,
|
||||
maxWidth: 70,
|
||||
onPressed: () {
|
||||
navigateWithName(context, AppRoutes.editAccountPage);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.notifications,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.notifications.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.settings,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.general.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.person,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.account.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: Image.asset(
|
||||
MyAssets.icWorldPng,
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.english.tr().toText(fontSize: 12),
|
||||
onTap: () {
|
||||
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA") {
|
||||
context.setLocale(const Locale("en", "US"));
|
||||
} else {
|
||||
context.setLocale(const Locale('ar', 'SA'));
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.logout,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.signOut.tr().toText(fontSize: 12),
|
||||
onTap: () {
|
||||
pop(context);
|
||||
navigateReplaceWithName(context, AppRoutes.registerSelection);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
name: car_customer_app
|
||||
description: A new Flutter project.
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
# Both the version and the builder number may be overridden in flutter
|
||||
# build by specifying --build-name and --build-number, respectively.
|
||||
# In Android, build-name is used as versionName while build-number used as versionCode.
|
||||
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
||||
# dependencies can be manually updated by changing the version numbers below to
|
||||
# the latest version available on pub.dev. To see which dependencies have newer
|
||||
# versions available, run `flutter pub outdated`.
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
|
||||
mc_common_app:
|
||||
path: D:/Development/car_common_app
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# encourage good coding practices. The lint set provided by the package is
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
|
||||
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter.
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
# fonts:
|
||||
# - family: Poppins
|
||||
# fonts:
|
||||
# - asset: assets/fonts/Poppins-Medium.ttf
|
||||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|
@ -0,0 +1,30 @@
|
||||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility that Flutter provides. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:car_customer_app/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget( MyApp());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
expect(find.text('1'), findsNothing);
|
||||
|
||||
// Tap the '+' icon and trigger a frame.
|
||||
await tester.tap(find.byIcon(Icons.add));
|
||||
await tester.pump();
|
||||
|
||||
// Verify that our counter has incremented.
|
||||
expect(find.text('0'), findsNothing);
|
||||
expect(find.text('1'), findsOneWidget);
|
||||
});
|
||||
}
|