commit 216efb8a835be8a5b77c37eaf7f0a83246a90a1a Author: Abdullah Salah Date: Wed Dec 25 11:09:55 2024 +0300 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +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 +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# 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 diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..2e4237d --- /dev/null +++ b/.metadata @@ -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: "4cf269e36de2573851eaef3c763994f8f9be494d" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + - platform: android + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + - platform: ios + create_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + base_revision: 4cf269e36de2573851eaef3c763994f8f9be494d + + # 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' diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..db29fb4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cSpell.words": [ + "المحرك", + "المراجعة" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ae17e5 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Gascom diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -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 diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..55afd91 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..7efab40 --- /dev/null +++ b/android/app/build.gradle @@ -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 = "com.example.gascom" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.gascom" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = 26 + 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.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..93943a4 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/gascom/MainActivity.kt b/android/app/src/main/kotlin/com/example/gascom/MainActivity.kt new file mode 100644 index 0000000..5f5786c --- /dev/null +++ b/android/app/src/main/kotlin/com/example/gascom/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.gascom + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..d2ffbff --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..2597170 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..7bb2df6 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -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-8.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..b9e43bd --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return 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 "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/assets/fonts/NotoSansArabic-Bold.ttf b/assets/fonts/NotoSansArabic-Bold.ttf new file mode 100644 index 0000000..311ecd7 Binary files /dev/null and b/assets/fonts/NotoSansArabic-Bold.ttf differ diff --git a/assets/fonts/NotoSansArabic-Light.ttf b/assets/fonts/NotoSansArabic-Light.ttf new file mode 100644 index 0000000..56ad192 Binary files /dev/null and b/assets/fonts/NotoSansArabic-Light.ttf differ diff --git a/assets/fonts/NotoSansArabic-Medium.ttf b/assets/fonts/NotoSansArabic-Medium.ttf new file mode 100644 index 0000000..b7c178e Binary files /dev/null and b/assets/fonts/NotoSansArabic-Medium.ttf differ diff --git a/assets/fonts/NotoSansArabic-Regular.ttf b/assets/fonts/NotoSansArabic-Regular.ttf new file mode 100644 index 0000000..79359c4 Binary files /dev/null and b/assets/fonts/NotoSansArabic-Regular.ttf differ diff --git a/assets/fonts/NotoSansArabic-SemiBold.ttf b/assets/fonts/NotoSansArabic-SemiBold.ttf new file mode 100644 index 0000000..a1a9cf2 Binary files /dev/null and b/assets/fonts/NotoSansArabic-SemiBold.ttf differ diff --git a/assets/languages/ar.json b/assets/languages/ar.json new file mode 100644 index 0000000..544b7b4 --- /dev/null +++ b/assets/languages/ar.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/assets/svgs/arrow_left.svg b/assets/svgs/arrow_left.svg new file mode 100644 index 0000000..2fad747 --- /dev/null +++ b/assets/svgs/arrow_left.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/camera.svg b/assets/svgs/camera.svg new file mode 100644 index 0000000..f1a4204 --- /dev/null +++ b/assets/svgs/camera.svg @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/assets/svgs/dollar_flag.svg b/assets/svgs/dollar_flag.svg new file mode 100644 index 0000000..65f4b8c --- /dev/null +++ b/assets/svgs/dollar_flag.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/done.svg b/assets/svgs/done.svg new file mode 100644 index 0000000..2fad747 --- /dev/null +++ b/assets/svgs/done.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/gas_station.svg b/assets/svgs/gas_station.svg new file mode 100644 index 0000000..e6c2e53 --- /dev/null +++ b/assets/svgs/gas_station.svg @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/generator.svg b/assets/svgs/generator.svg new file mode 100644 index 0000000..edb839b --- /dev/null +++ b/assets/svgs/generator.svg @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/generator_filled.svg b/assets/svgs/generator_filled.svg new file mode 100644 index 0000000..3f5bf84 --- /dev/null +++ b/assets/svgs/generator_filled.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/assets/svgs/headphone.svg b/assets/svgs/headphone.svg new file mode 100644 index 0000000..c59f783 --- /dev/null +++ b/assets/svgs/headphone.svg @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/home.svg b/assets/svgs/home.svg new file mode 100644 index 0000000..b74ed58 --- /dev/null +++ b/assets/svgs/home.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/home_filled.svg b/assets/svgs/home_filled.svg new file mode 100644 index 0000000..976d7a3 --- /dev/null +++ b/assets/svgs/home_filled.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/location_pin.svg b/assets/svgs/location_pin.svg new file mode 100644 index 0000000..e91e814 --- /dev/null +++ b/assets/svgs/location_pin.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/logo.svg b/assets/svgs/logo.svg new file mode 100644 index 0000000..3792900 --- /dev/null +++ b/assets/svgs/logo.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/notification.svg b/assets/svgs/notification.svg new file mode 100644 index 0000000..b554f99 --- /dev/null +++ b/assets/svgs/notification.svg @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/assets/svgs/profile_paper.svg b/assets/svgs/profile_paper.svg new file mode 100644 index 0000000..253ba76 --- /dev/null +++ b/assets/svgs/profile_paper.svg @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/settings.svg b/assets/svgs/settings.svg new file mode 100644 index 0000000..f9389c0 --- /dev/null +++ b/assets/svgs/settings.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/assets/svgs/user_sync.svg b/assets/svgs/user_sync.svg new file mode 100644 index 0000000..2c971c8 --- /dev/null +++ b/assets/svgs/user_sync.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/van.svg b/assets/svgs/van.svg new file mode 100644 index 0000000..c6eff57 --- /dev/null +++ b/assets/svgs/van.svg @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/svgs/van_filled.svg b/assets/svgs/van_filled.svg new file mode 100644 index 0000000..3516a60 --- /dev/null +++ b/assets/svgs/van_filled.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/assets/svgs/x.svg b/assets/svgs/x.svg new file mode 100644 index 0000000..f4b094c --- /dev/null +++ b/assets/svgs/x.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -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 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..7c56964 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e25838a --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*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 */; }; + 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 */; }; +/* 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 */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 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 = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 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 = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + 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 = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + 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 */ + 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"; + }; + 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"; + }; +/* 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 */, + ); + 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 = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom; + 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; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom.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; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom.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; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom.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 = 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; + 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 = 12.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 = 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 = 12.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; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.gascom; + 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 */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..8e3ca5d --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..6266644 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -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" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -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. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..b7caab5 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Gascom + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + gascom + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + NSCameraUsageDescription + To detect faces when completing a legal action, to scan national ids + + NSLocationWhenInUseUsageDescription + To enable GPS location access for Exif data + + NFCReaderUsageDescription + Need NFC permission for reading NFC tags + + com.apple.developer.nfc.readersession.formats + + NDEF + TAG + + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -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. + } + +} diff --git a/lib/constants/app_theme.dart b/lib/constants/app_theme.dart new file mode 100644 index 0000000..b5240ce --- /dev/null +++ b/lib/constants/app_theme.dart @@ -0,0 +1,87 @@ +import 'package:flutter/material.dart'; + +class AppTheme { + + static const primaryColor = Color(0xFF668D7B); + static const secondaryColor = Color(0xFFBEDDCC); + static const cardColor = Color(0xFF93B5A4); + static const yellowColor = Color(0xFFF1CC83); + static const redColor = Colors.red; + static const brownColor = Color(0xFF6B6148); + static const blackColor = Color(0xFF444444); + static const textColor = Color(0xFFFFFFFF); + + static get theme => ThemeData( + useMaterial3: true, + colorScheme: ColorScheme.fromSeed( + seedColor: primaryColor, + surface: primaryColor, + ), + scaffoldBackgroundColor: primaryColor, + textTheme: const TextTheme( + bodySmall: bodySmall, + bodyMedium: bodyMedium, + bodyLarge: bodyLarge, + titleLarge: titleLarge, + headlineLarge: headlineLarge, + ), + elevatedButtonTheme: ElevatedButtonThemeData( + style: ButtonStyle( + elevation: WidgetStateProperty.all(0), + backgroundColor: WidgetStateProperty.all(textColor), + padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 0, horizontal: 4)), + foregroundColor: WidgetStateProperty.all(primaryColor), + textStyle: WidgetStateProperty.all( + bodyMedium + ) + ), + ), + outlinedButtonTheme: OutlinedButtonThemeData( + style: ButtonStyle( + elevation: WidgetStateProperty.all(0), + backgroundColor: WidgetStateProperty.all(primaryColor), + padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 0, horizontal: 4)), + foregroundColor: WidgetStateProperty.all(textColor), + textStyle: WidgetStateProperty.all( + bodyMedium + ) + ), + ), + cardColor: cardColor, + ); + + static const bodySmall = TextStyle( + color: textColor, + fontSize: 14, + fontWeight: FontWeight.w300, + fontFamily: 'NotoSansArabic', + ); + + static const bodyMedium = TextStyle( + color: textColor, + fontSize: 16, + fontWeight: FontWeight.w400, + fontFamily: 'NotoSansArabic', + ); + + static const bodyLarge = TextStyle( + color: textColor, + fontSize: 18, + fontWeight: FontWeight.w400, + fontFamily: 'NotoSansArabic', + ); + + static const titleLarge = TextStyle( + color: textColor, + fontSize: 22, + fontWeight: FontWeight.w600, + fontFamily: 'NotoSansArabic', + ); + + static const headlineLarge = TextStyle( + color: textColor, + fontSize: 32, + fontWeight: FontWeight.w700, + fontFamily: 'NotoSansArabic', + ); +} \ No newline at end of file diff --git a/lib/extensions/face_detection_extension.dart b/lib/extensions/face_detection_extension.dart new file mode 100644 index 0000000..36bac3d --- /dev/null +++ b/lib/extensions/face_detection_extension.dart @@ -0,0 +1,47 @@ + +import 'package:camerawesome/camerawesome_plugin.dart'; +import 'package:google_mlkit_commons/google_mlkit_commons.dart'; + +extension MLKitUtils on AnalysisImage { + InputImage toInputImage() { + + return when( + nv21: (image) { + return InputImage.fromBytes( + bytes: image.bytes, + metadata: InputImageMetadata( + rotation: inputImageRotation, + format: InputImageFormat.nv21, + size: image.size, + bytesPerRow: image.planes.first.bytesPerRow, + ), + ); + }, + bgra8888: (image) { + return InputImage.fromBytes( + bytes: image.bytes, + metadata: InputImageMetadata( + size: size, + rotation: inputImageRotation, + format: InputImageFormat.nv21, + bytesPerRow: image.planes.first.bytesPerRow, + ), + ); + } + )!; + } + + InputImageRotation get inputImageRotation => + InputImageRotation.values.byName(rotation.name); + + InputImageFormat get inputImageFormat { + switch (format) { + case InputAnalysisImageFormat.bgra8888: + return InputImageFormat.bgra8888; + case InputAnalysisImageFormat.nv21: + return InputImageFormat.nv21; + default: + return InputImageFormat.yuv420; + } + } +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..b4c43c5 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,37 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/log_in_screen.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + await EasyLocalization.ensureInitialized(); + const List supportedLocales = [Locale("ar")]; + + runApp(EasyLocalization( + supportedLocales: supportedLocales, + path: 'assets/languages', + startLocale: const Locale("ar"), + fallbackLocale: const Locale("ar"), + saveLocale: true, + child: const MyApp(), + )); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Gascom', + debugShowCheckedModeBanner: false, + theme: AppTheme.theme, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + home: const LogInScreen(), + ); + } +} \ No newline at end of file diff --git a/lib/screens/change_engine_screen.dart b/lib/screens/change_engine_screen.dart new file mode 100644 index 0000000..cff6cce --- /dev/null +++ b/lib/screens/change_engine_screen.dart @@ -0,0 +1,118 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/screens/success_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/app_text_field.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class ChangeEngineScreen extends StatefulWidget { + const ChangeEngineScreen({super.key}); + + @override + State createState() => _ChangeEngineScreenState(); +} + +class _ChangeEngineScreenState extends State { + TextEditingController reasonController = TextEditingController(); + TextEditingController countryController = TextEditingController(); + TextEditingController engineNumberController = TextEditingController(); + TextEditingController enginePowerController = TextEditingController(); + TextEditingController engineTypeController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar( + title: "تبديل المحرك", + ), + body: SafeArea( + child: ListView( + padding: const EdgeInsets.all(20.0), + children: [ + AutoSizeText( + "لتبديل المحرك يرجى تزويدنا بمعلومات المحرك الجديد الجديد.", + maxLines: 3, + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 20.0), + AutoSizeText( + "سبب التبديل", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: reasonController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + AutoSizeText( + "منشأ المحرك الجديد", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: countryController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + AutoSizeText( + "رقم المحرك", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: engineNumberController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + AutoSizeText( + "القدرة التوليدية (KV.A)", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: enginePowerController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + AutoSizeText( + "نوع المحرك", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: engineTypeController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 25.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: handleSendRequest, + label: "تاكيد", + isElevated: true), + ), + ], + ) + ], + ), + ), + ); + } + + void handleSendRequest() { + // handle request + + pushScreenWithoutNavBar( + context, + const SuccessScreen( + title: "تم تقديم الطلب بنجاح", + subtitle: "سيتم مراجعة طلبك، واعلامك بالموافقة قريباً" + ) + ); + } +} diff --git a/lib/screens/change_location.dart b/lib/screens/change_location.dart new file mode 100644 index 0000000..43b332c --- /dev/null +++ b/lib/screens/change_location.dart @@ -0,0 +1,127 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/screens/document_camera_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/app_text_field.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class ChangeLocationScreen extends StatefulWidget { + const ChangeLocationScreen({super.key}); + + @override + State createState() => _ChangeLocationScreenState(); +} + +class _ChangeLocationScreenState extends State { + + TextEditingController reasonController = TextEditingController(); + TextEditingController districtController = TextEditingController(); + TextEditingController mahalaController = TextEditingController(); + TextEditingController streetController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar( + title: "تحويل موقع المولدة", + ), + body: SafeArea( + child: ListView( + padding: const EdgeInsets.all(20.0), + children: [ + AutoSizeText( + "لتحويل الموقع يرجى تزويدنا بمعلومات دقيقة للموقع الجديد بالاضافة الى سند ملكية للارض الجديدة.", + style: Theme.of(context).textTheme.bodyMedium, + maxLines: 2, + ), + const SizedBox(height: 20.0), + + AutoSizeText( + "سبب التحويل", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: reasonController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + + AutoSizeText( + "المنطقة", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: districtController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + + AutoSizeText( + "المحلة", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: mahalaController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + + AutoSizeText( + "الزقاق", + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 5.0), + AppTextField( + controller: streetController, + keyboardType: TextInputType.multiline, + ), + const SizedBox(height: 15.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: handleSetLocationOnMap, + label: "تحديد على الخريطة", + isElevated: false + ), + ), + ], + ), + const SizedBox(height: 25.0), + + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: handleSendRequest, + label: "تاكيد", + isElevated: true + ), + ), + ], + ) + ], + ), + ), + ); + } + + void handleSendRequest() { + // handle request + + Navigator.push(context, MaterialPageRoute( + fullscreenDialog: true, + builder: (context) => const DocumentCameraScreen(title: "سند ملكية", description: "ضع سند ملكية الارض الجديدة في المربع، وتاكد من وجود اضاءة مناسبة",), + )); + } + + void handleSetLocationOnMap() { + } +} \ No newline at end of file diff --git a/lib/screens/document_camera_screen.dart b/lib/screens/document_camera_screen.dart new file mode 100644 index 0000000..f9665a9 --- /dev/null +++ b/lib/screens/document_camera_screen.dart @@ -0,0 +1,126 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:camerawesome/camerawesome_plugin.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/success_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class DocumentCameraScreen extends StatefulWidget { + const DocumentCameraScreen({ + super.key, + required this.title, + required this.description, + }); + + final String title; + final String description; + + @override + State createState() => _DocumentCameraScreenState(); +} + +class _DocumentCameraScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + title: widget.title, + ), + body: SafeArea( + child: CameraAwesomeBuilder.custom( + sensorConfig: SensorConfig.single( + aspectRatio: CameraAspectRatios.ratio_16_9, + flashMode: FlashMode.none, + sensor: Sensor.position(SensorPosition.back), + zoom: 0.0, + ), + saveConfig: SaveConfig.photo( + + ), + builder: (state, previewSize) { + return Stack( + children: [ + Center( + child: ClipPath( + clipper: HoleClipper(), + child: Container( + color: AppTheme.primaryColor, + ), + ), + ), + Positioned( + bottom: 130, + left: 20, + right: 20, + child: AutoSizeText( + widget.description, + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.center, + maxLines: 2, + ) + ), + Positioned( + bottom: 70, + left: 20, + right: 20, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + // save image as bytes in a variable using the state object + // state.when( + // onPhotoMode:(s) => s.takePhoto( + // onPhoto: (request) => request.when( + // single: (r) => r.path, + // ), + // ), + // ); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const SuccessScreen(title: 'تم تقديم الطلب بنجاح', subtitle: 'سيتم مراجعة طلبك، واعلامك بموعد الكشف الموقعي',), + ), + ); + }, + label: "التقاط", + isElevated: true + ), + ), + ], + ), + ) + ], + ); + } + ), + ), + ); + } +} + +class HoleClipper extends CustomClipper { + @override + Path getClip(Size size) { + final path = Path() + ..addRect(Rect.fromLTWH(0, 0, size.width, size.height)) + ..addRRect(RRect.fromRectAndRadius( + Rect.fromCenter( + center: Offset(size.width / 2, size.height * 0.38), + width: size.width - (size.width * 0.2), // Adjust the width of the square + height: size.height - (size.height * 0.3), // Adjust the height of the square to match the width for a square shape + ), + const Radius.circular(20), // Adjust the border radius as needed + )) + ..fillType = PathFillType.evenOdd; + return path; + } + + @override + bool shouldReclip(covariant CustomClipper oldClipper) { + return false; + } +} \ No newline at end of file diff --git a/lib/screens/face_detection_screen.dart b/lib/screens/face_detection_screen.dart new file mode 100644 index 0000000..d10a47f --- /dev/null +++ b/lib/screens/face_detection_screen.dart @@ -0,0 +1,276 @@ +import 'dart:io'; + +import 'package:camerawesome/camerawesome_plugin.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/extensions/face_detection_extension.dart'; +import 'package:gascom/screens/order_details_screen.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; +import 'package:google_mlkit_face_detection/google_mlkit_face_detection.dart'; +import 'package:path_provider/path_provider.dart'; + +class FaceDetectionScreen extends StatefulWidget { + const FaceDetectionScreen({super.key}); + + @override + State createState() => _FaceDetectionScreenState(); +} + +class _FaceDetectionScreenState extends State { + + String message = "ضع وجهك في الدائرة المخصصة وتاكد من وجود اضاءة مناسبة"; + + final options = FaceDetectorOptions( + enableContours: true, + enableClassification: true, + enableLandmarks: true, + performanceMode: FaceDetectorMode.accurate, + minFaceSize: 0.5, + ); + + late final faceDetector = FaceDetector(options: options); + + // Face stability tracking + DateTime? _stableStartTime; + Rect? _lastFacePosition; + + // Constants for stability detection + final double _movementThreshold = 40; + final Duration _requiredStableTime = const Duration(seconds: 2); + + @override + void dispose() { + faceDetector.close(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar( + title: "تحقق الوجه", + ), + body: SafeArea( + child: Stack( + children: [ + CameraAwesomeBuilder.previewOnly( + builder: (state, preview) => const SizedBox(), + imageAnalysisConfig: AnalysisConfig( + maxFramesPerSecond: 10, + ), + onImageForAnalysis: handleImageAnalysis, + sensorConfig: SensorConfig.single( + aspectRatio: CameraAspectRatios.ratio_4_3, + flashMode: FlashMode.none, + sensor: Sensor.position(SensorPosition.front), + zoom: 0.0, + ), + ), + Center( + child: ClipPath( + clipper: HoleClipper(), + child: Container( + color: AppTheme.primaryColor, + ), + ), + ), + Positioned( + bottom: 50, + left: 20, + right: 20, + child: Text( + message, + style: Theme.of(context).textTheme.bodyMedium, + textAlign: TextAlign.center, + ), + ) + ], + ), + ), + ); + } + + bool _isFaceStable(Rect currentFace) { + if (_lastFacePosition == null) { + _lastFacePosition = currentFace; + return false; + } + + final double movement = + (currentFace.center.dx - _lastFacePosition!.center.dx).abs() + + (currentFace.center.dy - _lastFacePosition!.center.dy).abs(); + + _lastFacePosition = currentFace; + return movement < _movementThreshold; + } + + bool _isFaceCovered(Face face) { + // Check if essential face contours are present and visible + final requiredContours = [ + FaceContourType.face, + FaceContourType.leftEye, + FaceContourType.rightEye, + FaceContourType.noseBridge, + FaceContourType.noseBottom, + FaceContourType.leftCheek, + FaceContourType.rightCheek, + FaceContourType.upperLipTop, + FaceContourType.upperLipBottom, + FaceContourType.lowerLipTop, + FaceContourType.lowerLipBottom, + ]; + + // Count visible contours + int visibleContours = 0; + for (var contourType in requiredContours) { + if (face.contours[contourType]?.points.isNotEmpty ?? false) { + visibleContours++; + } + } + + // Check landmarks visibility + final hasEssentialLandmarks = + face.landmarks[FaceLandmarkType.leftEye] != null && + face.landmarks[FaceLandmarkType.rightEye] != null && + face.landmarks[FaceLandmarkType.noseBase] != null && + face.landmarks[FaceLandmarkType.bottomMouth] != null && + face.landmarks[FaceLandmarkType.leftMouth] != null && + face.landmarks[FaceLandmarkType.rightMouth] != null && + face.landmarks[FaceLandmarkType.leftEar] != null && + face.landmarks[FaceLandmarkType.rightEar] != null; + + // Check if eyes are open (existing check enhanced) + final eyesOpen = (face.rightEyeOpenProbability ?? 0) > 0.7 && (face.leftEyeOpenProbability ?? 0) > 0.7; + + print("@@@@@@@@@@@@@@@@@@"); + print(visibleContours); + print(hasEssentialLandmarks); + print(eyesOpen); + return !hasEssentialLandmarks || + visibleContours != requiredContours.length || + !eyesOpen; + } + + Future handleImageAnalysis(AnalysisImage img) async { + final inputImage = img.toInputImage(); + + try { + final faces = await faceDetector.processImage(inputImage); + + if (!context.mounted || !mounted) return; + if (faces.length == 1) { + + var face = faces.first; + var rect = faces.first.boundingBox; + final bool isStable = _isFaceStable(rect); + + // Check if face is covered + if (_isFaceCovered(face)) { + setState(() { + message = "الرجاء إزالة أي غطاء عن الوجه"; + }); + _stableStartTime = null; + return; + } + + if (!isStable) { + setState(() { + message = "ثبت وجهك في المكان المخصص وتأكد من أنه وجه حقيقي"; + }); + _stableStartTime = null; + return; + } + + if (!( + rect.left > (inputImage.metadata?.size.width ?? 0) * 0.1 + && rect.right < (inputImage.metadata?.size.width ?? 0) * 0.9 + && rect.top > (inputImage.metadata?.size.height ?? 0) * 0.1 + && rect.bottom < (inputImage.metadata?.size.height ?? 0) * 0.9 + && (faces.first.rightEyeOpenProbability ?? 0) > 0.3 + && (faces.first.leftEyeOpenProbability ?? 0) > 0.3 + )) { + setState(() { + message = "ثبت وجهك في المكان المخصص"; + }); + return; + } + + _stableStartTime ??= DateTime.now(); + + final stableDuration = DateTime.now().difference(_stableStartTime!); + if (stableDuration >= _requiredStableTime) { + img.when( + nv21: (image) { + faceDetector.close(); + + Navigator.pop(context); + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (context) => const OrderDetailsScreen()), + ); + }, + bgra8888: (image) { + faceDetector.close(); + Navigator.pop(context); + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (context) => const OrderDetailsScreen()), + ); + }, + ); + return; + } else { + setState(() { + message = "ثبت وجهك في المكان المخصص"; + }); + } + } + } catch (error) { + debugPrint("...sending image resulted error $error"); + } + } + + Future handleBuildPath(List sensors) async { + final Directory extDir = await getTemporaryDirectory(); + final Directory testDir = + await Directory('${extDir.path}/camerawesome') + .create(recursive: true); + + if (sensors.length == 1) { + final String filePath = + '${testDir.path}/${DateTime.now().millisecondsSinceEpoch}.jpg'; + return SingleCaptureRequest(filePath, sensors.first); + } else { + return MultipleCaptureRequest( + { + for (final sensor in sensors) + sensor: + '${testDir.path}/${sensor.position == SensorPosition.front ? 'front_' : "back_"}${DateTime.now().millisecondsSinceEpoch}.jpg', + }, + ); + } + } +} + +class HoleClipper extends CustomClipper { + @override + Path getClip(Size size) { + final path = Path() + ..addRect(Rect.fromLTWH(0, 0, size.width, size.height)) + ..addRRect(RRect.fromRectAndRadius( + Rect.fromCenter( + center: Offset(size.width / 2, size.height * 0.45), + width: size.width - (size.width * 0.2), // Adjust the width of the square + height: size.height - (size.height * 0.3), // Adjust the height of the square to match the width for a square shape + ), + const Radius.circular(20), // Adjust the border radius as needed + )) + ..fillType = PathFillType.evenOdd; + return path; + } + + @override + bool shouldReclip(covariant CustomClipper oldClipper) { + return false; + } +} \ No newline at end of file diff --git a/lib/screens/fines_screen.dart b/lib/screens/fines_screen.dart new file mode 100644 index 0000000..cf66723 --- /dev/null +++ b/lib/screens/fines_screen.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; +import 'package:gascom/widgets/fine_container.dart'; + +class FinesScreen extends StatelessWidget { + const FinesScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar( + title: "غرامات", + ), + body: SafeArea( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox(height: 30), + Text( + "غرامات غير مدفوعة", + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 20), + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: 5, + itemBuilder: (context, index) => FineContainer(), + separatorBuilder: (context, index) => const SizedBox(height: 10), + ), + const SizedBox(height: 15), + const Padding( + padding: EdgeInsets.symmetric(horizontal: 30), + child: Row( + children: [ + Divider( + color: AppTheme.textColor, + height: 1, + thickness: 1, + ), + ], + ), + ), + const SizedBox(height: 15), + Text( + "غرامات مدفوعة", + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 20), + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: 5, + itemBuilder: (context, index) => const FineContainer(), + separatorBuilder: (context, index) => const SizedBox(height: 10), + ), + const SizedBox(height: 30), + ], + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/follow_order_screen.dart b/lib/screens/follow_order_screen.dart new file mode 100644 index 0000000..059ddba --- /dev/null +++ b/lib/screens/follow_order_screen.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:gascom/widgets/order_container.dart'; + +class FollowOrderScreen extends StatefulWidget { + const FollowOrderScreen({super.key}); + + @override + State createState() => _FollowOrderScreenState(); +} + +class _FollowOrderScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox(height: 30), + Text( + "طلبات حالية", + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 20), + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: 5, + itemBuilder: (context, index) => OrderContainer(), + separatorBuilder: (context, index) => const SizedBox(height: 10), + ), + const SizedBox(height: 30), + Text( + "طلبات سابقة", + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 20), + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: 5, + itemBuilder: (context, index) => OrderContainer(), + separatorBuilder: (context, index) => const SizedBox(height: 10), + ), + const SizedBox(height: 30), + ], + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/generator_info_screen.dart b/lib/screens/generator_info_screen.dart new file mode 100644 index 0000000..6f97873 --- /dev/null +++ b/lib/screens/generator_info_screen.dart @@ -0,0 +1,195 @@ +import 'package:animated_custom_dropdown/custom_dropdown.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/app_text_field.dart'; + +class GeneratorInfoScreen extends StatefulWidget { + const GeneratorInfoScreen({super.key}); + + @override + State createState() => _GeneratorInfoScreenState(); +} + +class _GeneratorInfoScreenState extends State { + + final TextEditingController ownerNameController = TextEditingController(); + final TextEditingController phoneController = TextEditingController(); + final TextEditingController areaController = TextEditingController(); + final TextEditingController districtController = TextEditingController(); + final TextEditingController laneController = TextEditingController(); + final TextEditingController generatorBrandController = TextEditingController(); + final TextEditingController generatorPowerController = TextEditingController(); + final TextEditingController authorizedNameController = TextEditingController(); + + String selectedGeneratorType = 'حكومية'; + List availableGeneratorType = ['حكومية', 'اهلية']; + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: SafeArea( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 20), + children: [ + const SizedBox(height: 45,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "معلومات المولدة", + style: Theme.of(context).textTheme.titleLarge?.copyWith( + fontWeight: FontWeight.w600, + ), + ), + Text( + "#10023432", + style: Theme.of(context).textTheme.titleLarge?.copyWith( + fontWeight: FontWeight.w600, + ), + textDirection: TextDirection.ltr, + ), + ], + ), + const SizedBox(height: 30,), + Text( + "اسم صاحب المولدة", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: ownerNameController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "رقم الهاتف", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: phoneController, + keyboardType: TextInputType.phone, + ), + const SizedBox(height: 15,), + Text( + "فئة المولدة", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + CustomDropdown( + hintText: "فئة المولدة", + items: availableGeneratorType, + closedHeaderPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + expandedHeaderPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: CustomDropdownDecoration( + closedFillColor: AppTheme.primaryColor, + expandedFillColor: AppTheme.primaryColor, + closedBorder: Border.all( + color: AppTheme.textColor, + width: 1 + ), + expandedBorder: Border.all( + color: AppTheme.textColor, + width: 1 + ), + closedBorderRadius: const BorderRadius.all(Radius.circular(30)), + expandedBorderRadius: const BorderRadius.all(Radius.circular(20)), + hintStyle: Theme.of(context).textTheme.bodySmall, + listItemStyle: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w400, + ), + headerStyle: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w400, + ), + expandedSuffixIcon: const Icon(CupertinoIcons.chevron_up, color: AppTheme.textColor, size: 18,), + closedSuffixIcon: const Icon(CupertinoIcons.chevron_down, color: AppTheme.textColor, size: 18,), + ), + onChanged: (value) { + selectedGeneratorType = value ?? ""; + }, + ), + const SizedBox(height: 15,), + Text( + "المنطقة", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: areaController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "المحلة", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: districtController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "الزقاق", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: laneController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "نوع المولدة", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: generatorBrandController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "راس التوليد", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: generatorPowerController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 15,), + Text( + "مخول استلام الحصة الوقودية", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 6,), + AppTextField( + controller: authorizedNameController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 40,), + Center( + child: SizedBox( + width: 200, + height: 45, + child: AppButton( + onPressed: handleUpdateInfo, + label: "تحديث المعلومات", + isElevated: false + ) + ), + ), + const SizedBox(height: 50,), + ], + ), + ), + ); + } + + void handleUpdateInfo() { + } +} \ No newline at end of file diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart new file mode 100644 index 0000000..a281ce2 --- /dev/null +++ b/lib/screens/home_screen.dart @@ -0,0 +1,175 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/change_engine_screen.dart'; +import 'package:gascom/screens/change_location.dart'; +import 'package:gascom/screens/document_camera_screen.dart'; +import 'package:gascom/screens/fines_screen.dart'; +import 'package:gascom/screens/notifications_screen.dart'; +import 'package:gascom/screens/pay_monthly_gas.dart'; +import 'package:gascom/screens/service_fees_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/home_grid_item.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class HomeScreen extends StatefulWidget { + const HomeScreen({super.key}); + + @override + State createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: SafeArea( + child: Column( + children: [ + const SizedBox(height: 50,), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + width: 160, + "assets/svgs/logo.svg", + semanticsLabel: 'Logo', + ), + InkWell( + onTap: () => pushScreenWithoutNavBar(context, const NotificationsScreen()), + child: Padding( + padding: const EdgeInsets.only(left: 10), + child: SvgPicture.asset( + "assets/svgs/notification.svg", + semanticsLabel: 'Menu', + ), + ), + ), + ], + ), + ), + const SizedBox(height: 40,), + Row( + children: [ + SizedBox( + width: MediaQuery.sizeOf(context).width * 0.65, + child: const Divider( + color: AppTheme.yellowColor, + thickness: 3, + height: 0, + ), + ), + SizedBox( + width: MediaQuery.sizeOf(context).width * 0.35, + child: const Divider( + color: AppTheme.secondaryColor, + thickness: 1, + height: 0, + ), + ), + ], + ), + Expanded( + child: SingleChildScrollView( + child: Column( + children: [ + const SizedBox(height: 30,), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "الخدمات", + style: Theme.of(context).textTheme.bodyLarge, + ), + SizedBox( + width: 140, + height: 32, + child: AppButton( + onPressed: () { + pushScreenWithoutNavBar(context, const ServiceFeesScreen()); + }, + label: "رسوم الخدمات", + isElevated: false + ), + ), + ], + ), + ), + const SizedBox(height: 30,), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: GridView( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + crossAxisSpacing: 20, + mainAxisSpacing: 5, + childAspectRatio: MediaQuery.sizeOf(context).width / (MediaQuery.sizeOf(context).height / 1.3), + ), + children: [ + HomeGridItem( + title: "طلب حصة", + svgPath: "assets/svgs/gas_station.svg", + onPressed: () { + pushScreenWithoutNavBar(context, PayMonthlyGas()); + } + ), + HomeGridItem( + title: "غرامات", + svgPath: "assets/svgs/dollar_flag.svg", + onPressed: () { + pushScreenWithoutNavBar(context, const FinesScreen()); + } + ), + HomeGridItem( + title: "تحويل موقع", + svgPath: "assets/svgs/location_pin.svg", + onPressed: () { + pushScreenWithoutNavBar(context, const ChangeLocationScreen()); + } + ), + HomeGridItem( + title: "تبديل محرك", + svgPath: "assets/svgs/settings.svg", + onPressed: () { + pushScreenWithoutNavBar(context, const ChangeEngineScreen()); + } + ), + HomeGridItem( + title: "تجديد بطاقة الحصة الوقودية", + svgPath: "assets/svgs/profile_paper.svg", + onPressed: () { + pushScreenWithoutNavBar(context, const DocumentCameraScreen(title: "تجديد دفتر", description: "لتجديد الدفتر يرجى ارفاق صورة للدفتر الحالي, ضع الدفتر في المربع، وتاكد من وجود اضاءة جيدة ثم اضغط التقاط.",)); + } + ), + HomeGridItem( + title: "تغيير مخول", + svgPath: "assets/svgs/user_sync.svg", + onPressed: () { + } + ), + HomeGridItem( + title: "الدعم الفني", + svgPath: "assets/svgs/headphone.svg", + onPressed: () {} + ), + ], + ), + ) + ], + ), + ), + ) + ], + ) + ) + ); + } +} \ No newline at end of file diff --git a/lib/screens/log_in_screen.dart b/lib/screens/log_in_screen.dart new file mode 100644 index 0000000..af894e5 --- /dev/null +++ b/lib/screens/log_in_screen.dart @@ -0,0 +1,145 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/nfc_screen.dart'; +import 'package:gascom/screens/otp_provider_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:pinput/pinput.dart'; + +class LogInScreen extends StatefulWidget { + const LogInScreen({super.key}); + + @override + State createState() => _LogInScreenState(); +} + +class _LogInScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 25), + children: [ + const SizedBox(height: 150), + Center( + child: SizedBox( + width: MediaQuery.sizeOf(context).width * 0.6, + child: SvgPicture.asset( + "assets/svgs/logo.svg", + semanticsLabel: 'Home', + ), + ), + ), + const SizedBox(height: 50), + Center( + child: AutoSizeText( + "مرحبا بكم في كازكوم، يرجى ادخال رقم الترخيص الخاص بصاحب المولدة", + style: Theme.of(context).textTheme.bodyLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + Center( + child: AutoSizeText( + "أو قم بمسح رمز QR الموجود على البطاقة", + style: Theme.of(context).textTheme.bodyLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 35), + Row( + children: [ + InkWell( + borderRadius: BorderRadius.circular(11), + onTap: () { + // TODO: Implement QR Code Scanner + }, + child: Container( + width: 60, + height: 60, + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(11), + border: Border.all( + color: AppTheme.textColor, + width: 2, + ), + ), + child: SvgPicture.asset( + "assets/svgs/camera.svg", + semanticsLabel: 'QR Code', + ), + ), + ), + const SizedBox(width: 15), + Expanded( + child: Container( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 6), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(11), + border: Border.all( + color: AppTheme.textColor, + width: 2, + ), + ), + child: Directionality( + textDirection: TextDirection.ltr, + child: Pinput( + length: 5, + defaultPinTheme: PinTheme( + width: 30, + height: 35, + textStyle: Theme.of(context).textTheme.bodyLarge, + margin: const EdgeInsets.symmetric(horizontal: 5), + decoration: const BoxDecoration( + // color: AppTheme.textColor, + border: Border( + bottom: BorderSide( + color: AppTheme.textColor, + width: 1, + ), + ), + ), + ), + onCompleted: (value) { + Navigator.push(context, MaterialPageRoute(builder: (context) => OtpProviderScreen( + cardNumber: int.parse(value), + ))); + }, + ), + ), + ), + ), + ], + ), + + const SizedBox(height: 50), + + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 180, + child: AppButton( + onPressed: () { + Navigator.push(context, MaterialPageRoute( + fullscreenDialog: true, + // builder: (context) => NewGeneratorScreen(), + builder: (context) => NfcScreen(), + )); + }, + label: "مولـدة جـــديــدة", + isElevated: false + ), + ), + ], + ), + ], + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/screens/national_id_camera_screen.dart b/lib/screens/national_id_camera_screen.dart new file mode 100644 index 0000000..10dbf53 --- /dev/null +++ b/lib/screens/national_id_camera_screen.dart @@ -0,0 +1,120 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:camerawesome/camerawesome_plugin.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class NationalIdCameraScreen extends StatefulWidget { + const NationalIdCameraScreen({ + super.key, + required this.title, + required this.subtitle, + required this.description, + required this.onScanComplete, + }); + + final String title; + final String subtitle; + final String description; + final void Function() onScanComplete; + + @override + State createState() => _NationalIdCameraScreenState(); +} + +class _NationalIdCameraScreenState extends State { + + String? error; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar(), + body: SafeArea( + child: CameraAwesomeBuilder.custom( + sensorConfig: SensorConfig.single( + aspectRatio: CameraAspectRatios.ratio_16_9, + flashMode: FlashMode.none, + sensor: Sensor.position(SensorPosition.back), + zoom: 0.0, + ), + saveConfig: SaveConfig.photo( + + ), + builder: (state, previewSize) { + return Stack( + children: [ + Center( + child: ClipPath( + clipper: HoleClipper(), + child: Container( + color: AppTheme.primaryColor, + ), + ), + ), + Positioned( + top: 30, + left: 20, + right: 20, + child: AutoSizeText( + widget.title, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + fontWeight: FontWeight.w500, + ), + textAlign: TextAlign.center, + maxLines: 2, + ) + ), + Positioned( + top: 100, + left: 20, + right: 20, + child: AutoSizeText( + widget.subtitle, + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.center, + maxLines: 1, + ) + ), + Positioned( + bottom: 200, + left: 20, + right: 20, + child: AutoSizeText( + error ?? widget.description, + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.center, + maxLines: 2, + ) + ), + ], + ); + } + ), + ), + ); + } +} + +class HoleClipper extends CustomClipper { + @override + Path getClip(Size size) { + final path = Path() + ..addRect(Rect.fromLTWH(0, 0, size.width, size.height)) + ..addRRect(RRect.fromRectAndRadius( + Rect.fromCenter( + center: Offset(size.width / 2, size.height * 0.38), + width: size.width - (size.width * 0.1), // Adjust the width of the square + height: size.height - (size.height * 0.7), // Adjust the height of the square to match the width for a square shape + ), + const Radius.circular(20), // Adjust the border radius as needed + )) + ..fillType = PathFillType.evenOdd; + return path; + } + + @override + bool shouldReclip(covariant CustomClipper oldClipper) { + return false; + } +} \ No newline at end of file diff --git a/lib/screens/new_generator_screen.dart b/lib/screens/new_generator_screen.dart new file mode 100644 index 0000000..be1ffa0 --- /dev/null +++ b/lib/screens/new_generator_screen.dart @@ -0,0 +1,112 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/screens/national_id_camera_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class NewGeneratorScreen extends StatefulWidget { + const NewGeneratorScreen({super.key}); + + @override + State createState() => _NewGeneratorScreenState(); +} + +class _NewGeneratorScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar(), + body: SafeArea( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 25), + children: [ + const SizedBox(height: 150), + // SizedBox( + // width: 40, + // child: SvgPicture.asset( + // "assets/svgs/x.svg", + // semanticsLabel: 'Cancel', + // ), + // ), + // const SizedBox(height: 50), + Center( + child: AutoSizeText( + "طلب تخصيص حصة كاز للمولدة", + style: Theme.of(context).textTheme.titleLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 50), + Center( + child: AutoSizeText( + "يوفر تطبيق كاز كوم خدمة طلب حصة الكاز للمولدات الاهلية الكترونياً وبسهولة تامة.", + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 25), + Center( + child: AutoSizeText( + "لتسجيل حساب في كازكوم يرجى ملئ المعلومات المطلوبة والتأكد من صحة ودقة المعلومات.", + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 75), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + fullscreenDialog: true, + builder: (context) => NationalIdCameraScreen( + title: "الهوية الوطنية", + subtitle: "الوجه الامامي", + description: "ضع البطاقة الموحدة الخاصة بصاحب المولد في المربع وتاكد من وجود اضاءة مناسبة", + onScanComplete: () { + Navigator.push(context, MaterialPageRoute( + fullscreenDialog: true, + builder: (context) => NationalIdCameraScreen( + title: "الهوية الوطنية", + subtitle: "الوجه الخلفي", + description: "ضع البطاقة الموحدة الخاصة بصاحب المولد في المربع وتاكد من وجود اضاءة مناسبة", + onScanComplete: () { + Navigator.push(context, MaterialPageRoute( + fullscreenDialog: true, + builder: (context) => NationalIdCameraScreen( + title: "بطاقة السكن", + subtitle: "", + description: "ضع بطاقة السكن الخاصة بصاحب المولد في المربع وتاكد من وجود اضاءة مناسبة", + onScanComplete: () { + + } + ) + )); + } + ) + )); + }, + ) + ) + ); + }, + label: "التالي", + isElevated: false + ), + ), + ], + ), + ] + ) + ) + ); + } +} \ No newline at end of file diff --git a/lib/screens/nfc_screen.dart b/lib/screens/nfc_screen.dart new file mode 100644 index 0000000..eebc616 --- /dev/null +++ b/lib/screens/nfc_screen.dart @@ -0,0 +1,585 @@ +import 'dart:typed_data'; + +import 'package:dmrtd/dmrtd.dart'; +import 'package:dmrtd/src/proto/can_key.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class NfcScreen extends StatefulWidget { + const NfcScreen({super.key}); + + @override + State createState() => _NfcScreenState(); +} + +class _NfcScreenState extends State { + final NfcProvider _nfc = NfcProvider(); + MrtdData? _mrtdData = MrtdData(); + String _alertMessage = ""; + bool _isReading = false; + + String id = ''; // should change based on user id card (it's the string below the image) + DateTime dateOfBirth = DateTime(2000, 1, 1); // should change based on user id card + DateTime dateOfExpiry = DateTime(2029, 1, 1); // should change based on user id card + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) async { + try { + _buttonPressed(); + } catch (e) { + print(e); + } + }); + + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return const Scaffold( + appBar: CustomAppBar(), + body: SafeArea( + child: Center( + child: Text("NFC Screen, Nfc has ti be turned on."), + ), + ), + ); + } + + String formatProgressMsg(String message, int percentProgress) { + final p = (percentProgress / 20).round(); + final full = "🟢 " * p; + final empty = "⚪️ " * (5 - p); + return "$message\n\n$full$empty"; + } + + void _readMRTD({required AccessKey accessKey, bool isPace = false}) async { + try { + setState(() { + _mrtdData = null; + _alertMessage = "Waiting for Passport tag ..."; + _isReading = true; + }); + try { + bool demo = false; + print("-------------- FIRST -------------"); + if (!demo) + await _nfc.connect( + iosAlertMessage: "Hold your phone near Biometric Passport"); + + print("-------------- SECOND -------------"); + final passport = Passport(_nfc); + + print("-------------- THIRD -------------"); + setState(() { + _alertMessage = "Reading Passport ..."; + }); + + print("-------------- 4 -------------"); + _nfc.setIosAlertMessage("Trying to read EF.CardAccess ..."); + final mrtdData = MrtdData(); + + print("-------------- 5 -------------"); + try { + mrtdData.cardAccess = await passport.readEfCardAccess(); + } on PassportError { + print("-------------- 6 -------------"); + //if (e.code != StatusWord.fileNotFound) rethrow; + } + + _nfc.setIosAlertMessage("Trying to read EF.CardSecurity ..."); + + try { + //mrtdData.cardSecurity = await passport.readEfCardSecurity(); + } on PassportError { + //if (e.code != StatusWord.fileNotFound) rethrow; + } + + _nfc.setIosAlertMessage("Initiating session with PACE..."); + //set MrtdData + mrtdData.isPACE = isPace; + mrtdData.isDBA = accessKey.PACE_REF_KEY_TAG == 0x01 ? true : false; + + if (isPace) { + //PACE session + print("-------------- 7 -------------"); + await passport.startSessionPACE(accessKey, mrtdData.cardAccess!); + } else { + print("-------------- 8 -------------"); + //BAC session + await passport.startSession(accessKey as DBAKey); + } + + print("-------------- 9 -------------"); + _nfc.setIosAlertMessage(formatProgressMsg("Reading EF.COM ...", 0)); + mrtdData.com = await passport.readEfCOM(); + + _nfc.setIosAlertMessage( + formatProgressMsg("Reading Data Groups ...", 20)); + + print("-------------- 10 -------------"); + if (mrtdData.com!.dgTags.contains(EfDG1.TAG)) { + mrtdData.dg1 = await passport.readEfDG1(); + print("DG1 mrz country: ${mrtdData.dg1?.mrz.country}"); + print("DG1 mrz dateOfBirth: ${mrtdData.dg1?.mrz.dateOfBirth}"); + print("DG1 mrz dateOfExpiry: ${mrtdData.dg1?.mrz.dateOfExpiry}"); + print("DG1 mrz documentCode: ${mrtdData.dg1?.mrz.documentCode}"); + print("DG1 mrz documentNumber: ${mrtdData.dg1?.mrz.documentNumber}"); + print("DG1 mrz firstName: ${mrtdData.dg1?.mrz.firstName}"); + print("DG1 mrz gender: ${mrtdData.dg1?.mrz.gender}"); + print("DG1 mrz lastName: ${mrtdData.dg1?.mrz.lastName}"); + print("DG1 mrz nationality: ${mrtdData.dg1?.mrz.nationality}"); + print("DG1 mrz optionalData: ${mrtdData.dg1?.mrz.optionalData}"); + print("DG1 mrz optionalData2: ${mrtdData.dg1?.mrz.optionalData2}"); + print("DG1 mrz version: ${mrtdData.dg1?.mrz.version}"); + } + + print("-------------- 11 -------------"); + if (mrtdData.com!.dgTags.contains(EfDG2.TAG)) { + mrtdData.dg2 = await passport.readEfDG2(); + print("DG2 deviceType: ${mrtdData.dg2?.deviceType}"); + print("DG2 expression: ${mrtdData.dg2?.expression}"); + print("DG2 eyeColor: ${mrtdData.dg2?.eyeColor}"); + print("DG2 faceImageType: ${mrtdData.dg2?.faceImageType}"); + print("DG2 facialRecordDataLength: ${mrtdData.dg2?.facialRecordDataLength}"); + print("DG2 featureMask: ${mrtdData.dg2?.featureMask}"); + print("DG2 gender: ${mrtdData.dg2?.gender}"); + print("DG2 hairColor: ${mrtdData.dg2?.hairColor}"); + print("DG2 imageColorSpace: ${mrtdData.dg2?.imageColorSpace}"); + print("DG2 imageData: ${mrtdData.dg2?.imageData}"); + print("DG2 imageHeight: ${mrtdData.dg2?.imageHeight}"); + print("DG2 imageType: ${mrtdData.dg2?.imageType}"); + print("DG2 imageWidth: ${mrtdData.dg2?.imageWidth}"); + print("DG2 lengthOfRecord: ${mrtdData.dg2?.lengthOfRecord}"); + print("DG2 nrFeaturePoints: ${mrtdData.dg2?.nrFeaturePoints}"); + print("DG2 numberOfFacialImages: ${mrtdData.dg2?.numberOfFacialImages}"); + print("DG2 poseAngle: ${mrtdData.dg2?.poseAngle}"); + print("DG2 poseAngleUncertainty: ${mrtdData.dg2?.poseAngleUncertainty}"); + print("DG2 quality: ${mrtdData.dg2?.quality}"); + print("DG2 sourceType: ${mrtdData.dg2?.sourceType}"); + print("DG2 versionNumber: ${mrtdData.dg2?.versionNumber}"); + } + + // To read DG3 and DG4 session has to be established with CVCA certificate (not supported). + // if(mrtdData.com!.dgTags.contains(EfDG3.TAG)) { + // mrtdData.dg3 = await passport.readEfDG3(); + // } + + // if(mrtdData.com!.dgTags.contains(EfDG4.TAG)) { + // mrtdData.dg4 = await passport.readEfDG4(); + // } + + if (mrtdData.com!.dgTags.contains(EfDG5.TAG)) { + mrtdData.dg5 = await passport.readEfDG5(); + } + + if (mrtdData.com!.dgTags.contains(EfDG6.TAG)) { + mrtdData.dg6 = await passport.readEfDG6(); + } + + if (mrtdData.com!.dgTags.contains(EfDG7.TAG)) { + mrtdData.dg7 = await passport.readEfDG7(); + } + + if (mrtdData.com!.dgTags.contains(EfDG8.TAG)) { + mrtdData.dg8 = await passport.readEfDG8(); + } + + if (mrtdData.com!.dgTags.contains(EfDG9.TAG)) { + mrtdData.dg9 = await passport.readEfDG9(); + } + + if (mrtdData.com!.dgTags.contains(EfDG10.TAG)) { + mrtdData.dg10 = await passport.readEfDG10(); + } + + if (mrtdData.com!.dgTags.contains(EfDG11.TAG)) { + mrtdData.dg11 = await passport.readEfDG11(); + print("DG11 custodyInformation: ${mrtdData.dg11?.custodyInformation}"); + print("DG11 ersonalSummary: ${mrtdData.dg11?.ersonalSummary}"); + print("DG11 fullDateOfBirth: ${mrtdData.dg11?.fullDateOfBirth}"); + print("DG11 nameOfHolder: ${mrtdData.dg11?.nameOfHolder}"); + print("DG11 otherNames: ${mrtdData.dg11?.otherNames}"); + print("DG11 otherValidTDNumbers: ${mrtdData.dg11?.otherValidTDNumbers}"); + print("DG11 permanentAddress: ${mrtdData.dg11?.permanentAddress}"); + print("DG11 personalNumber: ${mrtdData.dg11?.personalNumber}"); + print("DG11 placeOfBirth: ${mrtdData.dg11?.placeOfBirth}"); + print("DG11 profession: ${mrtdData.dg11?.profession}"); + print("DG11 proofOfCitizenship: ${mrtdData.dg11?.proofOfCitizenship}"); + print("DG11 telephone: ${mrtdData.dg11?.telephone}"); + print("DG11 title: ${mrtdData.dg11?.title}"); + } + + if (mrtdData.com!.dgTags.contains(EfDG12.TAG)) { + mrtdData.dg12 = await passport.readEfDG12(); + print("DG12 dateOfIssue: ${mrtdData.dg12?.dateOfIssue}"); + print("DG12 dateOfIssue: ${mrtdData.dg12?.issuingAuthority}"); + } + + if (mrtdData.com!.dgTags.contains(EfDG13.TAG)) { + mrtdData.dg13 = await passport.readEfDG13(); + } + + if (mrtdData.com!.dgTags.contains(EfDG14.TAG)) { + mrtdData.dg14 = await passport.readEfDG14(); + } + + if (mrtdData.com!.dgTags.contains(EfDG15.TAG)) { + mrtdData.dg15 = await passport.readEfDG15(); + _nfc.setIosAlertMessage(formatProgressMsg("Doing AA ...", 60)); + + print("DG15 aaPublicKey: ${mrtdData.dg15?.aaPublicKey}"); + + mrtdData.aaSig = await passport.activeAuthenticate(Uint8List(8)); + } + + if (mrtdData.com!.dgTags.contains(EfDG16.TAG)) { + mrtdData.dg16 = await passport.readEfDG16(); + } + + print("-------------- 12 -------------"); + _nfc.setIosAlertMessage(formatProgressMsg("Reading EF.SOD ...", 80)); + mrtdData.sod = await passport.readEfSOD(); + + setState(() { + _mrtdData = mrtdData; + }); + + setState(() { + _alertMessage = ""; + }); + } on Exception catch (e) { + final se = e.toString().toLowerCase(); + String alertMsg = "An error has occurred while reading Passport!"; + if (e is PassportError) { + if (se.contains("security status not satisfied")) { + alertMsg = + "Failed to initiate session with passport.\nCheck input data!"; + } + print("PassportError: ${e.message}"); + } else { + print( + "An exception was encountered while trying to read Passport: $e"); + } + + if (se.contains('timeout')) { + alertMsg = "Timeout while waiting for Passport tag"; + } else if (se.contains("tag was lost")) { + alertMsg = "Tag was lost. Please try again!"; + } else if (se.contains("invalidated by user")) { + alertMsg = ""; + } + + setState(() { + _alertMessage = alertMsg; + }); + } finally { + if (_alertMessage.isNotEmpty) { + await _nfc.disconnect(iosErrorMessage: _alertMessage); + } else { + await _nfc.disconnect( + iosAlertMessage: formatProgressMsg("Finished", 100)); + } + setState(() { + _isReading = false; + }); + } + } on Exception catch (e) { + print("Read MRTD error: $e"); + } + } + + void _readMRTDOld() async { + try { + setState(() { + _mrtdData = null; + _alertMessage = "Waiting for Passport tag ..."; + _isReading = true; + }); + + await _nfc.connect( + iosAlertMessage: "Hold your phone near Biometric Passport"); + final passport = Passport(_nfc); + + setState(() { + _alertMessage = "Reading Passport ..."; + }); + + _nfc.setIosAlertMessage("Trying to read EF.CardAccess ..."); + final mrtdData = MrtdData(); + + try { + mrtdData.cardAccess = await passport.readEfCardAccess(); + } on PassportError { + //if (e.code != StatusWord.fileNotFound) rethrow; + } + + _nfc.setIosAlertMessage("Trying to read EF.CardSecurity ..."); + + try { + mrtdData.cardSecurity = await passport.readEfCardSecurity(); + } on PassportError { + //if (e.code != StatusWord.fileNotFound) rethrow; + } + + _nfc.setIosAlertMessage("Initiating session ..."); + final bacKeySeed = DBAKey(id, dateOfBirth, dateOfExpiry); + await passport.startSession(bacKeySeed); + + _nfc.setIosAlertMessage(formatProgressMsg("Reading EF.COM ...", 0)); + mrtdData.com = await passport.readEfCOM(); + + _nfc.setIosAlertMessage(formatProgressMsg("Reading Data Groups ...", 20)); + + if (mrtdData.com!.dgTags.contains(EfDG1.TAG)) { + mrtdData.dg1 = await passport.readEfDG1(); + print(mrtdData.dg1?.mrz); + } + + if (mrtdData.com!.dgTags.contains(EfDG2.TAG)) { + mrtdData.dg2 = await passport.readEfDG2(); + print("DG2 deviceType: ${mrtdData.dg2?.deviceType}"); + print("DG2 expression: ${mrtdData.dg2?.expression}"); + print("DG2 eyeColor: ${mrtdData.dg2?.eyeColor}"); + print("DG2 faceImageType: ${mrtdData.dg2?.faceImageType}"); + print("DG2 facialRecordDataLength: ${mrtdData.dg2?.facialRecordDataLength}"); + print("DG2 featureMask: ${mrtdData.dg2?.featureMask}"); + print("DG2 fid: ${mrtdData.dg2?.fid}"); + print("DG2 gender: ${mrtdData.dg2?.gender}"); + print("DG2 hairColor: ${mrtdData.dg2?.hairColor}"); + print("DG2 imageColorSpace: ${mrtdData.dg2?.imageColorSpace}"); + print("DG2 imageData: ${mrtdData.dg2?.imageData}"); + print("DG2 imageHeight: ${mrtdData.dg2?.imageHeight}"); + print("DG2 imageType: ${mrtdData.dg2?.imageType}"); + print("DG2 imageWidth: ${mrtdData.dg2?.imageWidth}"); + print("DG2 nrFeaturePoints: ${mrtdData.dg2?.nrFeaturePoints}"); + print("DG2 numberOfFacialImages: ${mrtdData.dg2?.numberOfFacialImages}"); + print("DG2 lengthOfRecord: ${mrtdData.dg2?.lengthOfRecord}"); + print("DG2 poseAngle: ${mrtdData.dg2?.poseAngle}"); + print("DG2 poseAngleUncertainty: ${mrtdData.dg2?.poseAngleUncertainty}"); + print("DG2 quality: ${mrtdData.dg2?.quality}"); + print("DG2 sourceType: ${mrtdData.dg2?.sourceType}"); + print("DG2 versionNumber: ${mrtdData.dg2?.versionNumber}"); + print("DG2 tag: ${mrtdData.dg2?.tag}"); + print("DG2 sfi: ${mrtdData.dg2?.sfi}"); + } + + // To read DG3 and DG4 session has to be established with CVCA certificate (not supported). + // if(mrtdData.com!.dgTags.contains(EfDG3.TAG)) { + // mrtdData.dg3 = await passport.readEfDG3(); + // } + + // if(mrtdData.com!.dgTags.contains(EfDG4.TAG)) { + // mrtdData.dg4 = await passport.readEfDG4(); + // } + + if (mrtdData.com!.dgTags.contains(EfDG5.TAG)) { + mrtdData.dg5 = await passport.readEfDG5(); + } + + if (mrtdData.com!.dgTags.contains(EfDG6.TAG)) { + mrtdData.dg6 = await passport.readEfDG6(); + } + + if (mrtdData.com!.dgTags.contains(EfDG7.TAG)) { + mrtdData.dg7 = await passport.readEfDG7(); + } + + if (mrtdData.com!.dgTags.contains(EfDG8.TAG)) { + mrtdData.dg8 = await passport.readEfDG8(); + } + + if (mrtdData.com!.dgTags.contains(EfDG9.TAG)) { + mrtdData.dg9 = await passport.readEfDG9(); + } + + if (mrtdData.com!.dgTags.contains(EfDG10.TAG)) { + mrtdData.dg10 = await passport.readEfDG10(); + } + + if (mrtdData.com!.dgTags.contains(EfDG11.TAG)) { + mrtdData.dg11 = await passport.readEfDG11(); + print("DG11 custodyInformation: ${mrtdData.dg11?.custodyInformation}"); + print("DG11 ersonalSummary: ${mrtdData.dg11?.ersonalSummary}"); + print("DG11 fullDateOfBirth: ${mrtdData.dg11?.fullDateOfBirth}"); + print("DG11 nameOfHolder: ${mrtdData.dg11?.nameOfHolder}"); + print("DG11 otherNames: ${mrtdData.dg11?.otherNames}"); + print("DG11 otherValidTDNumbers: ${mrtdData.dg11?.otherValidTDNumbers}"); + print("DG11 permanentAddress: ${mrtdData.dg11?.permanentAddress}"); + print("DG11 personalNumber: ${mrtdData.dg11?.personalNumber}"); + print("DG11 placeOfBirth: ${mrtdData.dg11?.placeOfBirth}"); + print("DG11 profession: ${mrtdData.dg11?.profession}"); + print("DG11 proofOfCitizenship: ${mrtdData.dg11?.proofOfCitizenship}"); + print("DG11 telephone: ${mrtdData.dg11?.telephone}"); + print("DG11 title: ${mrtdData.dg11?.title}"); + } + + if (mrtdData.com!.dgTags.contains(EfDG12.TAG)) { + mrtdData.dg12 = await passport.readEfDG12(); + print("DG12 dateOfIssue: ${mrtdData.dg12?.dateOfIssue}"); + print("DG12 issuingAuthority: ${mrtdData.dg12?.issuingAuthority}"); + } + + if (mrtdData.com!.dgTags.contains(EfDG13.TAG)) { + mrtdData.dg13 = await passport.readEfDG13(); + } + + if (mrtdData.com!.dgTags.contains(EfDG14.TAG)) { + mrtdData.dg14 = await passport.readEfDG14(); + } + + if (mrtdData.com!.dgTags.contains(EfDG15.TAG)) { + mrtdData.dg15 = await passport.readEfDG15(); + print("DG12 issuingAuthority: ${mrtdData.dg15?.aaPublicKey}"); + _nfc.setIosAlertMessage(formatProgressMsg("Doing AA ...", 60)); + mrtdData.aaSig = await passport.activeAuthenticate(Uint8List(8)); + } + + if (mrtdData.com!.dgTags.contains(EfDG16.TAG)) { + mrtdData.dg16 = await passport.readEfDG16(); + } + + _nfc.setIosAlertMessage(formatProgressMsg("Reading EF.SOD ...", 80)); + mrtdData.sod = await passport.readEfSOD(); + + setState(() { + _mrtdData = mrtdData; + }); + + setState(() { + _alertMessage = ""; + }); + } on Exception catch (e) { + final se = e.toString().toLowerCase(); + String alertMsg = "An error has occurred while reading Passport!"; + if (e is PassportError) { + if (se.contains("security status not satisfied")) { + alertMsg = + "Failed to initiate session with passport.\nCheck input data!"; + } + print("PassportError: ${e.message}"); + } else { + print("An exception was encountered while trying to read Passport: $e"); + } + + if (se.contains('timeout')) { + alertMsg = "Timeout while waiting for Passport tag"; + } else if (se.contains("tag was lost")) { + alertMsg = "Tag was lost. Please try again!"; + } else if (se.contains("invalidated by user")) { + alertMsg = ""; + } + + setState(() { + _alertMessage = alertMsg; + }); + } finally { + if (_alertMessage.isNotEmpty) { + await _nfc.disconnect(iosErrorMessage: _alertMessage); + } else { + await _nfc.disconnect( + iosAlertMessage: formatProgressMsg("Finished", 100)); + } + setState(() { + _isReading = false; + }); + } + } + + void _buttonPressed() async { + String _can = ""; + print("Button pressed"); + //Check on what tab we are + if (true) { + //DBA tab + // String errorText = ""; + // if (_doe.text.isEmpty) { + // errorText += "Please enter date of expiry!\n"; + // } + // if (_dob.text.isEmpty) { + // errorText += "Please enter date of birth!\n"; + // } + // if (_docNumber.text.isEmpty) { + // errorText += "Please enter passport number!"; + // } + + // setState(() { + // _alertMessage = errorText; + // }); + // //If there is an error, just jump out of the function + // if (errorText.isNotEmpty) return; + + final bacKeySeed = DBAKey(id, dateOfBirth, dateOfExpiry, paceMode: true); + _readMRTD(accessKey: bacKeySeed, isPace: true); + } else { + // PACE tab + // String errorText = ""; + // if (_can.isEmpty) { + // errorText = "Please enter CAN number!"; + // } else if (_can.text.length != 6) { + // errorText = "CAN number must be exactly 6 digits long!"; + // } + + // setState(() { + // _alertMessage = errorText; + // }); + // //If there is an error, just jump out of the function + // if (errorText.isNotEmpty) return; + + // final canKeySeed = CanKey(_can.text); + final canKeySeed = CanKey(id); + _readMRTD(accessKey: canKeySeed, isPace: true); + } + } +} + +class MrtdData { + EfCardAccess? cardAccess; + EfCardSecurity? cardSecurity; + EfCOM? com; + EfSOD? sod; + EfDG1? dg1; + EfDG2? dg2; + EfDG3? dg3; + EfDG4? dg4; + EfDG5? dg5; + EfDG6? dg6; + EfDG7? dg7; + EfDG8? dg8; + EfDG9? dg9; + EfDG10? dg10; + EfDG11? dg11; + EfDG12? dg12; + EfDG13? dg13; + EfDG14? dg14; + EfDG15? dg15; + EfDG16? dg16; + Uint8List? aaSig; + bool? isPACE; + bool? isDBA; +} + +final Map dgTagToString = { + EfDG1.TAG: 'EF.DG1', + EfDG2.TAG: 'EF.DG2', + EfDG3.TAG: 'EF.DG3', + EfDG4.TAG: 'EF.DG4', + EfDG5.TAG: 'EF.DG5', + EfDG6.TAG: 'EF.DG6', + EfDG7.TAG: 'EF.DG7', + EfDG8.TAG: 'EF.DG8', + EfDG9.TAG: 'EF.DG9', + EfDG10.TAG: 'EF.DG10', + EfDG11.TAG: 'EF.DG11', + EfDG12.TAG: 'EF.DG12', + EfDG13.TAG: 'EF.DG13', + EfDG14.TAG: 'EF.DG14', + EfDG15.TAG: 'EF.DG15', + EfDG16.TAG: 'EF.DG16' +}; diff --git a/lib/screens/notifications_screen.dart b/lib/screens/notifications_screen.dart new file mode 100644 index 0000000..e539e23 --- /dev/null +++ b/lib/screens/notifications_screen.dart @@ -0,0 +1,57 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class NotificationsScreen extends StatelessWidget { + const NotificationsScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar( + title: "الإشعارات", + ), + body: SafeArea( + child: ListView.separated( + padding: const EdgeInsets.all(20), + itemCount: 5, + separatorBuilder: (context, index) => const SizedBox(height: 10), + itemBuilder: (context, index) => InkWell( + child: Container( + // padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: AppTheme.textColor, + width: 1, + ), + ), + child: ListTile( + title: AutoSizeText( + "تم تحديث حالة الطلب", + style: Theme.of(context).textTheme.bodyLarge, + ), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AutoSizeText( + "تم تحديث حالة الطلب الخاص بك الى قيد المراجعة", + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.right, + ), + AutoSizeText( + "2024/12/12", + style: Theme.of(context).textTheme.bodySmall, + textAlign: TextAlign.right, + ), + ], + ), + ) + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/order_details_screen.dart b/lib/screens/order_details_screen.dart new file mode 100644 index 0000000..7c21791 --- /dev/null +++ b/lib/screens/order_details_screen.dart @@ -0,0 +1,400 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/face_detection_screen.dart'; +import 'package:gascom/screens/payment_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class OrderDetailsScreen extends StatefulWidget { + const OrderDetailsScreen({super.key}); + + @override + State createState() => _OrderDetailsScreenState(); +} + +class _OrderDetailsScreenState extends State { + + int activeStep = 3; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + title: "رقم الطلب: 67895435", + ), + body: ListView( + padding: const EdgeInsets.symmetric(horizontal: 20), + children: [ + const SizedBox(height: 20), + AutoSizeText( + "حالة الطلب", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 10), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 15), + activeStep > 0 ? const Padding( + padding: EdgeInsets.symmetric(horizontal: 6), + child: Icon( + Icons.check_rounded, + size: 26, + color: AppTheme.yellowColor, + ), + ) : const SizedBox(width: 40,), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "مراجعة الطلب من قبل لجنة الطاقة", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: activeStep == 0 + ? AppTheme.textColor + : activeStep > 0 + ? AppTheme.yellowColor + : AppTheme.textColor.withOpacity(0.6) + ), + ), + if (activeStep > 0) ...[ + const SizedBox(height: 5), + AutoSizeText( + "2024/02/06", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: AppTheme.yellowColor, + ), + ), + ] + ], + ), + ), + ] + ), + const SizedBox(height: 5), + SizedBox( + height: 40, + child: Row( + children: [ + const SizedBox(width: 40), + VerticalDivider( + color: activeStep > 0 ? AppTheme.textColor : AppTheme.textColor.withOpacity(0.6), + thickness: 1, + width: 20, + ), + ], + ), + ), + const SizedBox(height: 5), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 15), + activeStep > 1 ? const Padding( + padding: EdgeInsets.symmetric(horizontal: 6), + child: Icon( + Icons.check_rounded, + size: 26, + color: AppTheme.yellowColor, + ), + ) : const SizedBox(width: 40,), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "مراجعة الطلب من قبل لجنة الطاقة", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: activeStep == 1 + ? AppTheme.textColor + : activeStep > 1 + ? AppTheme.yellowColor + : AppTheme.textColor.withOpacity(0.6) + ), + ), + if (activeStep > 1) ...[ + const SizedBox(height: 5), + AutoSizeText( + "2024/02/06", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: AppTheme.yellowColor, + ), + ), + ] + ], + ), + ), + ] + ), + const SizedBox(height: 5), + SizedBox( + height: 40, + child: Row( + children: [ + const SizedBox(width: 40), + VerticalDivider( + color: activeStep > 1 ? AppTheme.textColor : AppTheme.textColor.withOpacity(0.6), + thickness: 1, + width: 20, + ), + ], + ), + ), + const SizedBox(height: 5), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 15), + activeStep > 2 ? const Padding( + padding: EdgeInsets.symmetric(horizontal: 6), + child: Icon( + Icons.check_rounded, + size: 26, + color: AppTheme.yellowColor, + ), + ) : const SizedBox(width: 40,), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "مراجعة الطلب من قبل لجنة الطاقة", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: activeStep == 2 + ? AppTheme.textColor + : activeStep > 2 + ? AppTheme.yellowColor + : AppTheme.textColor.withOpacity(0.6) + ), + ), + if (activeStep > 2) ...[ + const SizedBox(height: 5), + AutoSizeText( + "2024/02/06", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: AppTheme.yellowColor, + ), + ), + ] + ], + ), + ), + ] + ), + const SizedBox(height: 5), + SizedBox( + height: 40, + child: Row( + children: [ + const SizedBox(width: 40), + VerticalDivider( + color: activeStep > 2 ? AppTheme.textColor : AppTheme.textColor.withOpacity(0.6), + thickness: 1, + width: 20, + ), + ], + ), + ), + const SizedBox(height: 5), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 15), + activeStep > 3 ? const Padding( + padding: EdgeInsets.symmetric(horizontal: 6), + child: Icon( + Icons.check_rounded, + size: 26, + color: AppTheme.yellowColor, + ), + ) : const SizedBox(width: 40,), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "الدفع", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: activeStep == 3 + ? AppTheme.textColor + : activeStep > 3 + ? AppTheme.yellowColor + : AppTheme.textColor.withOpacity(0.6) + ), + ), + const SizedBox(height: 10), + if (activeStep > 3) ...[ + AutoSizeText( + "2024/02/06", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: AppTheme.yellowColor, + ), + ), + const SizedBox(height: 5), + ], + if (activeStep >= 3) ...[ + AutoSizeText( + "مبلغ الحصة", + minFontSize: 10, + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: activeStep == 3 + ? AppTheme.textColor + : AppTheme.yellowColor + ), + ), + AutoSizeText( + "5000 لتر / كاز اويل", + minFontSize: 10, + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: activeStep == 3 + ? AppTheme.textColor + : AppTheme.yellowColor + ), + ), + AutoSizeText( + "5,000,000 د.ع", + minFontSize: 10, + textAlign: TextAlign.start, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w500, + color: activeStep == 3 + ? AppTheme.textColor + : AppTheme.yellowColor + ), + ), + ], + if (activeStep == 3) ...[ + const SizedBox(height: 10), + SizedBox( + width: 180, + child: AppButton( + onPressed: () { + pushScreenWithoutNavBar(context, PaymentScreen( + title: "دفع مبلغ الحصة", + onPaymentComplete: () { + pushScreenWithoutNavBar(context, FaceDetectionScreen()); + }, + )); + }, + label: "ادفع", + isElevated: true + ), + ) + ] + ], + ), + ), + ] + ), + const SizedBox(height: 10), + SizedBox( + height: 40, + child: Row( + children: [ + const SizedBox(width: 40), + VerticalDivider( + color: activeStep > 3 ? AppTheme.textColor : AppTheme.textColor.withOpacity(0.6), + thickness: 1, + width: 20, + ), + ], + ), + ), + const SizedBox(height: 5), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const SizedBox(width: 15), + activeStep > 4 ? const Padding( + padding: EdgeInsets.symmetric(horizontal: 6), + child: Icon( + Icons.check_rounded, + size: 26, + color: AppTheme.yellowColor, + ), + ) : const SizedBox(width: 40,), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "الاستلام", + minFontSize: 10, + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: activeStep == 4 + ? AppTheme.textColor + : activeStep > 4 + ? AppTheme.yellowColor + : AppTheme.textColor.withOpacity(0.6) + ), + ), + const SizedBox(height: 5), + if (activeStep == 4) AutoSizeText( + "الطلب قيد التسليم", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: activeStep == 4 + ? AppTheme.textColor + : AppTheme.yellowColor, + ), + ), + if (activeStep > 4) ...[ + AutoSizeText( + "2024/02/13", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: activeStep == 4 + ? AppTheme.textColor + : AppTheme.yellowColor, + ), + ), + AutoSizeText( + "تم الاستلام", + minFontSize: 10, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: activeStep == 4 + ? AppTheme.textColor + : AppTheme.yellowColor, + ), + ), + ], + const SizedBox(height: 5), + if (activeStep == 4) ...[ + const SizedBox(height: 5), + SizedBox( + width: 180, + child: AppButton( + onPressed: () {}, + label: "تتبع الطلب", + isElevated: true + ), + ) + ] + ], + ), + ), + ] + ), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/otp_provider_screen.dart b/lib/screens/otp_provider_screen.dart new file mode 100644 index 0000000..db45af4 --- /dev/null +++ b/lib/screens/otp_provider_screen.dart @@ -0,0 +1,88 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:gascom/screens/otp_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; + +class OtpProviderScreen extends StatelessWidget { + const OtpProviderScreen({ + super.key, + required this.cardNumber, + }); + + final int cardNumber; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 25), + children: [ + const SizedBox(height: 150), + Center( + child: SizedBox( + width: MediaQuery.sizeOf(context).width * 0.6, + child: SvgPicture.asset( + "assets/svgs/logo.svg", + semanticsLabel: 'Home', + ), + ), + ), + const SizedBox(height: 50), + Center( + child: AutoSizeText( + "طريقة تاكيد الهوية", + style: Theme.of(context).textTheme.bodyLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + Center( + child: AutoSizeText( + "اختر طريقة ارسال رمز OTP لتسجيل الدخول", + style: Theme.of(context).textTheme.bodyLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 35), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + // TODO: Navigate to OTP Screen + Navigator.push(context, MaterialPageRoute(builder: (context) => const OtpScreen(isSms: true,))); + }, + label: "SMS", + isElevated: false + ), + ), + ], + ), + const SizedBox(height: 8), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + // TODO: Navigate to OTP Screen + Navigator.push(context, MaterialPageRoute(builder: (context) => const OtpScreen(isSms: false,))); + }, + label: "Whatsapp", + isElevated: false + ), + ), + ], + ), + ], + ), + ) + ); + } +} \ No newline at end of file diff --git a/lib/screens/otp_screen.dart b/lib/screens/otp_screen.dart new file mode 100644 index 0000000..b20eb28 --- /dev/null +++ b/lib/screens/otp_screen.dart @@ -0,0 +1,77 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/widgets/bottom_nav.dart'; +import 'package:pinput/pinput.dart'; + +class OtpScreen extends StatelessWidget { + const OtpScreen({ + super.key, + required this.isSms, + }); + + final bool isSms; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 25), + children: [ + const SizedBox(height: 150), + Center( + child: SizedBox( + width: MediaQuery.sizeOf(context).width * 0.6, + child: SvgPicture.asset( + "assets/svgs/logo.svg", + semanticsLabel: 'Home', + ), + ), + ), + const SizedBox(height: 80), + Center( + child: AutoSizeText( + "يرجى ادخال رمز OTP", + style: Theme.of(context).textTheme.bodyLarge, + textAlign: TextAlign.center, + minFontSize: 8, + ), + ), + const SizedBox(height: 35), + Container( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 6), + decoration: BoxDecoration( + // add a rounded border radius to the container + borderRadius: BorderRadius.circular(40), + border: Border.all( + color: AppTheme.textColor, + width: 2, + ), + ), + child: Directionality( + textDirection: TextDirection.ltr, + child: Pinput( + length: 6, + defaultPinTheme: PinTheme( + width: 30, + height: 35, + textStyle: Theme.of(context).textTheme.bodyLarge, + margin: const EdgeInsets.symmetric(horizontal: 5), + decoration: BoxDecoration( + border: Border.all(width: 0, color: Colors.transparent), + ), + ), + onCompleted: (value) { + Navigator.pushAndRemoveUntil(context, + MaterialPageRoute(builder: (context) => const BottomNav()), (_) => false); + }, + ), + ), + ), + ], + ), + )); + } +} diff --git a/lib/screens/pay_monthly_gas.dart b/lib/screens/pay_monthly_gas.dart new file mode 100644 index 0000000..d74092d --- /dev/null +++ b/lib/screens/pay_monthly_gas.dart @@ -0,0 +1,136 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/payment_screen.dart'; +import 'package:gascom/screens/success_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class PayMonthlyGas extends StatelessWidget { + const PayMonthlyGas({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + title: "دفع رسوم تقديم الطلب", + ), + body: SafeArea( + child: ListView( + padding: const EdgeInsets.all(20), + children: [ + AutoSizeText( + "طلب حصة كاز اويل ", + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 20), + + Row( + children: [ + Expanded( + child: AutoSizeText( + "حجم الحصة", + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + const SizedBox(width: 5,), + AutoSizeText( + "1000 لتر", + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 10), + + Row( + children: [ + Expanded( + child: AutoSizeText( + "تاريخ الطلب", + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + const SizedBox(width: 5,), + AutoSizeText( + "03/08/2024", + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 10), + + Row( + children: [ + Expanded( + child: AutoSizeText( + "رسوم تقديم الطلب", + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + const SizedBox(width: 5,), + AutoSizeText( + "25,000 د.ع", + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 15), + + Row( + children: [ + SizedBox( + width: MediaQuery.sizeOf(context).width * 0.5, + child: const Divider( + color: AppTheme.yellowColor, + thickness: 1, + height: 15, + ), + ), + ], + ), + const SizedBox(height: 15), + + Row( + children: [ + Expanded( + child: AutoSizeText( + "دفع رسوم تقديم الطلب", + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + const SizedBox(width: 5,), + AutoSizeText( + "25,000 د.ع", + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + const SizedBox(height: 50), + + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + pushScreenWithoutNavBar(context, PaymentScreen( + title: "", + onPaymentComplete: () { + pushScreenWithoutNavBar(context, const SuccessScreen(title: "تم تقديم الطلب بنجاح", subtitle: "يمكنك متابعة اجراءات المراجعة والتدقيق من خلال نافذة تتبع الطلبات")); + }, + )); + }, + label: "ادفع", + isElevated: true, + ), + ) + ], + ) + ], + ) + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/payment_screen.dart b/lib/screens/payment_screen.dart new file mode 100644 index 0000000..ed21918 --- /dev/null +++ b/lib/screens/payment_screen.dart @@ -0,0 +1,252 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/utils/text_field_4_space_formatter.dart'; +import 'package:gascom/utils/text_field_date_formatter.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/app_text_field.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class PaymentScreen extends StatefulWidget { + const PaymentScreen({ + super.key, + required this.title, + required this.onPaymentComplete, + }); + + final String title; + final void Function() onPaymentComplete; + + @override + State createState() => _PaymentScreenState(); +} + +class _PaymentScreenState extends State { + TextEditingController nameController = TextEditingController(); + TextEditingController cardNumberController = TextEditingController(); + TextEditingController expireController = TextEditingController(); + TextEditingController cvvController = TextEditingController(); + + bool checkBoxValue = false; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: const CustomAppBar(), + body: SafeArea( + child: ListView( + padding: const EdgeInsets.all(20), + children: [ + AutoSizeText( + widget.title, + style: Theme.of(context).textTheme.bodyLarge, + ), + const SizedBox(height: 20), + Container( + margin: const EdgeInsets.symmetric(horizontal: 5), + padding: const EdgeInsets.all(15), + // width: double.infinity, + decoration: BoxDecoration( + color: AppTheme.textColor, + borderRadius: BorderRadius.circular(24), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "5,000,000 د.ع", + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + fontWeight: FontWeight.bold, + color: AppTheme.blackColor), + ), + const SizedBox( + height: 2, + ), + AutoSizeText( + "مبلغ حصة كاز اويل", + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: AppTheme.blackColor, + fontWeight: FontWeight.w400), + ), + const SizedBox(height: 2), + const Divider( + color: Colors.grey, + thickness: 1, + height: 30, + ), + AutoSizeText( + "الاسم على البطاقة", + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: AppTheme.blackColor, + ), + ), + const SizedBox(height: 5), + AppTextField( + fillColor: Color(0xFFCBCBCB), + isFilled: true, + controller: nameController, + keyboardType: TextInputType.text, + ), + const SizedBox(height: 10), + AutoSizeText( + "رقم البطاقة", + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + color: AppTheme.blackColor, + ), + ), + const SizedBox(height: 5), + Directionality( + textDirection: TextDirection.ltr, + child: AppTextField( + fillColor: Color(0xFFCBCBCB), + isFilled: true, + controller: cardNumberController, + keyboardType: TextInputType.number, + isCentered: true, + maxCharacters: 19, + inputFormatters: [ + TextField4SpaceFormatter(), + ], + ), + ), + const SizedBox(height: 10), + SizedBox( + height: 80, + width: double.infinity, + child: Row( + children: [ + Expanded( + flex: 4, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "انتهاء الصلاحية", + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: AppTheme.blackColor, + ), + ), + const SizedBox(height: 5), + Directionality( + textDirection: TextDirection.ltr, + child: AppTextField( + fillColor: Color(0xFFCBCBCB), + isFilled: true, + controller: expireController, + keyboardType: TextInputType.number, + isCentered: true, + maxCharacters: 5, + inputFormatters: [ + TextFieldDateFormatter(), + ], + ), + ), + ], + ), + ), + const SizedBox( + width: 10, + ), + Expanded( + flex: 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + "رقم CVV", + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: AppTheme.blackColor, + ), + ), + const SizedBox(height: 5), + Directionality( + textDirection: TextDirection.ltr, + child: AppTextField( + fillColor: Color(0xFFCBCBCB), + isFilled: true, + controller: cvvController, + keyboardType: TextInputType.number, + isCentered: true, + maxCharacters: 3, + ), + ), + ], + ), + ), + ], + ), + ), + const SizedBox(height: 10), + Row( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + border: Border.all( + color: Colors.grey, + width: 1, + ), + ), + child: Container( + margin: const EdgeInsets.all(6), + width: 12, + height: 12, + child: Checkbox( + value: checkBoxValue, + onChanged: handleCheckBoxChange, + checkColor: Colors.grey, + activeColor: Colors.grey, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), + side: const BorderSide( + color: Colors.grey, + width: 1, + ), + ), + ), + ), + const SizedBox( + width: 8, + ), + AutoSizeText( + "اوافق على القوانين والاحكام", + style: + Theme.of(context).textTheme.bodyMedium?.copyWith( + color: AppTheme.blackColor, + ), + ), + ], + ), + const SizedBox(height: 15), + Row(children: [ + Expanded( + child: AppButton( + onPressed: widget.onPaymentComplete, + label: "تاكيد", + isElevated: true, + color: AppTheme.yellowColor, + ), + ), + ]), + ], + ), + ) + ], + ), + )); + } + + void handleCheckBoxChange(bool? value) { + setState(() { + checkBoxValue = value!; + }); + } +} diff --git a/lib/screens/service_fees_screen.dart b/lib/screens/service_fees_screen.dart new file mode 100644 index 0000000..d86eab2 --- /dev/null +++ b/lib/screens/service_fees_screen.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:gascom/widgets/custom_app_bar.dart'; + +class ServiceFeesScreen extends StatelessWidget { + const ServiceFeesScreen({super.key}); + + final List> fees = const [ + { + "service": "رسوم طلب حصة كاز اويل", + "price": "25,000 د.ع", + }, + { + "service": "رسوم توصيل الحصة", + "price": "60,000 د.ع", + }, + { + "service": "سعر 1000 لتر كاز اويل", + "price": "400,000 د.ع", + }, + { + "service": "رسوم تحويل موقع", + "price": "مجاناً", + }, + { + "service": "رسوم تبديل محرك", + "price": "مجاناً", + }, + { + "service": "رسوم تجديد دفتر", + "price": "مجاناً", + }, + { + "service": "رسوم تغيير مخول", + "price": "مجاناً", + }, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CustomAppBar( + title: " رسوم خدمات كازكم", + ), + body: SafeArea( + child: ListView.separated( + itemCount: fees.length, + padding: const EdgeInsets.all(20), + separatorBuilder: (context, index) => const SizedBox(height: 10), + itemBuilder: (context, index) => Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + fees[index]["service"]!, + style: Theme.of(context).textTheme.bodyMedium, + ), + ), + Text( + fees[index]["price"]!, + style: Theme.of(context).textTheme.bodyMedium, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/success_screen.dart b/lib/screens/success_screen.dart new file mode 100644 index 0000000..17512ec --- /dev/null +++ b/lib/screens/success_screen.dart @@ -0,0 +1,68 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:gascom/widgets/bottom_nav.dart'; + +class SuccessScreen extends StatelessWidget { + const SuccessScreen({ + super.key, + required this.title, + required this.subtitle, + }); + + final String title; + final String subtitle; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(20), + child: Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.check_rounded, + size: 100.0, + color: Theme.of(context).textTheme.bodyLarge?.color, + ), + const SizedBox(height: 20.0), + AutoSizeText( + title, + maxLines: 2, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.titleLarge, + ), + const SizedBox(height: 10.0), + AutoSizeText( + subtitle, + maxLines: 2, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 40.0), + SizedBox( + width: 200, + child: AppButton( + onPressed: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => const BottomNav()), + (_) => false + ); + }, + label: "تم", + isElevated: true, + ), + ), + const SizedBox(height: 40.0), + ], + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/utils/text_field_4_space_formatter.dart b/lib/utils/text_field_4_space_formatter.dart new file mode 100644 index 0000000..d5ce12c --- /dev/null +++ b/lib/utils/text_field_4_space_formatter.dart @@ -0,0 +1,23 @@ +import 'package:flutter/services.dart'; + +class TextField4SpaceFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, + TextEditingValue newValue, + ) { + final text = newValue.text.replaceAll(' ', ''); + final buffer = StringBuffer(); + for (int i = 0; i < text.length; i++) { + buffer.write(text[i]); + if ((i + 1) % 4 == 0 && i + 1 != text.length) { + buffer.write(' '); + } + } + final formattedText = buffer.toString(); + return newValue.copyWith( + text: formattedText, + selection: TextSelection.collapsed(offset: formattedText.length), + ); + } +} \ No newline at end of file diff --git a/lib/utils/text_field_date_formatter.dart b/lib/utils/text_field_date_formatter.dart new file mode 100644 index 0000000..2c96508 --- /dev/null +++ b/lib/utils/text_field_date_formatter.dart @@ -0,0 +1,23 @@ +import 'package:flutter/services.dart'; + +class TextFieldDateFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, + TextEditingValue newValue, + ) { + final text = newValue.text.replaceAll('/', ''); + final buffer = StringBuffer(); + for (int i = 0; i < text.length; i++) { + buffer.write(text[i]); + if (i == 1 && i + 1 != text.length) { + buffer.write('/'); + } + } + final formattedText = buffer.toString(); + return newValue.copyWith( + text: formattedText, + selection: TextSelection.collapsed(offset: formattedText.length), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/app_button.dart b/lib/widgets/app_button.dart new file mode 100644 index 0000000..afc083f --- /dev/null +++ b/lib/widgets/app_button.dart @@ -0,0 +1,100 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class AppButton extends StatelessWidget { + const AppButton({ + super.key, + required this.onPressed, + required this.label, + required this.isElevated, + this.isLoading = false, + this.textStyle, + this.color, + }); + + final void Function() onPressed; + final String label; + final bool isLoading; + final bool isElevated; + final TextStyle? textStyle; + final Color? color; + + @override + Widget build(BuildContext context) { + return isElevated + ? ElevatedButton( + onPressed: isLoading ? null : onPressed, + style: Theme.of(context).elevatedButtonTheme.style?.copyWith( + backgroundColor: WidgetStatePropertyAll(color ?? AppTheme.textColor), + ), + child: isLoading + ? const Spinner(color: AppTheme.primaryColor) + : Row( + children: [ + Expanded( + child: AutoSizeText( + label, + minFontSize: 8, + maxFontSize: 14, + maxLines: 1, + textAlign: TextAlign.center, + style: textStyle ?? Theme.of(context).textTheme.bodyLarge?.copyWith( + color: AppTheme.primaryColor, + ) + ), + ), + ], + ), + ) + : OutlinedButton( + onPressed: isLoading ? null : onPressed, + style: Theme.of(context).elevatedButtonTheme.style?.copyWith( + backgroundColor: WidgetStatePropertyAll(Theme.of(context).scaffoldBackgroundColor), + side: WidgetStatePropertyAll(BorderSide( + width: 1.5, + color: color ?? AppTheme.textColor, + )) + ), + child: isLoading + ? Spinner(color: color ?? AppTheme.textColor,) + : Row( + children: [ + Expanded( + child: AutoSizeText( + label, + minFontSize: 8, + maxFontSize: 14, + maxLines: 1, + textAlign: TextAlign.center, + style: textStyle ?? Theme.of(context).textTheme.bodyLarge?.copyWith( + color: AppTheme.textColor, + ) + ), + ), + ], + ), + ); + } +} + +class Spinner extends StatelessWidget { + const Spinner({ + super.key, + required this.color, + }); + + final Color? color; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + strokeWidth: 3, + color: color ?? Colors.white, + ), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/app_text_field.dart b/lib/widgets/app_text_field.dart new file mode 100644 index 0000000..8883658 --- /dev/null +++ b/lib/widgets/app_text_field.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class AppTextField extends StatelessWidget { + const AppTextField( + {super.key, + required this.controller, + required this.keyboardType, + this.onChanged, + this.errorText, + this.fillColor, + this.textColor, + this.isFilled, + this.isCentered, + this.maxCharacters, + this.inputFormatters,}); + + final TextEditingController controller; + final TextInputType keyboardType; + final void Function(String)? onChanged; + final String? errorText; + final Color? fillColor; + final Color? textColor; + final bool? isFilled; + final bool? isCentered; + final int? maxCharacters; + final List? inputFormatters; + + @override + Widget build(BuildContext context) { + return SizedBox( + height: 40, + child: TextField( + controller: controller, + keyboardType: keyboardType, + onChanged: onChanged, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w500, + color: textColor ?? const Color.fromARGB(255, 20, 20, 20), + ), + textAlign: isCentered ?? false ? TextAlign.center : TextAlign.start, + autocorrect: false, + inputFormatters: inputFormatters, + cursorColor: textColor ?? const Color.fromARGB(255, 20, 20, 20), + cursorRadius: const Radius.circular(10), + maxLength: maxCharacters, + decoration: InputDecoration( + counterText: "", + fillColor: fillColor ?? const Color.fromARGB(255, 20, 20, 20), + filled: isFilled ?? false, + contentPadding: + const EdgeInsets.symmetric(vertical: 5, horizontal: 20), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(30), + borderSide: + const BorderSide(color: AppTheme.textColor, width: 1)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(30), + borderSide: + const BorderSide(color: AppTheme.textColor, width: 1)), + errorText: errorText, + errorStyle: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(color: AppTheme.redColor), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(20), + borderSide: const BorderSide(color: AppTheme.redColor, width: 1)), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(20), + borderSide: const BorderSide(color: AppTheme.redColor, width: 1)), + ), + ), + ); + } +} diff --git a/lib/widgets/bottom_nav.dart b/lib/widgets/bottom_nav.dart new file mode 100644 index 0000000..8532025 --- /dev/null +++ b/lib/widgets/bottom_nav.dart @@ -0,0 +1,104 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/follow_order_screen.dart'; +import 'package:gascom/screens/generator_info_screen.dart'; +import 'package:gascom/screens/home_screen.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class BottomNav extends StatelessWidget { + const BottomNav({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return PersistentTabView( + controller: PersistentTabController(initialIndex: 0), + resizeToAvoidBottomInset: false, + navBarHeight: 70, + tabs: [ + tabConfig( + context, + const HomeScreen(), + "home", + "assets/svgs/home_filled.svg", + "assets/svgs/home.svg", + "Home Active", + "Home Inactive", + "الرئيسية", + ), + tabConfig( + context, + const GeneratorInfoScreen(), + "generator_info", + "assets/svgs/generator_filled.svg", + "assets/svgs/generator.svg", + "Generator Info Active", + "Generator Info Inactive", + "معلومات المولدة", + ), + tabConfig( + context, + const FollowOrderScreen(), + "follow_order", + "assets/svgs/van_filled.svg", + "assets/svgs/van.svg", + "Follow Order Active", + "Follow Order Inactive", + "تتبع الطلب", + ), + ], + navBarBuilder: (navBarConfig) => Style6BottomNavBar( + navBarConfig: navBarConfig, + navBarDecoration: NavBarDecoration( + color: AppTheme.secondaryColor, + padding: EdgeInsets.all(10), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + blurRadius: 10, + spreadRadius: 1, + offset: const Offset(0, 0), + ), + ], + ), + ), + ); + } + + PersistentTabConfig tabConfig( + BuildContext context, + Widget screen, + String initialRoute, + String activeIcon, + String inactiveIcon, + String activeSemanticsLabel, + String inactiveSemanticsLabel, + String title, + ) { + return PersistentTabConfig( + screen: screen, + navigatorConfig: NavigatorConfig( + initialRoute: initialRoute, + ), + item: ItemConfig( + icon: Padding( + padding: const EdgeInsets.only(top: 4, left: 4, right: 4), + child: SvgPicture.asset( + activeIcon, + semanticsLabel: activeSemanticsLabel, + ), + ), + inactiveIcon: SvgPicture.asset( + inactiveIcon, + semanticsLabel: inactiveSemanticsLabel, + ), + activeForegroundColor: AppTheme.primaryColor, + inactiveForegroundColor: AppTheme.primaryColor, + textStyle: Theme.of(context).textTheme.bodySmall ?? TextStyle(), + title: title, + ) + ); + } +} \ No newline at end of file diff --git a/lib/widgets/custom_app_bar.dart b/lib/widgets/custom_app_bar.dart new file mode 100644 index 0000000..20c0b74 --- /dev/null +++ b/lib/widgets/custom_app_bar.dart @@ -0,0 +1,40 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { + const CustomAppBar({super.key, this.title}); + + final String? title; + + @override + Size get preferredSize => const Size.fromHeight(80); + + @override + Widget build(BuildContext context) { + return AppBar( + toolbarHeight: 80, + titleSpacing: 0, + backgroundColor: AppTheme.primaryColor, + surfaceTintColor: AppTheme.primaryColor, + title: Text( + title ?? "", + style: Theme.of(context).textTheme.titleLarge, + ), + leading: IconButton( + icon: const Icon(CupertinoIcons.back, color: AppTheme.textColor,), + onPressed: () { + Navigator.pop(context); + }, + ), + bottom: title == null ? null : PreferredSize( + preferredSize: const Size.fromHeight(1), + child: Container( + color: AppTheme.yellowColor, + height: 1, + margin: const EdgeInsets.symmetric(horizontal: 20), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/fine_container.dart b/lib/widgets/fine_container.dart new file mode 100644 index 0000000..058882e --- /dev/null +++ b/lib/widgets/fine_container.dart @@ -0,0 +1,97 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/payment_screen.dart'; +import 'package:gascom/screens/success_screen.dart'; +import 'package:gascom/widgets/app_button.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class FineContainer extends StatelessWidget { + const FineContainer({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: AppTheme.textColor, + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: AutoSizeText( + "غرامة", + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w600, + ), + ), + ), + AutoSizeText( + "2024/12/12", + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + const SizedBox(height: 10), + AutoSizeText( + "200,000 د.ع", + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 15), + const Divider( + color: AppTheme.textColor, + height: 1, + thickness: 1, + ), + const SizedBox(height: 15), + AutoSizeText( + "مخالفة ساعات التشغيل والاطفاء", + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(height: 4), + AutoSizeText( + "يجب دفع الغرامة قبل تاريخ 01/09/2024 وبخلافه، لن يتم تزويدك باي حصة بعد هذا التاريخ", + style: Theme.of(context).textTheme.bodyMedium, + maxLines: 2, + ), + const SizedBox(height: 15), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width * 0.45, + child: AppButton( + onPressed: () { + pushScreenWithoutNavBar(context, + PaymentScreen( + title: "غرامات", + onPaymentComplete: () { + pushScreenWithoutNavBar(context, const SuccessScreen(title: "تم دفع الغرامة بنجاح", subtitle: "")); + } + ) + ); + }, + label: "دفع الغرامة", + isElevated: true, + ), + ), + ], + ) + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/home_grid_item.dart b/lib/widgets/home_grid_item.dart new file mode 100644 index 0000000..11c0b2c --- /dev/null +++ b/lib/widgets/home_grid_item.dart @@ -0,0 +1,55 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class HomeGridItem extends StatelessWidget { + const HomeGridItem({ + super.key, + required this.title, + required this.svgPath, + required this.onPressed, + }); + + final String title; + final String svgPath; + final void Function() onPressed; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: onPressed, + child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + AspectRatio( + aspectRatio: 1, + child: Container( + padding: const EdgeInsets.all(25), + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.circular(11), + border: Border.all( + color: AppTheme.secondaryColor, + width: 2, + ), + ), + child: SvgPicture.asset( + svgPath, + semanticsLabel: title, + ), + ), + ), + // const SizedBox(height: 10,), + AutoSizeText( + title, + style: Theme.of(context).textTheme.bodyMedium, + minFontSize: 12, + maxLines: 2, + textAlign: TextAlign.center, + ), + ], + ), + ); + } +} diff --git a/lib/widgets/order_container.dart b/lib/widgets/order_container.dart new file mode 100644 index 0000000..6971ebc --- /dev/null +++ b/lib/widgets/order_container.dart @@ -0,0 +1,70 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; +import 'package:gascom/screens/order_details_screen.dart'; +import 'package:gascom/widgets/order_state_badge.dart'; +import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; + +class OrderContainer extends StatelessWidget { + const OrderContainer({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15), + decoration: BoxDecoration( + color: AppTheme.cardColor, + borderRadius: BorderRadius.circular(10), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: AutoSizeText( + "2024/12/12", + style: Theme.of(context).textTheme.bodySmall, + ), + ), + const OrderStateBadge(state: "قيد المراجعة"), + ], + ), + const SizedBox(height: 8), + AutoSizeText( + "5000 لتر", + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 2), + AutoSizeText( + "رقم الطلب: 67895435", + style: Theme.of(context).textTheme.bodySmall, + ), + const SizedBox(height: 4), + const Divider( + color: AppTheme.primaryColor, + thickness: 1, + height: 25, + ), + InkWell( + splashColor: AppTheme.primaryColor, + onTap: () { + pushScreenWithoutNavBar(context, OrderDetailsScreen()); + }, + child: Center( + child: AutoSizeText( + "اظهر التفاصيل", + style: Theme.of(context).textTheme.bodySmall, + ), + ), + ) + ], + ), + ); + } +} diff --git a/lib/widgets/order_state_badge.dart b/lib/widgets/order_state_badge.dart new file mode 100644 index 0000000..e8848cc --- /dev/null +++ b/lib/widgets/order_state_badge.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class OrderStateBadge extends StatelessWidget { + const OrderStateBadge({ + super.key, + required this.state, + }); + + final String state; + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), + decoration: BoxDecoration( + color: state == "قيد المراجعة" ? AppTheme.yellowColor : AppTheme.primaryColor, + borderRadius: BorderRadius.circular(20), + ), + child: Text( + state, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: state == "قيد المراجعة" ? AppTheme.brownColor : AppTheme.textColor, + ), + ), + ); + } +} diff --git a/lib/widgets/text_container.dart b/lib/widgets/text_container.dart new file mode 100644 index 0000000..c510bf5 --- /dev/null +++ b/lib/widgets/text_container.dart @@ -0,0 +1,30 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; +import 'package:gascom/constants/app_theme.dart'; + +class TextContainer extends StatelessWidget { + const TextContainer({super.key, required this.text}); + + final String text; + + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20), + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.circular(20), + border: Border.all( + color: AppTheme.textColor, + width: 1, + ), + ), + child: AutoSizeText( + text, + style: Theme.of(context).textTheme.bodySmall, + minFontSize: 8, + ), + ); + } +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..c54ac3e --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,768 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + animated_custom_dropdown: + dependency: "direct main" + description: + name: animated_custom_dropdown + sha256: "5a72dc209041bb53f6c7164bc2e366552d5197cdb032b1c9b2c36e3013024486" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + camerawesome: + dependency: "direct main" + description: + name: camerawesome + sha256: "3619d5605fb14ab72c815532c1d9f635512c75df07b5a742b60a9a4b03b6081e" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + carousel_slider: + dependency: transitive + description: + name: carousel_slider + sha256: "7b006ec356205054af5beaef62e2221160ea36b90fb70a35e4deacd49d0349ae" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + colorfilter_generator: + dependency: transitive + description: + name: colorfilter_generator + sha256: ccc2995e440b1d828d55d99150e7cad64624f3cb4a1e235000de3f93cf10d35c + url: "https://pub.dev" + source: hosted + version: "0.0.8" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + crypto_keys_plus: + dependency: transitive + description: + name: crypto_keys_plus + sha256: fbebe8a45c68cd3c8b1ad3145172cfa276a30d9bbe9a4bf4cc03efc32b9b7a00 + url: "https://pub.dev" + source: hosted + version: "0.4.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + diffie_hellman: + dependency: transitive + description: + name: diffie_hellman + sha256: cf88adea8d7c56ed145e95db87e61297c52d236c2faace48fbcb425a73ddeba6 + url: "https://pub.dev" + source: hosted + version: "0.1.2" + dmrtd: + dependency: "direct main" + description: + path: "." + ref: master + resolved-ref: "8ced7600fb9fd84f0824bfaddc2fcc7bff655a7f" + url: "https://github.com/ZeroPass/dmrtd.git" + source: git + version: "2.0.0" + easy_localization: + dependency: "direct main" + description: + name: easy_localization + sha256: fa59bcdbbb911a764aa6acf96bbb6fa7a5cf8234354fc45ec1a43a0349ef0201 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + easy_logger: + dependency: transitive + description: + name: easy_logger + sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7 + url: "https://pub.dev" + source: hosted + version: "0.0.2" + easy_stepper: + dependency: "direct main" + description: + name: easy_stepper + sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" + url: "https://pub.dev" + source: hosted + version: "0.8.5+1" + expandable: + dependency: transitive + description: + name: expandable + sha256: "9604d612d4d1146dafa96c6d8eec9c2ff0994658d6d09fed720ab788c7f5afc2" + url: "https://pub.dev" + source: hosted + version: "5.0.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_nfc_kit: + dependency: transitive + description: + name: flutter_nfc_kit + sha256: fe0b86f4883e4a0ebeb6d1fbbc5a86123b95969a4d225bc5a760acda5e3f42e8 + url: "https://pub.dev" + source: hosted + version: "3.5.2" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "578bd8c508144fdaffd4f77b8ef2d8c523602275cd697cc3db284dbd762ef4ce" + url: "https://pub.dev" + source: hosted + version: "2.0.14" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + go_router: + dependency: transitive + description: + name: go_router + sha256: "8ae664a70174163b9f65ea68dd8673e29db8f9095de7b5cd00e167c621f4fef5" + url: "https://pub.dev" + source: hosted + version: "14.6.0" + google_mlkit_commons: + dependency: "direct main" + description: + name: google_mlkit_commons + sha256: "7e9a6d6e66b44aa8cfe944bda9bc3346c52486dd890ca49e5bc98845cda40d7f" + url: "https://pub.dev" + source: hosted + version: "0.9.0" + google_mlkit_face_detection: + dependency: "direct main" + description: + name: google_mlkit_face_detection + sha256: "65988405c884fd84a4ccc8bded7b5e3e4c33362f6f4eaaa94818bdaaba7bab7d" + url: "https://pub.dev" + source: hosted + version: "0.12.0" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image: + dependency: transitive + description: + name: image + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + url: "https://pub.dev" + source: hosted + version: "4.3.0" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "7afc60865a2429d994144f7d66ced2ae4305fe35d82890b8766e3359872d872c" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + matrix2d: + dependency: transitive + description: + name: matrix2d + sha256: "188718dd3bc2a31e372cfd0791b0f77f4f13ea76164147342cc378d9132949e7" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + ndef: + dependency: transitive + description: + name: ndef + sha256: "634d2b5c6f2c186e953218bac9905f3f5e1824b15e30bd1ed6e03a91cdbc7293" + url: "https://pub.dev" + source: hosted + version: "0.3.3" + nfc_manager: + dependency: "direct main" + description: + name: nfc_manager + sha256: f5be75e90f8f2bff3ee49fbd7ef65bdd4a86ee679c2412e71ab2846a8cff8c59 + url: "https://pub.dev" + source: hosted + version: "3.5.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a + url: "https://pub.dev" + source: hosted + version: "2.2.12" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + url: "https://pub.dev" + source: hosted + version: "2.4.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + persistent_bottom_nav_bar_v2: + dependency: "direct main" + description: + name: persistent_bottom_nav_bar_v2 + sha256: fcbb84757e598791b15321a314604e74719d098c51891b4c7555ae1dd901f582 + url: "https://pub.dev" + source: hosted + version: "5.3.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + pinput: + dependency: "direct main" + description: + name: pinput + sha256: "7bf9aa7d0eeb3da9f7d49d2087c7bc7d36cd277d2e94cc31c6da52e1ebb048d0" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" + url: "https://pub.dev" + source: hosted + version: "3.9.1" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" + url: "https://pub.dev" + source: hosted + version: "2.5.3" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e + url: "https://pub.dev" + source: hosted + version: "2.4.2" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + tripledes_nullsafety: + dependency: transitive + description: + name: tripledes_nullsafety + sha256: "39589b5271e96f2abc592f046e14c3dbcd87bd140c1e6f10f4005e6fb0c28b68" + url: "https://pub.dev" + source: hosted + version: "1.0.3" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + universal_platform: + dependency: transitive + description: + name: universal_platform + sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "773c9522d66d523e1c7b25dfb95cc91c26a1e17b107039cfe147285e92de7878" + url: "https://pub.dev" + source: hosted + version: "1.1.14" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" + url: "https://pub.dev" + source: hosted + version: "1.1.12" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: ab9ff38fc771e9ee1139320adbe3d18a60327370c218c60752068ebee4b49ab1 + url: "https://pub.dev" + source: hosted + version: "1.1.15" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" +sdks: + dart: ">=3.5.2 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..d8c2428 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,116 @@ +name: gascom +description: "An app to manage gas distribution." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: ^3.5.2 + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.8 + pinput: ^5.0.0 + persistent_bottom_nav_bar_v2: ^5.3.1 + flutter_svg: ^2.0.10+1 + easy_localization: ^3.0.7 + auto_size_text: ^3.0.0 + animated_custom_dropdown: ^3.1.1 + easy_stepper: ^0.8.5+1 + camerawesome: ^2.1.0 + path_provider: ^2.1.4 + google_mlkit_face_detection: ^0.12.0 + google_mlkit_commons: ^0.9.0 + nfc_manager: ^3.5.0 + dmrtd: + git: + url: https://github.com/ZeroPass/dmrtd.git + ref: master + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^4.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/svgs/ + - assets/languages/ + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + fonts: + - family: NotoSansArabic + fonts: + - asset: assets/fonts/NotoSansArabic-Light.ttf + weight: 300 + - family: NotoSansArabic + fonts: + - asset: assets/fonts/NotoSansArabic-Regular.ttf + weight: 400 + - family: NotoSansArabic + fonts: + - asset: assets/fonts/NotoSansArabic-Medium.ttf + weight: 500 + - family: NotoSansArabic + fonts: + - asset: assets/fonts/NotoSansArabic-SemiBold.ttf + weight: 600 + - family: NotoSansArabic + fonts: + - asset: assets/fonts/NotoSansArabic-Bold.ttf + weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..d4654bf --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:gascom/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}