diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..dfe0770
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5d32d2a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,71 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Visual Studio Code related
+.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Android related
+**/android/**/gradle-wrapper.jar
+**/android/.gradle
+**/android/captures/
+**/android/gradlew
+**/android/gradlew.bat
+**/android/local.properties
+**/android/app/google-services.json
+**/android/**/GeneratedPluginRegistrant.java
+
+# iOS/XCode related
+**/ios/**/*.mode1v3
+**/ios/**/*.mode2v3
+**/ios/**/*.moved-aside
+**/ios/**/*.pbxuser
+**/ios/**/*.perspectivev3
+**/ios/**/*sync/
+**/ios/**/.sconsign.dblite
+**/ios/**/.tags*
+**/ios/**/.vagrant/
+**/ios/**/DerivedData/
+**/ios/**/Icon?
+**/ios/**/Pods/
+**/ios/**/.symlinks/
+**/ios/**/profile
+**/ios/**/xcuserdata
+**/ios/.generated/
+**/ios/Flutter/App.framework
+**/ios/Flutter/Flutter.framework
+**/ios/Flutter/Generated.xcconfig
+**/ios/Flutter/app.flx
+**/ios/Flutter/app.zip
+**/ios/Flutter/flutter_assets/
+**/ios/ServiceDefinitions.json
+**/ios/Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!**/ios/**/default.mode1v3
+!**/ios/**/default.mode2v3
+!**/ios/**/default.pbxuser
+!**/ios/**/default.perspectivev3
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..033ad2a
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
+ channel: stable
+
+project_type: app
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3390c2f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# sandtrackdriver
+
diff --git a/_.txt b/_.txt
new file mode 100644
index 0000000..f87b655
--- /dev/null
+++ b/_.txt
@@ -0,0 +1,14 @@
+user
+ number
+ balance
+ currency
+ pin
+ notifications
+ date
+ nature
+ amount
+ number
+
+ trransactions
+ token
+
diff --git a/android/app/build.gradle b/android/app/build.gradle
new file mode 100644
index 0000000..12e0d68
--- /dev/null
+++ b/android/app/build.gradle
@@ -0,0 +1,63 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion 28
+
+ lintOptions {
+ disable 'InvalidPackage'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.sandtrackdriver"
+ minSdkVersion 18
+ targetSdkVersion 28
+ multiDexEnabled true
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
+
+dependencies {
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'androidx.test:runner:1.1.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
+}
+apply plugin: 'com.google.gms.google-services'
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..c6721db
--- /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..3aba9d9
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/java/com/example/sandtrackdriver/MainActivity.java b/android/app/src/main/java/com/example/sandtrackdriver/MainActivity.java
new file mode 100644
index 0000000..d786298
--- /dev/null
+++ b/android/app/src/main/java/com/example/sandtrackdriver/MainActivity.java
@@ -0,0 +1,13 @@
+package com.example.sandtrackdriver;
+
+import android.os.Bundle;
+import io.flutter.app.FlutterActivity;
+import io.flutter.plugins.GeneratedPluginRegistrant;
+
+public class MainActivity extends FlutterActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ GeneratedPluginRegistrant.registerWith(this);
+ }
+}
diff --git a/android/app/src/main/res/drawable/icon.png b/android/app/src/main/res/drawable/icon.png
new file mode 100644
index 0000000..e55b4f9
Binary files /dev/null and b/android/app/src/main/res/drawable/icon.png differ
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-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
new file mode 100644
index 0000000..d26c0f3
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.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-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
new file mode 100644
index 0000000..72fbfda
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.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-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
new file mode 100644
index 0000000..33278d9
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.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-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
new file mode 100644
index 0000000..106872a
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.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/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
new file mode 100644
index 0000000..084265a
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ
diff --git a/android/app/src/main/res/values/developer-config.xml b/android/app/src/main/res/values/developer-config.xml
new file mode 100644
index 0000000..734acc6
--- /dev/null
+++ b/android/app/src/main/res/values/developer-config.xml
@@ -0,0 +1,4 @@
+
+
+ sk.eyJ1IjoibWljaGFlbHRlbmRvIiwiYSI6ImNqeXp1aGg1ejA1N2kzZ3FuengyejVhbTcifQ.wJCJgrPhlraiJZgUz3wvMw
+
\ No newline at end of file
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..00fa441
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..c6721db
--- /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..6ca85f9
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,30 @@
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.3.0'
+ classpath 'com.google.gms:google-services:4.2.0'
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..8ce44f6
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableJetifier=true
+android.useAndroidX=true
+
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..2819f02
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000..5a2f14f
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,15 @@
+include ':app'
+
+def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+
+def plugins = new Properties()
+def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
+if (pluginsFile.exists()) {
+ pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
+}
+
+plugins.each { name, path ->
+ def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
+ include ":$name"
+ project(":$name").projectDir = pluginDirectory
+}
diff --git a/assets/images/img_not_available.jpeg b/assets/images/img_not_available.jpeg
new file mode 100644
index 0000000..b1384e8
Binary files /dev/null and b/assets/images/img_not_available.jpeg differ
diff --git a/assets/images/mimi1.gif b/assets/images/mimi1.gif
new file mode 100644
index 0000000..01468a1
Binary files /dev/null and b/assets/images/mimi1.gif differ
diff --git a/assets/images/mimi2.gif b/assets/images/mimi2.gif
new file mode 100644
index 0000000..8dad0d2
Binary files /dev/null and b/assets/images/mimi2.gif differ
diff --git a/assets/images/mimi3.gif b/assets/images/mimi3.gif
new file mode 100644
index 0000000..01468a1
Binary files /dev/null and b/assets/images/mimi3.gif differ
diff --git a/assets/images/mimi4.gif b/assets/images/mimi4.gif
new file mode 100644
index 0000000..cebc61b
Binary files /dev/null and b/assets/images/mimi4.gif differ
diff --git a/assets/images/mimi5.gif b/assets/images/mimi5.gif
new file mode 100644
index 0000000..6103163
Binary files /dev/null and b/assets/images/mimi5.gif differ
diff --git a/assets/images/mimi6.gif b/assets/images/mimi6.gif
new file mode 100644
index 0000000..3471ba8
Binary files /dev/null and b/assets/images/mimi6.gif differ
diff --git a/assets/images/mimi7.gif b/assets/images/mimi7.gif
new file mode 100644
index 0000000..789c02c
Binary files /dev/null and b/assets/images/mimi7.gif differ
diff --git a/assets/images/mimi8.gif b/assets/images/mimi8.gif
new file mode 100644
index 0000000..0579b79
Binary files /dev/null and b/assets/images/mimi8.gif differ
diff --git a/assets/images/mimi9.gif b/assets/images/mimi9.gif
new file mode 100644
index 0000000..7761f9c
Binary files /dev/null and b/assets/images/mimi9.gif differ
diff --git a/assets/launcher/icon.png b/assets/launcher/icon.png
new file mode 100644
index 0000000..c9b8599
Binary files /dev/null and b/assets/launcher/icon.png differ
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..9367d48
--- /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
+ 8.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..5fb0086
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,506 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
+ 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
+ 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+ 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 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 PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
+ 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
+ );
+ 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 = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; 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 = ""; };
+ 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 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 = (
+ 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
+ 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B80C3931E831B6300D905FE /* App.framework */,
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEBA1CF902C7004384FC /* Flutter.framework */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+ 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 97C146F11CF9000F007C117D /* Supporting Files */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+ 97C146F11CF9000F007C117D /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146F21CF9000F007C117D /* main.m */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 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 = {
+ LastUpgradeCheck = 0910;
+ ORGANIZATIONNAME = "The Chromium Authors";
+ TargetAttributes = {
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+ 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_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_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = 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;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = S8QB4VV633;
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.sandtrackdriver;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_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_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_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_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.sandtrackdriver;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/Flutter",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.sandtrackdriver;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..786d6aa
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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/AppDelegate.h b/ios/Runner/AppDelegate.h
new file mode 100644
index 0000000..36e21bb
--- /dev/null
+++ b/ios/Runner/AppDelegate.h
@@ -0,0 +1,6 @@
+#import
+#import
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end
diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m
new file mode 100644
index 0000000..59a72e9
--- /dev/null
+++ b/ios/Runner/AppDelegate.m
@@ -0,0 +1,13 @@
+#include "AppDelegate.h"
+#include "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [GeneratedPluginRegistrant registerWithRegistry:self];
+ // Override point for customization after application launch.
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+@end
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..3d43d11
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..28c6bf0
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..2ccbfd9
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..f091b6b
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..4cde121
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..d0ef06e
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..dcdc230
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..2ccbfd9
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..c8f9ed8
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..a6d6b86
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..a6d6b86
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..75b2d16
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..c4df70d
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..6a84f41
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..d0e1f58
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..29b6956
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,45 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ sandtrackdriver
+ 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
+
+ UIViewControllerBasedStatusBarAppearance
+
+
+
diff --git a/ios/Runner/main.m b/ios/Runner/main.m
new file mode 100644
index 0000000..dff6597
--- /dev/null
+++ b/ios/Runner/main.m
@@ -0,0 +1,9 @@
+#import
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char* argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
diff --git a/lib/about.dart b/lib/about.dart
new file mode 100644
index 0000000..bcd9fde
--- /dev/null
+++ b/lib/about.dart
@@ -0,0 +1,80 @@
+import 'package:flutter/material.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+class About extends StatefulWidget {
+ @override
+ _AboutState createState() => new _AboutState();
+}
+
+class _AboutState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return new Scaffold(
+ appBar: new AppBar(
+ title: new Text('About Trackmart Driver'),
+ actions: [
+ IconButton(
+ icon: Icon(
+ Icons.language,
+ color: Colors.white,
+ ),
+ onPressed: () async {
+ if (await canLaunch('http://sandtrackdriverapp.com')) {
+ await launch('http://sandtrackdriverapp.com');
+ } else {
+ throw 'Could not launch http://www.sandtrackdriverapp.com';
+ }
+ },
+ )
+ ],
+ ),
+ body: new Center(
+ child: Column(children: [
+ Container(height: 60),
+ Icon(Icons.local_shipping,size:80,color: Theme.of(context).primaryColor,),
+ Text('Property of:'),
+ Text('Trackmart Technologies'),
+ Hyperlink(
+ 'http://www.sandtrackdriverapp.com', 'sandtrackdriverapp.com'),
+ Text('Nairobi, Kenya'),
+ Container(height: 20),
+ Hyperlink(
+ 'http://www.sandtrackdriverapp.com/legal', 'Legal documentation'),
+ Container(height: 20),
+ Text('Designed and developed by:'),
+ Text('Michael Tendo Ssemwanga'),
+ Hyperlink('http://www.tendo.dev', 'tendo.dev'),
+ ]),
+ ),
+ );
+ }
+}
+
+class Hyperlink extends StatelessWidget {
+ final String _url;
+ final String _text;
+
+ Hyperlink(this._url, this._text);
+
+ _launchURL() async {
+ if (await canLaunch(_url)) {
+ await launch(_url);
+ } else {
+ throw 'Could not launch $_url';
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ child: Text(
+ _text,
+ style: TextStyle(
+ decoration: TextDecoration.underline,
+ color: Theme.of(context).accentColor,
+ ),
+ ),
+ onTap: _launchURL,
+ );
+ }
+}
diff --git a/lib/chat.dart b/lib/chat.dart
new file mode 100644
index 0000000..5db63ce
--- /dev/null
+++ b/lib/chat.dart
@@ -0,0 +1,704 @@
+import 'dart:async';
+import 'dart:io';
+
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:firebase_storage/firebase_storage.dart';
+import 'package:flutter/material.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:intl/intl.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+import 'const.dart';
+
+class Chat extends StatelessWidget {
+ //Firestore store;
+ final String peerId;
+ final String peerName;
+ final String peerAvatar;
+
+ Chat(
+ {Key key,
+ @required this.peerId,
+ this.peerName,
+ @required this.peerAvatar,
+ })
+ : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return new Scaffold(
+ appBar: new AppBar(
+ title: new Text(
+ peerName,
+ //style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
+ ),
+ centerTitle: true,
+ ),
+ body: new ChatScreen(
+ //store: store??Firestore.instance,
+ peerId: peerId,
+ peerName: peerName,
+ peerAvatar: peerAvatar,
+ ),
+ );
+ }
+}
+
+class ChatScreen extends StatefulWidget {
+ final String peerId;
+ final String peerName;
+ final String peerAvatar;
+
+ ChatScreen(
+ {Key key,
+ this.peerName,
+ @required this.peerId,
+ @required this.peerAvatar,
+ })
+ : super(key: key);
+
+ @override
+ State createState() => new ChatScreenState(
+ peerId: peerId,
+ peerName: peerName,
+ peerAvatar: peerAvatar,
+ );
+}
+
+class ChatScreenState extends State {
+ ChatScreenState(
+ {Key key,
+ @required this.peerId,
+ @required this.peerName,
+ @required this.peerAvatar,
+ });
+
+ //final Firestore firestore;
+ String peerId;
+ String peerName;
+ String peerAvatar;
+ String id;
+
+ var listMessage;
+ String groupChatId;
+ SharedPreferences prefs;
+
+ File imageFile;
+ bool isLoading;
+ bool isShowSticker;
+ String imageUrl;
+
+ final TextEditingController textEditingController =
+ new TextEditingController();
+ final ScrollController listScrollController = new ScrollController();
+ final FocusNode focusNode = new FocusNode();
+
+ @override
+ void initState() {
+ super.initState();
+ focusNode.addListener(onFocusChange);
+
+ groupChatId = '';
+
+ isLoading = false;
+ isShowSticker = false;
+ imageUrl = '';
+
+ readLocal();
+ }
+
+ void onFocusChange() {
+ if (focusNode.hasFocus) {
+ // Hide sticker when keyboard appear
+ setState(() {
+ isShowSticker = false;
+ });
+ }
+ }
+
+ readLocal() async {
+ prefs = await SharedPreferences.getInstance();
+ id = prefs.getString('id') ?? '';
+ if (id.hashCode <= peerId.hashCode) {
+ groupChatId = '$id-$peerId';
+ } else {
+ groupChatId = '$peerId-$id';
+ }
+
+ Firestore.instance
+ .collection('drivers')
+ .document(id)
+ .updateData({'chattingWith': peerId});
+
+ setState(() {});
+ }
+
+ Future getImage() async {
+ imageFile = await ImagePicker.pickImage(source: ImageSource.gallery);
+
+ if (imageFile != null) {
+ setState(() {
+ isLoading = true;
+ });
+ uploadFile();
+ }
+ }
+
+ void getSticker() {
+ // Hide keyboard when sticker appear
+ focusNode.unfocus();
+ setState(() {
+ isShowSticker = !isShowSticker;
+ });
+ }
+
+ Future uploadFile() async {
+ String fileName = DateTime.now().millisecondsSinceEpoch.toString();
+ StorageReference reference = FirebaseStorage.instance.ref().child(fileName);
+ StorageUploadTask uploadTask = reference.putFile(imageFile);
+ StorageTaskSnapshot storageTaskSnapshot = await uploadTask.onComplete;
+ storageTaskSnapshot.ref.getDownloadURL().then((downloadUrl) {
+ imageUrl = downloadUrl;
+ setState(() {
+ isLoading = false;
+ onSendMessage(imageUrl, 1);
+ });
+ }, onError: (err) {
+ setState(() {
+ isLoading = false;
+ });
+ Fluttertoast.showToast(msg: 'This file is not an image');
+ });
+ }
+
+ void onSendMessage(String content, int type) {
+ // type: 0 = text, 1 = image, 2 = sticker
+ if (content.trim() != '') {
+ textEditingController.clear();
+
+ var documentReference = Firestore.instance
+ .collection('messages')
+ .document(groupChatId)
+ .collection(groupChatId)
+ .document(DateTime.now().millisecondsSinceEpoch.toString());
+
+ Firestore.instance.runTransaction((transaction) async {
+ await transaction.set(
+ documentReference,
+ {
+ 'idFrom': id,
+ 'idTo': peerId,
+ 'timestamp': DateTime.now().millisecondsSinceEpoch.toString(),
+ 'content': content,
+ 'type': type
+ },
+ );
+ });
+ listScrollController.animateTo(0.0,
+ duration: Duration(milliseconds: 300), curve: Curves.easeOut);
+ } else {
+ Fluttertoast.showToast(msg: 'Nothing to send');
+ }
+ }
+
+ Widget buildItem(int index, DocumentSnapshot document) {
+ if (document['idFrom'] == id) {
+ return Row(
+ children: [
+ document['type'] == 0
+ // Text
+ ? Container(
+ child: Text(
+ document['content'],
+ style: TextStyle(color: primaryColor),
+ ),
+ padding: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
+ width: 200.0,
+ decoration: BoxDecoration(
+ color: greyColor2,
+ borderRadius: BorderRadius.circular(8.0)),
+ margin: EdgeInsets.only(
+ bottom: isLastMessageRight(index) ? 20.0 : 10.0,
+ right: 10.0),
+ )
+ : document['type'] == 1
+ // Image
+ ? Container(
+ child: Material(
+ child: CachedNetworkImage(
+ placeholder: (context, url) => Container(
+ child: CircularProgressIndicator(
+ valueColor:
+ AlwaysStoppedAnimation(themeColor),
+ ),
+ width: 200.0,
+ height: 200.0,
+ padding: EdgeInsets.all(70.0),
+ decoration: BoxDecoration(
+ color: greyColor2,
+ borderRadius: BorderRadius.all(
+ Radius.circular(8.0),
+ ),
+ ),
+ ),
+ errorWidget: (context, url, error) => Material(
+ child: Image.asset(
+ 'assets/images/img_not_available.jpeg',
+ width: 200.0,
+ height: 200.0,
+ fit: BoxFit.cover,
+ ),
+ borderRadius: BorderRadius.all(
+ Radius.circular(8.0),
+ ),
+ clipBehavior: Clip.hardEdge,
+ ),
+ imageUrl: document['content'],
+ width: 200.0,
+ height: 200.0,
+ fit: BoxFit.cover,
+ ),
+ borderRadius: BorderRadius.all(Radius.circular(8.0)),
+ clipBehavior: Clip.hardEdge,
+ ),
+ margin: EdgeInsets.only(
+ bottom: isLastMessageRight(index) ? 20.0 : 10.0,
+ right: 10.0),
+ )
+ // Sticker
+ : Container(
+ child: new Image.asset(
+ 'assets/images/${document['content']}.gif',
+ width: 100.0,
+ height: 100.0,
+ fit: BoxFit.cover,
+ ),
+ margin: EdgeInsets.only(
+ bottom: isLastMessageRight(index) ? 20.0 : 10.0,
+ right: 10.0),
+ ),
+ ],
+ mainAxisAlignment: MainAxisAlignment.end,
+ );
+ } else {
+ // Left (peer message)
+ return Container(
+ child: Column(
+ children: [
+ Row(
+ children: [
+ isLastMessageLeft(index)
+ ? peerAvatar == null
+ ? CircleAvatar(
+ child: Text(peerName[0]),
+ radius: 17.5,
+ )
+ : Material(
+ child: CachedNetworkImage(
+ placeholder: (context, url) => Container(
+ child: CircularProgressIndicator(
+ strokeWidth: 1.0,
+ valueColor:
+ AlwaysStoppedAnimation(themeColor),
+ ),
+ width: 35.0,
+ height: 35.0,
+ padding: EdgeInsets.all(10.0),
+ ),
+ imageUrl: peerAvatar,
+ width: 35.0,
+ height: 35.0,
+ fit: BoxFit.cover,
+ ),
+ borderRadius: BorderRadius.all(
+ Radius.circular(18.0),
+ ),
+ clipBehavior: Clip.hardEdge,
+ )
+ : Container(width: 35.0),
+ document['type'] == 0
+ ? Container(
+ child: Text(
+ document['content'],
+ style: TextStyle(color: Colors.white),
+ ),
+ padding: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 10.0),
+ width: 200.0,
+ decoration: BoxDecoration(
+ color: primaryColor,
+ borderRadius: BorderRadius.circular(8.0)),
+ margin: EdgeInsets.only(left: 10.0),
+ )
+ : document['type'] == 1
+ ? Container(
+ child: Material(
+ child: CachedNetworkImage(
+ placeholder: (context, url) => Container(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(
+ themeColor),
+ ),
+ width: 200.0,
+ height: 200.0,
+ padding: EdgeInsets.all(70.0),
+ decoration: BoxDecoration(
+ color: greyColor2,
+ borderRadius: BorderRadius.all(
+ Radius.circular(8.0),
+ ),
+ ),
+ ),
+ errorWidget: (context, url, error) => Material(
+ child: Image.asset(
+ 'assets/images/img_not_available.jpeg',
+ width: 200.0,
+ height: 200.0,
+ fit: BoxFit.cover,
+ ),
+ borderRadius: BorderRadius.all(
+ Radius.circular(8.0),
+ ),
+ clipBehavior: Clip.hardEdge,
+ ),
+ imageUrl: document['content'],
+ width: 200.0,
+ height: 200.0,
+ fit: BoxFit.cover,
+ ),
+ borderRadius:
+ BorderRadius.all(Radius.circular(8.0)),
+ clipBehavior: Clip.hardEdge,
+ ),
+ margin: EdgeInsets.only(left: 10.0),
+ )
+ : Container(
+ child: new Image.asset(
+ 'assets/images/${document['content']}.gif',
+ width: 100.0,
+ height: 100.0,
+ fit: BoxFit.cover,
+ ),
+ margin: EdgeInsets.only(
+ bottom: isLastMessageRight(index) ? 20.0 : 10.0,
+ right: 10.0),
+ ),
+ ],
+ ),
+
+ // Time
+ isLastMessageLeft(index)
+ ? Container(
+ child: Text(
+ DateFormat('dd MMM kk:mm').format(
+ DateTime.fromMillisecondsSinceEpoch(
+ int.parse(document['timestamp']))),
+ style: TextStyle(
+ color: greyColor,
+ fontSize: 12.0,
+ fontStyle: FontStyle.italic),
+ ),
+ margin: EdgeInsets.only(left: 50.0, top: 5.0, bottom: 5.0),
+ )
+ : Container()
+ ],
+ crossAxisAlignment: CrossAxisAlignment.start,
+ ),
+ margin: EdgeInsets.only(bottom: 10.0),
+ );
+ }
+ }
+
+ bool isLastMessageLeft(int index) {
+ if ((index > 0 &&
+ listMessage != null &&
+ listMessage[index - 1]['idFrom'] == id) ||
+ index == 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ bool isLastMessageRight(int index) {
+ if ((index > 0 &&
+ listMessage != null &&
+ listMessage[index - 1]['idFrom'] != id) ||
+ index == 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ Future onBackPress() {
+ if (isShowSticker) {
+ setState(() {
+ isShowSticker = false;
+ });
+ } else {
+ Firestore.instance
+ .collection('drivers')
+ .document(id)
+ .updateData({'chattingWith': null});
+ Navigator.pop(context);
+ }
+
+ return Future.value(false);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return WillPopScope(
+ child: Stack(
+ children: [
+ Column(
+ children: [
+ // List of messages
+ buildListMessage(),
+
+ // Sticker
+ (isShowSticker ? buildSticker() : Container()),
+
+ // Input content
+ buildInput(),
+ ],
+ ),
+
+ // Loading
+ buildLoading()
+ ],
+ ),
+ onWillPop: onBackPress,
+ );
+ }
+
+ Widget buildSticker() {
+ return Container(
+ child: Column(
+ children: [
+ Row(
+ children: [
+ FlatButton(
+ onPressed: () => onSendMessage('mimi1', 2),
+ child: new Image.asset(
+ 'assets/images/mimi1.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi2', 2),
+ child: new Image.asset(
+ 'assets/images/mimi2.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi3', 2),
+ child: new Image.asset(
+ 'assets/images/mimi3.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ )
+ ],
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ ),
+ Row(
+ children: [
+ FlatButton(
+ onPressed: () => onSendMessage('mimi4', 2),
+ child: new Image.asset(
+ 'assets/images/mimi4.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi5', 2),
+ child: new Image.asset(
+ 'assets/images/mimi5.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi6', 2),
+ child: new Image.asset(
+ 'assets/images/mimi6.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ )
+ ],
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ ),
+ Row(
+ children: [
+ FlatButton(
+ onPressed: () => onSendMessage('mimi7', 2),
+ child: new Image.asset(
+ 'assets/images/mimi7.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi8', 2),
+ child: new Image.asset(
+ 'assets/images/mimi8.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ FlatButton(
+ onPressed: () => onSendMessage('mimi9', 2),
+ child: new Image.asset(
+ 'assets/images/mimi9.gif',
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ ),
+ )
+ ],
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ )
+ ],
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ ),
+ decoration: new BoxDecoration(
+ border:
+ new Border(top: new BorderSide(color: greyColor2, width: 0.5)),
+ color: Colors.white),
+ padding: EdgeInsets.all(5.0),
+ height: 180.0,
+ );
+ }
+
+ Widget buildLoading() {
+ return Positioned(
+ child: isLoading
+ ? Container(
+ child: Center(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(themeColor)),
+ ),
+ color: Colors.white.withOpacity(0.8),
+ )
+ : Container(),
+ );
+ }
+
+ Widget buildInput() {
+ return Container(
+ child: Row(
+ children: [
+ // Button send image
+ Material(
+ child: new Container(
+ margin: new EdgeInsets.symmetric(horizontal: 1.0),
+ child: new IconButton(
+ icon: new Icon(Icons.image),
+ onPressed: getImage,
+ color: primaryColor,
+ ),
+ ),
+ color: Colors.white,
+ ),
+ Material(
+ child: new Container(
+ margin: new EdgeInsets.symmetric(horizontal: 1.0),
+ child: new IconButton(
+ icon: new Icon(Icons.face),
+ onPressed: getSticker,
+ color: primaryColor,
+ ),
+ ),
+ color: Colors.white,
+ ),
+
+ // Edit text
+ Flexible(
+ child: Container(
+ child: TextField(
+ style: TextStyle(color: primaryColor, fontSize: 15.0),
+ controller: textEditingController,
+ decoration: InputDecoration.collapsed(
+ hintText: 'Type your message...',
+ hintStyle: TextStyle(color: greyColor),
+ ),
+ focusNode: focusNode,
+ ),
+ ),
+ ),
+
+ // Button send message
+ Material(
+ child: new Container(
+ margin: new EdgeInsets.symmetric(horizontal: 8.0),
+ child: new IconButton(
+ icon: new Icon(Icons.send),
+ onPressed: () => onSendMessage(textEditingController.text, 0),
+ color: primaryColor,
+ ),
+ ),
+ color: Colors.white,
+ ),
+ ],
+ ),
+ width: double.infinity,
+ height: 50.0,
+ decoration: new BoxDecoration(
+ border:
+ new Border(top: new BorderSide(color: greyColor2, width: 0.5)),
+ color: Colors.white),
+ );
+ }
+
+ Widget buildListMessage() {
+ return Flexible(
+ child: groupChatId == ''
+ ? Center(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(themeColor)))
+ : StreamBuilder(
+ stream: Firestore.instance
+ .collection('messages')
+ .document(groupChatId)
+ .collection(groupChatId)
+ .orderBy('timestamp', descending: true)
+ .limit(20)
+ .snapshots(),
+ builder: (context, snapshot) {
+ if (!snapshot.hasData) {
+ return Center(
+ child: CircularProgressIndicator(
+ valueColor:
+ AlwaysStoppedAnimation(themeColor)));
+ } else {
+ listMessage = snapshot.data.documents;
+ return ListView.builder(
+ padding: EdgeInsets.all(10.0),
+ itemBuilder: (context, index) =>
+ buildItem(index, snapshot.data.documents[index]),
+ itemCount: snapshot.data.documents.length,
+ reverse: true,
+ controller: listScrollController,
+ );
+ }
+ },
+ ),
+ );
+ }
+}
diff --git a/lib/const.dart b/lib/const.dart
new file mode 100644
index 0000000..e70532c
--- /dev/null
+++ b/lib/const.dart
@@ -0,0 +1,6 @@
+import 'dart:ui';
+
+final themeColor = Color(0xfff5a623);
+final primaryColor = Color(0xff203152);
+final greyColor = Color(0xffaeaeae);
+final greyColor2 = Color(0xffE8E8E8);
diff --git a/lib/contact.dart b/lib/contact.dart
new file mode 100644
index 0000000..8b607a7
--- /dev/null
+++ b/lib/contact.dart
@@ -0,0 +1,86 @@
+import 'package:flutter/material.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+class ContactPage extends StatefulWidget {
+ @override
+ _ContactPageState createState() => new _ContactPageState();
+}
+
+class _ContactPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return new Scaffold(
+ appBar: new AppBar(
+ title: new Text('Contact Us'),
+ actions: [
+ IconButton(
+ icon: Icon(
+ Icons.phone,
+ color: Colors.white,
+ ),
+ onPressed: () async {
+ if (await canLaunch('tel:+256700216707')) {
+ await launch('tel:+256700216707');
+ } else {
+ print('Could not launch tel:+256700216707');
+ }
+ },
+ )
+ ],
+ ),
+ body: new Container(
+ margin: const EdgeInsets.symmetric(horizontal: 16.0),
+ child: new Center(
+ child: Column(children: [
+ Container(height: 60),
+ Icon(Icons.local_shipping,size:80,color: Theme.of(context).primaryColor,),
+ Text(
+ 'We suggest that you check out the support page in case of any issues.'),
+ Text(
+ 'In case you were not able to solve your issue with the information in the support section,'),
+ Text('We are here to help, any time of day'),
+ Text('Call:'),
+ Hyperlink('tel:+256700216707', '+256700216707'),
+ Container(height: 20),
+ Text('Email:'),
+ Hyperlink('mailto:support@sandtrackdriverapp.com',
+ 'support@sandtrackdriverapp.com'),
+ Container(height: 20),
+ Text('Whatsapp:'),
+ //Text('Michael Tendo Ssemwanga'),
+ Hyperlink('http:wa.me/+256700216707', '+256700216707'),
+ ]),
+ ),
+ ),
+ );
+ }
+}
+
+class Hyperlink extends StatelessWidget {
+ final String _url;
+ final String _text;
+
+ Hyperlink(this._url, this._text);
+
+ _launchURL() async {
+ if (await canLaunch(_url)) {
+ await launch(_url);
+ } else {
+ throw 'Could not launch $_url';
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ child: Text(
+ _text,
+ style: TextStyle(
+ decoration: TextDecoration.underline,
+ color: Theme.of(context).accentColor,
+ ),
+ ),
+ onTap: _launchURL,
+ );
+ }
+}
diff --git a/lib/credit_card_bloc.dart b/lib/credit_card_bloc.dart
new file mode 100644
index 0000000..40c1141
--- /dev/null
+++ b/lib/credit_card_bloc.dart
@@ -0,0 +1,64 @@
+import 'dart:async';
+
+class CreditCardBloc {
+ final ccInputController = StreamController();
+ final expInputController = StreamController();
+ final cvvInputController = StreamController();
+ final nameInputController = StreamController();
+
+ Sink get ccInputSink => ccInputController.sink;
+
+ Sink get expInputSink => expInputController.sink;
+
+ Sink get cvvInputSink => cvvInputController.sink;
+
+ Sink get nameInputSink => nameInputController.sink;
+
+ final ccOutputController = StreamController();
+ final expOutputController = StreamController();
+ final cvvOutputController = StreamController();
+ final nameOutputController = StreamController();
+
+ Stream get ccOutputStream => ccOutputController.stream;
+
+ Stream get expOutputStream => expOutputController.stream;
+
+ Stream get cvvOutputStream => cvvOutputController.stream;
+
+ Stream get nameOutputStream => nameOutputController.stream;
+
+ CreditCardBloc() {
+ ccInputController.stream.listen(onCCInput);
+ expInputController.stream.listen(onExpInput);
+ cvvInputController.stream.listen(onCvvInput);
+ nameInputController.stream.listen(onNameInput);
+ }
+
+ onCCInput(String input) {
+ ccOutputController.add(input.toString());
+ }
+
+ onExpInput(String input) {
+ expOutputController.add(input);
+ }
+
+ onCvvInput(String input) {
+ cvvOutputController.add(input);
+ }
+
+ onNameInput(String input) {
+ nameOutputController.add(input);
+ }
+
+ void ccFormat(String s) {
+ print(s);
+ ccInputSink.add(s);
+ }
+
+ void dispose() {
+ ccInputController?.close();
+ cvvInputController?.close();
+ expInputController?.close();
+ nameInputController?.close();
+ }
+}
diff --git a/lib/credit_card_page.dart b/lib/credit_card_page.dart
new file mode 100644
index 0000000..dda1186
--- /dev/null
+++ b/lib/credit_card_page.dart
@@ -0,0 +1,243 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_masked_text/flutter_masked_text.dart';
+
+import 'credit_card_bloc.dart';
+import 'profile_tile.dart';
+
+class CreditCardPage extends StatefulWidget {
+ final ValueChanged result;
+
+ CreditCardPage({this.result});
+
+ @override
+ _CreditCardPageState createState() => new _CreditCardPageState();
+}
+
+class _CreditCardPageState extends State {
+ BuildContext _context;
+ CreditCardBloc cardBloc;
+ MaskedTextController ccMask =
+ MaskedTextController(mask: "0000 0000 0000 0000");
+ MaskedTextController expMask = MaskedTextController(mask: "00/00");
+ TextEditingController cvvControl = new TextEditingController();
+ FocusNode _focus2 = new FocusNode();
+ bool _isCVV = false;
+
+ void initState() {
+ super.initState();
+ _focus2.addListener(() {
+ if (_focus2.hasFocus)
+ setState(() {
+ _isCVV = true;
+ });
+ else
+ setState(() {
+ _isCVV = false;
+ });
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ _context = context;
+ cardBloc = CreditCardBloc();
+
+ return new Scaffold(
+ appBar: new AppBar(
+ leading: IconButton(
+ icon: Icon(Icons.arrow_back),
+ onPressed: () {
+ Navigator.pop(context);
+ }),
+ title: new Text('Credit Card'),
+ actions: [
+ IconButton(
+ icon: Icon(
+ Icons.help,
+ color: Colors.white,
+ ),
+ onPressed: () {},
+ )
+ ],
+ ),
+ body: SingleChildScrollView(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ creditCardWidget(),
+ fillEntries(),
+ Container(height: 40)
+ ],
+ ),
+ ),
+ floatingActionButton: FloatingActionButton.extended(
+ onPressed: () {
+ widget.result('success');
+ Navigator.pop(context);
+ },
+ //backgroundColor: Colors.transparent,
+ icon: Icon(
+ Icons.payment,
+ color: Colors.white,
+ ),
+ label: Text(
+ "Continue",
+ //style: TextStyle(color: Colors.white),
+ ),
+ ),
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
+ );
+ }
+
+ Widget cardEntries() => Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ StreamBuilder(
+ stream: cardBloc.ccOutputStream,
+ initialData: "**** **** **** ****",
+ builder: (context, snapshot) {
+ snapshot.data.length > 0
+ ? ccMask.updateText(snapshot.data)
+ : null;
+ return !_isCVV
+ ? Text(
+ snapshot.data.length > 0
+ ? snapshot.data
+ : "**** **** **** ****",
+ style: TextStyle(color: Colors.white, fontSize: 22.0),
+ )
+ : Container(width: 0, height: 0);
+ }),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ StreamBuilder(
+ stream: cardBloc.expOutputStream,
+ initialData: "MM/YY",
+ builder: (context, snapshot) {
+ snapshot.data.length > 0
+ ? expMask.updateText(snapshot.data)
+ : null;
+ return !_isCVV
+ ? ProfileTile(
+ textColor: Colors.white,
+ title: "Expiry",
+ subtitle: snapshot.data.length > 0
+ ? snapshot.data
+ : "MM/YY",
+ )
+ : Container(width: 0, height: 0);
+ }),
+ SizedBox(
+ width: 200.0,
+ ),
+ StreamBuilder(
+ stream: cardBloc.cvvOutputStream,
+ initialData: "***",
+ builder: (context, snapshot) => _isCVV
+ ? ProfileTile(
+ textColor: Colors.white,
+ title: "CVV",
+ subtitle: snapshot.data.length > 0
+ ? snapshot.data
+ : "***",
+ )
+ : Container(width: 0, height: 0)),
+ ],
+ ),
+ ],
+ ),
+ );
+
+ Widget fillEntries() => Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ TextField(
+ controller: ccMask,
+ keyboardType: TextInputType.number,
+ maxLength: 19,
+ onChanged: (out) => cardBloc.ccInputSink.add(ccMask.text),
+ decoration: InputDecoration(
+ labelText: "Card Number", border: OutlineInputBorder()),
+ ),
+ TextField(
+ controller: expMask,
+ keyboardType: TextInputType.number,
+ maxLength: 5,
+ onChanged: (out) => cardBloc.expInputSink.add(expMask.text),
+ decoration: InputDecoration(
+ labelStyle: TextStyle(),
+ labelText: "MM/YY",
+ border: OutlineInputBorder()),
+ ),
+ TextField(
+ controller: cvvControl,
+ keyboardType: TextInputType.number,
+ maxLength: 3,
+ focusNode: _focus2,
+ onChanged: (out) => cardBloc.cvvInputSink.add(out),
+ decoration: InputDecoration(
+ labelStyle: TextStyle(fontWeight: FontWeight.bold),
+ labelText: "CVV (on the back of the card)",
+ border: OutlineInputBorder()),
+ ),
+ ],
+ ),
+ );
+
+ Widget creditCardWidget() {
+ var deviceSize = MediaQuery.of(_context).size;
+ return Container(
+ height: deviceSize.height * 0.3,
+ color: Colors.grey.shade300,
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Card(
+ elevation: 3.0,
+ child: Stack(
+ fit: StackFit.expand,
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(colors: [
+ // new Color.fromRGBO(103, 218, 255, 1.0),
+ // new Color.fromRGBO(3, 169, 244, 1.0),
+ // new Color.fromRGBO(0, 122, 193, 1.0),
+ Colors.blueGrey.shade800,
+ Colors.blue,
+ ])),
+ ),
+ Opacity(
+ opacity: 0.1,
+ child: Image.asset(
+ "assets/images/map.png",
+ fit: BoxFit.cover,
+ ),
+ ),
+ _isCVV
+ ? Positioned(
+ top: 20,
+ child: SizedBox(
+ height: 50,
+ width: MediaQuery.of(_context).size.width,
+ child: Row(children: [
+ Expanded(child: Container(color: Colors.black))
+ ])))
+ : Container(width: 0, height: 0),
+ MediaQuery.of(_context).orientation == Orientation.portrait
+ ? cardEntries()
+ : FittedBox(
+ child: cardEntries(),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/home_page.dart b/lib/home_page.dart
new file mode 100644
index 0000000..a17a54e
--- /dev/null
+++ b/lib/home_page.dart
@@ -0,0 +1,1836 @@
+import 'dart:async';
+
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:dio/dio.dart';
+import 'package:firebase_database/firebase_database.dart';
+import 'package:flutter/material.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:geolocator/geolocator.dart';
+import 'package:intl/intl.dart';
+import 'package:path/path.dart' as path;
+import 'package:share/share.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:sqflite/sqflite.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import 'about.dart';
+import 'chat.dart';
+import 'contact.dart';
+import 'settings.dart';
+import 'support.dart';
+import 'map.dart';
+
+class HomePage extends StatelessWidget {
+ final VoidCallback onSignedout;
+ final String currentUserId;
+
+ HomePage({this.onSignedout, this.currentUserId});
+
+ @override
+ Widget build(BuildContext context) {
+ return new MaterialApp(
+ theme: new ThemeData(
+ primaryColor: const Color(0xff004d40),
+ primaryColorDark: const Color(0xff005B9A),
+ accentColor: const Color(0xff005B9A),
+ ),
+ title: "Trackmart Driver",
+ home: new TabbedGuy(
+ onSignedout: this.onSignedout,
+ currentUserId: this.currentUserId,
+ ),
+ );
+ }
+}
+
+class TabbedGuy extends StatefulWidget {
+ const TabbedGuy({this.onSignedout, this.currentUserId});
+
+ final VoidCallback onSignedout;
+ final String currentUserId;
+
+ @override
+ _TabbedGuyState createState() =>
+ new _TabbedGuyState(currentUserId: this.currentUserId);
+}
+
+class _TabbedGuyState extends State
+ with SingleTickerProviderStateMixin {
+ bool isLoading = false;
+ double quantity = 1;
+ DatabaseReference databaseReference;
+ FirebaseDatabase database;
+ Firestore firestore;
+
+ // final formKey = new GlobalKey();
+ // final key = new GlobalKey();
+ final TextEditingController _filter = new TextEditingController();
+ FocusNode myFocusNode;
+ String _searchText = "";
+ Icon _searchIcon = new Icon(Icons.search);
+ Widget _appBarTitle = new Text('Trackmart Driver');
+ List _history = [];
+ List _filteredHistory = [];
+ SharedPreferences prefs;
+ final String currentUserId;
+ bool _status = false;
+ Geolocator geolocator = Geolocator();
+ StreamSubscription positionStreamSubscription;
+ String currentUserName;
+ String currentUserPhoto;
+ static double currentLat;
+ static double currentLong;
+
+ //TODO: Don't draw anything before all loading is done, all thens have completed
+ bool _stillLoading = true;
+
+ _TabbedGuyState({this.currentUserId});
+
+ static TabController _tabController;
+
+ @override
+ void initState() {
+ super.initState();
+ _startup().then((value) {
+ if (mounted)
+ setState(() {
+ _stillLoading = !value;
+ });
+ }).catchError((e) {
+ print(e.toString());
+ //sho(e.toString(), context);
+ if (mounted)
+ setState(() {
+ _stillLoading = false;
+ });
+ });
+ }
+
+ _updateLocation(Position position) {
+ if (mounted)
+ setState(() {
+ currentLat = position.latitude;
+ currentLong = position.longitude;
+ });
+ databaseReference
+ .child('Drivers')
+ .child(currentUserId)
+ .child('transit')
+ .once()
+ .then((d) {
+ Map map = d.value?.cast();
+ map?.forEach((key, values) {
+ databaseReference
+ .child('buyers')
+ .child(values['userId'])
+ .child('transit')
+ .child(key)
+ //.child('dlat')
+ //.set(
+ //position.latitude,
+ //'dlong':position.longitude
+ //)
+ .update({'dlat':position.latitude,'dlong':position.longitude})
+ .then((v) {
+ /*databaseReference
+ .child('buyers')
+ .child(values['userId'])
+ .child('transit')
+ .child(key)
+ .child('dlong')
+ .set(
+ position.longitude,
+ //'dlong':position.longitude
+ )
+ .then((v) {
+ //print('Updated in transit $key');
+ });*/
+ //print('Updated in transit $key');
+ });
+ });
+ });
+ databaseReference
+ .child('Drivers')
+ .child(currentUserId)
+ .update({
+ 'lat': position.latitude,
+ 'long': position.longitude,
+ })
+ .then((v) {})
+ .catchError((e) {
+ print(e.toString());
+ });
+ }
+
+ Future _startup() async {
+ database = FirebaseDatabase.instance;
+ database.setPersistenceEnabled(true);
+ database.setPersistenceCacheSizeBytes(10000000);
+ databaseReference = database.reference();
+ firestore = Firestore.instance;
+ prefs = await SharedPreferences.getInstance();
+ currentUserName = prefs.getString('displayName');
+ currentUserPhoto = prefs.getString('photoUrl');
+ await getWorkStatus();
+
+ _filter.addListener(() {
+ if (_filter.text.isEmpty) {
+ if (mounted)
+ setState(() {
+ _searchText = "";
+ _filteredHistory = _history;
+ });
+ } else {
+ if (mounted)
+ setState(() {
+ _searchText = _filter.text;
+ });
+ }
+ });
+ _getHistory();
+ _tabController = TabController(vsync: this, length: 3, initialIndex: 1);
+ myFocusNode = FocusNode();
+ return true;
+ }
+
+ @override
+ void dispose() {
+ myFocusNode.dispose();
+ _tabController.dispose();
+ positionStreamSubscription?.cancel();
+ super.dispose();
+ }
+
+ getWorkStatus() async {
+ bool status = (await databaseReference
+ .child('drivers')
+ .child(currentUserId)
+ .child('status')
+ .once())
+ .value;
+ setState(() {
+ _status = status ?? false;
+ });
+ registerLocation(_status);
+ return _status;
+ }
+
+ registerLocation(bool value) async {
+ if (value) {
+ //geolocator = Geolocator();
+ await geolocator
+ .getCurrentPosition(desiredAccuracy: LocationAccuracy.best)
+ .then((value) {
+ Position position = value;
+ print('Location');
+ print(position == null
+ ? 'Unknown'
+ : position.latitude.toString() +
+ ', ' +
+ position.longitude.toString());
+ _updateLocation(position);
+ //var geolocator = Geolocator();
+ var locationOptions = LocationOptions(
+ accuracy: LocationAccuracy.high, distanceFilter: 10);
+ positionStreamSubscription = geolocator
+ .getPositionStream(locationOptions)
+ .listen((Position position) {
+ print(position == null
+ ? 'Unknown'
+ : position.latitude.toString() +
+ ', ' +
+ position.longitude.toString());
+ _updateLocation(position);
+ });
+ });
+ } else
+ positionStreamSubscription?.cancel();
+ }
+
+ updateWork(bool value) async {
+ await databaseReference
+ .child('drivers')
+ .child(currentUserId)
+ .child('status')
+ .set(value);
+ registerLocation(value);
+ //TODO:also firestore
+ }
+
+ Widget build(BuildContext context) {
+ return _stillLoading
+ ? SafeArea(
+ child: Scaffold(
+ body: Container(
+ color: Colors.white,
+ child: Center(
+ child:
+ Column(mainAxisSize: MainAxisSize.min, children: [
+ Icon(
+ Icons.local_shipping,
+ size: 80,
+ color: Theme.of(context).primaryColor,
+ ),
+ Container(
+ margin: EdgeInsets.only(bottom: 8),
+ width: 200,
+ child: LinearProgressIndicator(),
+ ),
+ Center(
+ child: Text('Trackmart Driver',
+ style: TextStyle(
+ fontSize: 20, color: Theme.of(context).accentColor)),
+ ),
+ Padding(
+ padding: EdgeInsets.all(8),
+ child: Center(
+ child: Text('Drive • Deliver • Earn',
+ style: TextStyle(
+ fontSize: 17, color: Theme.of(context).accentColor)),
+ ),
+ ),
+ ])),
+ )))
+ : Scaffold(
+ drawer: Drawer(
+ child: ListView(
+ // Important: Remove any padding from the ListView.
+ padding: EdgeInsets.zero,
+ children: [
+ DrawerHeader(
+ child: InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ new MaterialPageRoute(
+ builder: (context) => new SettingsPage(
+ firestore: firestore,
+ )));
+ },
+ child: Center(
+ child: Column(children: [
+ Material(
+ child: currentUserPhoto != null
+ ? CachedNetworkImage(
+ placeholder: (context, url) => Container(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(
+ Theme.of(context).accentColor),
+ ),
+ width: 80.0,
+ height: 80.0,
+ //padding: EdgeInsets.all(15.0),
+ ),
+ imageUrl: currentUserPhoto,
+ width: 80.0,
+ height: 80.0,
+ fit: BoxFit.cover,
+ )
+ : Icon(
+ Icons.account_circle,
+ size: 80.0,
+ ),
+ borderRadius: BorderRadius.all(Radius.circular(40.0)),
+ clipBehavior: Clip.hardEdge,
+ ),
+ Padding(
+ padding: EdgeInsets.all(16),
+ child: Text(currentUserName ?? '',
+ style: TextStyle(
+ fontSize: 17,
+ color: Theme.of(context).accentColor)),
+ ),
+ ])),
+ ),
+ decoration: BoxDecoration(),
+ ),
+ SwitchListTile(
+ title: Text(
+ _status ? 'Available' : 'Not available',
+ ),
+ secondary:
+ Icon(_status ? Icons.work : Icons.not_interested),
+ value: _status, //TODO: fix this
+ onChanged: (value) {
+ updateWork(value).then((v) {
+ setState(() {
+ _status = value;
+ });
+ });
+ }),
+ ListTile(
+ title: Text('Help'),
+ trailing: new Icon(
+ Icons.help,
+ color: Theme.of(context).accentColor,
+ ),
+ onTap: () {
+ Navigator.push(
+ context,
+ new MaterialPageRoute(
+ builder: (context) => new SupportPage()));
+ },
+ ),
+ ListTile(
+ title: Text('Contact'),
+ trailing: new Icon(
+ Icons.phone,
+ color: Theme.of(context).accentColor,
+ ),
+ onTap: () {
+ Navigator.push(
+ context,
+ new MaterialPageRoute(
+ builder: (context) => new ContactPage()));
+ // Update the state of the app.
+ // ...
+ },
+ ),
+ ListTile(
+ title: Text('About Trackmart Driver'),
+ trailing: new Icon(
+ Icons.local_shipping,
+ color: Theme.of(context).accentColor,
+ ),
+ onTap: () {
+ Navigator.push(
+ context,
+ new MaterialPageRoute(
+ builder: (context) => new About()));
+ },
+ ),
+ ListTile(
+ title: Text('Invite'),
+ trailing: new Icon(
+ Icons.share,
+ color: Theme.of(context).accentColor,
+ ),
+ onTap: () {
+ Share.share(
+ 'You can make money and get more customers deliverying Sand to buyers using Trackmart Driver Driver app. Download it at https://play.google.com/sandtrackdriverapp?uid=${currentUserId}');
+ print(
+ 'You can make money and get more customers deliverying Sand to buyers using Trackmart Driver Driver app. Download it at https://play.google.com/sandtrackdriverapp?uid=${currentUserId}');
+ },
+ ),
+ ListTile(
+ title: Text('Log out'),
+ trailing: new Icon(
+ Icons.exit_to_app,
+ color: Theme.of(context).accentColor,
+ ),
+ onTap: () {
+ widget.onSignedout();
+ },
+ ),
+ ],
+ ),
+ ),
+ appBar: _buildBar(context),
+ body: new InkWell(
+ onTapDown: (t) {
+ FocusScope.of(context).requestFocus(new FocusNode());
+ },
+ child: TabBarView(
+ controller: _tabController,
+ children: [
+ new Column(
+ //modified
+ children: [
+ //new
+ new Flexible(
+ child: _buildContacts(), //new
+ ),
+ //new
+ ], //new
+ ),
+ Container(
+ margin: const EdgeInsets.symmetric(horizontal: 8.0),
+ child: _buildHome()),
+ new Column(
+ //modified
+ children: [
+ //new
+ new Flexible(
+ //new
+ child: _buildHistory(), //new
+ ), //new
+ ], //new
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _buildBar(BuildContext context) {
+ return new AppBar(
+ actions: [
+ IconButton(
+ icon: _searchIcon,
+ onPressed: _searchPressed,
+ ),
+ IconButton(
+ icon: Icon(Icons.map),
+ onPressed: () {
+ Navigator.push(
+ context,
+ new MaterialPageRoute(
+ builder: (context) => new MapPage2(
+ driverId: widget.currentUserId,
+ dlat: _TabbedGuyState.currentLat,
+ dlong: _TabbedGuyState.currentLong,
+ selectOrder: confirmOrder,
+ )));
+ },
+ ),
+ ],
+ bottom: TabBar(
+ controller: _tabController,
+ tabs: [
+ Tab(text: ('Chats')),
+ Tab(text: ('Delivery')),
+ Tab(text: ('Earnings')),
+ ],
+ ),
+ title: _appBarTitle,
+ );
+ }
+
+ confirmOrder(String orderKey) {}
+ static showModal(text, sent_context) {
+ showDialog(
+ context: sent_context,
+ barrierDismissible: false,
+ builder: (BuildContext context) {
+ return new AlertDialog(
+ title: Text(text),
+ content: LinearProgressIndicator(),
+ contentPadding: EdgeInsets.all(10.0),
+ );
+ });
+ }
+
+ Widget _buildContacts() {
+ return Stack(
+ children: [
+ // List
+ Container(
+ child: StreamBuilder(
+ stream: firestore.collection('buyers').snapshots(),
+ builder: (context, snapshot) {
+ if (!snapshot.hasData) {
+ return Center(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(
+ Theme.of(context).accentColor),
+ ),
+ );
+ } else {
+ return ListView.separated(
+ separatorBuilder: (context, index) => Divider(),
+ itemBuilder: (context, index) =>
+ buildItem(context, snapshot.data.documents[index]),
+ itemCount: snapshot.data.documents.length,
+ );
+ }
+ },
+ ),
+ ),
+ Positioned(
+ child: isLoading
+ ? Container(
+ child: Center(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(
+ Theme.of(context).accentColor)),
+ ),
+ color: Colors.white.withOpacity(0.8),
+ )
+ : Container(),
+ )
+ ],
+ );
+ }
+
+ Widget buildItem(BuildContext context, DocumentSnapshot document) {
+ return document['displayName']
+ .toLowerCase()
+ .contains(_searchText.toLowerCase())
+ ? Container(
+ child: FlatButton(
+ child: Row(
+ children: [
+ Material(
+ child: document['photoUrl'] != null
+ ? CachedNetworkImage(
+ placeholder: (context, url) => Container(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(
+ Theme.of(context).accentColor),
+ ),
+ width: 50.0,
+ height: 50.0,
+ //padding: EdgeInsets.all(15.0),
+ ),
+ imageUrl: document['photoUrl'],
+ width: 50.0,
+ height: 50.0,
+ fit: BoxFit.cover,
+ )
+ : Icon(
+ Icons.account_circle,
+ size: 50.0,
+ //color: greyColor,
+ ),
+ borderRadius: BorderRadius.all(Radius.circular(25.0)),
+ clipBehavior: Clip.hardEdge,
+ ),
+ Flexible(
+ child: Container(
+ child: Column(
+ children: [
+ Container(
+ child: Text(
+ '${document['displayName']}',
+ style: TextStyle(
+ color: Theme.of(context).primaryColor),
+ ),
+ alignment: Alignment.centerLeft,
+ margin: EdgeInsets.fromLTRB(10.0, 0.0, 0.0, 5.0),
+ ),
+ ],
+ ),
+ margin: EdgeInsets.only(left: 5.0),
+ ),
+ ),
+ ],
+ ),
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => Chat(
+ peerName: document['displayName'],
+ //store: firestore,
+ peerId: document.documentID,
+ peerAvatar: document['photoUrl'],
+ )));
+ },
+ padding: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10.0)),
+ ),
+ margin: EdgeInsets.only(left: 5.0, right: 5.0),
+ )
+ : Container(
+ width: 0,
+ height: 0,
+ );
+ }
+
+ _buildInTransit() {
+ return StreamBuilder(
+ stream: databaseReference
+ .child('Drivers')
+ .child(currentUserId)
+ .child('transit')
+ .onValue,
+ //TODO: on value changes, chill streambuilder, listen and setstate on names.
+ builder: (context, snap) {
+ if (snap.hasData &&
+ !snap.hasError &&
+ snap.data.snapshot.value != null) {
+//taking the data snapshot.
+ //DataSnapshot snapshot = snap.data.snapshot;
+ List items = [];
+//it gives all the documents in this list.
+ //List