Compare commits

4 Commits

Author SHA1 Message Date
root 1112b04516 fix phone dashboard 2026-05-27 03:11:45 -04:00
root 7ca43ba2f3 update the app 2026-05-25 15:56:00 -04:00
root 277db06d26 add dashboard to phone app 2026-05-25 05:10:43 -04:00
root d04c8ce437 first app design 2026-05-24 02:35:37 -04:00
168 changed files with 19472 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
# Environment configs (contain URLs — do not commit)
env/
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# 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-dependencies
.pub-cache/
.pub/
/build/
/coverage/
# 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
+62
View File
@@ -0,0 +1,62 @@
image: ghcr.io/cirruslabs/flutter:stable
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH
stages:
- verify
- build
variables:
PUB_CACHE: "$CI_PROJECT_DIR/.pub-cache"
cache:
key:
files:
- pubspec.lock
paths:
- .pub-cache/
- .dart_tool/
before_script:
- flutter --version
- flutter pub get
analyze:
stage: verify
script:
- flutter analyze --no-fatal-infos
test:
stage: verify
script:
- flutter test
build_android_apk:
stage: build
script:
- flutter build apk --release
artifacts:
when: always
expire_in: 7 days
paths:
- build/app/outputs/flutter-apk/app-release.apk
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
build_android_appbundle:
stage: build
script:
- flutter build appbundle --release
artifacts:
when: always
expire_in: 7 days
paths:
- build/app/outputs/bundle/release/app-release.aab
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+33
View File
@@ -0,0 +1,33 @@
# 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: "ff37bef603469fb030f2b72995ab929ccfc227f0"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: android
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
- platform: ios
create_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
base_revision: ff37bef603469fb030f2b72995ab929ccfc227f0
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
+28
View File
@@ -0,0 +1,28 @@
# 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.dev/lints.
#
# 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
+14
View File
@@ -0,0 +1,14 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/
# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
+44
View File
@@ -0,0 +1,44 @@
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "ma.rentaldrivego.car_rental_app"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "ma.rentaldrivego.car_rental_app"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
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.getByName("debug")
}
}
}
flutter {
source = "../.."
}
@@ -0,0 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- Allow HTTP to localhost for dev dashboard WebView. Remove for production. -->
<application android:usesCleartextTraffic="true"/>
</manifest>
+48
View File
@@ -0,0 +1,48 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:label="KriTomobil"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
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"
/>
<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>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
@@ -0,0 +1,5 @@
package ma.rentaldrivego.car_rental_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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 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
the Flutter engine 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
the Flutter engine 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">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool 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>
+24
View File
@@ -0,0 +1,24 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
+12
View File
@@ -0,0 +1,12 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=false
android.newDsl=false
+5
View File
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-all.zip
+26
View File
@@ -0,0 +1,26 @@
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "9.2.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")
Binary file not shown.

After

Width:  |  Height:  |  Size: 448 KiB

+17
View File
@@ -0,0 +1,17 @@
Run it from the project root:
./build_prod_apk.sh
The APK lands at build/outputs/rentaldrivego-release.apk.
One thing to sort out before distributing — the build.gradle.kts currently signs with the debug
key in release mode:
signingConfig = signingConfigs.getByName("debug")
That's fine for internal testing, but app stores and most MDM systems require a proper release
keystore. When you're ready to publish:
1. Generate a keystore once:
keytool -genkey -v -keystore android/rentaldrivego.jks \
-alias rentaldrivego -keyalg RSA -keysize 2048 -validity 10000
2. Add the signing config to android/app/build.gradle.kts pointing at that keystore
3. Add android/rentaldrivego.jks to .gitignore
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail
# ── Config ────────────────────────────────────────────────────────────────────
ENV_FILE="env/prod.json"
OUTPUT_DIR="build/outputs"
APK_SRC="build/app/outputs/flutter-apk/app-release.apk"
APK_DEST="$OUTPUT_DIR/rentaldrivego-release.apk"
# ── Checks ────────────────────────────────────────────────────────────────────
cd "$(dirname "$0")"
if ! command -v flutter &>/dev/null; then
echo "❌ flutter not found in PATH"
exit 1
fi
if [[ ! -f "$ENV_FILE" ]]; then
echo "$ENV_FILE not found — create it with production API URLs"
exit 1
fi
# ── Build ─────────────────────────────────────────────────────────────────────
echo "▶ Cleaning previous build..."
flutter clean
echo "▶ Fetching dependencies..."
flutter pub get
echo "▶ Building release APK (production)..."
flutter build apk --release --dart-define-from-file="$ENV_FILE"
# ── Copy to output ────────────────────────────────────────────────────────────
mkdir -p "$OUTPUT_DIR"
cp "$APK_SRC" "$APK_DEST"
echo ""
echo "✅ Build complete!"
echo " APK → $APK_DEST"
echo " Size: $(du -sh "$APK_DEST" | cut -f1)"
+34
View File
@@ -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
+24
View File
@@ -0,0 +1,24 @@
<?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>
</dict>
</plist>
+2
View File
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
+2
View File
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
#include "Generated.xcconfig"
+2
View File
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
+42
View File
@@ -0,0 +1,42 @@
platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
+35
View File
@@ -0,0 +1,35 @@
PODS:
- Flutter (1.0.0)
- flutter_secure_storage (6.0.0):
- Flutter
- image_picker_ios (0.0.1):
- Flutter
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
PODFILE CHECKSUM: f8c2dcdfb50bb67645580d28a6bf814fca30bdec
COCOAPODS: 1.16.2
+737
View File
@@ -0,0 +1,737 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.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 */; };
995A594C2412F61895CB2016 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF55B8E259192E16A3811CC1 /* Pods_Runner.framework */; };
F42061B85542064B2CAE079F /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0055849AAFA1815289813A3B /* Pods_RunnerTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
remoteInfo = Runner;
};
/* End PBXContainerItemProxy 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 */
0055849AAFA1815289813A3B /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
2B8CB5C8A4FB36AEE69DD7FA /* 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>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
6CBEB391E648AB4FC44FCDFE /* 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>"; };
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>"; };
7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
79F48B122F8D6BC8002A1A11 /* Profile.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Profile.xcconfig; path = Flutter/Profile.xcconfig; 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>"; };
A7206B50C42F65222935848D /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
AA12F1DB701472A907C0C6B9 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
B893C3A8BB7D1BA341320415 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
DF55B8E259192E16A3811CC1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FBDCE86BA6755F0F93243B5B /* 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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
995A594C2412F61895CB2016 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EC4F91958B1958510DF60AFF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F42061B85542064B2CAE079F /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
79F48B122F8D6BC8002A1A11 /* Profile.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
D394CDA7A7BD6BDE41D8494A /* Pods */,
ACB44088637E3B4C0CAEDA11 /* Frameworks */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
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 */,
7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
ACB44088637E3B4C0CAEDA11 /* Frameworks */ = {
isa = PBXGroup;
children = (
DF55B8E259192E16A3811CC1 /* Pods_Runner.framework */,
0055849AAFA1815289813A3B /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
D394CDA7A7BD6BDE41D8494A /* Pods */ = {
isa = PBXGroup;
children = (
2B8CB5C8A4FB36AEE69DD7FA /* Pods-Runner.debug.xcconfig */,
6CBEB391E648AB4FC44FCDFE /* Pods-Runner.release.xcconfig */,
FBDCE86BA6755F0F93243B5B /* Pods-Runner.profile.xcconfig */,
A7206B50C42F65222935848D /* Pods-RunnerTests.debug.xcconfig */,
AA12F1DB701472A907C0C6B9 /* Pods-RunnerTests.release.xcconfig */,
B893C3A8BB7D1BA341320415 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
F3650807002DE913D3C084C2 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
EC4F91958B1958510DF60AFF /* Frameworks */,
);
buildRules = (
);
dependencies = (
331C8086294A63A400263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
8ADD842875B4146703974D33 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
0A3C24793BEDEF7D086CCEB8 /* [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 = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 97C146ED1CF9000F007C117D;
};
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 */,
331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C807F294A63A400263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
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 */
0A3C24793BEDEF7D086CCEB8 /* [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;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
8ADD842875B4146703974D33 /* [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;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
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";
};
F3650807002DE913D3C084C2 /* [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-RunnerTests-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 */
331C807D294A63A400263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 97C146ED1CF9000F007C117D /* Runner */;
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency 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;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 13.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 = 79F48B122F8D6BC8002A1A11 /* Profile.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;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A7206B50C42F65222935848D /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Debug;
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AA12F1DB701472A907C0C6B9 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Release;
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B893C3A8BB7D1BA341320415 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 13.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;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
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;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp;
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;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = ma.rentaldrivego.carRentalApp;
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 */
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C8088294A63A400263BE5 /* Debug */,
331C8089294A63A400263BE5 /* Release */,
331C808A294A63A400263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
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,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
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"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</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>
+10
View File
@@ -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>
+16
View File
@@ -0,0 +1,16 @@
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}
@@ -0,0 +1 @@
{"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":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"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":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@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"}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 844 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 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"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

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>
+26
View File
@@ -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>
+70
View File
@@ -0,0 +1,70 @@
<?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>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>KriTomobil</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>KriTomobil</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>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</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>
</dict>
</plist>
+1
View File
@@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"
+6
View File
@@ -0,0 +1,6 @@
import Flutter
import UIKit
class SceneDelegate: FlutterSceneDelegate {
}
+12
View File
@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}
+5
View File
@@ -0,0 +1,5 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
output-dir: lib/l10n
nullable-getter: false
+40
View File
@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'core/router/app_router.dart';
import 'core/theme/app_theme.dart';
import 'core/providers/locale_provider.dart';
import 'core/providers/theme_provider.dart';
import 'l10n/app_localizations.dart';
class CarRentalApp extends ConsumerWidget {
const CarRentalApp({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final router = ref.watch(routerProvider);
final locale = ref.watch(localeProvider);
final themeMode = ref.watch(themeProvider);
return MaterialApp.router(
title: 'KriTomobil',
theme: AppTheme.light,
darkTheme: AppTheme.dark,
themeMode: themeMode,
routerConfig: router,
debugShowCheckedModeBanner: false,
locale: locale,
supportedLocales: const [
Locale('en'),
Locale('fr'),
Locale('ar'),
],
localizationsDelegates: const [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
);
}
}
+44
View File
@@ -0,0 +1,44 @@
import 'dart:io';
class AppConstants {
static const String apiBaseUrlOverride =
String.fromEnvironment('API_BASE_URL');
static const String dashboardUrlOverride =
String.fromEnvironment('DASHBOARD_URL');
// Production
static const String productionApiUrl = 'https://api.rentaldrivego.ma/api/v1';
static const String productionDashboardUrl = 'https://rentaldrivego.ma';
// Development
static const String devAndroidApiUrl = 'http://10.0.2.2:4000/api/v1';
static const String devLocalApiUrl = 'http://localhost:4000/api/v1';
static const String devAndroidDashboardUrl = 'http://10.0.2.2:3001';
static const String devLocalDashboardUrl = 'http://localhost:3001';
static String get baseUrl {
if (apiBaseUrlOverride.isNotEmpty) return apiBaseUrlOverride;
return productionApiUrl;
}
static String get dashboardBaseUrl {
if (dashboardUrlOverride.isNotEmpty) return dashboardUrlOverride;
return productionDashboardUrl;
}
static String resolveMediaUrl(String url) {
if (!url.startsWith('http')) {
return '${baseUrl.replaceAll('/api/v1', '')}$url';
}
if (Platform.isAndroid && url.contains('localhost')) {
return url.replaceFirst('localhost', '10.0.2.2');
}
return url;
}
static const String tokenKey = 'auth_token';
static const String userTypeKey = 'user_type';
static const String userTypeEmployee = 'employee';
static const String userTypeRenter = 'renter';
}
+179
View File
@@ -0,0 +1,179 @@
class DashboardMetrics {
final DashboardKpis kpis;
final List<DashboardRecentReservation> recentReservations;
final List<DashboardSourceBreakdown> sourceBreakdown;
final DashboardSubscription? subscription;
const DashboardMetrics({
required this.kpis,
required this.recentReservations,
required this.sourceBreakdown,
required this.subscription,
});
factory DashboardMetrics.fromJson(Map<String, dynamic> json) {
final kpiJson = json['kpis'] as Map<String, dynamic>?;
return DashboardMetrics(
kpis: DashboardKpis.fromJson(kpiJson ?? json),
recentReservations: (json['recentReservations'] as List<dynamic>?)
?.map(
(e) => DashboardRecentReservation.fromJson(
e as Map<String, dynamic>,
),
)
.toList() ??
const [],
sourceBreakdown: (json['sourceBreakdown'] as List<dynamic>?)
?.map(
(e) => DashboardSourceBreakdown.fromJson(
e as Map<String, dynamic>,
),
)
.toList() ??
const [],
subscription: json['subscription'] is Map<String, dynamic>
? DashboardSubscription.fromJson(
json['subscription'] as Map<String, dynamic>,
)
: null,
);
}
factory DashboardMetrics.empty() => DashboardMetrics(
kpis: DashboardKpis.empty(),
recentReservations: const [],
sourceBreakdown: const [],
subscription: null,
);
}
class DashboardKpis {
final int totalBookings;
final int activeVehicles;
final double monthlyRevenue;
final int totalCustomers;
final double bookingsChange;
final double vehiclesChange;
final double revenueChange;
final double customersChange;
const DashboardKpis({
required this.totalBookings,
required this.activeVehicles,
required this.monthlyRevenue,
required this.totalCustomers,
required this.bookingsChange,
required this.vehiclesChange,
required this.revenueChange,
required this.customersChange,
});
factory DashboardKpis.fromJson(Map<String, dynamic> json) => DashboardKpis(
totalBookings:
(json['totalBookings'] as num?)?.toInt() ??
(json['totalReservations'] as num?)?.toInt() ??
0,
activeVehicles:
(json['activeVehicles'] as num?)?.toInt() ??
(json['availableVehicles'] as num?)?.toInt() ??
(json['totalVehicles'] as num?)?.toInt() ??
0,
monthlyRevenue:
(json['monthlyRevenue'] as num?)?.toDouble() ??
(json['totalRevenue'] as num?)?.toDouble() ??
0,
totalCustomers: (json['totalCustomers'] as num?)?.toInt() ?? 0,
bookingsChange: (json['bookingsChange'] as num?)?.toDouble() ?? 0,
vehiclesChange: (json['vehiclesChange'] as num?)?.toDouble() ?? 0,
revenueChange: (json['revenueChange'] as num?)?.toDouble() ?? 0,
customersChange: (json['customersChange'] as num?)?.toDouble() ?? 0,
);
factory DashboardKpis.empty() => const DashboardKpis(
totalBookings: 0,
activeVehicles: 0,
monthlyRevenue: 0,
totalCustomers: 0,
bookingsChange: 0,
vehiclesChange: 0,
revenueChange: 0,
customersChange: 0,
);
}
class DashboardRecentReservation {
final String id;
final String bookingRef;
final String customerName;
final String vehicleName;
final DateTime startDate;
final DateTime endDate;
final String status;
final double totalAmount;
const DashboardRecentReservation({
required this.id,
required this.bookingRef,
required this.customerName,
required this.vehicleName,
required this.startDate,
required this.endDate,
required this.status,
required this.totalAmount,
});
factory DashboardRecentReservation.fromJson(Map<String, dynamic> json) =>
DashboardRecentReservation(
id: json['id'] as String,
bookingRef: json['bookingRef'] as String? ?? '',
customerName: json['customerName'] as String? ?? 'Unknown customer',
vehicleName: json['vehicleName'] as String? ?? 'Unknown vehicle',
startDate: DateTime.tryParse(json['startDate'] as String? ?? '') ??
DateTime.now(),
endDate: DateTime.tryParse(json['endDate'] as String? ?? '') ??
DateTime.now(),
status: json['status'] as String? ?? 'UNKNOWN',
totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0,
);
}
class DashboardSourceBreakdown {
final String source;
final int count;
final double revenue;
const DashboardSourceBreakdown({
required this.source,
required this.count,
required this.revenue,
});
factory DashboardSourceBreakdown.fromJson(Map<String, dynamic> json) =>
DashboardSourceBreakdown(
source: json['source'] as String? ?? 'UNKNOWN',
count: (json['count'] as num?)?.toInt() ?? 0,
revenue: (json['revenue'] as num?)?.toDouble() ?? 0,
);
}
class DashboardSubscription {
final String status;
final String? planName;
final DateTime? trialEndsAt;
const DashboardSubscription({
required this.status,
required this.planName,
required this.trialEndsAt,
});
factory DashboardSubscription.fromJson(Map<String, dynamic> json) =>
DashboardSubscription(
status: json['status'] as String? ?? 'ACTIVE',
planName: json['planName'] as String?,
trialEndsAt: json['trialEndsAt'] == null
? null
: DateTime.tryParse(json['trialEndsAt'] as String),
);
}
+54
View File
@@ -0,0 +1,54 @@
class Employee {
final String id;
final String firstName;
final String lastName;
final String email;
final String role;
final bool isActive;
final String? companyId;
const Employee({
required this.id,
required this.firstName,
required this.lastName,
required this.email,
required this.role,
required this.isActive,
this.companyId,
});
String get fullName => '$firstName $lastName';
factory Employee.fromJson(Map<String, dynamic> json) => Employee(
id: json['id'] as String,
firstName: json['firstName'] as String,
lastName: json['lastName'] as String,
email: json['email'] as String,
role: json['role'] as String,
isActive: json['isActive'] as bool? ?? true,
companyId: json['companyId'] as String?,
);
}
class Renter {
final String id;
final String firstName;
final String lastName;
final String email;
const Renter({
required this.id,
required this.firstName,
required this.lastName,
required this.email,
});
String get fullName => '$firstName $lastName';
factory Renter.fromJson(Map<String, dynamic> json) => Renter(
id: json['id'] as String,
firstName: json['firstName'] as String,
lastName: json['lastName'] as String,
email: json['email'] as String,
);
}
+85
View File
@@ -0,0 +1,85 @@
class Customer {
final String id;
final String firstName;
final String lastName;
final String? email;
final String? phone;
final String licenseStatus;
final bool isFlagged;
final String? flagReason;
final DateTime? dateOfBirth;
final String? nationality;
final DateTime createdAt;
const Customer({
required this.id,
required this.firstName,
required this.lastName,
this.email,
this.phone,
required this.licenseStatus,
required this.isFlagged,
this.flagReason,
this.dateOfBirth,
this.nationality,
required this.createdAt,
});
String get fullName => '$firstName $lastName';
factory Customer.fromJson(Map<String, dynamic> json) => Customer(
id: json['id'] as String,
firstName: json['firstName'] as String,
lastName: json['lastName'] as String,
email: json['email'] as String?,
phone: json['phone'] as String?,
licenseStatus: json['licenseStatus'] as String? ?? 'PENDING',
isFlagged: json['isFlagged'] as bool? ?? false,
flagReason: json['flagReason'] as String?,
dateOfBirth: json['dateOfBirth'] != null
? DateTime.tryParse(json['dateOfBirth'] as String)
: null,
nationality: json['nationality'] as String?,
createdAt: DateTime.parse(
json['createdAt'] as String? ?? DateTime.now().toIso8601String()),
);
}
class CustomerListResponse {
final List<Customer> data;
final int total;
final int page;
final int pageSize;
const CustomerListResponse({
required this.data,
required this.total,
required this.page,
required this.pageSize,
});
factory CustomerListResponse.fromApi(dynamic json) {
if (json is List<dynamic>) {
final customers = json
.map((e) => Customer.fromJson(e as Map<String, dynamic>))
.toList();
return CustomerListResponse(
data: customers,
total: customers.length,
page: 1,
pageSize: customers.length,
);
}
return CustomerListResponse.fromJson(json as Map<String, dynamic>);
}
factory CustomerListResponse.fromJson(Map<String, dynamic> json) =>
CustomerListResponse(
data: ((json['data'] ?? const <dynamic>[]) as List<dynamic>)
.map((e) => Customer.fromJson(e as Map<String, dynamic>))
.toList(),
total: json['total'] as int? ?? ((json['data'] as List<dynamic>?)?.length ?? 0),
page: json['page'] as int? ?? 1,
pageSize: json['pageSize'] as int? ?? 20,
);
}
+223
View File
@@ -0,0 +1,223 @@
class CompanyBrand {
final String displayName;
final String? logoUrl;
final String subdomain;
final double? marketplaceRating;
final String primaryColor;
const CompanyBrand({
required this.displayName,
this.logoUrl,
required this.subdomain,
this.marketplaceRating,
required this.primaryColor,
});
factory CompanyBrand.fromJson(Map<String, dynamic> json) => CompanyBrand(
displayName: json['displayName'] as String? ?? '',
logoUrl: json['logoUrl'] as String?,
subdomain: json['subdomain'] as String? ?? '',
marketplaceRating:
(json['marketplaceRating'] as num?)?.toDouble(),
primaryColor: json['primaryColor'] as String? ?? '#1A56DB',
);
}
class MarketplaceCompany {
final String id;
final CompanyBrand brand;
const MarketplaceCompany({required this.id, required this.brand});
factory MarketplaceCompany.fromJson(Map<String, dynamic> json) =>
MarketplaceCompany(
id: json['id'] as String,
brand: CompanyBrand.fromJson(
json['brand'] as Map<String, dynamic>),
);
}
class MarketplaceVehicle {
final String id;
final String companyId;
final String make;
final String model;
final int year;
final String? color;
final String licensePlate;
final String category;
final int seats;
final String transmission;
final String fuelType;
final List<String> features;
// dailyRate comes in cents from the API
final int dailyRateCents;
final String status;
final List<String> photos;
final int? mileage;
final bool isPublished;
final MarketplaceCompany company;
final bool availability;
final String availabilityStatus;
final DateTime? nextAvailableAt;
const MarketplaceVehicle({
required this.id,
required this.companyId,
required this.make,
required this.model,
required this.year,
this.color,
required this.licensePlate,
required this.category,
required this.seats,
required this.transmission,
required this.fuelType,
required this.features,
required this.dailyRateCents,
required this.status,
required this.photos,
this.mileage,
required this.isPublished,
required this.company,
required this.availability,
required this.availabilityStatus,
this.nextAvailableAt,
});
String get displayName => '$year $make $model';
String? get primaryPhoto => photos.isNotEmpty ? photos.first : null;
// Convert cents to dollars for display
double get dailyRate => dailyRateCents / 100;
String get companySlug => company.brand.subdomain;
factory MarketplaceVehicle.fromJson(Map<String, dynamic> json) =>
MarketplaceVehicle(
id: json['id'] as String,
companyId: json['companyId'] as String,
make: json['make'] as String,
model: json['model'] as String,
year: json['year'] as int,
color: json['color'] as String?,
licensePlate: json['licensePlate'] as String,
category: json['category'] as String? ?? 'ECONOMY',
seats: json['seats'] as int? ?? 5,
transmission: json['transmission'] as String? ?? 'MANUAL',
fuelType: json['fuelType'] as String? ?? 'GASOLINE',
features: (json['features'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
dailyRateCents: json['dailyRate'] as int? ?? 0,
status: json['status'] as String? ?? 'AVAILABLE',
photos: (json['photos'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
mileage: json['mileage'] as int?,
isPublished: json['isPublished'] as bool? ?? false,
company: MarketplaceCompany.fromJson(
json['company'] as Map<String, dynamic>),
availability: json['availability'] as bool? ?? true,
availabilityStatus:
json['availabilityStatus'] as String? ?? 'AVAILABLE',
nextAvailableAt: json['nextAvailableAt'] != null
? DateTime.tryParse(json['nextAvailableAt'] as String)
: null,
);
}
class MarketplaceSearchResult {
final List<MarketplaceVehicle> data;
final int total;
final int page;
final int pageSize;
const MarketplaceSearchResult({
required this.data,
required this.total,
required this.page,
required this.pageSize,
});
factory MarketplaceSearchResult.fromJson(Map<String, dynamic> json) {
final raw = json['data'] ?? json;
if (raw is List) {
return MarketplaceSearchResult(
data: raw
.map((e) =>
MarketplaceVehicle.fromJson(e as Map<String, dynamic>))
.toList(),
total: json['total'] as int? ?? raw.length,
page: json['page'] as int? ?? 1,
pageSize: json['pageSize'] as int? ?? 20,
);
}
return MarketplaceSearchResult(
data: (json['data'] as List<dynamic>)
.map((e) =>
MarketplaceVehicle.fromJson(e as Map<String, dynamic>))
.toList(),
total: json['total'] as int? ?? 0,
page: json['page'] as int? ?? 1,
pageSize: json['pageSize'] as int? ?? 20,
);
}
}
class MarketplaceOffer {
final String id;
final String title;
final String? description;
final String? imageUrl;
final String type;
final int discountValue;
final String? promoCode;
final bool isFeatured;
final DateTime validUntil;
final MarketplaceCompany company;
const MarketplaceOffer({
required this.id,
required this.title,
this.description,
this.imageUrl,
required this.type,
required this.discountValue,
this.promoCode,
required this.isFeatured,
required this.validUntil,
required this.company,
});
String get discountLabel {
switch (type) {
case 'PERCENTAGE':
return '$discountValue% off';
case 'FIXED_AMOUNT':
return '\$${(discountValue / 100).toStringAsFixed(0)} off';
case 'FREE_DAY':
return '$discountValue free day(s)';
case 'SPECIAL_RATE':
return 'Special rate';
default:
return 'Offer';
}
}
factory MarketplaceOffer.fromJson(Map<String, dynamic> json) =>
MarketplaceOffer(
id: json['id'] as String,
title: json['title'] as String,
description: json['description'] as String?,
imageUrl: json['imageUrl'] as String?,
type: json['type'] as String,
discountValue: json['discountValue'] as int? ?? 0,
promoCode: json['promoCode'] as String?,
isFeatured: json['isFeatured'] as bool? ?? false,
validUntil:
DateTime.parse(json['validUntil'] as String),
company: MarketplaceCompany.fromJson(
json['company'] as Map<String, dynamic>),
);
}
+31
View File
@@ -0,0 +1,31 @@
class AppNotification {
final String id;
final String type;
final String title;
final String body;
final bool isRead;
final DateTime createdAt;
final Map<String, dynamic>? data;
const AppNotification({
required this.id,
required this.type,
required this.title,
required this.body,
required this.isRead,
required this.createdAt,
this.data,
});
factory AppNotification.fromJson(Map<String, dynamic> json) =>
AppNotification(
id: json['id'] as String,
type: json['type'] as String? ?? '',
title: json['title'] as String? ?? '',
body: json['body'] as String? ?? '',
isRead: json['isRead'] as bool? ?? false,
createdAt: DateTime.parse(
json['createdAt'] as String? ?? DateTime.now().toIso8601String()),
data: json['data'] as Map<String, dynamic>?,
);
}
+68
View File
@@ -0,0 +1,68 @@
class CompanyOffer {
final String id;
final String title;
final String? description;
final String type; // PERCENTAGE | FIXED_AMOUNT | FREE_DAY | SPECIAL_RATE
final int discountValue;
final String? promoCode;
final bool isActive;
final bool isPublic;
final bool isFeatured;
final DateTime validFrom;
final DateTime validUntil;
final int? maxRedemptions;
final int redemptionCount;
final List<String> categories;
const CompanyOffer({
required this.id,
required this.title,
this.description,
required this.type,
required this.discountValue,
this.promoCode,
required this.isActive,
required this.isPublic,
required this.isFeatured,
required this.validFrom,
required this.validUntil,
this.maxRedemptions,
required this.redemptionCount,
required this.categories,
});
String get discountLabel {
switch (type) {
case 'PERCENTAGE':
return '$discountValue% off';
case 'FIXED_AMOUNT':
return '\$${(discountValue / 100).toStringAsFixed(0)} off';
case 'FREE_DAY':
return '$discountValue free day${discountValue == 1 ? '' : 's'}';
case 'SPECIAL_RATE':
return 'Special rate';
default:
return 'Offer';
}
}
factory CompanyOffer.fromJson(Map<String, dynamic> json) => CompanyOffer(
id: json['id'] as String,
title: json['title'] as String,
description: json['description'] as String?,
type: json['type'] as String? ?? 'PERCENTAGE',
discountValue: json['discountValue'] as int? ?? 0,
promoCode: json['promoCode'] as String?,
isActive: json['isActive'] as bool? ?? true,
isPublic: json['isPublic'] as bool? ?? false,
isFeatured: json['isFeatured'] as bool? ?? false,
validFrom: DateTime.parse(json['validFrom'] as String),
validUntil: DateTime.parse(json['validUntil'] as String),
maxRedemptions: json['maxRedemptions'] as int?,
redemptionCount: json['redemptionCount'] as int? ?? 0,
categories: (json['categories'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
);
}
+62
View File
@@ -0,0 +1,62 @@
class ReportSummary {
final int totalReservations;
final double rentalRevenue;
final double totalPaid;
final double totalOutstanding;
final List<ReportItem> items;
const ReportSummary({
required this.totalReservations,
required this.rentalRevenue,
required this.totalPaid,
required this.totalOutstanding,
required this.items,
});
factory ReportSummary.fromJson(Map<String, dynamic> json) => ReportSummary(
totalReservations: json['totalReservations'] as int? ?? 0,
rentalRevenue: (json['rentalRevenue'] as num?)?.toDouble() ?? 0,
totalPaid: (json['totalPaid'] as num?)?.toDouble() ?? 0,
totalOutstanding:
(json['totalOutstanding'] as num?)?.toDouble() ?? 0,
items: (json['reservations'] as List<dynamic>? ?? [])
.map((e) => ReportItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
}
class ReportItem {
final String id;
final String? customerName;
final String? vehicleName;
final DateTime startDate;
final DateTime endDate;
final double totalAmount;
final String status;
final String paymentStatus;
final String? source;
const ReportItem({
required this.id,
this.customerName,
this.vehicleName,
required this.startDate,
required this.endDate,
required this.totalAmount,
required this.status,
required this.paymentStatus,
this.source,
});
factory ReportItem.fromJson(Map<String, dynamic> json) => ReportItem(
id: json['id'] as String,
customerName: json['customerName'] as String?,
vehicleName: json['vehicleName'] as String?,
startDate: DateTime.parse(json['startDate'] as String),
endDate: DateTime.parse(json['endDate'] as String),
totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0,
status: json['status'] as String? ?? '',
paymentStatus: json['paymentStatus'] as String? ?? '',
source: json['source'] as String?,
);
}
+158
View File
@@ -0,0 +1,158 @@
class Reservation {
final String id;
final String status;
final DateTime startDate;
final DateTime endDate;
final double totalAmount;
final String paymentStatus;
final String? vehicleId;
final String? customerId;
final VehicleSummary? vehicle;
final CustomerSummary? customer;
final DateTime createdAt;
final String? source;
final String? contractNumber;
final String? invoiceNumber;
const Reservation({
required this.id,
required this.status,
required this.startDate,
required this.endDate,
required this.totalAmount,
required this.paymentStatus,
this.vehicleId,
this.customerId,
this.vehicle,
this.customer,
required this.createdAt,
this.source,
this.contractNumber,
this.invoiceNumber,
});
int get days => endDate.difference(startDate).inDays;
factory Reservation.fromJson(Map<String, dynamic> json) => Reservation(
id: json['id'] as String,
status: json['status'] as String,
startDate: DateTime.parse(json['startDate'] as String),
endDate: DateTime.parse(json['endDate'] as String),
totalAmount: (json['totalAmount'] as num?)?.toDouble() ?? 0,
paymentStatus: json['paymentStatus'] as String? ?? 'PENDING',
vehicleId: json['vehicleId'] as String?,
customerId: json['customerId'] as String?,
vehicle: json['vehicle'] != null
? VehicleSummary.fromJson(
json['vehicle'] as Map<String, dynamic>)
: null,
customer: json['customer'] != null
? CustomerSummary.fromJson(
json['customer'] as Map<String, dynamic>)
: null,
createdAt: DateTime.parse(
json['createdAt'] as String? ?? DateTime.now().toIso8601String()),
source: json['source'] as String?,
contractNumber: json['contractNumber'] as String?,
invoiceNumber: json['invoiceNumber'] as String?,
);
}
class VehicleSummary {
final String id;
final String make;
final String model;
final int year;
final String licensePlate;
final List<String> photos;
const VehicleSummary({
required this.id,
required this.make,
required this.model,
required this.year,
required this.licensePlate,
required this.photos,
});
String get displayName => '$year $make $model';
String? get primaryPhoto => photos.isNotEmpty ? photos.first : null;
factory VehicleSummary.fromJson(Map<String, dynamic> json) => VehicleSummary(
id: json['id'] as String,
make: json['make'] as String,
model: json['model'] as String,
year: json['year'] as int,
licensePlate: json['licensePlate'] as String,
photos: (json['photos'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
);
}
class CustomerSummary {
final String id;
final String firstName;
final String lastName;
final String? email;
final String? phone;
const CustomerSummary({
required this.id,
required this.firstName,
required this.lastName,
this.email,
this.phone,
});
String get fullName => '$firstName $lastName';
factory CustomerSummary.fromJson(Map<String, dynamic> json) =>
CustomerSummary(
id: json['id'] as String,
firstName: json['firstName'] as String,
lastName: json['lastName'] as String,
email: json['email'] as String?,
phone: json['phone'] as String?,
);
}
class ReservationListResponse {
final List<Reservation> data;
final int total;
final int page;
final int pageSize;
const ReservationListResponse({
required this.data,
required this.total,
required this.page,
required this.pageSize,
});
factory ReservationListResponse.fromApi(dynamic json) {
if (json is List<dynamic>) {
final reservations = json
.map((e) => Reservation.fromJson(e as Map<String, dynamic>))
.toList();
return ReservationListResponse(
data: reservations,
total: reservations.length,
page: 1,
pageSize: reservations.length,
);
}
return ReservationListResponse.fromJson(json as Map<String, dynamic>);
}
factory ReservationListResponse.fromJson(Map<String, dynamic> json) =>
ReservationListResponse(
data: ((json['data'] ?? const <dynamic>[]) as List<dynamic>)
.map((e) => Reservation.fromJson(e as Map<String, dynamic>))
.toList(),
total: json['total'] as int? ?? ((json['data'] as List<dynamic>?)?.length ?? 0),
page: json['page'] as int? ?? 1,
pageSize: json['pageSize'] as int? ?? 20,
);
}
+63
View File
@@ -0,0 +1,63 @@
class BrandSettings {
final String displayName;
final String? tagline;
final String? publicEmail;
final String? publicPhone;
final String? publicCity;
final String? publicCountry;
final String? websiteUrl;
final String? whatsappNumber;
final String? logoUrl;
final String primaryColor;
final bool isListedOnMarketplace;
final String? defaultLocale;
final String? defaultCurrency;
const BrandSettings({
required this.displayName,
this.tagline,
this.publicEmail,
this.publicPhone,
this.publicCity,
this.publicCountry,
this.websiteUrl,
this.whatsappNumber,
this.logoUrl,
required this.primaryColor,
required this.isListedOnMarketplace,
this.defaultLocale,
this.defaultCurrency,
});
factory BrandSettings.fromJson(Map<String, dynamic> json) => BrandSettings(
displayName: json['displayName'] as String? ?? '',
tagline: json['tagline'] as String?,
publicEmail: json['publicEmail'] as String?,
publicPhone: json['publicPhone'] as String?,
publicCity: json['publicCity'] as String?,
publicCountry: json['publicCountry'] as String?,
websiteUrl: json['websiteUrl'] as String?,
whatsappNumber: json['whatsappNumber'] as String?,
logoUrl: json['logoUrl'] as String?,
primaryColor: json['primaryColor'] as String? ?? '#1A56DB',
isListedOnMarketplace:
json['isListedOnMarketplace'] as bool? ?? false,
defaultLocale: json['defaultLocale'] as String?,
defaultCurrency: json['defaultCurrency'] as String?,
);
Map<String, dynamic> toJson() => {
'displayName': displayName,
if (tagline != null) 'tagline': tagline,
if (publicEmail != null) 'publicEmail': publicEmail,
if (publicPhone != null) 'publicPhone': publicPhone,
if (publicCity != null) 'publicCity': publicCity,
if (publicCountry != null) 'publicCountry': publicCountry,
if (websiteUrl != null) 'websiteUrl': websiteUrl,
if (whatsappNumber != null) 'whatsappNumber': whatsappNumber,
'primaryColor': primaryColor,
'isListedOnMarketplace': isListedOnMarketplace,
if (defaultLocale != null) 'defaultLocale': defaultLocale,
if (defaultCurrency != null) 'defaultCurrency': defaultCurrency,
};
}
+99
View File
@@ -0,0 +1,99 @@
class Vehicle {
final String id;
final String make;
final String model;
final int year;
final String licensePlate;
final double dailyRate;
final String status;
final String category;
final List<String> photos;
final int? mileage;
final int? seats;
final String? transmission;
final String? fuelType;
final String? color;
final bool isPublished;
const Vehicle({
required this.id,
required this.make,
required this.model,
required this.year,
required this.licensePlate,
required this.dailyRate,
required this.status,
required this.category,
required this.photos,
this.mileage,
this.seats,
this.transmission,
this.fuelType,
this.color,
required this.isPublished,
});
String get displayName => '$year $make $model';
String? get primaryPhoto => photos.isNotEmpty ? photos.first : null;
factory Vehicle.fromJson(Map<String, dynamic> json) => Vehicle(
id: json['id'] as String,
make: json['make'] as String,
model: json['model'] as String,
year: json['year'] as int,
licensePlate: json['licensePlate'] as String,
dailyRate: (json['dailyRate'] as num).toDouble(),
status: json['status'] as String? ?? 'AVAILABLE',
category: json['category'] as String? ?? 'ECONOMY',
photos: (json['photos'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
mileage: json['mileage'] as int?,
seats: json['seats'] as int?,
transmission: json['transmission'] as String?,
fuelType: json['fuelType'] as String?,
color: json['color'] as String?,
isPublished: json['isPublished'] as bool? ?? false,
);
}
class VehicleListResponse {
final List<Vehicle> data;
final int total;
final int page;
final int pageSize;
const VehicleListResponse({
required this.data,
required this.total,
required this.page,
required this.pageSize,
});
factory VehicleListResponse.fromApi(dynamic json) {
if (json is List<dynamic>) {
final vehicles = json
.map((e) => Vehicle.fromJson(e as Map<String, dynamic>))
.toList();
return VehicleListResponse(
data: vehicles,
total: vehicles.length,
page: 1,
pageSize: vehicles.length,
);
}
return VehicleListResponse.fromJson(json as Map<String, dynamic>);
}
factory VehicleListResponse.fromJson(Map<String, dynamic> json) =>
VehicleListResponse(
data: ((json['data'] ?? const <dynamic>[]) as List<dynamic>)
.map((e) => Vehicle.fromJson(e as Map<String, dynamic>))
.toList(),
total: json['total'] as int? ?? ((json['data'] as List<dynamic>?)?.length ?? 0),
page: json['page'] as int? ?? 1,
pageSize: json['pageSize'] as int? ?? 20,
);
}
+92
View File
@@ -0,0 +1,92 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../constants/app_constants.dart';
import '../models/auth_models.dart';
import '../services/auth_service.dart';
import '../storage/token_storage.dart';
enum AuthStatus { unknown, authenticated, unauthenticated }
class AuthState {
final AuthStatus status;
final String? userType;
final Employee? employee;
final Renter? renter;
const AuthState({
required this.status,
this.userType,
this.employee,
this.renter,
});
AuthState copyWith({
AuthStatus? status,
String? userType,
Employee? employee,
Renter? renter,
}) =>
AuthState(
status: status ?? this.status,
userType: userType ?? this.userType,
employee: employee ?? this.employee,
renter: renter ?? this.renter,
);
}
class AuthNotifier extends StateNotifier<AuthState> {
final AuthService _service;
AuthNotifier(this._service)
: super(const AuthState(status: AuthStatus.unknown));
Future<void> init() async {
final token = await TokenStorage.getToken();
final userType = await TokenStorage.getUserType();
if (token == null || userType == null) {
state = const AuthState(status: AuthStatus.unauthenticated);
return;
}
try {
if (userType == AppConstants.userTypeEmployee) {
final employee = await _service.getMe();
state = AuthState(
status: AuthStatus.authenticated,
userType: userType,
employee: employee,
);
} else {
final renter = await _service.getRenterMe();
state = AuthState(
status: AuthStatus.authenticated,
userType: userType,
renter: renter,
);
}
} catch (_) {
await TokenStorage.clear();
state = const AuthState(status: AuthStatus.unauthenticated);
}
}
Future<void> loginEmployee(String email, String password) async {
final result = await _service.loginEmployee(email: email, password: password);
await TokenStorage.saveToken(result.token);
await TokenStorage.saveUserType(AppConstants.userTypeEmployee);
state = AuthState(
status: AuthStatus.authenticated,
userType: AppConstants.userTypeEmployee,
employee: result.employee,
);
}
Future<void> logout() async {
await _service.logout();
state = const AuthState(status: AuthStatus.unauthenticated);
}
}
final authServiceProvider = Provider((_) => AuthService());
final authProvider = StateNotifierProvider<AuthNotifier, AuthState>((ref) {
return AuthNotifier(ref.read(authServiceProvider));
});
+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
const _localeKey = 'app_locale';
const _storage = FlutterSecureStorage(
aOptions: AndroidOptions(encryptedSharedPreferences: true),
);
class LocaleNotifier extends StateNotifier<Locale> {
LocaleNotifier() : super(const Locale('en')) {
_load();
}
Future<void> _load() async {
final code = await _storage.read(key: _localeKey);
if (code != null) state = Locale(code);
}
Future<void> setLocale(Locale locale) async {
await _storage.write(key: _localeKey, value: locale.languageCode);
state = locale;
}
}
final localeProvider = StateNotifierProvider<LocaleNotifier, Locale>(
(_) => LocaleNotifier(),
);
+34
View File
@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
const _themeKey = 'app_theme';
const _storage = FlutterSecureStorage(
aOptions: AndroidOptions(encryptedSharedPreferences: true),
);
class ThemeNotifier extends StateNotifier<ThemeMode> {
ThemeNotifier() : super(ThemeMode.dark) {
_load();
}
Future<void> _load() async {
final val = await _storage.read(key: _themeKey);
if (val == 'light') state = ThemeMode.light;
if (val == 'dark') state = ThemeMode.dark;
}
Future<void> setMode(ThemeMode mode) async {
await _storage.write(
key: _themeKey, value: mode == ThemeMode.light ? 'light' : 'dark');
state = mode;
}
void toggle() =>
setMode(state == ThemeMode.dark ? ThemeMode.light : ThemeMode.dark);
}
final themeProvider = StateNotifierProvider<ThemeNotifier, ThemeMode>(
(_) => ThemeNotifier(),
);
+240
View File
@@ -0,0 +1,240 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import '../constants/app_constants.dart';
import '../models/marketplace.dart';
import '../providers/auth_provider.dart';
import '../../features/auth/screens/splash_screen.dart';
import '../../features/auth/screens/landing_screen.dart';
import '../../features/auth/screens/role_screen.dart';
import '../../features/auth/screens/employee_login_screen.dart';
import '../../features/dashboard/screens/home_screen.dart';
import '../../features/dashboard/screens/vehicles_screen.dart';
import '../../features/dashboard/screens/vehicle_detail_screen.dart';
import '../../features/dashboard/screens/vehicle_form_screen.dart';
import '../../features/dashboard/screens/reservations_screen.dart';
import '../../features/dashboard/screens/reservation_detail_screen.dart';
import '../../features/dashboard/screens/new_reservation_screen.dart';
import '../../features/dashboard/screens/customers_screen.dart';
import '../../features/dashboard/screens/customer_detail_screen.dart';
import '../../features/dashboard/screens/customer_form_screen.dart';
import '../../features/dashboard/screens/notifications_screen.dart';
import '../../features/dashboard/screens/online_reservations_screen.dart';
import '../../features/dashboard/screens/contract_screen.dart';
import '../../features/dashboard/screens/contracts_screen.dart';
import '../../features/dashboard/screens/offers_screen.dart';
import '../../features/dashboard/screens/reports_screen.dart';
import '../../features/dashboard/screens/settings_screen.dart';
import '../../features/dashboard/screens/team_screen.dart';
import '../../features/client/screens/client_home_screen.dart';
import '../../features/client/screens/client_vehicle_detail_screen.dart';
import '../../features/client/screens/booking_screen.dart';
import '../../features/client/screens/booking_confirmation_screen.dart';
import '../../features/client/screens/my_bookings_screen.dart';
import '../../features/client/models/booking_result.dart';
final routerProvider = Provider<GoRouter>((ref) {
final router = GoRouter(
initialLocation: '/splash',
redirect: (context, state) {
final auth = ref.read(authProvider);
final status = auth.status;
final loc = state.matchedLocation;
final isSplash = loc == '/splash';
final isLanding = loc == '/landing';
final isLogin = loc.startsWith('/login');
final isAgency = loc == '/agency';
if (status == AuthStatus.unknown) {
return isSplash ? null : '/splash';
}
if (isSplash) {
if (status == AuthStatus.authenticated) {
return auth.userType == AppConstants.userTypeEmployee
? '/dashboard'
: '/client';
}
return '/landing';
}
if (isAgency) {
if (status == AuthStatus.authenticated) {
return auth.userType == AppConstants.userTypeEmployee
? '/dashboard'
: '/client';
}
return '/login/employee';
}
if (status == AuthStatus.unauthenticated) {
if (isLanding ||
isLogin ||
loc.startsWith('/client') ||
loc == '/role') {
return null;
}
return '/landing';
}
if (status == AuthStatus.authenticated) {
if (isLogin) {
return auth.userType == AppConstants.userTypeEmployee
? '/dashboard'
: '/client';
}
}
return null;
},
routes: [
GoRoute(path: '/splash', builder: (context, _) => const SplashScreen()),
GoRoute(path: '/landing', builder: (context, _) => const LandingScreen()),
GoRoute(path: '/role', builder: (context, _) => const RoleScreen()),
GoRoute(
path: '/login/employee',
builder: (context, _) => const EmployeeLoginScreen(),
),
GoRoute(path: '/dashboard', builder: (context, _) => const HomeScreen()),
GoRoute(
path: '/dashboard/vehicles',
builder: (context, _) => const VehiclesScreen(),
),
GoRoute(
path: '/dashboard/fleet',
builder: (context, _) => const VehiclesScreen(),
),
GoRoute(
path: '/dashboard/reservations',
builder: (context, _) => const ReservationsScreen(),
),
GoRoute(
path: '/dashboard/customers',
builder: (context, _) => const CustomersScreen(),
),
GoRoute(
path: '/dashboard/vehicles/:id',
builder: (_, state) =>
VehicleDetailScreen(id: state.pathParameters['id']!),
),
GoRoute(
path: '/dashboard/fleet/:id',
builder: (_, state) =>
VehicleDetailScreen(id: state.pathParameters['id']!),
),
GoRoute(
path: '/dashboard/reservations/:id',
builder: (_, state) =>
ReservationDetailScreen(id: state.pathParameters['id']!),
),
GoRoute(
path: '/dashboard/reservations/:id/contract',
builder: (_, state) =>
ContractScreen(reservationId: state.pathParameters['id']!),
),
GoRoute(
path: '/dashboard/customers/:id',
builder: (_, state) =>
CustomerDetailScreen(id: state.pathParameters['id']!),
),
GoRoute(
path: '/dashboard/notifications',
builder: (context, _) => const NotificationsScreen(),
),
GoRoute(
path: '/dashboard/online-reservations',
builder: (context, _) => const OnlineReservationsScreen(),
),
GoRoute(
path: '/dashboard/contracts',
builder: (context, _) => const ContractsScreen(),
),
GoRoute(
path: '/dashboard/offers',
builder: (context, _) => const OffersScreen(),
),
GoRoute(
path: '/dashboard/reports',
builder: (context, _) => const ReportsScreen(),
),
GoRoute(
path: '/dashboard/settings',
builder: (context, _) => const SettingsScreen(),
),
GoRoute(
path: '/dashboard/team',
builder: (context, _) => const TeamScreen(),
),
GoRoute(
path: '/client',
builder: (context, _) => const ClientHomeScreen(),
),
GoRoute(
path: '/client/bookings',
builder: (context, _) => const MyBookingsScreen(),
),
GoRoute(
path: '/client/vehicles/:id',
builder: (_, state) => ClientVehicleDetailScreen(
id: state.pathParameters['id']!,
vehicle: state.extra as MarketplaceVehicle?,
),
),
GoRoute(
path: '/client/book/:vehicleId',
builder: (_, state) => BookingScreen(
vehicleId: state.pathParameters['vehicleId']!,
vehicle: state.extra as MarketplaceVehicle?,
),
),
GoRoute(
path: '/booking-confirmation',
builder: (_, state) {
final result = state.extra as BookingResult?;
if (result == null) return const ClientHomeScreen();
return BookingConfirmationScreen(result: result);
},
),
GoRoute(
path: '/agency',
builder: (context, _) => const EmployeeLoginScreen(),
),
GoRoute(
path: '/dashboard/reservations/new',
builder: (context, _) => const NewReservationScreen(),
),
GoRoute(
path: '/dashboard/vehicles/new',
builder: (context, _) => const VehicleFormScreen(),
),
GoRoute(
path: '/dashboard/fleet/new',
builder: (context, _) => const VehicleFormScreen(),
),
GoRoute(
path: '/dashboard/vehicles/:id/edit',
builder: (_, state) => VehicleFormScreen(
vehicle: state.extra as dynamic,
),
),
GoRoute(
path: '/dashboard/fleet/:id/edit',
builder: (_, state) => VehicleFormScreen(
vehicle: state.extra as dynamic,
),
),
GoRoute(
path: '/dashboard/customers/new',
builder: (context, _) => const CustomerFormScreen(),
),
GoRoute(
path: '/dashboard/customers/:id/edit',
builder: (_, state) => CustomerFormScreen(
customer: state.extra as dynamic,
),
),
],
);
ref.listen<AuthState>(authProvider, (_, _) => router.refresh());
return router;
});
+26
View File
@@ -0,0 +1,26 @@
import '../models/analytics.dart';
import '../models/report.dart';
import 'api_client.dart';
class AnalyticsService {
final _client = ApiClient.instance;
Future<DashboardMetrics> getDashboard() async {
final res = await _client.get('/analytics/dashboard');
return DashboardMetrics.fromJson(res.data as Map<String, dynamic>);
}
Future<ReportSummary> getReport({
required String startDate,
required String endDate,
String? status,
}) async {
final res = await _client.get('/analytics/report', params: {
'startDate': startDate,
'endDate': endDate,
'status': ?status,
'format': 'JSON',
});
return ReportSummary.fromJson(res.data as Map<String, dynamic>);
}
}
+72
View File
@@ -0,0 +1,72 @@
import 'package:dio/dio.dart';
import '../constants/app_constants.dart';
import '../storage/token_storage.dart';
class ApiClient {
static final ApiClient _instance = ApiClient._();
late final Dio _dio;
ApiClient._() {
_dio = Dio(BaseOptions(
baseUrl: AppConstants.baseUrl,
connectTimeout: const Duration(seconds: 10),
receiveTimeout: const Duration(seconds: 30),
headers: {'Content-Type': 'application/json'},
));
_dio.interceptors.add(InterceptorsWrapper(
onRequest: (options, handler) async {
final token = await TokenStorage.getToken();
if (token != null && !_shouldSkipAuthHeader(options.path)) {
options.headers['Authorization'] = 'Bearer $token';
}
handler.next(options);
},
onResponse: (response, handler) {
// Every successful response from this API is wrapped: { data: <payload> }
// Unwrap it so services always receive the raw payload.
final body = response.data;
if (body is Map<String, dynamic> &&
body.length == 1 &&
body.containsKey('data')) {
response.data = body['data'];
}
handler.next(response);
},
onError: (e, handler) {
// Log API errors to help diagnose issues during development.
final resp = e.response;
if (resp != null) {
// ignore: avoid_print
print('[API] ${e.requestOptions.method} ${e.requestOptions.path}${resp.statusCode}: ${resp.data}');
}
handler.next(e);
},
));
}
static ApiClient get instance => _instance;
bool _shouldSkipAuthHeader(String path) {
return path.endsWith('/auth/employee/login') ||
path.endsWith('/auth/renter/login');
}
// baseUrl is dynamic (platform-aware), so recreate when it may have changed.
// In practice this is called once and cached via the singleton.
Dio get dio => _dio;
Future<Response> get(String path, {Map<String, dynamic>? params}) =>
_dio.get(path, queryParameters: params);
Future<Response> post(String path, {dynamic data}) =>
_dio.post(path, data: data);
Future<Response> patch(String path, {dynamic data}) =>
_dio.patch(path, data: data);
Future<Response> put(String path, {dynamic data}) =>
_dio.put(path, data: data);
Future<Response> delete(String path) => _dio.delete(path);
}
+38
View File
@@ -0,0 +1,38 @@
import '../models/auth_models.dart';
import '../storage/token_storage.dart';
import 'api_client.dart';
class AuthService {
final _client = ApiClient.instance;
// Response after envelope unwrap: { token, employee: { id, firstName, ... } }
Future<({String token, Employee employee})> loginEmployee({
required String email,
required String password,
}) async {
final res = await _client.post('/auth/employee/login', data: {
'email': email.trim().toLowerCase(),
'password': password,
});
final data = res.data as Map<String, dynamic>;
final token = data['token'] as String;
final employee =
Employee.fromJson(data['employee'] as Map<String, dynamic>);
return (token: token, employee: employee);
}
// Response after envelope unwrap: { employee: { id, firstName, ... } }
Future<Employee> getMe() async {
final res = await _client.get('/auth/employee/me');
final data = res.data as Map<String, dynamic>;
return Employee.fromJson(data['employee'] as Map<String, dynamic>);
}
Future<Renter> getRenterMe() async {
final res = await _client.get('/auth/renter/me');
final data = res.data as Map<String, dynamic>;
return Renter.fromJson(data);
}
Future<void> logout() => TokenStorage.clear();
}

Some files were not shown because too many files have changed in this diff Show More