Compare commits

...

3 Commits

  1. BIN
      .DS_Store
  2. 19
      .idea/libraries/Dart_SDK.xml
  3. 15
      .idea/libraries/KotlinJavaRuntime.xml
  4. 9
      .idea/modules.xml
  5. 6
      .idea/runConfigurations/main_dart.xml
  6. 36
      .idea/workspace.xml
  7. 10
      .metadata
  8. 29
      analysis_options.yaml
  9. 22
      android/app/build.gradle
  10. 51
      android/app/google-services.json
  11. 3
      android/app/src/main/AndroidManifest.xml
  12. 2
      android/app/src/main/res/values/styles.xml
  13. 6
      android/build.gradle
  14. BIN
      assets/.DS_Store
  15. BIN
      assets/images/.DS_Store
  16. 1
      assets/images/coupon.svg
  17. 1
      assets/images/search.svg
  18. BIN
      ios/.DS_Store
  19. 2
      ios/Flutter/AppFrameworkInfo.plist
  20. 49
      ios/Podfile
  21. 1391
      ios/Podfile.lock
  22. 30
      ios/Runner.xcodeproj/project.pbxproj
  23. 2
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  24. BIN
      ios/Runner/.DS_Store
  25. 4
      ios/Runner/AppDelegate.swift
  26. 13
      ios/Runner/Base.lproj/Main.storyboard
  27. 18
      ios/Runner/GoogleService-Info.plist
  28. 58
      ios/Runner/Info.plist
  29. 38
      ios/Runner/ProdGoogleService-Info.plist
  30. 7
      ios/firebase_app_id_file.json
  31. 8
      lib/Classes/API Clasess/BusinessProfile.dart
  32. 6
      lib/Classes/API Clasess/CampAd.dart
  33. 16
      lib/Classes/API Clasess/Campaign.dart
  34. 10
      lib/Classes/API Clasess/CommentsPost.dart
  35. 32
      lib/Classes/API Clasess/CouponDetails.dart
  36. 24
      lib/Classes/API Clasess/CouponHead.dart
  37. 12
      lib/Classes/API Clasess/Desire.dart
  38. 4
      lib/Classes/API Clasess/ExploreObject.dart
  39. 20
      lib/Classes/API Clasess/FacebookUser.dart
  40. 20
      lib/Classes/API Clasess/GoogleUser.dart
  41. 18
      lib/Classes/API Clasess/Post.dart
  42. 8
      lib/Classes/API Clasess/PostFav.dart
  43. 10
      lib/Classes/API Clasess/PostUpload.dart
  44. 14
      lib/Classes/API Clasess/PostedAd.dart
  45. 4
      lib/Classes/API Clasess/PostionAP.dart
  46. 14
      lib/Classes/API Clasess/Product.dart
  47. 28
      lib/Classes/API Clasess/ProximityCoupon.dart
  48. 6
      lib/Classes/API Clasess/ReferralClass.dart
  49. 6
      lib/Classes/API Clasess/Registrar.dart
  50. 6
      lib/Classes/API Clasess/ResetClass.dart
  51. 6
      lib/Classes/API Clasess/SilverPurchaseRequest.dart
  52. 28
      lib/Classes/API Clasess/TesoBusinessDetail.dart
  53. 26
      lib/Classes/API Clasess/TesoUserDetail.dart
  54. 16
      lib/Classes/API Clasess/ThirdPerson.dart
  55. 6
      lib/Classes/API Clasess/TokenHandler.dart
  56. 20
      lib/Classes/API Clasess/TwitterUser.dart
  57. 12
      lib/Classes/API Clasess/UserAuth.dart
  58. 6
      lib/Classes/API Clasess/UserFavCategory.dart
  59. 6
      lib/Classes/API Clasess/UserFinance.dart
  60. 10
      lib/Classes/ChatMessage.dart
  61. 4
      lib/Classes/ColorFilters.dart
  62. 2
      lib/Classes/Connection.dart
  63. 14
      lib/Classes/Firebase/Comments.dart
  64. 22
      lib/Classes/Firebase/Posts.dart
  65. 18
      lib/Classes/NotificationSpliter.dart
  66. 22
      lib/Classes/Payload.dart
  67. 16
      lib/Classes/Product.dart
  68. 6
      lib/Classes/QRClass.dart
  69. 10
      lib/Classes/ReportedContent.dart
  70. 26
      lib/Classes/TesoShop.dart
  71. 34
      lib/Classes/TesoUser.dart
  72. 7
      lib/Classes/TextE.dart
  73. 31
      lib/Classes/Uploading.dart
  74. 6
      lib/Classes/categories.dart
  75. 15
      lib/Classes/customLoginButton.dart
  76. 13
      lib/Classes/customTesoButton.dart
  77. 18
      lib/Classes/friend.dart
  78. 18
      lib/Classes/inbox.dart
  79. 48
      lib/GeneralWidgets/widgets/uservideo_player_widget.dart
  80. 104
      lib/GeneralWidgets/widgets/video_player_widget.dart
  81. 1
      lib/GeneralWidgets/widgets/widgets.dart
  82. 24
      lib/Notifications/NotificationPlugin.dart
  83. 76
      lib/Pages/BusinessLocator.dart
  84. 141
      lib/Pages/Campaigns.dart
  85. 10
      lib/Pages/DesireComeTrue.dart
  86. 4
      lib/Pages/LandingPage.dart
  87. 14
      lib/Pages/PageWidgets/Alerts/AlertTile.dart
  88. 10
      lib/Pages/PageWidgets/Alerts/Redeemable.dart
  89. 2
      lib/Pages/PageWidgets/Alerts/Refund.dart
  90. 10
      lib/Pages/PageWidgets/Alerts/header.dart
  91. 14
      lib/Pages/PageWidgets/Alerts/personalizedCoupon.dart
  92. 10
      lib/Pages/PageWidgets/Alerts/post.dart
  93. 18
      lib/Pages/PageWidgets/Alerts/requestTile.dart
  94. 26
      lib/Pages/PageWidgets/BusinessProfile/BusinessHead.dart
  95. 6
      lib/Pages/PageWidgets/BusinessProfile/BusinessItems.dart
  96. 142
      lib/Pages/PageWidgets/Campaigns/campaignTile.dart
  97. 45
      lib/Pages/PageWidgets/Campaigns/header.dart
  98. 6
      lib/Pages/PageWidgets/ChatScreen/header.dart
  99. 4
      lib/Pages/PageWidgets/ChatScreen/recipient.dart
  100. 4
      lib/Pages/PageWidgets/ChatScreen/sender.dart

BIN
.DS_Store

Binary file not shown.

19
.idea/libraries/Dart_SDK.xml

@ -0,0 +1,19 @@
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://D:\flutter/bin/cache/dart-sdk/lib/typed_data" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

15
.idea/libraries/KotlinJavaRuntime.xml

@ -0,0 +1,15 @@
<component name="libraryTable">
<library name="KotlinJavaRuntime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-sources.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect-sources.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test-sources.jar!/" />
</SOURCES>
</library>
</component>

9
.idea/modules.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/teso.iml" filepath="$PROJECT_DIR$/teso.iml" />
<module fileurl="file://$PROJECT_DIR$/android/teso_android.iml" filepath="$PROJECT_DIR$/android/teso_android.iml" />
</modules>
</component>
</project>

6
.idea/runConfigurations/main_dart.xml

@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method />
</configuration>
</component>

36
.idea/workspace.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="ToolWindowManager">
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
</navigator>
<panes>
<pane id="ProjectPane">
<option name="show-excluded-files" value="false" />
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="dart.analysis.tool.window.force.activate" value="true" />
<property name="show.migrate.to.gradle.popup" value="false" />
</component>
</project>

10
.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: db747aa1331bd95bc9b3874c842261ca2d302cd5
channel: stable
project_type: app

29
analysis_options.yaml

@ -0,0 +1,29 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
#include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

22
android/app/build.gradle

@ -54,6 +54,7 @@ android {
applicationId "com.sparentechBacware.teso" applicationId "com.sparentechBacware.teso"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 31 targetSdkVersion 31
ndkVersion '23.1.7779620'
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
} }
@ -75,18 +76,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
// buildTypes {
// release {
// // TODO: Add your own signing config for the release build.
// // Signing with the debug keys for now, so `flutter run --release` works.
// ndk {
// abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
// }
// minifyEnabled true
// signingConfig signingConfigs.debug
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// }
// }
} }
@ -103,12 +92,5 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation 'com.google.firebase:firebase-crashlytics:17.3.0' implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
implementation 'com.github.AbedElazizShe:LightCompressor:0.9.4'
def camerax_version = "1.0.0"
// CameraX core library using camera2 implementation
implementation "androidx.camera:camera-camera2:$camerax_version"
// CameraX Lifecycle Library
implementation "androidx.camera:camera-lifecycle:$camerax_version"
// CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha24"
} }

51
android/app/google-services.json

@ -1,57 +1,45 @@
{ {
"project_info": { "project_info": {
"project_number": "280510379185", "project_number": "675860686596",
"firebase_url": "https://teso-ghana-default-rtdb.firebaseio.com", "project_id": "teso-test-6fc81",
"project_id": "teso-ghana", "storage_bucket": "teso-test-6fc81.appspot.com"
"storage_bucket": "teso-ghana.appspot.com"
}, },
"client": [{ "client": [
{
"client_info": { "client_info": {
"mobilesdk_app_id": "1:280510379185:android:b778de8dca1cf49219de90", "mobilesdk_app_id": "1:675860686596:android:8522b46df172af41cd9251",
"android_client_info": { "android_client_info": {
"package_name": "com.sparentechBacware.teso" "package_name": "com.sparentechBacware.teso"
} }
}, },
"oauth_client": [{ "oauth_client": [
"client_id": "280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.sparentechBacware.teso",
"certificate_hash": "40b68890dd51d72454ccdc7289623c4d56273248"
}
},
{ {
"client_id": "280510379185-87k85sksrd30mu9fjgfmacb3bkcjnmdq.apps.googleusercontent.com", "client_id": "675860686596-in4piqob6d8nj42nguh06abpdrrhai0f.apps.googleusercontent.com",
"client_type": 1, "client_type": 1,
"android_info": { "android_info": {
"package_name": "com.sparentechBacware.teso", "package_name": "com.sparentechBacware.teso",
"certificate_hash": "4f655cf94cd94864838475611b711c2528e33601" "certificate_hash": "b50b0b74dfcde0a02336f00eae49428a517551b2"
} }
}, },
{ {
"client_id": "280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com", "client_id": "675860686596-n32ta36ndmugfm1jj61mu2p1v197a1nn.apps.googleusercontent.com",
"client_type": 1, "client_type": 3
"android_info": {
"package_name": "com.sparentechBacware.teso",
"certificate_hash": "063304c2da41f90c824fad163b5ad481edf6db11"
} }
}, ],
"api_key": [
{ {
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", "current_key": "AIzaSyDt05opA09hr9Y1pysllCsEE_6dT4CrhRM"
"client_type": 3
} }
], ],
"api_key": [{
"current_key": "AIzaSyAHBguF6oqPEq7em1vLrh_NP2LoPuabe6o"
}],
"services": { "services": {
"appinvite_service": { "appinvite_service": {
"other_platform_oauth_client": [{ "other_platform_oauth_client": [
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com", {
"client_id": "675860686596-n32ta36ndmugfm1jj61mu2p1v197a1nn.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
}, },
{ {
"client_id": "280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com", "client_id": "675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg.apps.googleusercontent.com",
"client_type": 2, "client_type": 2,
"ios_info": { "ios_info": {
"bundle_id": "com.tesoapp", "bundle_id": "com.tesoapp",
@ -61,6 +49,7 @@
] ]
} }
} }
}], }
],
"configuration_version": "1" "configuration_version": "1"
} }

3
android/app/src/main/AndroidManifest.xml

@ -31,7 +31,7 @@
<data android:scheme="https" /> <data android:scheme="https" />
</intent> </intent>
</queries> </queries>
<application android:name="io.flutter.app.FlutterApplication" android:label="Teso" tools:replace="label" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true" android:usesCleartextTraffic="true"> <application android:name="${applicationName}" android:label="Teso" tools:replace="label" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true" android:usesCleartextTraffic="true">
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyB3gbhILEzrSCFpxE509PnEb7slCkBfBQI" /> <meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyB3gbhILEzrSCFpxE509PnEb7slCkBfBQI" />
<meta-data android:name="com.google.firebase.ml.vision.DEPENDENCIES" android:value="ocr,label" /> <meta-data android:name="com.google.firebase.ml.vision.DEPENDENCIES" android:value="ocr,label" />
<activity android:name=".MainActivity" android:launchMode="singleTop" <activity android:name=".MainActivity" android:launchMode="singleTop"
@ -44,7 +44,6 @@
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
<meta-data android:name="flutterEmbedding" android:value="2" /> <meta-data android:name="flutterEmbedding" android:value="2" />
<intent-filter> <intent-filter>

2
android/app/src/main/res/values/styles.xml

@ -13,6 +13,6 @@
This Theme is only used starting with V2 of Flutter's Android embedding. --> This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
</resources> </resources>

6
android/build.gradle

@ -43,9 +43,9 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
ext { // ext {
flutterFFmpegPackage = "full-gpl-lts" // flutterFFmpegPackage = "full-gpl-lts"
} // }

BIN
assets/.DS_Store

Binary file not shown.

BIN
assets/images/.DS_Store

Binary file not shown.

1
assets/images/coupon.svg

@ -0,0 +1 @@
<svg id="Gylph" height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m28.06 39a1.14 1.14 0 0 0 -2.27 0 1.14 1.14 0 0 0 2.27 0z"/><path d="m39.23 26.75a1 1 0 0 1 1.41-1.42l2.28 2.28s4.39-4.4 4.43-4.47a5 5 0 0 0 -.13-7l-1.48-1.49a1 1 0 0 0 -1.37-.05 3.27 3.27 0 0 1 -4.62-4.6 1 1 0 0 0 0-1.37l-1.53-1.48a5.09 5.09 0 0 0 -7.16 0l-4.3 4.31 2.24 2.26a1 1 0 0 1 -1.42 1.41l-2.27-2.27-15.81 15.84h31.66c-.48-.51-1.45-1.47-1.93-1.95zm-5.81-7.22a1 1 0 0 1 -1.41 0l-1.57-1.53a1 1 0 0 1 0-1.41 1 1 0 0 1 1.42 0l1.56 1.56a1 1 0 0 1 0 1.38zm4.39 4.39a1 1 0 0 1 -1.41 0l-1.57-1.57a1 1 0 0 1 0-1.41 1 1 0 0 1 1.42 0l1.56 1.57a1 1 0 0 1 0 1.41z"/><path d="m54 30.68h-7.72v3.73a1 1 0 0 1 -2 .27c-.11-1 0-2.94 0-4h-33.94a6 6 0 0 0 -6.34 6v2.57a1 1 0 0 0 1 1 4.26 4.26 0 0 1 0 8.52 1 1 0 0 0 -1 1v2.57a6 6 0 0 0 6 6h34.28s-.06-3.83 0-4a1 1 0 0 1 1.9 0c.12.29.05 4 .05 4h7.77a6 6 0 0 0 6-6v-2.59a1 1 0 0 0 -.93-1c-5.23-.44-5.21-8 0-8.48a1 1 0 0 0 .93-1v-2.59a6 6 0 0 0 -6-6zm-24.35 8.32a2.73 2.73 0 0 1 -5.45 0 2.73 2.73 0 0 1 5.45 0zm-4.19 10.7a2.72 2.72 0 0 1 5.44 0 2.72 2.72 0 0 1 -5.44 0zm8-9.86-10 9.95a1 1 0 0 1 -1.41-1.42l9.95-9.94a1 1 0 0 1 1.42 0 1 1 0 0 1 .03 1.41zm12.82 9.86a1 1 0 0 1 -2 0v-2.7a1 1 0 0 1 2 0zm0-7.65a1 1 0 0 1 -2 0v-2.72a1 1 0 0 1 2 0z"/><path d="m27.05 49.7a1.13 1.13 0 0 0 2.26 0 1.13 1.13 0 0 0 -2.26 0z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

1
assets/images/search.svg

@ -0,0 +1 @@
<svg clip-rule="evenodd" fill-rule="evenodd" height="512" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 1707 1707" width="512" xmlns="http://www.w3.org/2000/svg"><g id="Layer_x0020_1"><path d="m623 1250c-166 0-323-65-440-183-118-118-183-274-183-440 0-167 65-323 183-441 117-118 274-182 440-182s323 64 441 182c117 118 182 274 182 441 0 166-65 322-182 440-118 118-275 183-441 183zm0-140c-129 0-251-50-342-141-91-92-142-213-142-342 0-130 51-251 142-343 91-91 213-141 342-141s251 50 342 141c189 189 189 496 0 685-91 91-213 141-342 141z"/><path d="m1198 1309c-8 0-16-3-22-9l-134-134c23-18 44-36 64-57 23-22 43-46 62-71l135 135c12 12 12 31 0 43-6 5-13 8-21 8-7 0-13-2-18-6l-39 48c5 11 3 24-6 34-6 6-14 9-21 9z"/><path d="m1577 1703c-34 0-67-13-91-38l-282-281c-24-24-37-57-37-91 0-35 13-68 37-92 25-24 57-38 92-38s67 14 92 38l281 281c50 51 50 133 0 183-25 25-57 38-92 38z"/><path d="m421 829c-112-112-112-293 0-405 11-12 11-31 0-42-12-12-31-12-43 0-135 135-135 354 0 489 6 6 14 9 21 9 8 0 16-3 22-9 11-11 11-30 0-42z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
ios/.DS_Store

Binary file not shown.

2
ios/Flutter/AppFrameworkInfo.plist

@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>8.0</string> <string>9.0</string>
</dict> </dict>
</plist> </plist>

49
ios/Podfile

@ -1,5 +1,8 @@
platform :ios, '12.0' # Uncomment this line to define a global platform for your project
$FirebaseSDKVersion = '7.11.0' platform :ios, '15.0'
# Override Firebase SDK Version
$FirebaseSDKVersion = '9.2.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', { project 'Runner', {
@ -25,45 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup flutter_ios_podfile_setup
# "fork" of method flutter_install_ios_plugin_pods (in fluttertools podhelpers.rb) to get lts version of ffmpeg
def flutter_install_ios_plugin_pods(ios_application_path = nil)
# defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
ios_application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
raise 'Could not find iOS application path' unless ios_application_path
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
symlink_dir = File.expand_path('.symlinks', ios_application_path)
system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.
symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
system('mkdir', '-p', symlink_plugins_dir)
plugins_file = File.join(ios_application_path, '..', '.flutter-plugins-dependencies')
plugin_pods = flutter_parse_plugins_file(plugins_file)
plugin_pods.each do |plugin_hash|
plugin_name = plugin_hash['name']
plugin_path = plugin_hash['path']
if (plugin_name && plugin_path)
symlink = File.join(symlink_plugins_dir, plugin_name)
File.symlink(plugin_path, symlink)
if plugin_name == 'flutter_ffmpeg'
pod plugin_name+'/full-gpl-lts', :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
else
pod plugin_name, :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
end
end
end
end
target 'Runner' do target 'Runner' do
# pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.33.0'
pod 'GoogleMLKit/ImageLabeling'
pod 'GoogleMLKit/TextRecognition'
use_frameworks! use_frameworks!
use_modular_headers! use_modular_headers!
@ -74,7 +39,7 @@ post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end end
end end
end

1391
ios/Podfile.lock

File diff suppressed because it is too large

30
ios/Runner.xcodeproj/project.pbxproj

@ -14,6 +14,7 @@
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
DE7D3950774AF2253178F202 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29578401A5FB3088ABB7635B /* Pods_Runner.framework */; }; DE7D3950774AF2253178F202 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29578401A5FB3088ABB7635B /* Pods_Runner.framework */; };
FE1744D5ADF4D39D2F573FCB /* GoogleService-Info.plist in Sources */ = {isa = PBXBuildFile; fileRef = 0B3B84CDB01189B80ADF6D47 /* GoogleService-Info.plist */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -30,6 +31,7 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0B3B84CDB01189B80ADF6D47 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
29578401A5FB3088ABB7635B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29578401A5FB3088ABB7635B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -98,6 +100,7 @@
97C146EF1CF9000F007C117D /* Products */, 97C146EF1CF9000F007C117D /* Products */,
4334E30C393B71F7A6E589D8 /* Pods */, 4334E30C393B71F7A6E589D8 /* Pods */,
23D06BD6AD1FD965EEBFDFB4 /* Frameworks */, 23D06BD6AD1FD965EEBFDFB4 /* Frameworks */,
0B3B84CDB01189B80ADF6D47 /* GoogleService-Info.plist */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -140,6 +143,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
5E474C80B70EC554E7278F77 /* [CP] Embed Pods Frameworks */, 5E474C80B70EC554E7278F77 /* [CP] Embed Pods Frameworks */,
1065E7A3A2329C46618FAF60 /* [CP] Copy Pods Resources */, 1065E7A3A2329C46618FAF60 /* [CP] Copy Pods Resources */,
8B6BAB971734FC2758E568B5 /* [firebase_crashlytics] Crashlytics Upload Symbols */,
); );
buildRules = ( buildRules = (
); );
@ -156,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1240; LastUpgradeCheck = 1300;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
@ -268,6 +272,26 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
8B6BAB971734FC2758E568B5 /* [firebase_crashlytics] Crashlytics Upload Symbols */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}\"",
"\"$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)\"",
);
name = "[firebase_crashlytics] Crashlytics Upload Symbols";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$PODS_ROOT/FirebaseCrashlytics/upload-symbols\" --flutter-project \"$PROJECT_DIR/firebase_app_id_file.json\" ";
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -291,6 +315,7 @@
files = ( files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
FE1744D5ADF4D39D2F573FCB /* GoogleService-Info.plist in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -382,6 +407,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp; PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -514,6 +540,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp; PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -538,6 +565,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp; PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

2
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1240" LastUpgradeVersion = "1300"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

BIN
ios/Runner/.DS_Store

Binary file not shown.

4
ios/Runner/AppDelegate.swift

@ -1,5 +1,7 @@
import UIKit import UIKit
import Flutter import Flutter
import Firebase
import GoogleMaps
@UIApplicationMain @UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
@ -7,6 +9,8 @@ import Flutter
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
FirebaseApp.configure()
GMSServices.provideAPIKey("AIzaSyB3gbhILEzrSCFpxE509PnEb7slCkBfBQI")
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }

13
ios/Runner/Base.lproj/Main.storyboard

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Flutter View Controller--> <!--Flutter View Controller-->
@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="-26" y="-44"/>
</scene> </scene>
</scenes> </scenes>
</document> </document>

18
ios/Runner/GoogleService-Info.plist

@ -3,23 +3,23 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CLIENT_ID</key> <key>CLIENT_ID</key>
<string>280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com</string> <string>675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key> <key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string> <string>com.googleusercontent.apps.675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg</string>
<key>ANDROID_CLIENT_ID</key> <key>ANDROID_CLIENT_ID</key>
<string>280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com</string> <string>675860686596-in4piqob6d8nj42nguh06abpdrrhai0f.apps.googleusercontent.com</string>
<key>API_KEY</key> <key>API_KEY</key>
<string>AIzaSyCBDtZO2_Z5JjrNj1TocK6YAlk_wDbzZHs</string> <string>AIzaSyDBcm0Bpx8tucyVx3Cwe48ehqcWGPWThzI</string>
<key>GCM_SENDER_ID</key> <key>GCM_SENDER_ID</key>
<string>280510379185</string> <string>675860686596</string>
<key>PLIST_VERSION</key> <key>PLIST_VERSION</key>
<string>1</string> <string>1</string>
<key>BUNDLE_ID</key> <key>BUNDLE_ID</key>
<string>com.tesoapp</string> <string>com.tesoapp</string>
<key>PROJECT_ID</key> <key>PROJECT_ID</key>
<string>teso-ghana</string> <string>teso-test-6fc81</string>
<key>STORAGE_BUCKET</key> <key>STORAGE_BUCKET</key>
<string>teso-ghana.appspot.com</string> <string>teso-test-6fc81.appspot.com</string>
<key>IS_ADS_ENABLED</key> <key>IS_ADS_ENABLED</key>
<false></false> <false></false>
<key>IS_ANALYTICS_ENABLED</key> <key>IS_ANALYTICS_ENABLED</key>
@ -31,8 +31,6 @@
<key>IS_SIGNIN_ENABLED</key> <key>IS_SIGNIN_ENABLED</key>
<true></true> <true></true>
<key>GOOGLE_APP_ID</key> <key>GOOGLE_APP_ID</key>
<string>1:280510379185:ios:52af12a619d5443119de90</string> <string>1:675860686596:ios:41d840f75d89875ccd9251</string>
<key>DATABASE_URL</key>
<string>https://teso-ghana-default-rtdb.firebaseio.com</string>
</dict> </dict>
</plist> </plist>

58
ios/Runner/Info.plist

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BGTaskSchedulerPermittedIdentifiers</key> <key>BGTaskSchedulerPermittedIdentifiers</key>
<array> <array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array> </array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
@ -32,38 +34,34 @@
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string> <string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string>
<string>com.googleusercontent.apps.675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg</string>
<string>fb1759156777594606</string> <string>fb1759156777594606</string>
</array> </array>
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>FUAllFilesUploadedMessage</key>
<string>Posts successfully published on Teso</string>
<key>FUMaximumConnectionsPerHost</key>
<integer>5</integer>
<key>FUMaximumUploadOperation</key>
<integer>5</integer>
<key>FUTimeoutInSeconds</key>
<integer>3600</integer>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>
<array> <array>
<string>fbapi</string> <string>https</string>
<string>fbapi20130214</string> <string>http</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbapi20160328</string>
<string>fbauth</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array> </array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true /> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true /> <true/>
<key>NSAllowsArbitraryLoadsInWebContent</key> <key>NSAllowsArbitraryLoadsInWebContent</key>
<true /> <true/>
</dict> </dict>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>This app needs camera access to scan QR codes and capture photos</string> <string>This app needs camera access to scan QR codes and capture photos</string>
@ -104,24 +102,8 @@
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false /> <false/>
<key>io.flutter.embedded_views_preview</key> <key>io.flutter.embedded_views_preview</key>
<true /> <true/>
<!-- changes this number to configure the maximum number of concurrent tasks --> </dict>
<key>FUMaximumConnectionsPerHost</key>
<integer>5</integer>
<!-- changes this number to configure the maximum number of concurrent tasks -->
<key>FUMaximumUploadOperation</key>
<integer>5</integer>
<!-- changes this number to configure the request timeout -->
<key>FUTimeoutInSeconds</key>
<integer>3600</integer>
<key>FUAllFilesUploadedMessage</key>
<string>Posts successfully published on Teso</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
</array>
</dict>
</plist> </plist>

38
ios/Runner/ProdGoogleService-Info.plist

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string>
<key>ANDROID_CLIENT_ID</key>
<string>280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyCBDtZO2_Z5JjrNj1TocK6YAlk_wDbzZHs</string>
<key>GCM_SENDER_ID</key>
<string>280510379185</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.tesoapp</string>
<key>PROJECT_ID</key>
<string>teso-ghana</string>
<key>STORAGE_BUCKET</key>
<string>teso-ghana.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:280510379185:ios:52af12a619d5443119de90</string>
<key>DATABASE_URL</key>
<string>https://teso-ghana-default-rtdb.firebaseio.com</string>
</dict>
</plist>

7
ios/firebase_app_id_file.json

@ -0,0 +1,7 @@
{
"file_generated_by": "FlutterFire CLI",
"purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
"GOOGLE_APP_ID": "1:675860686596:ios:41d840f75d89875ccd9251",
"FIREBASE_PROJECT_ID": "teso-test-6fc81",
"GCM_SENDER_ID": "675860686596"
}

8
lib/Classes/API Clasess/BusinessProfile.dart

@ -4,10 +4,10 @@ import 'package:teso/Classes/API%20Clasess/Product.dart';
import '../TesoUser.dart'; import '../TesoUser.dart';
class BusinessProfileClass { class BusinessProfileClass {
List<Product> products; List<Product>? products;
List<CouponDetails> coupons; List<CouponDetails>? coupons;
List<TesoUser> subscribers; List<TesoUser>? subscribers;
bool subscribed; bool? subscribed;
BusinessProfileClass({ BusinessProfileClass({
this.coupons, this.coupons,

6
lib/Classes/API Clasess/CampAd.dart

@ -1,7 +1,7 @@
class CampAd { class CampAd {
String postId; String? postId;
String campaignId; String? campaignId;
bool approved; bool? approved;
CampAd({ CampAd({
this.approved, this.approved,

16
lib/Classes/API Clasess/Campaign.dart

@ -1,12 +1,12 @@
class Campaign { class Campaign {
String campaignID; String? campaignID;
String description; String? description;
String businessID; String? businessID;
String status; String? status;
String title; String? title;
DateTime startDate; DateTime? startDate;
String targetProduct; String? targetProduct;
int rewards; int? rewards;
Campaign({ Campaign({
this.businessID, this.businessID,

10
lib/Classes/API Clasess/CommentsPost.dart

@ -1,9 +1,9 @@
class CommentsPost { class CommentsPost {
String postId; String? postId;
String commentId; String? commentId;
String comment; String? comment;
String timestamp; String? timestamp;
String commenterId; String? commenterId;
CommentsPost({ CommentsPost({
this.postId, this.postId,

32
lib/Classes/API Clasess/CouponDetails.dart

@ -2,20 +2,20 @@ import 'TesoBusinessDetail.dart';
import 'Product.dart'; import 'Product.dart';
class CouponDetails { class CouponDetails {
String couponId; String? couponId;
String businessId; String? businessId;
Product targetProduct; Product? targetProduct;
String type; String? type;
int quantity; int? quantity;
DateTime expiration; DateTime? expiration;
double worth; double? worth;
String state; String? state;
TesoBusinessDetail issuer; TesoBusinessDetail? issuer;
double productCost; double? productCost;
double lowerLimit; double? lowerLimit;
double upperLimit; double? upperLimit;
String countID; String? countID;
String condition; String? condition;
CouponDetails( CouponDetails(
{this.businessId, {this.businessId,
@ -54,7 +54,7 @@ class CouponDetails {
condition: json['condition'].toString()); condition: json['condition'].toString());
} catch (e) { } catch (e) {
print(e); print(e);
return null; return CouponDetails();
} }
} }
@ -83,7 +83,7 @@ class CouponDetails {
data['businessId'] = this.businessId; data['businessId'] = this.businessId;
data['couponId'] = this.couponId; data['couponId'] = this.couponId;
data['target'] = this.targetProduct; data['target'] = this.targetProduct;
data['expiration'] = this.expiration.toIso8601String(); data['expiration'] = this.expiration!.toIso8601String();
data['issuer'] = this.issuer; data['issuer'] = this.issuer;
data['productCost'] = this.productCost.toString(); data['productCost'] = this.productCost.toString();
data['quantity'] = this.quantity; data['quantity'] = this.quantity;

24
lib/Classes/API Clasess/CouponHead.dart

@ -1,14 +1,14 @@
class CouponsHead { class CouponsHead {
String couponId; String? couponId;
String businessId; String? businessId;
String targetProduct; String? targetProduct;
String type; String? type;
int quantity; int? quantity;
DateTime expiration; DateTime? expiration;
double lower; double? lower;
double upper; double? upper;
String state; String? state;
DateTime generated; DateTime? generated;
CouponsHead( CouponsHead(
{this.businessId, {this.businessId,
@ -38,9 +38,9 @@ class CouponsHead {
final Map<dynamic, dynamic> data = Map<dynamic, dynamic>(); final Map<dynamic, dynamic> data = Map<dynamic, dynamic>();
data['businessID'] = this.businessId; data['businessID'] = this.businessId;
data['couponID'] = this.couponId; data['couponID'] = this.couponId;
data['expiration'] = this.expiration.toIso8601String(); data['expiration'] = this.expiration!.toIso8601String();
data['generated'] = this.generated != null data['generated'] = this.generated != null
? this.generated.toIso8601String() ? this.generated!.toIso8601String()
: DateTime.now().toIso8601String(); : DateTime.now().toIso8601String();
data['quantity'] = this.quantity; data['quantity'] = this.quantity;
data['state'] = this.state; data['state'] = this.state;

12
lib/Classes/API Clasess/Desire.dart

@ -1,10 +1,10 @@
class Desire { class Desire {
String productName; String? productName;
String productID; String? productID;
String productImage; String? productImage;
String enlisted; String? enlisted;
double price; double? price;
String category; String? category;
Desire( Desire(
{this.productName, {this.productName,

4
lib/Classes/API Clasess/ExploreObject.dart

@ -1,8 +1,8 @@
import 'package:teso/Classes/API%20Clasess/Product.dart'; import 'package:teso/Classes/API%20Clasess/Product.dart';
class ExploreClass { class ExploreClass {
List<Product> trending; List<Product>? trending;
List<Product> latest; List<Product>? latest;
ExploreClass({ ExploreClass({
this.trending, this.trending,

20
lib/Classes/API Clasess/FacebookUser.dart

@ -1,14 +1,14 @@
class FacebookUser { class FacebookUser {
String firstname; String? firstname;
String surname; String? surname;
String email; String? email;
String gender; String? gender;
String username; String? username;
String userGUID; String? userGUID;
String country; String? country;
String pictureUri; String? pictureUri;
String deviceToken; String? deviceToken;
String referralCode; String? referralCode;
FacebookUser( FacebookUser(
{this.firstname, {this.firstname,

20
lib/Classes/API Clasess/GoogleUser.dart

@ -1,14 +1,14 @@
class GoogleUser { class GoogleUser {
String firstname; String? firstname;
String surname; String? surname;
String email; String? email;
String gender; String? gender;
String username; String? username;
String userGUID; String? userGUID;
String country; String? country;
String pictureUri; String? pictureUri;
String deviceToken; String? deviceToken;
String referralCode; String? referralCode;
GoogleUser({ GoogleUser({
this.firstname, this.firstname,

18
lib/Classes/API Clasess/Post.dart

@ -1,12 +1,12 @@
class Post { class Post {
String postID; String? postID;
DateTime timestamp; DateTime? timestamp;
String playbackID; String? playbackID;
String publisherID; String? publisherID;
String title; String? title;
String assetID; String? assetID;
String aspect; String? aspect;
String rendition; String? rendition;
Post({ Post({
this.postID, this.postID,
@ -36,7 +36,7 @@ class Post {
data['postId'] = this.postID; data['postId'] = this.postID;
data['playbackID'] = this.playbackID; data['playbackID'] = this.playbackID;
data['title'] = this.title; data['title'] = this.title;
data['timestamp'] = this.timestamp.toIso8601String(); data['timestamp'] = this.timestamp!.toIso8601String();
data['assetID'] = this.assetID; data['assetID'] = this.assetID;
data['aspect'] = this.aspect; data['aspect'] = this.aspect;
data['rendition'] = this.rendition; data['rendition'] = this.rendition;

8
lib/Classes/API Clasess/PostFav.dart

@ -1,8 +1,8 @@
class PostFav { class PostFav {
String postId; String? postId;
String admirerId; String? admirerId;
String timestamp; String? timestamp;
String countId; String? countId;
PostFav({ PostFav({
this.postId, this.postId,

10
lib/Classes/API Clasess/PostUpload.dart

@ -1,9 +1,9 @@
class PostUpload { class PostUpload {
String title; String? title;
String thumbnail; String? thumbnail;
String aspect; String? aspect;
String campaignID; String? campaignID;
String path; String? path;
PostUpload({ PostUpload({
this.title, this.title,

14
lib/Classes/API Clasess/PostedAd.dart

@ -5,18 +5,18 @@ import 'package:teso/Classes/API%20Clasess/PostFav.dart';
import 'package:teso/Classes/TesoUser.dart'; import 'package:teso/Classes/TesoUser.dart';
class PostedAd { class PostedAd {
Post post; Post? post;
List<PostFav> likes; List<PostFav>? likes;
List<CommentsPost> comments; List<CommentsPost>? comments;
bool campaignAd; bool? campaignAd;
CampAd campAdvert; CampAd? campAdvert;
TesoUser publisher; TesoUser? publisher;
PostedAd({ PostedAd({
this.post, this.post,
this.likes, this.likes,
this.comments, this.comments,
List<TesoUser> friends, List<TesoUser>? friends,
this.campaignAd, this.campaignAd,
this.campAdvert, this.campAdvert,
this.publisher, this.publisher,

4
lib/Classes/API Clasess/PostionAP.dart

@ -1,6 +1,6 @@
class Position1 { class Position1 {
double latitude; double? latitude;
double longitude; double? longitude;
Position1({ Position1({
this.latitude, this.latitude,

14
lib/Classes/API Clasess/Product.dart

@ -1,11 +1,11 @@
class Product { class Product {
String productName; String? productName;
String businessID; String? businessID;
String productDesc; String? productDesc;
String productID; String? productID;
String categoryID; String? categoryID;
double unitPrice; double? unitPrice;
String productImage; String? productImage;
Product( Product(
{this.businessID, {this.businessID,

28
lib/Classes/API Clasess/ProximityCoupon.dart

@ -1,20 +1,20 @@
import 'TesoBusinessDetail.dart'; import 'TesoBusinessDetail.dart';
class ProximityCoupon { class ProximityCoupon {
String couponId; String? couponId;
TesoBusinessDetail business; TesoBusinessDetail? business;
String targetName; String? targetName;
String targetID; String? targetID;
String targetImage; String? targetImage;
double targetCost; double? targetCost;
String tagretDescription; String? tagretDescription;
String type; String? type;
int quantity; int? quantity;
DateTime expiration; DateTime? expiration;
double lowerLimit; double? lowerLimit;
double upperLimit; double? upperLimit;
String state; String? state;
String condition; String? condition;
ProximityCoupon({ ProximityCoupon({
this.business, this.business,

6
lib/Classes/API Clasess/ReferralClass.dart

@ -1,7 +1,7 @@
class ReferralClass { class ReferralClass {
String referrer; String? referrer;
String referred; String? referred;
bool reward; bool? reward;
ReferralClass({ ReferralClass({
this.referred, this.referred,

6
lib/Classes/API Clasess/Registrar.dart

@ -2,9 +2,9 @@ import 'package:teso/Classes/API%20Clasess/TesoUserDetail.dart';
import 'package:teso/Classes/API%20Clasess/UserAuth.dart'; import 'package:teso/Classes/API%20Clasess/UserAuth.dart';
class Registrar { class Registrar {
UserAuth authentication; UserAuth? authentication;
TesoUserDetail user; TesoUserDetail? user;
String referral; String? referral;
Registrar({ Registrar({
this.authentication, this.authentication,
this.user, this.user,

6
lib/Classes/API Clasess/ResetClass.dart

@ -1,7 +1,7 @@
class ResetClass { class ResetClass {
String password; String? password;
String resetGuid; String? resetGuid;
String resetcode; String? resetcode;
ResetClass({ ResetClass({
this.password, this.password,

6
lib/Classes/API Clasess/SilverPurchaseRequest.dart

@ -1,7 +1,7 @@
class SilverPurchaseRequest { class SilverPurchaseRequest {
int coinamount; int? coinamount;
String method; String? method;
double amount; double? amount;
SilverPurchaseRequest({ SilverPurchaseRequest({
this.coinamount, this.coinamount,

28
lib/Classes/API Clasess/TesoBusinessDetail.dart

@ -1,17 +1,17 @@
class TesoBusinessDetail { class TesoBusinessDetail {
String businessId; String? businessId;
String handle; String? handle;
String businessName; String? businessName;
String businessTin; String? businessTin;
String businessDescription; String? businessDescription;
String businessCategory; String? businessCategory;
String businessAddress; String? businessAddress;
String businessContact; String? businessContact;
String businessLogo; String? businessLogo;
DateTime dateOfEst; DateTime? dateOfEst;
String businessEmail; String? businessEmail;
String businessLat; String? businessLat;
String businessLng; String? businessLng;
TesoBusinessDetail( TesoBusinessDetail(
{this.businessId, {this.businessId,
@ -56,7 +56,7 @@ class TesoBusinessDetail {
data['businessLogo'] = this.businessLogo; data['businessLogo'] = this.businessLogo;
data['businessName'] = this.businessName; data['businessName'] = this.businessName;
data['businessTin'] = this.businessTin; data['businessTin'] = this.businessTin;
data['dateOfEst'] = this.dateOfEst.toIso8601String(); data['dateOfEst'] = this.dateOfEst!.toIso8601String();
data['handle'] = this.handle; data['handle'] = this.handle;
return data; return data;
} }

26
lib/Classes/API Clasess/TesoUserDetail.dart

@ -1,18 +1,18 @@
import 'package:teso/Classes/TesoUser.dart'; import 'package:teso/Classes/TesoUser.dart';
class TesoUserDetail { class TesoUserDetail {
String userGUID; String? userGUID;
String username; String? username;
String firstname; String? firstname;
String surname; String? surname;
String description; String? description;
String address; String? address;
String email; String? email;
String thumbnailDp; String? thumbnailDp;
String phonenumber; String? phonenumber;
String country; String? country;
String gender; String? gender;
DateTime dateOfBirth; DateTime? dateOfBirth;
TesoUserDetail( TesoUserDetail(
{this.username, {this.username,
@ -65,7 +65,7 @@ class TesoUserDetail {
data['description'] = this.description; data['description'] = this.description;
data['address'] = this.address; data['address'] = this.address;
data['phonenumber'] = this.phonenumber; data['phonenumber'] = this.phonenumber;
data['dateOfBirth'] = this.dateOfBirth.toIso8601String(); data['dateOfBirth'] = this.dateOfBirth!.toIso8601String();
data['thumbnailDp'] = this.thumbnailDp; data['thumbnailDp'] = this.thumbnailDp;
data['email'] = this.email; data['email'] = this.email;
data['gender'] = this.gender; data['gender'] = this.gender;

16
lib/Classes/API Clasess/ThirdPerson.dart

@ -1,12 +1,14 @@
// ignore_for_file: unnecessary_null_comparison
import 'package:teso/Classes/TesoUser.dart'; import 'package:teso/Classes/TesoUser.dart';
import 'Post.dart'; import 'Post.dart';
class ThirdPerson { class ThirdPerson {
TesoUser user; TesoUser? user;
List<Post> posts = <Post>[]; List<Post>? posts = <Post>[];
List following = []; List? following = [];
List friends = []; List? friends = [];
String relation; String? relation;
ThirdPerson({ ThirdPerson({
this.user, this.user,
@ -22,8 +24,8 @@ class ThirdPerson {
return ThirdPerson( return ThirdPerson(
user: json["user"] != null ? TesoUser.fromJSON(json["user"]) : null, user: json["user"] != null ? TesoUser.fromJSON(json["user"]) : null,
posts: adverts != null ? adverts : <Post>[], posts: adverts != null ? adverts : <Post>[],
following: json["following"] as List, following: json["following"] as List?,
friends: json["friends"] as List, friends: json["friends"] as List?,
relation: json["relation"], relation: json["relation"],
); );
} }

6
lib/Classes/API Clasess/TokenHandler.dart

@ -1,9 +1,9 @@
import 'package:teso/Classes/TesoUser.dart'; import 'package:teso/Classes/TesoUser.dart';
class TokenHandler { class TokenHandler {
String tokenTeso; String? tokenTeso;
String tokenFirebase; String? tokenFirebase;
TesoUser user; TesoUser? user;
TokenHandler({this.tokenTeso, this.user, this.tokenFirebase}); TokenHandler({this.tokenTeso, this.user, this.tokenFirebase});

20
lib/Classes/API Clasess/TwitterUser.dart

@ -1,14 +1,14 @@
class TwitterUser { class TwitterUser {
String firstname; String? firstname;
String surname; String? surname;
String email; String? email;
String gender; String? gender;
String username; String? username;
String userGUID; String? userGUID;
String country; String? country;
String pictureUri; String? pictureUri;
String deviceToken; String? deviceToken;
String referralCode; String? referralCode;
TwitterUser( TwitterUser(
{this.firstname, {this.firstname,

12
lib/Classes/API Clasess/UserAuth.dart

@ -1,10 +1,10 @@
class UserAuth { class UserAuth {
String username; String? username;
String password; String? password;
String accountType; String? accountType;
String status; String? status;
String deviceToken; String? deviceToken;
String referralCode; String? referralCode;
UserAuth({ UserAuth({
this.username, this.username,
this.password, this.password,

6
lib/Classes/API Clasess/UserFavCategory.dart

@ -1,7 +1,7 @@
class UserFavCategory { class UserFavCategory {
String userGuid; String? userGuid;
String categoryCode; String? categoryCode;
String countID; String? countID;
UserFavCategory({ UserFavCategory({
this.userGuid, this.userGuid,

6
lib/Classes/API Clasess/UserFinance.dart

@ -1,7 +1,7 @@
class UserFinance { class UserFinance {
String userGUID; String? userGUID;
int gold; int? gold;
int silver; int? silver;
UserFinance({ UserFinance({
this.userGUID, this.userGUID,

10
lib/Classes/ChatMessage.dart

@ -1,9 +1,9 @@
class ChatMessage { class ChatMessage {
String idFrom; String? idFrom;
String idTo; String? idTo;
String content; String? content;
int type; int? type;
DateTime timestamp; DateTime? timestamp;
ChatMessage({ ChatMessage({
this.idFrom, this.idFrom,

4
lib/Classes/ColorFilters.dart

@ -1,8 +1,8 @@
import 'package:flutter/painting.dart'; import 'package:flutter/painting.dart';
class ColorFilter { class ColorFilter {
Color code; Color? code;
String name; String? name;
ColorFilter({ ColorFilter({
this.code, this.code,
this.name, this.name,

2
lib/Classes/Connection.dart

@ -31,7 +31,7 @@ class MyConnectivity {
SharedPreferences prefs = await SharedPreferences.getInstance(); SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = { Map<String, String> requestHeaders = {
// 'Content-type': 'application/json', // 'Content-type': 'application/json',
'Authorization': prefs.getString("tokensTeso") 'Authorization': prefs.getString("tokensTeso")!
}; };
var register2 = serverLocation + 'serverstatus'; var register2 = serverLocation + 'serverstatus';
var client1 = await http var client1 = await http

14
lib/Classes/Firebase/Comments.dart

@ -1,11 +1,11 @@
class FBComments { class FBComments {
String postID; String? postID;
DateTime timestamp; DateTime? timestamp;
String thumbnail; String? thumbnail;
String commenterID; String? commenterID;
String commenter; String? commenter;
String commentID; String? commentID;
String comment; String? comment;
FBComments( FBComments(
{this.postID, {this.postID,

22
lib/Classes/Firebase/Posts.dart

@ -1,15 +1,15 @@
class FBPosts { class FBPosts {
String postID; String? postID;
DateTime timestamp; DateTime? timestamp;
String playbackID; String? playbackID;
String publisherID; String? publisherID;
String title; String? title;
String assetID; String? assetID;
String rendition; String? rendition;
String aspect; String? aspect;
String campaignID; String? campaignID;
int likes; int? likes;
int comments; int? comments;
FBPosts( FBPosts(
{this.postID, {this.postID,

18
lib/Classes/NotificationSpliter.dart

@ -14,40 +14,31 @@ class NotificationSplitter {
payload.load2 = data["firstname"]; payload.load2 = data["firstname"];
payload.load3 = data["surname"]; payload.load3 = data["surname"];
return payload; return payload;
break;
case "likes": case "likes":
Provider.of<UserProvider>(context, listen: false).pullAds();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["post"]; payload.load1 = data["post"];
return payload; return payload;
break;
case "comments": case "comments":
Provider.of<UserProvider>(context, listen: false).pullAds();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["post"]; payload.load1 = data["post"];
return payload; return payload;
break;
case "friendapproval": case "friendapproval":
Provider.of<UserProvider>(context, listen: false).loadFriends(); Provider.of<UserProvider>(context, listen: false).loadFriends();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
return payload; return payload;
break;
case "friendrequest": case "friendrequest":
payload.loadID = "TESN000"; payload.loadID = "TESN000";
return payload; return payload;
break;
case "gifted": case "gifted":
Provider.of<UserProvider>(context, listen: false).getCoupons(); Provider.of<UserProvider>(context, listen: false).getCoupons();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["couponID"]; payload.load1 = data["couponID"];
return payload; return payload;
break;
case "cancellation": case "cancellation":
Provider.of<UserProvider>(context, listen: false).getCoupons(); Provider.of<UserProvider>(context, listen: false).getCoupons();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["couponID"]; payload.load1 = data["couponID"];
return payload; return payload;
break;
case "personalized": case "personalized":
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["coupon"]; payload.load1 = data["coupon"];
@ -58,7 +49,6 @@ class NotificationSplitter {
payload.load6 = data["originalPrice"]; payload.load6 = data["originalPrice"];
payload.load7 = data["productName"]; payload.load7 = data["productName"];
return payload; return payload;
break;
case "campaign": case "campaign":
var coup = jsonDecode(data["campaign"]); var coup = jsonDecode(data["campaign"]);
payload.loadID = "TESN005"; payload.loadID = "TESN005";
@ -71,33 +61,27 @@ class NotificationSplitter {
payload.load7 = coup["goldReward"].toString(); payload.load7 = coup["goldReward"].toString();
payload.load8 = coup["startDate"].toString(); payload.load8 = coup["startDate"].toString();
return payload; return payload;
break;
case "reward": case "reward":
payload.loadID = "TESN0R0"; payload.loadID = "TESN0R0";
return payload; return payload;
break;
case "expired": case "expired":
Provider.of<UserProvider>(context, listen: false).getCoupons(); Provider.of<UserProvider>(context, listen: false).getCoupons();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["couponID"]; payload.load1 = data["couponID"];
return payload; return payload;
break;
case "refund": case "refund":
Provider.of<UserProvider>(context, listen: false).getUserInformation(); Provider.of<UserProvider>(context, listen: false).getUserInformation();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["couponID"]; payload.load1 = data["couponID"];
return payload; return payload;
break;
case "coinpurchase": case "coinpurchase":
Provider.of<UserProvider>(context, listen: false).getUserInformation(); Provider.of<UserProvider>(context, listen: false).getUserInformation();
payload.loadID = "TESN000"; payload.loadID = "TESN000";
payload.load1 = data["orderID"]; payload.load1 = data["orderID"];
await closeWebView(); await closeInAppWebView();
return payload; return payload;
break;
default: default:
return payload; return payload;
break;
} }
} }
} }

22
lib/Classes/Payload.dart

@ -1,15 +1,15 @@
class Payload { class Payload {
String loadID; String? loadID;
String load1; String? load1;
String load2; String? load2;
String load3; String? load3;
String load4; String? load4;
String load5; String? load5;
String load6; String? load6;
String load7; String? load7;
String load8; String? load8;
String load9; String? load9;
String load10; String? load10;
Payload({ Payload({
this.load1, this.load1,

16
lib/Classes/Product.dart

@ -1,12 +1,12 @@
class Product { class Product {
String itemID; String? itemID;
String name; String? name;
String shopName; String? shopName;
String shopLocation; String? shopLocation;
String country; String? country;
String duration; String? duration;
String adShort; String? adShort;
String adFull; String? adFull;
Product( Product(
{this.itemID, {this.itemID,

6
lib/Classes/QRClass.dart

@ -1,7 +1,7 @@
class QRClass { class QRClass {
String code; String? code;
String type; String? type;
List rawBytes; List? rawBytes;
QRClass({ QRClass({
this.code, this.code,

10
lib/Classes/ReportedContent.dart

@ -1,11 +1,11 @@
import 'dart:core'; import 'dart:core';
class ReportedContent { class ReportedContent {
String userGuid; String? userGuid;
String postID; String? postID;
String publisherID; String? publisherID;
DateTime timestamp; DateTime? timestamp;
int report; int? report;
ReportedContent( ReportedContent(
{this.postID, {this.postID,

26
lib/Classes/TesoShop.dart

@ -1,17 +1,17 @@
class TesoShop { class TesoShop {
String shopID; String? shopID;
String shopName; String? shopName;
String shopTin; String? shopTin;
String shopAddress; String? shopAddress;
double latitude; double? latitude;
double longitude; double? longitude;
String shopPhone; String? shopPhone;
DateTime dateEst; DateTime? dateEst;
String handle; String? handle;
String categoryShop; String? categoryShop;
String shopDescription; String? shopDescription;
String logo; String? logo;
String email; String? email;
TesoShop( TesoShop(
{this.shopID, {this.shopID,

34
lib/Classes/TesoUser.dart

@ -1,23 +1,23 @@
import 'API Clasess/TesoUserDetail.dart'; import 'API Clasess/TesoUserDetail.dart';
class TesoUser { class TesoUser {
String userGUID; String? userGUID;
String username; String? username;
String firstname; String? firstname;
String lastname; String? lastname;
String description; String? description;
String email; String? email;
String phonenumber; String? phonenumber;
String address; String? address;
String displaypicture; String? displaypicture;
DateTime dateOfBirth; DateTime? dateOfBirth;
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
String thumbnail_dp; String? thumbnail_dp;
String gold; String? gold;
String silver; String? silver;
String friends; String? friends;
String gender; String? gender;
String country; String? country;
TesoUser( TesoUser(
{this.userGUID, {this.userGUID,
@ -66,7 +66,7 @@ class TesoUser {
data['lastname'] = this.lastname; data['lastname'] = this.lastname;
data['description'] = this.description; data['description'] = this.description;
data['address'] = this.address; data['address'] = this.address;
data["dateOfBirth"] = this.dateOfBirth.toIso8601String(); data["dateOfBirth"] = this.dateOfBirth!.toIso8601String();
data['phonenumber'] = this.phonenumber; data['phonenumber'] = this.phonenumber;
data['thumbnail_dp'] = this.thumbnail_dp; data['thumbnail_dp'] = this.thumbnail_dp;
data['email'] = this.email; data['email'] = this.email;

7
lib/Classes/TextE.dart

@ -1,10 +1,9 @@
import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class Textted { class Textted {
String text; String? text;
TextStyle textStyle; TextStyle? textStyle;
TextAlign textAlign; TextAlign? textAlign;
Textted({ Textted({
this.text, this.text,

31
lib/Classes/Uploading.dart

@ -1,31 +0,0 @@
import 'package:flutter_upchunk/flutter_upchunk.dart';
class Uploading {
String id;
String title;
String path;
String aspect;
String thumbnail;
UpChunk token;
double pending;
String campaignID;
String muxuploadID;
String muxuploadURL;
String muxassetID;
bool isProcessing;
Uploading({
this.id,
this.title,
this.path,
this.aspect,
this.thumbnail,
this.token,
this.pending,
this.campaignID,
this.isProcessing,
this.muxuploadID,
this.muxuploadURL,
this.muxassetID,
});
}

6
lib/Classes/categories.dart

@ -1,7 +1,7 @@
class Category { class Category {
String id; String? id;
String name; String? name;
String image; String? image;
Category({this.id, this.name, this.image}); Category({this.id, this.name, this.image});
Category.fromJson(Map<String, dynamic> json) Category.fromJson(Map<String, dynamic> json)
: id = json['catid'], : id = json['catid'],

15
lib/Classes/customLoginButton.dart

@ -1,17 +1,16 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomLoginButton extends StatelessWidget { class CustomLoginButton extends StatelessWidget {
final Widget child; final Widget child;
final double width; final double width;
final double height; final double height;
final Function onPressed; final Function? onPressed;
final String icon; final String? icon;
final Color color; final Color? color;
const CustomLoginButton({ const CustomLoginButton({
Key key, Key? key,
@required this.child, required this.child,
this.width = double.infinity, this.width = double.infinity,
this.height = 50.0, this.height = 50.0,
this.onPressed, this.onPressed,
@ -68,12 +67,12 @@ class CustomLoginButton extends StatelessWidget {
), ),
), ),
child: InkWell( child: InkWell(
onTap: onPressed, onTap: onPressed as void Function()?,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Image( Image(
image: AssetImage(icon), image: AssetImage(icon!),
height: 20, height: 20,
), ),
child child

13
lib/Classes/customTesoButton.dart

@ -1,16 +1,15 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RaisedGradientButton extends StatelessWidget { class RaisedGradientButton extends StatelessWidget {
final Widget child; final Widget child;
final Gradient gradient; final Gradient? gradient;
final double width; final double width;
final double height; final double height;
final Function onPressed; final Function? onPressed;
const RaisedGradientButton({ const RaisedGradientButton({
Key key, Key? key,
@required this.child, required this.child,
this.gradient, this.gradient,
this.width = double.infinity, this.width = double.infinity,
this.height = 50.0, this.height = 50.0,
@ -31,7 +30,7 @@ class RaisedGradientButton extends StatelessWidget {
height: 40.0, height: 40.0,
decoration: BoxDecoration(gradient: gradient, boxShadow: [ decoration: BoxDecoration(gradient: gradient, boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey[500], color: Colors.grey[500]!,
offset: Offset(0.0, 1.5), offset: Offset(0.0, 1.5),
blurRadius: 1.5, blurRadius: 1.5,
), ),
@ -44,7 +43,7 @@ class RaisedGradientButton extends StatelessWidget {
), ),
color: Colors.transparent, color: Colors.transparent,
child: InkWell( child: InkWell(
onTap: onPressed, onTap: onPressed as void Function()?,
child: Center( child: Center(
child: child, child: child,
)), )),

18
lib/Classes/friend.dart

@ -1,13 +1,13 @@
class Friend { class Friend {
String userID; String? userID;
String firstname; String? firstname;
String surname; String? surname;
String dateOfBirth; String? dateOfBirth;
String thumbnail; String? thumbnail;
String description; String? description;
String posts; String? posts;
String following; String? following;
String friendsNum; String? friendsNum;
Friend( Friend(
{this.userID, {this.userID,

18
lib/Classes/inbox.dart

@ -1,13 +1,13 @@
class InboxMessage { class InboxMessage {
String userID; String? userID;
String firstname; String? firstname;
String surname; String? surname;
String messageID; String? messageID;
String message; String? message;
String thumbnail; String? thumbnail;
String bio; String? bio;
DateTime timestamp; DateTime? timestamp;
int unread; int? unread;
InboxMessage( InboxMessage(
{this.userID, {this.userID,

48
lib/GeneralWidgets/widgets/uservideo_player_widget.dart

@ -1,48 +0,0 @@
import 'package:better_player/better_player.dart';
import 'package:flutter/material.dart';
import 'package:teso/Classes/Firebase/Posts.dart';
const ASPECT_RATIO = 16 / 9;
class VideoPlayerWidget extends StatefulWidget {
final BetterPlayerController controller;
final FBPosts ad;
const VideoPlayerWidget({
Key key,
@required this.controller,
@required this.ad,
}) : assert(controller != null),
assert(ad != null),
super(key: key);
@override
_VideoPlayerWidgetState createState() => _VideoPlayerWidgetState();
}
class _VideoPlayerWidgetState extends State<VideoPlayerWidget> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return FittedBox(
clipBehavior: Clip.hardEdge,
child: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: BetterPlayer(
controller: widget.controller,
),
),
);
}
@override
void dispose() {
widget.controller.dispose();
super.dispose();
}
}

104
lib/GeneralWidgets/widgets/video_player_widget.dart

@ -1,104 +0,0 @@
import 'package:better_player/better_player.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:teso/Classes/API%20Clasess/CouponDetails.dart';
import 'package:teso/Classes/API%20Clasess/Post.dart';
import 'package:teso/Pages/Sub_Pages/ProductDetails/CouponList.dart';
import 'package:teso/providers/user_provider.dart';
const ASPECT_RATIO = 16 / 9;
class VideoPlayerWidget extends StatefulWidget {
final BetterPlayerController controller;
final Post ad;
final bool play;
final List<CouponDetails> details;
const VideoPlayerWidget({
Key key,
@required this.controller,
@required this.ad,
@required this.play,
this.details,
}) : assert(controller != null),
assert(ad != null),
super(key: key);
@override
_VideoPlayerWidgetState createState() => _VideoPlayerWidgetState();
}
class _VideoPlayerWidgetState extends State<VideoPlayerWidget> {
bool displayed = false;
@override
void initState() {
widget.controller.videoPlayerController.addListener(() => checkVideo());
super.initState();
// if (widget.play) {
// _chewieController.play();
// }
}
checkVideo() async {
// Implement your calls inside these conditions' bodies :
if (widget.controller.videoPlayerController.value.position ==
Duration(seconds: 0, minutes: 0, hours: 0)) {
// print('video Started');
Provider.of<UserProvider>(context, listen: false).viewPost(widget.ad);
}
if (widget.controller.videoPlayerController.value.position.inSeconds >
(widget.controller.videoPlayerController.value.duration.inSeconds) /
3) {
// print('video Ended');
if (!displayed && widget.details.length > 0) {
setState(() {
displayed = true;
});
await Navigator.of(context).push(
PageRouteBuilder(
opaque: false,
pageBuilder: (_, __, ___) => CouponList(
couponsList: widget.details,
),
),
);
}
// _chewieController.play();
}
}
// @override
// void didUpdateWidget(VideoPlayerWidget oldWidget) {
// if (oldWidget.play != widget.play) {
// if (widget.play) {
// _chewieController.play();
// } else {
// _chewieController.pause();
// }
// }
// super.didUpdateWidget(oldWidget);
// }
@override
Widget build(BuildContext context) {
return FittedBox(
clipBehavior: Clip.hardEdge,
child: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: BetterPlayer(
controller: widget.controller,
),
),
);
}
@override
void dispose() {
widget.controller.dispose();
super.dispose();
}
}

1
lib/GeneralWidgets/widgets/widgets.dart

@ -1 +0,0 @@
export 'video_player_widget.dart';

24
lib/Notifications/NotificationPlugin.dart

@ -8,11 +8,11 @@ import 'package:rxdart/subjects.dart';
class NotificationPlugin { class NotificationPlugin {
// //
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
final BehaviorSubject<ReceivedNotification> final BehaviorSubject<ReceivedNotification>
didReceivedLocalNotificationSubject = didReceivedLocalNotificationSubject =
BehaviorSubject<ReceivedNotification>(); BehaviorSubject<ReceivedNotification>();
var initializationSettings; late var initializationSettings;
NotificationPlugin._() { NotificationPlugin._() {
init(); init();
@ -48,7 +48,7 @@ class NotificationPlugin {
_requestIOSPermission() { _requestIOSPermission() {
flutterLocalNotificationsPlugin flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation< .resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>() IOSFlutterLocalNotificationsPlugin>()!
.requestPermissions( .requestPermissions(
alert: true, alert: true,
badge: true, badge: true,
@ -64,13 +64,13 @@ class NotificationPlugin {
setOnNotificationClick(Function onNotificationClick) async { setOnNotificationClick(Function onNotificationClick) async {
await flutterLocalNotificationsPlugin.initialize(initializationSettings, await flutterLocalNotificationsPlugin.initialize(initializationSettings,
onSelectNotification: (String payload) async { onSelectNotification: (String? payload) async {
onNotificationClick(payload); onNotificationClick(payload);
}); });
} }
Future<void> showNotification( Future<void> showNotification(
String title, String body, String payload) async { String? title, String? body, String payload) async {
var androidChannelSpecifics = AndroidNotificationDetails( var androidChannelSpecifics = AndroidNotificationDetails(
'CHANNEL_ID', 'CHANNEL_ID',
'CHANNEL_NAME', 'CHANNEL_NAME',
@ -258,14 +258,14 @@ NotificationPlugin notificationPlugin = NotificationPlugin._();
class ReceivedNotification { class ReceivedNotification {
final int id; final int id;
final String title; final String? title;
final String body; final String? body;
final String payload; final String? payload;
ReceivedNotification({ ReceivedNotification({
@required this.id, required this.id,
@required this.title, required this.title,
@required this.body, required this.body,
@required this.payload, required this.payload,
}); });
} }

76
lib/Pages/BusinessLocator.dart

@ -23,27 +23,27 @@ class BusinessLocator extends StatefulWidget {
} }
class _BusinessLocatorState extends State<BusinessLocator> { class _BusinessLocatorState extends State<BusinessLocator> {
String mapstyle; String? mapstyle;
var _future; var _future;
static LatLng _initialPosition; static LatLng? _initialPosition;
Set<Marker> markers = {}; Set<Marker> markers = {};
List<TesoShop> shops; List<TesoShop>? shops;
GoogleMapController mapController; GoogleMapController? mapController;
static const double CAMERA_ZOOM = 13.499910354614258; static const double CAMERA_ZOOM = 13.499910354614258;
bool routing = false; bool routing = false;
List<LatLng> polylineCoordinates = []; List<LatLng> polylineCoordinates = [];
Map<PolylineId, Polyline> polylines = {}; Map<PolylineId, Polyline> polylines = {};
String selectedshop = ""; String? selectedshop = "";
Location location = Location(); Location location = Location();
String routingMessage = "Finding shops...."; String routingMessage = "Finding shops....";
LocationData _location; late LocationData _location;
String _error; String? _error;
String _placeDistance; String? _placeDistance;
final startAddressController = TextEditingController(); final startAddressController = TextEditingController();
final destinationAddressController = TextEditingController(); final destinationAddressController = TextEditingController();
bool ios = false; bool ios = false;
Future<LatLng> _determinePosition(context) async { Future<LatLng?> _determinePosition(context) async {
setState(() { setState(() {
_error = null; _error = null;
}); });
@ -51,7 +51,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
final LocationData _locationResult = await location.getLocation(); final LocationData _locationResult = await location.getLocation();
setState(() { setState(() {
_location = _locationResult; _location = _locationResult;
_initialPosition = LatLng(_location.latitude, _location.longitude); _initialPosition = LatLng(_location.latitude!, _location.longitude!);
}); });
await getLocations(); await getLocations();
@ -68,7 +68,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
SharedPreferences prefs = await SharedPreferences.getInstance(); SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = { Map<String, String> requestHeaders = {
'Content-type': 'application/json', 'Content-type': 'application/json',
'Authorization': prefs.getString('tokensTeso') 'Authorization': prefs.getString('tokensTeso')!
}; };
var register2 = serverLocation + 'tesobusiness/available'; var register2 = serverLocation + 'tesobusiness/available';
@ -84,12 +84,12 @@ class _BusinessLocatorState extends State<BusinessLocator> {
} }
} }
if (shops.length > 0 && shops != null) if (shops!.length > 0 && shops != null)
shops.forEach((element) { shops!.forEach((element) {
MarkerId markerId = MarkerId(element.shopID); MarkerId markerId = MarkerId(element.shopID!);
Marker marker = Marker( Marker marker = Marker(
markerId: markerId, markerId: markerId,
position: LatLng(element.latitude, element.longitude), position: LatLng(element.latitude!, element.longitude!),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan), icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan),
infoWindow: InfoWindow( infoWindow: InfoWindow(
title: element.shopName, title: element.shopName,
@ -118,7 +118,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
super.initState(); super.initState();
ios = Platform.isIOS; ios = Platform.isIOS;
SharedPreferences.getInstance().then((prefs) { SharedPreferences.getInstance().then((prefs) {
String currentTheme = prefs.getString("theme"); String? currentTheme = prefs.getString("theme");
if (currentTheme == "light") { if (currentTheme == "light") {
rootBundle.loadString('assets/styles/light.txt').then((string) { rootBundle.loadString('assets/styles/light.txt').then((string) {
mapstyle = string; mapstyle = string;
@ -132,7 +132,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
_future = _determinePosition(context); _future = _determinePosition(context);
location.onLocationChanged.listen((LocationData cLoc) { location.onLocationChanged.listen((LocationData cLoc) {
_initialPosition = LatLng(cLoc.latitude, cLoc.longitude); _initialPosition = LatLng(cLoc.latitude!, cLoc.longitude!);
}); });
} }
@ -140,10 +140,10 @@ class _BusinessLocatorState extends State<BusinessLocator> {
Position _northeastCoordinates; Position _northeastCoordinates;
Position _southwestCoordinates; Position _southwestCoordinates;
MarkerId markerId = MarkerId(tesoShop.shopName + " Location"); MarkerId markerId = MarkerId(tesoShop.shopName! + " Location");
Marker marker = Marker( Marker marker = Marker(
markerId: markerId, markerId: markerId,
position: LatLng(tesoShop.latitude, tesoShop.longitude), position: LatLng(tesoShop.latitude!, tesoShop.longitude!),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen), icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen),
infoWindow: InfoWindow( infoWindow: InfoWindow(
title: tesoShop.shopName, title: tesoShop.shopName,
@ -155,12 +155,12 @@ class _BusinessLocatorState extends State<BusinessLocator> {
markers.clear(); markers.clear();
markers.add(marker); markers.add(marker);
selectedshop = tesoShop.shopName; selectedshop = tesoShop.shopName;
destinationAddressController.text = selectedshop; destinationAddressController.text = selectedshop!;
}); });
Position user = Position( Position user = Position(
latitude: _initialPosition.latitude, latitude: _initialPosition!.latitude,
longitude: _initialPosition.longitude, longitude: _initialPosition!.longitude,
accuracy: 100, accuracy: 100,
altitude: 100, altitude: 100,
heading: 100, heading: 100,
@ -168,8 +168,8 @@ class _BusinessLocatorState extends State<BusinessLocator> {
speedAccuracy: 100, speedAccuracy: 100,
timestamp: DateTime.now()); timestamp: DateTime.now());
Position shopLoc = Position( Position shopLoc = Position(
latitude: tesoShop.latitude, latitude: tesoShop.latitude!,
longitude: tesoShop.longitude, longitude: tesoShop.longitude!,
accuracy: 100, accuracy: 100,
altitude: 100, altitude: 100,
heading: 100, heading: 100,
@ -177,7 +177,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
speedAccuracy: 100, speedAccuracy: 100,
timestamp: DateTime.now()); timestamp: DateTime.now());
if (_initialPosition.latitude <= tesoShop.latitude) { if (_initialPosition!.latitude <= tesoShop.latitude!) {
_southwestCoordinates = user; _southwestCoordinates = user;
_northeastCoordinates = shopLoc; _northeastCoordinates = shopLoc;
} else { } else {
@ -187,7 +187,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
await createPolylines(user, shopLoc); await createPolylines(user, shopLoc);
_calculateDistance(user, shopLoc); _calculateDistance(user, shopLoc);
mapController.animateCamera( mapController!.animateCamera(
CameraUpdate.newLatLngBounds( CameraUpdate.newLatLngBounds(
LatLngBounds( LatLngBounds(
northeast: LatLng( northeast: LatLng(
@ -248,7 +248,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
@override @override
void dispose() { void dispose() {
if (mapController != null) mapController.dispose(); if (mapController != null) mapController!.dispose();
super.dispose(); super.dispose();
} }
@ -329,7 +329,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
myLocationEnabled: true, myLocationEnabled: true,
markers: markers, markers: markers,
initialCameraPosition: CameraPosition( initialCameraPosition: CameraPosition(
target: _initialPosition, target: _initialPosition!,
zoom: CAMERA_ZOOM, zoom: CAMERA_ZOOM,
//bearing: CAMERA_BEARING, //bearing: CAMERA_BEARING,
), ),
@ -377,7 +377,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
), ),
), ),
Visibility( Visibility(
visible: selectedshop == null || selectedshop.isEmpty visible: selectedshop == null || selectedshop!.isEmpty
? false ? false
: true, : true,
child: Align( child: Align(
@ -489,7 +489,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
double _coordinateDistance(lat1, lon1, lat2, lon2) { double _coordinateDistance(lat1, lon1, lat2, lon2) {
var p = 0.017453292519943295; var p = 0.017453292519943295;
var c = cos; var c = cos as double Function(num?);
var a = 0.5 - var a = 0.5 -
c((lat2 - lat1) * p) / 2 + c((lat2 - lat1) * p) / 2 +
c(lat1 * p) * c(lat2 * p) * (1 - c((lon2 - lon1) * p)) / 2; c(lat1 * p) * c(lat2 * p) * (1 - c((lon2 - lon1) * p)) / 2;
@ -522,7 +522,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
// Accommodate the two locations within the // Accommodate the two locations within the
// camera view of the map // camera view of the map
mapController.animateCamera( mapController!.animateCamera(
CameraUpdate.newLatLngBounds( CameraUpdate.newLatLngBounds(
LatLngBounds( LatLngBounds(
northeast: LatLng(northEastLatitude, northEastLongitude), northeast: LatLng(northEastLatitude, northEastLongitude),
@ -569,13 +569,13 @@ class _BusinessLocatorState extends State<BusinessLocator> {
} }
Widget _textField({ Widget _textField({
TextEditingController controller, TextEditingController? controller,
FocusNode focusNode, FocusNode? focusNode,
String label, String? label,
String hint, String? hint,
double width, required double width,
Icon prefixIcon, Icon? prefixIcon,
Widget suffixIcon, Widget? suffixIcon,
}) { }) {
return Container( return Container(
width: width * 0.8, width: width * 0.8,

141
lib/Pages/Campaigns.dart

@ -1,141 +0,0 @@
import 'package:flutter/material.dart';
import 'PageWidgets/Campaigns/header.dart';
import 'package:teso/Classes/API Clasess/Campaign.dart';
import 'PageWidgets/Campaigns/campaignTile.dart';
import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:teso/util/consts.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'dart:async';
class Campaigns extends StatefulWidget {
@override
_CampaignsState createState() => _CampaignsState();
}
class _CampaignsState extends State<Campaigns> {
TextEditingController searchkey;
List<Campaign> campaignMain;
List<Campaign> campaign;
var _future;
void clearText() {
setState(() {
searchkey.clear();
});
}
Future<List<Campaign>> getCampaigns() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = {
'Content-type': 'application/json',
'Authorization': prefs.getString('tokensTeso')
};
var register2 = serverLocation + 'adverts/businesscampaigns';
var client1 = await http.post(Uri.parse(register2),
body: json.encode(searchkey.text), headers: requestHeaders);
if (client1.statusCode == 200) {
var details = jsonDecode(client1.body);
if (mounted)
setState(() {
campaign = List<Campaign>.from(
details.map((model) => Campaign.fromJSON(model)).toList());
});
if (campaignMain == null) {
setState(() {
campaignMain = campaign;
});
}
}
return campaign;
}
@override
void initState() {
super.initState();
searchkey = new TextEditingController();
_future = getCampaigns();
searchkey.addListener(() async {
if (searchkey.text.isNotEmpty) {
getCampaigns();
} else {
setState(() {
campaign = campaignMain;
});
}
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: true,
title: Text("Join a Campaign"),
centerTitle: true,
),
body: Container(
// padding: EdgeInsets.only(
// left: 10,
// right: 10,
// ),
child: Column(
children: [
buildCampaignHead(context, searchkey, clearText),
SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height,
child: FutureBuilder(
future: _future,
builder: (context, snapshot) {
if (snapshot.data == null &&
snapshot.connectionState == ConnectionState.waiting) {
return Container(
child: Center(
child: CupertinoActivityIndicator(
animating: true,
radius: 15,
),
),
);
} else if (snapshot.data == null &&
snapshot.connectionState == ConnectionState.done) {
return Container(
height: MediaQuery.of(context).size.width,
width: MediaQuery.of(context).size.width,
child: Center(
child: Text(
"Sorry there are no open campaigns at the moment"),
),
);
} else {
return ListView.builder(
primary: true,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: campaign.length,
itemBuilder: (context, index) {
return buildCampaign(
context,
campaign.elementAt(index),
);
},
);
}
},
),
),
),
],
),
),
);
}
}

10
lib/Pages/DesireComeTrue.dart

@ -17,8 +17,8 @@ class DesireComeTrue extends StatefulWidget {
class _DesireComeTrueState extends State<DesireComeTrue> class _DesireComeTrueState extends State<DesireComeTrue>
with TickerProviderStateMixin { with TickerProviderStateMixin {
AnimationController _controller; late AnimationController _controller;
Animation<double> _fabScale; late Animation<double> _fabScale;
List<Desire> desires = <Desire>[]; List<Desire> desires = <Desire>[];
@override @override
@ -35,9 +35,9 @@ class _DesireComeTrueState extends State<DesireComeTrue>
}); });
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
var jiffy = Jiffy()..add(months: 1); var jiffy = Jiffy()..add(months: 1);
if (value.getString("desire" + jiffy.format("MMMM, yyyy")).isNotEmpty) { if (value.getString("desire" + jiffy.format("MMMM, yyyy"))!.isNotEmpty) {
var desired = var desired =
jsonDecode(value.getString("desire" + jiffy.format("MMMM, yyyy"))); jsonDecode(value.getString("desire" + jiffy.format("MMMM, yyyy"))!);
setState(() { setState(() {
desires = List<Desire>.from( desires = List<Desire>.from(
desired.map((model) => Desire.fromJSON(model)).toList()); desired.map((model) => Desire.fromJSON(model)).toList());
@ -53,7 +53,7 @@ class _DesireComeTrueState extends State<DesireComeTrue>
SharedPreferences prefs = await SharedPreferences.getInstance(); SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = { Map<String, String> requestHeaders = {
'Content-type': 'application/json', 'Content-type': 'application/json',
'Authorization': prefs.getString('tokensTeso') 'Authorization': prefs.getString('tokensTeso')!
}; };
var register2 = serverLocation + 'monthly-desires/submit-newdesire'; var register2 = serverLocation + 'monthly-desires/submit-newdesire';

4
lib/Pages/LandingPage.dart

@ -14,9 +14,9 @@ import 'package:teso/util/consts.dart';
import 'PageWidgets/Settings/terms.dart'; import 'PageWidgets/Settings/terms.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
final List<CameraDescription> connectedCameras; final List<CameraDescription>? connectedCameras;
const LandingPage({Key key, this.connectedCameras}) : super(key: key); const LandingPage({Key? key, this.connectedCameras}) : super(key: key);
@override @override
_LandingPageState createState() => _LandingPageState(); _LandingPageState createState() => _LandingPageState();
} }

14
lib/Pages/PageWidgets/Alerts/AlertTile.dart

@ -4,12 +4,12 @@ import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart'; import 'package:time_elapsed/time_elapsed.dart';
buildAlert( buildAlert(
{BuildContext context, {required BuildContext context,
DateTime timestamp, required DateTime timestamp,
String description, required String description,
Icon icons, Icon? icons,
String thumbnail, String? thumbnail,
String username}) { String? username}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0), padding: EdgeInsets.symmetric(horizontal: 25.0),
child: Material( child: Material(
@ -85,7 +85,7 @@ buildAlert(
color: Color.fromRGBO(0, 0, 0, 0.4), color: Color.fromRGBO(0, 0, 0, 0.4),
child: Center( child: Center(
child: Text( child: Text(
username.characters username!.characters
.characterAt(0) .characterAt(0)
.toString() .toString()
.toUpperCase(), .toUpperCase(),

10
lib/Pages/PageWidgets/Alerts/Redeemable.dart

@ -6,11 +6,11 @@ import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart'; import 'package:time_elapsed/time_elapsed.dart';
buildRedeemableAlert( buildRedeemableAlert(
{BuildContext context, {required BuildContext context,
DateTime timestamp, required DateTime timestamp,
Icon icons, Icon? icons,
String thumbnail, required String thumbnail,
String message}) { required String message}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0), padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material( child: Material(

2
lib/Pages/PageWidgets/Alerts/Refund.dart

@ -5,7 +5,7 @@ import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart'; import 'package:time_elapsed/time_elapsed.dart';
buildRefundAlert( buildRefundAlert(
{BuildContext context, DateTime timestamp, Icon icons, String message}) { {required BuildContext context, required DateTime timestamp, Icon? icons, required String message}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0), padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material( child: Material(

10
lib/Pages/PageWidgets/Alerts/header.dart

@ -7,10 +7,10 @@ import 'package:flutter/material.dart';
buildNotficationHeader( buildNotficationHeader(
BuildContext context, BuildContext context,
Color fcurrentColor, Color? fcurrentColor,
Color fcurrentColor1, Color? fcurrentColor1,
Color fTextColor1, Color fTextColor1,
Color fTextColor2, Color? fTextColor2,
Function navigationTapped, Function navigationTapped,
bool status, bool status,
TesoUser user) { TesoUser user) {
@ -40,14 +40,14 @@ buildNotficationHeader(
child: user.thumbnail_dp == null child: user.thumbnail_dp == null
? Center( ? Center(
child: Text( child: Text(
user.username.characters user.username!.characters
.characterAt(0) .characterAt(0)
.toString() .toString()
.toUpperCase(), .toUpperCase(),
), ),
) )
: CachedNetworkImage( : CachedNetworkImage(
imageUrl: userdpURL + user.thumbnail_dp, imageUrl: userdpURL + user.thumbnail_dp!,
imageBuilder: (context, imageProvider) => FadeInImage( imageBuilder: (context, imageProvider) => FadeInImage(
height: 90, height: 90,
width: 90, width: 90,

14
lib/Pages/PageWidgets/Alerts/personalizedCoupon.dart

@ -6,13 +6,13 @@ import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart'; import 'package:time_elapsed/time_elapsed.dart';
buildPersonalizedAlert( buildPersonalizedAlert(
{BuildContext context, {required BuildContext context,
DateTime timestamp, required DateTime timestamp,
Icon icons, Icon? icons,
String thumbnail, required String thumbnail,
String message, required String message,
Function accept, Function? accept,
Function decline}) { Function? decline}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0), padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material( child: Material(

10
lib/Pages/PageWidgets/Alerts/post.dart

@ -4,11 +4,11 @@ import 'package:teso/util/consts.dart';
import 'package:time_elapsed/time_elapsed.dart'; import 'package:time_elapsed/time_elapsed.dart';
buildPostAlert( buildPostAlert(
{BuildContext context, {required BuildContext context,
DateTime timestamp, required DateTime timestamp,
Icon icons, Icon? icons,
String thumbnail, String? thumbnail,
String message}) { required String message}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0), padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material( child: Material(

18
lib/Pages/PageWidgets/Alerts/requestTile.dart

@ -5,14 +5,14 @@ import 'package:teso/util/consts.dart';
import 'package:teso/Classes/customTesoButton.dart'; import 'package:teso/Classes/customTesoButton.dart';
buildRequest( buildRequest(
{BuildContext context, {required BuildContext context,
DateTime timestamp, required DateTime timestamp,
String description, required String description,
Icon icons, Icon? icons,
String thumbnail, String? thumbnail,
String username, String? username,
Function approve, Function? approve,
Function decline}) { Function? decline}) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 8.0), padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 8.0),
child: Material( child: Material(
@ -159,7 +159,7 @@ buildRequest(
color: Color.fromRGBO(0, 0, 0, 0.4), color: Color.fromRGBO(0, 0, 0, 0.4),
child: Center( child: Center(
child: Text( child: Text(
username.characters username!.characters
.characterAt(0) .characterAt(0)
.toString() .toString()
.toUpperCase(), .toUpperCase(),

26
lib/Pages/PageWidgets/BusinessProfile/BusinessHead.dart

@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
import 'package:teso/Classes/TesoShop.dart'; import 'package:teso/Classes/TesoShop.dart';
buildHead( buildHead(
{BuildContext context, {required BuildContext context,
TesoShop shopSelected, required TesoShop shopSelected,
int products, required int products,
int subscribers, required int subscribers,
int coupons}) { required int coupons}) {
return Container( return Container(
// height: MediaQuery.of(context).size.width - // height: MediaQuery.of(context).size.width -
// (MediaQuery.of(context).size.width * 0.40), // (MediaQuery.of(context).size.width * 0.40),
@ -46,7 +46,7 @@ buildHead(
), ),
child: shopSelected.logo != "null" child: shopSelected.logo != "null"
? CachedNetworkImage( ? CachedNetworkImage(
imageUrl: businessLogoURL + shopSelected.logo, imageUrl: businessLogoURL + shopSelected.logo!,
imageBuilder: (context, imageProvider) => imageBuilder: (context, imageProvider) =>
FadeInImage( FadeInImage(
height: 90, height: 90,
@ -71,7 +71,7 @@ buildHead(
Container( Container(
child: Center( child: Center(
child: Text( child: Text(
Numeral(products).value().toString(), Numeral(products).numeral.toString(),
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
), ),
), ),
@ -90,7 +90,7 @@ buildHead(
Container( Container(
child: Center( child: Center(
child: Text( child: Text(
Numeral(subscribers).value().toString(), Numeral(subscribers).numeral.toString(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
), ),
@ -110,7 +110,7 @@ buildHead(
Container( Container(
child: Center( child: Center(
child: Text( child: Text(
Numeral(coupons).value().toString(), Numeral(coupons).numeral.toString(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold), style: TextStyle(fontWeight: FontWeight.bold),
), ),
@ -133,7 +133,7 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09, left: MediaQuery.of(context).size.width * 0.09,
), ),
child: Text( child: Text(
shopSelected.shopAddress, shopSelected.shopAddress!,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
//color: Colors.grey, //color: Colors.grey,
@ -147,7 +147,7 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09, left: MediaQuery.of(context).size.width * 0.09,
), ),
child: Text( child: Text(
shopSelected.categoryShop, shopSelected.categoryShop!,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
@ -163,8 +163,8 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09, left: MediaQuery.of(context).size.width * 0.09,
), ),
child: Text( child: Text(
shopSelected.shopDescription.toLowerCase() != "null" shopSelected.shopDescription!.toLowerCase() != "null"
? shopSelected.shopDescription ? shopSelected.shopDescription!
: "", : "",
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,

6
lib/Pages/PageWidgets/BusinessProfile/BusinessItems.dart

@ -14,7 +14,7 @@ buildItems(BuildContext context, Product product, double height) {
// borderRadius: BorderRadius.circular(30.0), // borderRadius: BorderRadius.circular(30.0),
// ), // ),
child: Hero( child: Hero(
tag: product.productID, tag: product.productID!,
child: GestureDetector( child: GestureDetector(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -34,7 +34,7 @@ buildItems(BuildContext context, Product product, double height) {
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
fit: BoxFit.fill, fit: BoxFit.fill,
image: NetworkImage(productURL + product.productImage), image: NetworkImage(productURL + product.productImage!),
placeholder: AssetImage("assets/images/loading.png"), placeholder: AssetImage("assets/images/loading.png"),
), ),
Container( Container(
@ -49,7 +49,7 @@ buildItems(BuildContext context, Product product, double height) {
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(bottom: 40), margin: EdgeInsets.only(bottom: 40),
child: Text( child: Text(
product.productName.toUpperCase(), product.productName!.toUpperCase(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,

142
lib/Pages/PageWidgets/Campaigns/campaignTile.dart

@ -1,142 +0,0 @@
import 'package:flutter/material.dart';
import 'package:teso/Classes/API Clasess/Campaign.dart';
import 'package:teso/providers/pageAnimations.dart';
import 'package:teso/util/consts.dart';
import 'package:jiffy/jiffy.dart';
import 'package:teso/Pages/Sub_Pages/Campaign/AuditionPage.dart';
buildCampaign(BuildContext context, Campaign campaignItem) {
return Container(
width: MediaQuery.of(context).size.width,
//height: 120,
// padding: EdgeInsets.only(
// left: 10,
// right: 10,
// ),
child: Material(
elevation: 2.5,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 90,
height: 95,
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
width: 0.5,
),
borderRadius: BorderRadius.only(
topRight: Radius.circular(30),
topLeft: Radius.circular(30),
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
child: Image(
width: MediaQuery.of(context).size.width * 0.28,
height: 110,
fit: BoxFit.fill,
image: NetworkImage(campaignItem.targetProduct != null
? productURL + campaignItem.targetProduct
: ""),
),
),
),
Container(
width: MediaQuery.of(context).size.width - 105,
//height: 110,
padding: EdgeInsets.all(5),
child: Column(
children: [
Container(
width: double.infinity,
child: Wrap(
direction: Axis.horizontal,
children: [
Text(
"Campaign Title : ",
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(campaignItem.title)
],
),
),
Container(
width: double.infinity,
child: Wrap(
direction: Axis.horizontal,
children: [
Text(
"Description : ",
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(
campaignItem.description.length > 90
? campaignItem.description.substring(0, 90) +
"...."
: campaignItem.description,
)
],
),
),
Container(
width: double.infinity,
child: Wrap(
direction: Axis.horizontal,
children: [
Text(
"Start Date : ",
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(Jiffy(campaignItem.startDate).yMMMMd),
],
),
),
Container(
width: double.infinity,
child: Align(
alignment: Alignment.centerRight,
child: Container(
width: 90,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
),
primary: accentMain,
),
onPressed: () => Navigator.push(
context,
PageTransition(
child: Audition(
campaign: campaignItem,
),
type: PageTransitionType.rightToLeft,
),
),
child: Text("Join"),
),
),
),
),
],
),
),
],
),
),
),
);
}

45
lib/Pages/PageWidgets/Campaigns/header.dart

@ -1,45 +0,0 @@
import 'package:flutter/material.dart';
buildCampaignHead(
BuildContext context, TextEditingController searchkey, Function filter) {
return Container(
height: 60.0,
//margin: EdgeInsets.all(10.0),
padding: EdgeInsets.all(10.0),
child: Material(
elevation: 4.0,
borderRadius: BorderRadius.circular(12.0),
shadowColor: Theme.of(context).backgroundColor,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
//buildSmartSearch(context),
new Expanded(
child: InkWell(
onTap: () => print("Searching"),
child: TextField(
autofocus: false,
enabled: true,
textAlign: TextAlign.start,
controller: searchkey,
onChanged: (String v) => filter(v),
style: TextStyle(
color: Theme.of(context).primaryColorLight,
),
decoration: InputDecoration(
border: InputBorder.none,
prefixIcon: Icon(
Icons.search,
color: Theme.of(context).primaryColorLight,
),
hintText: "Search",
hintStyle: TextStyle(color: Colors.grey),
),
),
),
),
],
),
),
);
}

6
lib/Pages/PageWidgets/ChatScreen/header.dart

@ -53,14 +53,14 @@ buildChatHead(BuildContext context, TesoUser user) {
child: user.thumbnail_dp == null child: user.thumbnail_dp == null
? Center( ? Center(
child: Text( child: Text(
user.firstname.characters user.firstname!.characters
.characterAt(0) .characterAt(0)
.toString() .toString()
.toUpperCase(), .toUpperCase(),
), ),
) )
: CachedNetworkImage( : CachedNetworkImage(
imageUrl: userdpURL + user.thumbnail_dp, imageUrl: userdpURL + user.thumbnail_dp!,
imageBuilder: (context, imageProvider) => FadeInImage( imageBuilder: (context, imageProvider) => FadeInImage(
height: 90, height: 90,
width: 90, width: 90,
@ -86,7 +86,7 @@ buildChatHead(BuildContext context, TesoUser user) {
direction: Axis.vertical, direction: Axis.vertical,
children: [ children: [
Text( Text(
user.firstname + " " + user.lastname, user.firstname! + " " + user.lastname!,
style: TextStyle(fontSize: 15), style: TextStyle(fontSize: 15),
textAlign: TextAlign.left, textAlign: TextAlign.left,
), ),

4
lib/Pages/PageWidgets/ChatScreen/recipient.dart

@ -25,12 +25,12 @@ buildRecipient(BuildContext context, ChatMessage message) {
spacing: 10.0, spacing: 10.0,
direction: Axis.horizontal, direction: Axis.horizontal,
children: [ children: [
Text(message.content), Text(message.content!),
Container( Container(
child: Align( child: Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: Text( child: Text(
TimeElapsed.fromDateTime(message.timestamp), TimeElapsed.fromDateTime(message.timestamp!),
textAlign: TextAlign.right, textAlign: TextAlign.right,
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,

4
lib/Pages/PageWidgets/ChatScreen/sender.dart

@ -25,12 +25,12 @@ buildSender(BuildContext context, ChatMessage document) {
spacing: 10.0, spacing: 10.0,
direction: Axis.horizontal, direction: Axis.horizontal,
children: [ children: [
Text(document.content), Text(document.content!),
Container( Container(
child: Align( child: Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: Text( child: Text(
TimeElapsed.fromDateTime(document.timestamp), TimeElapsed.fromDateTime(document.timestamp!),
textAlign: TextAlign.right, textAlign: TextAlign.right,
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,

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

Loading…
Cancel
Save