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. 47
      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. 44
      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"
minSdkVersion 21
targetSdkVersion 31
ndkVersion '23.1.7779620'
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
@ -75,18 +76,6 @@ android {
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 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
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_number": "280510379185",
"firebase_url": "https://teso-ghana-default-rtdb.firebaseio.com",
"project_id": "teso-ghana",
"storage_bucket": "teso-ghana.appspot.com"
"project_number": "675860686596",
"project_id": "teso-test-6fc81",
"storage_bucket": "teso-test-6fc81.appspot.com"
},
"client": [{
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:280510379185:android:b778de8dca1cf49219de90",
"mobilesdk_app_id": "1:675860686596:android:8522b46df172af41cd9251",
"android_client_info": {
"package_name": "com.sparentechBacware.teso"
}
},
"oauth_client": [{
"client_id": "280510379185-0shp8sia3i5m589bov645t3kuddb1032.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.sparentechBacware.teso",
"certificate_hash": "40b68890dd51d72454ccdc7289623c4d56273248"
}
},
"oauth_client": [
{
"client_id": "280510379185-87k85sksrd30mu9fjgfmacb3bkcjnmdq.apps.googleusercontent.com",
"client_id": "675860686596-in4piqob6d8nj42nguh06abpdrrhai0f.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.sparentechBacware.teso",
"certificate_hash": "4f655cf94cd94864838475611b711c2528e33601"
"certificate_hash": "b50b0b74dfcde0a02336f00eae49428a517551b2"
}
},
{
"client_id": "280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.sparentechBacware.teso",
"certificate_hash": "063304c2da41f90c824fad163b5ad481edf6db11"
"client_id": "675860686596-n32ta36ndmugfm1jj61mu2p1v197a1nn.apps.googleusercontent.com",
"client_type": 3
}
},
],
"api_key": [
{
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com",
"client_type": 3
"current_key": "AIzaSyDt05opA09hr9Y1pysllCsEE_6dT4CrhRM"
}
],
"api_key": [{
"current_key": "AIzaSyAHBguF6oqPEq7em1vLrh_NP2LoPuabe6o"
}],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [{
"client_id": "280510379185-58chj1fi4pts4p7p7sieq16miapvtepi.apps.googleusercontent.com",
"other_platform_oauth_client": [
{
"client_id": "675860686596-n32ta36ndmugfm1jj61mu2p1v197a1nn.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com",
"client_id": "675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.tesoapp",
@ -61,6 +49,7 @@
]
}
}
}],
}
],
"configuration_version": "1"
}

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

@ -31,7 +31,7 @@
<data android:scheme="https" />
</intent>
</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.firebase.ml.vision.DEPENDENCIES" android:value="ocr,label" />
<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.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" />
<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. -->
<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>
</resources>

6
android/build.gradle

@ -43,9 +43,9 @@ subprojects {
project.evaluationDependsOn(':app')
}
ext {
flutterFFmpegPackage = "full-gpl-lts"
}
// ext {
// 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>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>

47
ios/Podfile

@ -1,5 +1,8 @@
platform :ios, '12.0'
$FirebaseSDKVersion = '7.11.0'
# Uncomment this line to define a global platform for your project
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'
project 'Runner', {
@ -25,45 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
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
# 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_modular_headers!
@ -74,7 +39,7 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
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

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 */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
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 */
/* Begin PBXCopyFilesBuildPhase section */
@ -30,6 +31,7 @@
/* End PBXCopyFilesBuildPhase 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>"; };
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; };
@ -98,6 +100,7 @@
97C146EF1CF9000F007C117D /* Products */,
4334E30C393B71F7A6E589D8 /* Pods */,
23D06BD6AD1FD965EEBFDFB4 /* Frameworks */,
0B3B84CDB01189B80ADF6D47 /* GoogleService-Info.plist */,
);
sourceTree = "<group>";
};
@ -140,6 +143,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
5E474C80B70EC554E7278F77 /* [CP] Embed Pods Frameworks */,
1065E7A3A2329C46618FAF60 /* [CP] Copy Pods Resources */,
8B6BAB971734FC2758E568B5 /* [firebase_crashlytics] Crashlytics Upload Symbols */,
);
buildRules = (
);
@ -156,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1240;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -268,6 +272,26 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
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 */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -291,6 +315,7 @@
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
FE1744D5ADF4D39D2F573FCB /* GoogleService-Info.plist in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -382,6 +407,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -514,6 +540,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -538,6 +565,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1;
PRODUCT_BUNDLE_IDENTIFIER = com.tesoapp;
PRODUCT_NAME = "$(TARGET_NAME)";
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"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

BIN
ios/Runner/.DS_Store

Binary file not shown.

4
ios/Runner/AppDelegate.swift

@ -1,5 +1,7 @@
import UIKit
import Flutter
import Firebase
import GoogleMaps
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@ -7,6 +9,8 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GMSServices.provideAPIKey("AIzaSyB3gbhILEzrSCFpxE509PnEb7slCkBfBQI")
GeneratedPluginRegistrant.register(with: self)
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"?>
<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">
<?xml version="1.0" encoding="UTF-8"?>
<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>
<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>
<scenes>
<!--Flutter View Controller-->
@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<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>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-26" y="-44"/>
</scene>
</scenes>
</document>

18
ios/Runner/GoogleService-Info.plist

@ -3,23 +3,23 @@
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>280510379185-67vianhh973klriv75ip2tb9cf8ibitl.apps.googleusercontent.com</string>
<string>675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string>
<string>com.googleusercontent.apps.675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg</string>
<key>ANDROID_CLIENT_ID</key>
<string>280510379185-ac7qjglm9cct9u0diqrns6om8t2mb9ug.apps.googleusercontent.com</string>
<string>675860686596-in4piqob6d8nj42nguh06abpdrrhai0f.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyCBDtZO2_Z5JjrNj1TocK6YAlk_wDbzZHs</string>
<string>AIzaSyDBcm0Bpx8tucyVx3Cwe48ehqcWGPWThzI</string>
<key>GCM_SENDER_ID</key>
<string>280510379185</string>
<string>675860686596</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.tesoapp</string>
<key>PROJECT_ID</key>
<string>teso-ghana</string>
<string>teso-test-6fc81</string>
<key>STORAGE_BUCKET</key>
<string>teso-ghana.appspot.com</string>
<string>teso-test-6fc81.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
@ -31,8 +31,6 @@
<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>
<string>1:675860686596:ios:41d840f75d89875ccd9251</string>
</dict>
</plist>

44
ios/Runner/Info.plist

@ -6,6 +6,8 @@
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
@ -32,29 +34,25 @@
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.280510379185-67vianhh973klriv75ip2tb9cf8ibitl</string>
<string>com.googleusercontent.apps.675860686596-8dsd5qf42n1gej04f2m2rmt27neft8vg</string>
<string>fb1759156777594606</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<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>
<array>
<string>fbapi</string>
<string>fbapi20130214</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>
<string>https</string>
<string>http</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
@ -107,21 +105,5 @@
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
<!-- changes this number to configure the maximum number of concurrent tasks -->
<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>

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';
class BusinessProfileClass {
List<Product> products;
List<CouponDetails> coupons;
List<TesoUser> subscribers;
bool subscribed;
List<Product>? products;
List<CouponDetails>? coupons;
List<TesoUser>? subscribers;
bool? subscribed;
BusinessProfileClass({
this.coupons,

6
lib/Classes/API Clasess/CampAd.dart

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

16
lib/Classes/API Clasess/Campaign.dart

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

10
lib/Classes/API Clasess/CommentsPost.dart

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

32
lib/Classes/API Clasess/CouponDetails.dart

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

24
lib/Classes/API Clasess/CouponHead.dart

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

12
lib/Classes/API Clasess/Desire.dart

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

4
lib/Classes/API Clasess/ExploreObject.dart

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

20
lib/Classes/API Clasess/FacebookUser.dart

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

20
lib/Classes/API Clasess/GoogleUser.dart

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

18
lib/Classes/API Clasess/Post.dart

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

8
lib/Classes/API Clasess/PostFav.dart

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

10
lib/Classes/API Clasess/PostUpload.dart

@ -1,9 +1,9 @@
class PostUpload {
String title;
String thumbnail;
String aspect;
String campaignID;
String path;
String? title;
String? thumbnail;
String? aspect;
String? campaignID;
String? path;
PostUpload({
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';
class PostedAd {
Post post;
List<PostFav> likes;
List<CommentsPost> comments;
bool campaignAd;
CampAd campAdvert;
TesoUser publisher;
Post? post;
List<PostFav>? likes;
List<CommentsPost>? comments;
bool? campaignAd;
CampAd? campAdvert;
TesoUser? publisher;
PostedAd({
this.post,
this.likes,
this.comments,
List<TesoUser> friends,
List<TesoUser>? friends,
this.campaignAd,
this.campAdvert,
this.publisher,

4
lib/Classes/API Clasess/PostionAP.dart

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

14
lib/Classes/API Clasess/Product.dart

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

28
lib/Classes/API Clasess/ProximityCoupon.dart

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

6
lib/Classes/API Clasess/ReferralClass.dart

@ -1,7 +1,7 @@
class ReferralClass {
String referrer;
String referred;
bool reward;
String? referrer;
String? referred;
bool? reward;
ReferralClass({
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';
class Registrar {
UserAuth authentication;
TesoUserDetail user;
String referral;
UserAuth? authentication;
TesoUserDetail? user;
String? referral;
Registrar({
this.authentication,
this.user,

6
lib/Classes/API Clasess/ResetClass.dart

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

6
lib/Classes/API Clasess/SilverPurchaseRequest.dart

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

28
lib/Classes/API Clasess/TesoBusinessDetail.dart

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

26
lib/Classes/API Clasess/TesoUserDetail.dart

@ -1,18 +1,18 @@
import 'package:teso/Classes/TesoUser.dart';
class TesoUserDetail {
String userGUID;
String username;
String firstname;
String surname;
String description;
String address;
String email;
String thumbnailDp;
String phonenumber;
String country;
String gender;
DateTime dateOfBirth;
String? userGUID;
String? username;
String? firstname;
String? surname;
String? description;
String? address;
String? email;
String? thumbnailDp;
String? phonenumber;
String? country;
String? gender;
DateTime? dateOfBirth;
TesoUserDetail(
{this.username,
@ -65,7 +65,7 @@ class TesoUserDetail {
data['description'] = this.description;
data['address'] = this.address;
data['phonenumber'] = this.phonenumber;
data['dateOfBirth'] = this.dateOfBirth.toIso8601String();
data['dateOfBirth'] = this.dateOfBirth!.toIso8601String();
data['thumbnailDp'] = this.thumbnailDp;
data['email'] = this.email;
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 'Post.dart';
class ThirdPerson {
TesoUser user;
List<Post> posts = <Post>[];
List following = [];
List friends = [];
String relation;
TesoUser? user;
List<Post>? posts = <Post>[];
List? following = [];
List? friends = [];
String? relation;
ThirdPerson({
this.user,
@ -22,8 +24,8 @@ class ThirdPerson {
return ThirdPerson(
user: json["user"] != null ? TesoUser.fromJSON(json["user"]) : null,
posts: adverts != null ? adverts : <Post>[],
following: json["following"] as List,
friends: json["friends"] as List,
following: json["following"] as List?,
friends: json["friends"] as List?,
relation: json["relation"],
);
}

6
lib/Classes/API Clasess/TokenHandler.dart

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

20
lib/Classes/API Clasess/TwitterUser.dart

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

12
lib/Classes/API Clasess/UserAuth.dart

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

6
lib/Classes/API Clasess/UserFavCategory.dart

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

6
lib/Classes/API Clasess/UserFinance.dart

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

10
lib/Classes/ChatMessage.dart

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

4
lib/Classes/ColorFilters.dart

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

2
lib/Classes/Connection.dart

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

14
lib/Classes/Firebase/Comments.dart

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

22
lib/Classes/Firebase/Posts.dart

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

18
lib/Classes/NotificationSpliter.dart

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

22
lib/Classes/Payload.dart

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

16
lib/Classes/Product.dart

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

6
lib/Classes/QRClass.dart

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

10
lib/Classes/ReportedContent.dart

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

26
lib/Classes/TesoShop.dart

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

34
lib/Classes/TesoUser.dart

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

7
lib/Classes/TextE.dart

@ -1,10 +1,9 @@
import 'dart:ui';
import 'package:flutter/material.dart';
class Textted {
String text;
TextStyle textStyle;
TextAlign textAlign;
String? text;
TextStyle? textStyle;
TextAlign? textAlign;
Textted({
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 {
String id;
String name;
String image;
String? id;
String? name;
String? image;
Category({this.id, this.name, this.image});
Category.fromJson(Map<String, dynamic> json)
: id = json['catid'],

15
lib/Classes/customLoginButton.dart

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

13
lib/Classes/customTesoButton.dart

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

18
lib/Classes/friend.dart

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

18
lib/Classes/inbox.dart

@ -1,13 +1,13 @@
class InboxMessage {
String userID;
String firstname;
String surname;
String messageID;
String message;
String thumbnail;
String bio;
DateTime timestamp;
int unread;
String? userID;
String? firstname;
String? surname;
String? messageID;
String? message;
String? thumbnail;
String? bio;
DateTime? timestamp;
int? unread;
InboxMessage(
{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 {
//
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
final BehaviorSubject<ReceivedNotification>
didReceivedLocalNotificationSubject =
BehaviorSubject<ReceivedNotification>();
var initializationSettings;
late var initializationSettings;
NotificationPlugin._() {
init();
@ -48,7 +48,7 @@ class NotificationPlugin {
_requestIOSPermission() {
flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
IOSFlutterLocalNotificationsPlugin>()!
.requestPermissions(
alert: true,
badge: true,
@ -64,13 +64,13 @@ class NotificationPlugin {
setOnNotificationClick(Function onNotificationClick) async {
await flutterLocalNotificationsPlugin.initialize(initializationSettings,
onSelectNotification: (String payload) async {
onSelectNotification: (String? payload) async {
onNotificationClick(payload);
});
}
Future<void> showNotification(
String title, String body, String payload) async {
String? title, String? body, String payload) async {
var androidChannelSpecifics = AndroidNotificationDetails(
'CHANNEL_ID',
'CHANNEL_NAME',
@ -258,14 +258,14 @@ NotificationPlugin notificationPlugin = NotificationPlugin._();
class ReceivedNotification {
final int id;
final String title;
final String body;
final String payload;
final String? title;
final String? body;
final String? payload;
ReceivedNotification({
@required this.id,
@required this.title,
@required this.body,
@required this.payload,
required this.id,
required this.title,
required this.body,
required this.payload,
});
}

76
lib/Pages/BusinessLocator.dart

@ -23,27 +23,27 @@ class BusinessLocator extends StatefulWidget {
}
class _BusinessLocatorState extends State<BusinessLocator> {
String mapstyle;
String? mapstyle;
var _future;
static LatLng _initialPosition;
static LatLng? _initialPosition;
Set<Marker> markers = {};
List<TesoShop> shops;
GoogleMapController mapController;
List<TesoShop>? shops;
GoogleMapController? mapController;
static const double CAMERA_ZOOM = 13.499910354614258;
bool routing = false;
List<LatLng> polylineCoordinates = [];
Map<PolylineId, Polyline> polylines = {};
String selectedshop = "";
String? selectedshop = "";
Location location = Location();
String routingMessage = "Finding shops....";
LocationData _location;
String _error;
String _placeDistance;
late LocationData _location;
String? _error;
String? _placeDistance;
final startAddressController = TextEditingController();
final destinationAddressController = TextEditingController();
bool ios = false;
Future<LatLng> _determinePosition(context) async {
Future<LatLng?> _determinePosition(context) async {
setState(() {
_error = null;
});
@ -51,7 +51,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
final LocationData _locationResult = await location.getLocation();
setState(() {
_location = _locationResult;
_initialPosition = LatLng(_location.latitude, _location.longitude);
_initialPosition = LatLng(_location.latitude!, _location.longitude!);
});
await getLocations();
@ -68,7 +68,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = {
'Content-type': 'application/json',
'Authorization': prefs.getString('tokensTeso')
'Authorization': prefs.getString('tokensTeso')!
};
var register2 = serverLocation + 'tesobusiness/available';
@ -84,12 +84,12 @@ class _BusinessLocatorState extends State<BusinessLocator> {
}
}
if (shops.length > 0 && shops != null)
shops.forEach((element) {
MarkerId markerId = MarkerId(element.shopID);
if (shops!.length > 0 && shops != null)
shops!.forEach((element) {
MarkerId markerId = MarkerId(element.shopID!);
Marker marker = Marker(
markerId: markerId,
position: LatLng(element.latitude, element.longitude),
position: LatLng(element.latitude!, element.longitude!),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan),
infoWindow: InfoWindow(
title: element.shopName,
@ -118,7 +118,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
super.initState();
ios = Platform.isIOS;
SharedPreferences.getInstance().then((prefs) {
String currentTheme = prefs.getString("theme");
String? currentTheme = prefs.getString("theme");
if (currentTheme == "light") {
rootBundle.loadString('assets/styles/light.txt').then((string) {
mapstyle = string;
@ -132,7 +132,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
_future = _determinePosition(context);
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 _southwestCoordinates;
MarkerId markerId = MarkerId(tesoShop.shopName + " Location");
MarkerId markerId = MarkerId(tesoShop.shopName! + " Location");
Marker marker = Marker(
markerId: markerId,
position: LatLng(tesoShop.latitude, tesoShop.longitude),
position: LatLng(tesoShop.latitude!, tesoShop.longitude!),
icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen),
infoWindow: InfoWindow(
title: tesoShop.shopName,
@ -155,12 +155,12 @@ class _BusinessLocatorState extends State<BusinessLocator> {
markers.clear();
markers.add(marker);
selectedshop = tesoShop.shopName;
destinationAddressController.text = selectedshop;
destinationAddressController.text = selectedshop!;
});
Position user = Position(
latitude: _initialPosition.latitude,
longitude: _initialPosition.longitude,
latitude: _initialPosition!.latitude,
longitude: _initialPosition!.longitude,
accuracy: 100,
altitude: 100,
heading: 100,
@ -168,8 +168,8 @@ class _BusinessLocatorState extends State<BusinessLocator> {
speedAccuracy: 100,
timestamp: DateTime.now());
Position shopLoc = Position(
latitude: tesoShop.latitude,
longitude: tesoShop.longitude,
latitude: tesoShop.latitude!,
longitude: tesoShop.longitude!,
accuracy: 100,
altitude: 100,
heading: 100,
@ -177,7 +177,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
speedAccuracy: 100,
timestamp: DateTime.now());
if (_initialPosition.latitude <= tesoShop.latitude) {
if (_initialPosition!.latitude <= tesoShop.latitude!) {
_southwestCoordinates = user;
_northeastCoordinates = shopLoc;
} else {
@ -187,7 +187,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
await createPolylines(user, shopLoc);
_calculateDistance(user, shopLoc);
mapController.animateCamera(
mapController!.animateCamera(
CameraUpdate.newLatLngBounds(
LatLngBounds(
northeast: LatLng(
@ -248,7 +248,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
@override
void dispose() {
if (mapController != null) mapController.dispose();
if (mapController != null) mapController!.dispose();
super.dispose();
}
@ -329,7 +329,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
myLocationEnabled: true,
markers: markers,
initialCameraPosition: CameraPosition(
target: _initialPosition,
target: _initialPosition!,
zoom: CAMERA_ZOOM,
//bearing: CAMERA_BEARING,
),
@ -377,7 +377,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
),
),
Visibility(
visible: selectedshop == null || selectedshop.isEmpty
visible: selectedshop == null || selectedshop!.isEmpty
? false
: true,
child: Align(
@ -489,7 +489,7 @@ class _BusinessLocatorState extends State<BusinessLocator> {
double _coordinateDistance(lat1, lon1, lat2, lon2) {
var p = 0.017453292519943295;
var c = cos;
var c = cos as double Function(num?);
var a = 0.5 -
c((lat2 - lat1) * 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
// camera view of the map
mapController.animateCamera(
mapController!.animateCamera(
CameraUpdate.newLatLngBounds(
LatLngBounds(
northeast: LatLng(northEastLatitude, northEastLongitude),
@ -569,13 +569,13 @@ class _BusinessLocatorState extends State<BusinessLocator> {
}
Widget _textField({
TextEditingController controller,
FocusNode focusNode,
String label,
String hint,
double width,
Icon prefixIcon,
Widget suffixIcon,
TextEditingController? controller,
FocusNode? focusNode,
String? label,
String? hint,
required double width,
Icon? prefixIcon,
Widget? suffixIcon,
}) {
return Container(
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>
with TickerProviderStateMixin {
AnimationController _controller;
Animation<double> _fabScale;
late AnimationController _controller;
late Animation<double> _fabScale;
List<Desire> desires = <Desire>[];
@override
@ -35,9 +35,9 @@ class _DesireComeTrueState extends State<DesireComeTrue>
});
SharedPreferences.getInstance().then((value) {
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 =
jsonDecode(value.getString("desire" + jiffy.format("MMMM, yyyy")));
jsonDecode(value.getString("desire" + jiffy.format("MMMM, yyyy"))!);
setState(() {
desires = List<Desire>.from(
desired.map((model) => Desire.fromJSON(model)).toList());
@ -53,7 +53,7 @@ class _DesireComeTrueState extends State<DesireComeTrue>
SharedPreferences prefs = await SharedPreferences.getInstance();
Map<String, String> requestHeaders = {
'Content-type': 'application/json',
'Authorization': prefs.getString('tokensTeso')
'Authorization': prefs.getString('tokensTeso')!
};
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';
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
_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';
buildAlert(
{BuildContext context,
DateTime timestamp,
String description,
Icon icons,
String thumbnail,
String username}) {
{required BuildContext context,
required DateTime timestamp,
required String description,
Icon? icons,
String? thumbnail,
String? username}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0),
child: Material(
@ -85,7 +85,7 @@ buildAlert(
color: Color.fromRGBO(0, 0, 0, 0.4),
child: Center(
child: Text(
username.characters
username!.characters
.characterAt(0)
.toString()
.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';
buildRedeemableAlert(
{BuildContext context,
DateTime timestamp,
Icon icons,
String thumbnail,
String message}) {
{required BuildContext context,
required DateTime timestamp,
Icon? icons,
required String thumbnail,
required String message}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0),
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';
buildRefundAlert(
{BuildContext context, DateTime timestamp, Icon icons, String message}) {
{required BuildContext context, required DateTime timestamp, Icon? icons, required String message}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0),
child: Material(

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

@ -7,10 +7,10 @@ import 'package:flutter/material.dart';
buildNotficationHeader(
BuildContext context,
Color fcurrentColor,
Color fcurrentColor1,
Color? fcurrentColor,
Color? fcurrentColor1,
Color fTextColor1,
Color fTextColor2,
Color? fTextColor2,
Function navigationTapped,
bool status,
TesoUser user) {
@ -40,14 +40,14 @@ buildNotficationHeader(
child: user.thumbnail_dp == null
? Center(
child: Text(
user.username.characters
user.username!.characters
.characterAt(0)
.toString()
.toUpperCase(),
),
)
: CachedNetworkImage(
imageUrl: userdpURL + user.thumbnail_dp,
imageUrl: userdpURL + user.thumbnail_dp!,
imageBuilder: (context, imageProvider) => FadeInImage(
height: 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';
buildPersonalizedAlert(
{BuildContext context,
DateTime timestamp,
Icon icons,
String thumbnail,
String message,
Function accept,
Function decline}) {
{required BuildContext context,
required DateTime timestamp,
Icon? icons,
required String thumbnail,
required String message,
Function? accept,
Function? decline}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0),
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';
buildPostAlert(
{BuildContext context,
DateTime timestamp,
Icon icons,
String thumbnail,
String message}) {
{required BuildContext context,
required DateTime timestamp,
Icon? icons,
String? thumbnail,
required String message}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0),
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';
buildRequest(
{BuildContext context,
DateTime timestamp,
String description,
Icon icons,
String thumbnail,
String username,
Function approve,
Function decline}) {
{required BuildContext context,
required DateTime timestamp,
required String description,
Icon? icons,
String? thumbnail,
String? username,
Function? approve,
Function? decline}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 8.0),
child: Material(
@ -159,7 +159,7 @@ buildRequest(
color: Color.fromRGBO(0, 0, 0, 0.4),
child: Center(
child: Text(
username.characters
username!.characters
.characterAt(0)
.toString()
.toUpperCase(),

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

@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
import 'package:teso/Classes/TesoShop.dart';
buildHead(
{BuildContext context,
TesoShop shopSelected,
int products,
int subscribers,
int coupons}) {
{required BuildContext context,
required TesoShop shopSelected,
required int products,
required int subscribers,
required int coupons}) {
return Container(
// height: MediaQuery.of(context).size.width -
// (MediaQuery.of(context).size.width * 0.40),
@ -46,7 +46,7 @@ buildHead(
),
child: shopSelected.logo != "null"
? CachedNetworkImage(
imageUrl: businessLogoURL + shopSelected.logo,
imageUrl: businessLogoURL + shopSelected.logo!,
imageBuilder: (context, imageProvider) =>
FadeInImage(
height: 90,
@ -71,7 +71,7 @@ buildHead(
Container(
child: Center(
child: Text(
Numeral(products).value().toString(),
Numeral(products).numeral.toString(),
style: TextStyle(fontWeight: FontWeight.bold),
),
),
@ -90,7 +90,7 @@ buildHead(
Container(
child: Center(
child: Text(
Numeral(subscribers).value().toString(),
Numeral(subscribers).numeral.toString(),
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold),
),
@ -110,7 +110,7 @@ buildHead(
Container(
child: Center(
child: Text(
Numeral(coupons).value().toString(),
Numeral(coupons).numeral.toString(),
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.bold),
),
@ -133,7 +133,7 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09,
),
child: Text(
shopSelected.shopAddress,
shopSelected.shopAddress!,
style: TextStyle(
fontWeight: FontWeight.w400,
//color: Colors.grey,
@ -147,7 +147,7 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09,
),
child: Text(
shopSelected.categoryShop,
shopSelected.categoryShop!,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 12,
@ -163,8 +163,8 @@ buildHead(
left: MediaQuery.of(context).size.width * 0.09,
),
child: Text(
shopSelected.shopDescription.toLowerCase() != "null"
? shopSelected.shopDescription
shopSelected.shopDescription!.toLowerCase() != "null"
? shopSelected.shopDescription!
: "",
style: TextStyle(
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),
// ),
child: Hero(
tag: product.productID,
tag: product.productID!,
child: GestureDetector(
onTap: () => Navigator.push(
context,
@ -34,7 +34,7 @@ buildItems(BuildContext context, Product product, double height) {
width: double.infinity,
height: double.infinity,
fit: BoxFit.fill,
image: NetworkImage(productURL + product.productImage),
image: NetworkImage(productURL + product.productImage!),
placeholder: AssetImage("assets/images/loading.png"),
),
Container(
@ -49,7 +49,7 @@ buildItems(BuildContext context, Product product, double height) {
width: double.infinity,
margin: EdgeInsets.only(bottom: 40),
child: Text(
product.productName.toUpperCase(),
product.productName!.toUpperCase(),
textAlign: TextAlign.center,
style: TextStyle(
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
? Center(
child: Text(
user.firstname.characters
user.firstname!.characters
.characterAt(0)
.toString()
.toUpperCase(),
),
)
: CachedNetworkImage(
imageUrl: userdpURL + user.thumbnail_dp,
imageUrl: userdpURL + user.thumbnail_dp!,
imageBuilder: (context, imageProvider) => FadeInImage(
height: 90,
width: 90,
@ -86,7 +86,7 @@ buildChatHead(BuildContext context, TesoUser user) {
direction: Axis.vertical,
children: [
Text(
user.firstname + " " + user.lastname,
user.firstname! + " " + user.lastname!,
style: TextStyle(fontSize: 15),
textAlign: TextAlign.left,
),

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

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

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

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

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

Loading…
Cancel
Save