commit 5484b23433e5b37703e0bb9110008066eb0ab844 Author: MhdZiadHirati Date: Tue Oct 17 17:22:55 2023 +0300 init commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24476c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..18cd0c7 --- /dev/null +++ b/.metadata @@ -0,0 +1,45 @@ +# 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: "2524052335ec76bb03e04ede244b071f1b86d190" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: android + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: ios + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: linux + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: macos + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: web + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + - platform: windows + create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d2b9f3 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# taafee_mobile + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..f77c3ee --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.taafee_mobile" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.taafee_mobile" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion 21 + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..fdb9e21 --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "940759562035", + "project_id": "pages-7fbaa", + "storage_bucket": "pages-7fbaa.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:940759562035:android:8a119361e21dfeb03df046", + "android_client_info": { + "package_name": "com.example.pages" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBivrCkhL1DE3h4wlxFJxhfxrOJJhpM1Wo" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a2cb260 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/taafee_mobile/MainActivity.kt b/android/app/src/main/kotlin/com/example/taafee_mobile/MainActivity.kt new file mode 100644 index 0000000..4712a89 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/taafee_mobile/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.taafee_mobile + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..f7eb7f6 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3c472b9 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..55c4ca8 --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,20 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +include ":app" + +apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/assets/animations/Add Successfuly.json b/assets/animations/Add Successfuly.json new file mode 100644 index 0000000..478db34 --- /dev/null +++ b/assets/animations/Add Successfuly.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":60,"ip":0,"op":124,"w":512,"h":512,"nm":"Add successful","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":3,"ty":4,"nm":"Correct","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[12.5,-14,0],"ix":1},"s":{"a":0,"k":[60,60,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-105,-15],[-35,72],[130,-100]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.437062671138,0.76862745098,0.444864220713,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":40,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.168],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":85,"s":[0]},{"t":115,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":85,"op":1286,"st":85,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Card","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[468.412,112.742,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":65,"s":[0,0,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":85,"s":[70,70,100]},{"t":95,"s":[60,60,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-80.301,11.119],[80.326,10.967],[80.302,-11.119],[-80.326,-10.968]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[384.088,116.279],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 18","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[187.254,-25.946],[-187.294,-25.592],[-187.254,25.946],[187.294,25.589],[187.27,11.472],[187.254,-25.942]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[468.365,60.65],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 19","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-4.023,-7.58],[-3.999,14.506],[-164.626,14.658],[-164.65,-7.429]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[9.3,-0.009],[0,0],[-0.011,-9.297],[0,0],[-9.286,0.005],[0,0],[0.013,9.292],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.009,-9.299],[0,0],[-9.291,0.011],[0,0],[0.009,9.294],[0,0],[9.307,-0.012],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[187.182,-95.665],[170.336,-112.481],[-170.543,-112.158],[-187.364,-95.311],[-187.183,95.668],[-170.338,112.485],[170.546,112.165],[187.362,95.313],[187.245,-26.501],[-187.303,-26.144],[-187.343,-77.682],[187.205,-78.036]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.352941176471,0.431372578939,0.494117676978,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[468.413,112.74],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 20","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[468.412,112.742],"ix":2},"a":{"a":0,"k":[468.412,112.742],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Card","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":65,"op":1266,"st":65,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Paper 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[11]},{"t":30,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":10,"s":[288.714,282.621,0],"to":[-5.452,-4.437,0],"ti":[5.452,4.437,0]},{"t":30,"s":[256,256,0]}],"ix":2},"a":{"a":0,"k":[179.927,512.242,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.803,0.803,0.333],"y":[0,0,0]},"t":20,"s":[50,50,100]},{"t":50,"s":[5,5,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,649.158],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,603.52],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,557.881],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.801]],"v":[[122.143,6.885],[-122.143,6.885],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,466.604],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.801]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,420.965],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,375.327],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":2,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[139.228,-229.027],[-179.677,-229.027],[-179.677,229.027],[179.677,229.027],[179.677,-188.579],[139.228,-188.579]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.945098099054,0.949019667682,0.949019667682,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-12.556,-29.264],[27.892,11.184],[3.23,29.264],[-27.893,22.949]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.901960844152,0.90588241278,0.909803981407,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[331.711,312.479],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":2,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[179.927,512.242],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Paper","np":9,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":51,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Paper","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":10,"s":[-13]},{"t":30,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":10,"s":[216.714,250.621,0],"to":[6.548,0.896,0],"ti":[-6.548,-0.896,0]},{"t":30,"s":[256,256,0]}],"ix":2},"a":{"a":0,"k":[179.927,512.242,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.803,0.803,0.333],"y":[0,0,0]},"t":20,"s":[50,50,100]},{"t":50,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,649.158],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,603.52],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,557.881],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.801]],"v":[[122.143,6.885],[-122.143,6.885],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,466.604],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.801]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0.001],[-122.143,-6.884],[122.143,-6.884],[128.075,0.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,420.965],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.276,0],[0,0],[0,3.802],[-3.276,0],[0,0],[0,-3.802]],"o":[[0,0],[-3.276,0],[0,-3.802],[0,0],[3.276,0],[0,3.802]],"v":[[122.143,6.884],[-122.143,6.884],[-128.075,0],[-122.143,-6.884],[122.143,-6.884],[128.075,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.654901960784,0.662745098039,0.674509803922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,375.327],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":2,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[139.228,-229.027],[-179.677,-229.027],[-179.677,229.027],[179.677,229.027],[179.677,-188.579],[139.228,-188.579]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.945098099054,0.949019667682,0.949019667682,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-12.556,-29.264],[27.892,11.184],[3.23,29.264],[-27.893,22.949]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.901960844152,0.90588241278,0.909803981407,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[331.711,312.479],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":2,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"tr","p":{"a":0,"k":[179.927,512.242],"ix":2},"a":{"a":0,"k":[179.927,512.242],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Paper","np":9,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":51,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"BG Circle","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[19.5,0.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.896,0.896,0.333],"y":[0,0,0]},"t":30,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":50,"s":[10,10,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":55,"s":[8,8,100]},{"t":75,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[381,381],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254901961,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[19.5,0.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[70,70],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":-38,"op":1163,"st":-38,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/animations/Exit.json b/assets/animations/Exit.json new file mode 100644 index 0000000..39fcffc --- /dev/null +++ b/assets/animations/Exit.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":60,"ip":0,"op":136,"w":512,"h":512,"nm":"Exit","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Front led","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[255.677,245.948,0],"to":[0,1.667,0],"ti":[0,-1.667,0]},{"t":25,"s":[255.677,255.948,0]}],"ix":2},"a":{"a":0,"k":[145.677,110.448,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[12.273,3.45],[0,0],[0,0],[0,0],[0,0],[0,0],[0,-7.772],[0,0],[-7.771,0],[0,0],[0,7.762],[0,0]],"o":[[-3.113,-0.703],[0,0],[0,0],[0,0],[0,0],[-7.771,0],[0,0],[0,7.762],[0,0],[7.77,0],[0,0],[0,-13.357]],"v":[[124.106,-64.204],[115.389,-65.221],[-39.296,-65.347],[-51.97,-96.861],[-57.329,-110.197],[-131.367,-110.197],[-145.427,-96.135],[-145.427,96.135],[-131.367,110.197],[131.359,110.197],[145.427,96.135],[145.427,-36.158]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[145.677,110.448],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Card 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":74,"s":[100]},{"t":84,"s":[2]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[0.987]},"o":{"x":[0.333],"y":[0]},"t":37,"s":[0]},{"t":87,"s":[-29.988]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.33,"y":1},"o":{"x":0.499,"y":0},"t":37,"s":[269.679,273.821,0],"to":[0.333,-63.333,0],"ti":[122.667,5.333,0]},{"t":87,"s":[101.679,94.821,0]}],"ix":2},"a":{"a":0,"k":[38.679,23.321,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-16.469,2.28],[16.475,2.25],[16.469,-2.28],[-16.475,-2.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.385,24.046],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.405,-5.322],[-38.413,-5.248],[-38.405,5.322],[38.413,5.249],[38.408,2.353],[38.405,-5.32]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.669,12.638],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.825,-1.555],[-0.82,2.975],[-33.764,3.006],[-33.769,-1.524]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[1.907,-0.001],[0,0],[-0.002,-1.907],[0,0],[-1.905,0.001],[0,0],[0.002,1.905],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.002,-1.907],[0,0],[-1.906,0.002],[0,0],[0.002,1.907],[0,0],[1.909,-0.002],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.39,-19.621],[34.935,-23.07],[-34.977,-23.003],[-38.427,-19.548],[-38.39,19.62],[-34.935,23.07],[34.978,23.004],[38.427,19.548],[38.403,-5.436],[-38.415,-5.362],[-38.423,-15.932],[38.395,-16.005]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.352941176471,0.431372578939,0.494117676978,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.679,23.321],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":27,"op":88,"st":27,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Card 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":84,"s":[100]},{"t":94,"s":[2]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":47,"s":[0]},{"t":97,"s":[-10]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.33,"y":1},"o":{"x":0.499,"y":0},"t":47,"s":[269.679,273.821,0],"to":[0.333,-63.333,0],"ti":[76.667,80.333,0]},{"t":97,"s":[205.679,38.821,0]}],"ix":2},"a":{"a":0,"k":[38.679,23.321,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-16.469,2.28],[16.475,2.25],[16.469,-2.28],[-16.475,-2.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.385,24.046],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.405,-5.322],[-38.413,-5.248],[-38.405,5.322],[38.413,5.249],[38.408,2.353],[38.405,-5.32]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.669,12.638],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.825,-1.555],[-0.82,2.975],[-33.764,3.006],[-33.769,-1.524]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[1.907,-0.001],[0,0],[-0.002,-1.907],[0,0],[-1.905,0.001],[0,0],[0.002,1.905],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.002,-1.907],[0,0],[-1.906,0.002],[0,0],[0.002,1.907],[0,0],[1.909,-0.002],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.39,-19.621],[34.935,-23.07],[-34.977,-23.003],[-38.427,-19.548],[-38.39,19.62],[-34.935,23.07],[34.978,23.004],[38.427,19.548],[38.403,-5.436],[-38.415,-5.362],[-38.423,-15.932],[38.395,-16.005]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.352941176471,0.431372578939,0.494117676978,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.679,23.321],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":37,"op":98,"st":37,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Card 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":79,"s":[100]},{"t":89,"s":[2]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":42,"s":[0]},{"t":92,"s":[100]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.33,"y":1},"o":{"x":0.499,"y":0},"t":42,"s":[269.679,273.821,0],"to":[0.333,-63.333,0],"ti":[-133.333,1.333,0]},{"t":92,"s":[421.679,44.821,0]}],"ix":2},"a":{"a":0,"k":[38.679,23.321,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-16.469,2.28],[16.475,2.25],[16.469,-2.28],[-16.475,-2.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.385,24.046],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.405,-5.322],[-38.413,-5.248],[-38.405,5.322],[38.413,5.249],[38.408,2.353],[38.405,-5.32]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.669,12.638],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.825,-1.555],[-0.82,2.975],[-33.764,3.006],[-33.769,-1.524]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[1.907,-0.001],[0,0],[-0.002,-1.907],[0,0],[-1.905,0.001],[0,0],[0.002,1.905],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.002,-1.907],[0,0],[-1.906,0.002],[0,0],[0.002,1.907],[0,0],[1.909,-0.002],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.39,-19.621],[34.935,-23.07],[-34.977,-23.003],[-38.427,-19.548],[-38.39,19.62],[-34.935,23.07],[34.978,23.004],[38.427,19.548],[38.403,-5.436],[-38.415,-5.362],[-38.423,-15.932],[38.395,-16.005]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.352941176471,0.431372578939,0.494117676978,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.679,23.321],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":32,"op":93,"st":32,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Card","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":74,"s":[100]},{"t":84,"s":[2]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":37,"s":[0]},{"t":87,"s":[100]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.33,"y":1},"o":{"x":0.499,"y":0},"t":37,"s":[269.679,273.821,0],"to":[0.333,-63.333,0],"ti":[-146.333,-57.667,0]},{"t":87,"s":[470.679,116.821,0]}],"ix":2},"a":{"a":0,"k":[38.679,23.321,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-16.469,2.28],[16.475,2.25],[16.469,-2.28],[-16.475,-2.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.385,24.046],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.405,-5.322],[-38.413,-5.248],[-38.405,5.322],[38.413,5.249],[38.408,2.353],[38.405,-5.32]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.937254961799,0.650980392157,0.36862745098,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.669,12.638],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.825,-1.555],[-0.82,2.975],[-33.764,3.006],[-33.769,-1.524]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[1.907,-0.001],[0,0],[-0.002,-1.907],[0,0],[-1.905,0.001],[0,0],[0.002,1.905],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.002,-1.907],[0,0],[-1.906,0.002],[0,0],[0.002,1.907],[0,0],[1.909,-0.002],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[38.39,-19.621],[34.935,-23.07],[-34.977,-23.003],[-38.427,-19.548],[-38.39,19.62],[-34.935,23.07],[34.978,23.004],[38.427,19.548],[38.403,-5.436],[-38.415,-5.362],[-38.423,-15.932],[38.395,-16.005]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.352941176471,0.431372578939,0.494117676978,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.679,23.321],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":27,"op":92,"st":27,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Back led","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[302.146,204.956,0],"to":[0,-1.667,0],"ti":[0,1.667,0]},{"t":25,"s":[302.146,194.956,0]}],"ix":2},"a":{"a":0,"k":[192.146,49.456,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.109,0],[0,0],[0,0],[0,0],[0,0],[-3.489,-1.538],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,-8.025]],"v":[[91.158,-37.18],[-98.958,-37.18],[-98.376,-34.313],[-84.171,34.676],[89.188,34.951],[98.958,37.18],[98.596,36.927],[98.596,-22.665]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[192.146,49.456],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/animations/Folder Lottie.json b/assets/animations/Folder Lottie.json new file mode 100644 index 0000000..977f50c --- /dev/null +++ b/assets/animations/Folder Lottie.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":60,"ip":0,"op":211,"w":512,"h":512,"nm":"Folder","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-21,-215.5],[-21.5,26],[0,0]],"o":[[0,0],[12.73,130.63],[21.5,-26],[0,0]],"v":[[-6,-58],[-226,-16.5],[-134,73.5],[-49.5,-13]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.811765005074,0.486274988511,0.168626987233,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":90,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.505],"y":[0]},"t":44,"s":[-307]},{"t":74,"s":[0]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":52,"op":1204,"st":3,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[208.796,274.716,0],"ix":2},"a":{"a":0,"k":[-47.204,18.716,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[10,-97],[49.926,7.245],[11.772,10.729]],"o":[[0,0],[-3.743,36.31],[-83.45,-12.109],[-19.75,-18]],"v":[[6,-55],[200,32],[79.516,88.889],[-92.5,-9.75]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.811765005074,0.486274988511,0.168626987233,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":90,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.501],"y":[0]},"t":41,"s":[-309]},{"t":71,"s":[0]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":48,"op":1201,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Front","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.973,"y":0},"t":10,"s":[228.84,250.521,0],"to":[-1.667,0,0],"ti":[1.667,0,0]},{"t":31,"s":[218.84,250.521,0]}],"ix":2},"a":{"a":0,"k":[219.754,163.985,0],"ix":1},"s":{"a":0,"k":[82,82,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.929,"y":0},"t":10,"s":[{"i":[[0,0.065],[0,0],[10.065,-0.039],[0,0],[2.411,-1.069],[1.793,-1.934],[0,0],[0,0],[-1.593,-12.823],[0,0],[-10.039,0.014],[0,0],[0,0]],"o":[[0,0],[-1.296,-10.686],[0,0],[-2.637,0.03],[-2.412,1.069],[0,0],[0,0],[-12.059,0.065],[0,0],[1.295,10.673],[0,0],[38.313,0.789],[-39.542,37.724]],"v":[[170.9,115.778],[168.395,-141.444],[148.499,-160.07],[77.518,-159.85],[69.865,-158.185],[63.491,-153.633],[29.813,-117.792],[-167.586,-116.73],[-187.326,-92.418],[-187.141,145.038],[-167.271,163.665],[176.82,162.979],[208.432,132.34]],"c":true}]},{"t":31,"s":[{"i":[[0,0.065],[0,0],[10.065,-0.039],[0,0],[2.411,-1.069],[1.793,-1.934],[0,0],[0,0],[-1.593,-12.823],[0,0],[-10.039,0.014],[0,0],[0,0]],"o":[[0,0],[-1.296,-10.686],[0,0],[-2.637,0.03],[-2.412,1.069],[0,0],[0,0],[-12.059,0.065],[0,0],[1.295,10.673],[0,0],[38.313,0.789],[-43.987,9.726]],"v":[[170.899,115.777],[138.517,-145.103],[118.621,-163.729],[47.64,-163.509],[39.987,-161.844],[33.613,-157.292],[-0.065,-121.451],[-197.464,-120.388],[-217.204,-96.077],[-187.141,145.038],[-167.271,163.664],[176.819,162.979],[218.797,152.461]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[219.047,164.018],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-21,-215.5],[-21.5,26],[0,0]],"o":[[0,0],[12.73,130.63],[21.5,-26],[0,0]],"v":[[-6,-58],[-226,-16.5],[-134,73.5],[-49.5,-13]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.811765005074,0.486274988511,0.168626987233,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":90,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.505],"y":[0]},"t":44,"s":[-307]},{"t":74,"s":[0]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":44,"op":52,"st":3,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[208.796,274.716,0],"ix":2},"a":{"a":0,"k":[-47.204,18.716,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[10,-97],[49.926,7.245],[11.772,10.729]],"o":[[0,0],[-3.743,36.31],[-83.45,-12.109],[-19.75,-18]],"v":[[6,-55],[200,32],[79.516,88.889],[-92.5,-9.75]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.811765005074,0.486274988511,0.168626987233,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":12,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":90,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.501],"y":[0]},"t":41,"s":[-309]},{"t":71,"s":[0]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":41,"op":48,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Ghost 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":99,"s":[90]},{"t":155,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":79,"s":[224.596,234.069,0],"to":[-0.354,-0.548,0],"ti":[-0.148,0.73,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":80,"s":[223.457,214.309,0],"to":[14.163,-69.748,0],"ti":[-11.688,63.119,0]},{"t":156,"s":[104.596,73.569,0]}],"ix":2},"a":{"a":0,"k":[96.51,103.279,0],"ix":1},"s":{"a":0,"k":[-60,60,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.843,-2.143],[3.403,0.774],[2.924,2.048],[0.76,3.49],[-0.333,1.846],[-2.566,0.848],[-1.703,-1.228],[-1.47,-1.491],[-2.249,-1.278],[-1.444,-1.34]],"o":[[-2.789,2.105],[-3.484,-0.796],[-2.929,-2.048],[-0.402,-1.83],[0.478,-2.661],[1.988,-0.659],[1.703,1.223],[1.823,1.841],[1.752,0.995],[2.814,2.604]],"v":[[81.334,-50.603],[71.247,-49.605],[61.391,-53.632],[55.329,-62.167],[55.309,-67.758],[59.695,-74.099],[65.607,-72.786],[70.102,-68.405],[76.252,-63.702],[82.243,-60.902]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-1.047,-2.946],[2.338,-5.469],[4.227,-4.184],[5.791,0.52],[-1.693,6.154],[-1.603,2.947],[-0.956,4.201],[-1.328,3.227],[-3.396,0.818],[-3.012,-3.34]],"o":[[1.985,5.605],[-2.338,5.47],[-4.135,4.091],[-5.905,-0.536],[0.869,-3.171],[2.06,-3.789],[0.776,-3.405],[1.331,-3.229],[4.373,-1.051],[2.091,2.322]],"v":[[46.174,-66.225],[45.097,-48.828],[34.691,-34.473],[19.547,-27.012],[9.208,-40.784],[15.225,-50.008],[19.786,-62.065],[22.296,-72.219],[29.51,-79.271],[41.286,-74.154]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-1.044,-2.639],[-0.142,-2.833],[0.763,-8.987],[1.369,-2],[3.169,0.49],[0.006,7.581],[0.555,2.842],[-0.116,4.571],[-0.928,1.571],[-0.973,0.83],[-2.636,1.183],[-2.68,-1.088]],"o":[[1.047,2.638],[0.46,9.008],[-0.208,2.417],[-1.812,2.648],[-8.004,-1.236],[-0.002,-2.847],[-0.858,-4.419],[0.046,-1.825],[0.65,-1.102],[2.199,-1.877],[2.637,-1.183],[2.63,1.068]],"v":[[67.822,-32.41],[69.286,-24.061],[68.221,2.954],[66.398,9.906],[57.884,13.182],[44.926,-3.72],[44.788,-12.047],[42.997,-24.982],[44.117,-30.28],[46.724,-33.072],[53.818,-38.007],[62.238,-38.525]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[8.9,6.67],[7.634,1.324],[7.888,-3.756],[5.49,-8.952],[-2.339,-14.498],[-1.796,-14.572],[12.566,-16.147],[19.567,5.979],[10.427,-3.265],[-8.863,-4.073],[-15.447,5.034],[-16.623,20.04],[-1.791,10.285],[5.67,11.513]],"o":[[-6.198,-4.648],[-8.612,-1.491],[-9.484,4.515],[-7.68,12.516],[2.341,14.496],[2.502,20.308],[-12.569,16.149],[-9.659,-2.952],[6.454,6.91],[14.759,6.789],[57.115,-18.606],[6.665,-8.037],[2.198,-12.646],[-4.919,-9.975]],"v":[[68.372,-91.646],[47.79,-101.964],[22.442,-97.163],[-1.336,-77.172],[-7.028,-34.43],[1.879,8.693],[-11.982,66.886],[-66.357,86.273],[-96.741,79.448],[-65.03,96.665],[-17.669,97.559],[75.803,19.477],[94.543,-29.581],[90.661,-67.242]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[96.991,103.705],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":6,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":79,"op":1280,"st":79,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Ghost","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":88,"s":[90]},{"t":137,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":68,"s":[279.596,244.069,0],"to":[78.5,30.667,0],"ti":[-83.5,13.333,0]},{"t":145,"s":[411.596,161.069,0]}],"ix":2},"a":{"a":0,"k":[96.51,103.279,0],"ix":1},"s":{"a":0,"k":[60,60,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.843,-2.143],[3.403,0.774],[2.924,2.048],[0.76,3.49],[-0.333,1.846],[-2.566,0.848],[-1.703,-1.228],[-1.47,-1.491],[-2.249,-1.278],[-1.444,-1.34]],"o":[[-2.789,2.105],[-3.484,-0.796],[-2.929,-2.048],[-0.402,-1.83],[0.478,-2.661],[1.988,-0.659],[1.703,1.223],[1.823,1.841],[1.752,0.995],[2.814,2.604]],"v":[[81.334,-50.603],[71.247,-49.605],[61.391,-53.632],[55.329,-62.167],[55.309,-67.758],[59.695,-74.099],[65.607,-72.786],[70.102,-68.405],[76.252,-63.702],[82.243,-60.902]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-1.047,-2.946],[2.338,-5.469],[4.227,-4.184],[5.791,0.52],[-1.693,6.154],[-1.603,2.947],[-0.956,4.201],[-1.328,3.227],[-3.396,0.818],[-3.012,-3.34]],"o":[[1.985,5.605],[-2.338,5.47],[-4.135,4.091],[-5.905,-0.536],[0.869,-3.171],[2.06,-3.789],[0.776,-3.405],[1.331,-3.229],[4.373,-1.051],[2.091,2.322]],"v":[[46.174,-66.225],[45.097,-48.828],[34.691,-34.473],[19.547,-27.012],[9.208,-40.784],[15.225,-50.008],[19.786,-62.065],[22.296,-72.219],[29.51,-79.271],[41.286,-74.154]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-1.044,-2.639],[-0.142,-2.833],[0.763,-8.987],[1.369,-2],[3.169,0.49],[0.006,7.581],[0.555,2.842],[-0.116,4.571],[-0.928,1.571],[-0.973,0.83],[-2.636,1.183],[-2.68,-1.088]],"o":[[1.047,2.638],[0.46,9.008],[-0.208,2.417],[-1.812,2.648],[-8.004,-1.236],[-0.002,-2.847],[-0.858,-4.419],[0.046,-1.825],[0.65,-1.102],[2.199,-1.877],[2.637,-1.183],[2.63,1.068]],"v":[[67.822,-32.41],[69.286,-24.061],[68.221,2.954],[66.398,9.906],[57.884,13.182],[44.926,-3.72],[44.788,-12.047],[42.997,-24.982],[44.117,-30.28],[46.724,-33.072],[53.818,-38.007],[62.238,-38.525]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[8.9,6.67],[7.634,1.324],[7.888,-3.756],[5.49,-8.952],[-2.339,-14.498],[-1.796,-14.572],[12.566,-16.147],[19.567,5.979],[10.427,-3.265],[-8.863,-4.073],[-15.447,5.034],[-16.623,20.04],[-1.791,10.285],[5.67,11.513]],"o":[[-6.198,-4.648],[-8.612,-1.491],[-9.484,4.515],[-7.68,12.516],[2.341,14.496],[2.502,20.308],[-12.569,16.149],[-9.659,-2.952],[6.454,6.91],[14.759,6.789],[57.115,-18.606],[6.665,-8.037],[2.198,-12.646],[-4.919,-9.975]],"v":[[68.372,-91.646],[47.79,-101.964],[22.442,-97.163],[-1.336,-77.172],[-7.028,-34.43],[1.879,8.693],[-11.982,66.886],[-66.357,86.273],[-96.741,79.448],[-65.03,96.665],[-17.669,97.559],[75.803,19.477],[94.543,-29.581],[90.661,-67.242]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[96.991,103.705],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":6,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":68,"op":1269,"st":68,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Back","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.973,"y":0},"t":10,"s":[283.894,268.203,0],"to":[1.667,0,0],"ti":[-1.667,0,0]},{"t":31,"s":[293.894,268.203,0]}],"ix":2},"a":{"a":0,"k":[195.76,141.35,0],"ix":1},"s":{"a":0,"k":[82,82,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":10,"s":[{"i":[[1.736,-9.183],[0,0],[0,0],[0,0],[-4.389,18.108],[0,0],[10.412,-0.013],[0,0]],"o":[[0,0],[0,0],[0,0],[13.728,-0.065],[0,0],[3.357,-13.743],[0,0],[-6.735,-0.013]],"v":[[-144.967,-125.214],[-190.82,110.267],[-196.779,141.094],[108.906,139.62],[139.201,109.257],[135.495,-112.916],[121.081,-140.946],[-130.461,-140.757]],"c":true}]},{"t":31,"s":[{"i":[[1.736,-9.183],[0,0],[0,0],[0,0],[-4.389,18.108],[0,0],[10.412,-0.013],[0,0]],"o":[[0,0],[0,0],[0,0],[13.728,-0.065],[0,0],[3.357,-13.743],[0,0],[-6.735,-0.013]],"v":[[-144.967,-125.214],[-190.82,110.267],[-196.779,141.094],[108.906,139.62],[139.201,109.257],[193.422,-113.05],[179.008,-141.08],[-130.461,-140.757]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[197.029,141.344],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/animations/Loader.json b/assets/animations/Loader.json new file mode 100644 index 0000000..77a0d5d --- /dev/null +++ b/assets/animations/Loader.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":60,"ip":0,"op":126,"w":512,"h":512,"nm":"Loader","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":65,"s":[64.25,245.75,0],"to":[31.917,0,0],"ti":[-31.917,0,0]},{"t":85,"s":[255.75,245.75,0]}],"ix":2},"a":{"a":0,"k":[-0.25,-10.25,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[195.5,40.5],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.25,-10.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":65,"op":1266,"st":65,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Mark/Folder.ai","cl":"ai","tt":1,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":105,"s":[100]},{"t":125,"s":[0]}],"ix":11},"r":{"a":0,"k":2,"ix":10},"p":{"a":0,"k":[255.936,245.022,0],"ix":2},"a":{"a":0,"k":[90.936,29.522,0],"ix":1},"s":{"a":0,"k":[102.692,74.687,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.002,0.113],[-0.9,-0.057],[-0.001,-0.056],[0,0]],"o":[[0.899,0.057],[0,0.057],[0,0],[0.002,-0.113]],"v":[[-1.346,-0.17],[1.352,0.001],[1.353,0.17],[-1.353,0.17]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[103.688,1.172],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.012,0.121],[-0.928,-0.045],[0.004,-0.076],[0,0]],"o":[[0.928,0.045],[-0.004,0.076],[0,0],[0.012,-0.121]],"v":[[-1.374,-0.182],[1.409,-0.046],[1.397,0.182],[-1.409,0.182]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[7.554,34.458],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.844,0.293],[-0.615,0.08],[0.044,-0.366]],"o":[[0.923,-0.119],[-0.035,0.299],[-0.615,-0.213]],"v":[[-1.046,-0.208],[1.046,-0.478],[0.932,0.478]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[29.141,54.99],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0.042,0.614],[-0.444,-0.217],[0.345,-0.177],[-0.039,-0.104],[0.344,0.071]],"o":[[-0.028,-0.407],[0.745,0.363],[-0.129,0.066],[0.039,0.105],[-0.343,-0.069],[-0.002,-0.001]],"v":[[-0.801,0.623],[-0.9,-0.805],[0.9,0.072],[0.081,0.492],[0.199,0.805],[-0.832,0.598]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[58.327,52.194],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0.882,-0.355],[-0.548,1.342]],"o":[[-0.882,0.355],[0.352,-1.886],[0,0]],"v":[[1.323,-0.123],[-1.323,0.943],[1.138,-0.658]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16.239,14.143],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.012,-0.14],[0.962,1.589],[-0.832,-0.073]],"o":[[-0.81,-0.339],[1.087,0.094],[-0.012,0.14]],"v":[[1.34,-0.135],[-1.376,-0.794],[1.376,-0.556]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[22.632,13.469],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.02,0.103],[-1.52,0.3]],"o":[[0,0],[-0.021,-0.102],[1.519,-0.3],[0,0]],"v":[[2.302,-0.311],[-2.24,0.604],[-2.302,0.296],[2.256,-0.604]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[38.077,6.834],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":2,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.187,-0.38],[0.939,-0.108],[0.029,0.067],[-0.494,0.18],[-0.001,0.075],[0,0],[0.012,0.065],[-0.715,0.08]],"o":[[-0.611,1.248],[-0.804,0.092],[-0.03,-0.067],[0.494,-0.18],[0.001,-0.076],[0,0],[-0.012,-0.065],[0.716,-0.08],[0,0]],"v":[[0.61,-0.715],[1.505,0.408],[-1.178,0.715],[-1.268,0.513],[0.215,-0.027],[0.217,-0.253],[-1.467,-0.253],[-1.505,-0.449],[0.642,-0.688]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[56.884,53.504],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.961,0.175],[-0.057,-1.05]],"o":[[1.426,-0.904],[-0.985,-0.18]],"v":[[-1.454,0.186],[1.454,0.717]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.534,57.837],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":2,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.798,0.201],[0.516,-0.117],[0.757,0.317]],"o":[[0.456,1.16],[-0.39,0.088],[1.146,-0.288]],"v":[[1.119,-0.704],[0.077,0.616],[-1.575,-0.027]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[14.119,11.573],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 10","np":2,"cix":2,"bm":0,"ix":10,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.17,0.402],[-0.996,-0.104],[-1.232,0.122],[0.255,-0.222]],"o":[[0.007,-0.462],[1.08,0.113],[-0.388,0.339],[-1.238,-0.819]],"v":[[-2.058,0.356],[-1.219,-0.469],[2.215,-0.758],[1.27,0.066]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[35.536,58.351],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 11","np":2,"cix":2,"bm":0,"ix":11,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.218,-0.225],[0.813,-0.669],[1.112,-0.548],[-0.382,0.093],[-0.17,0.969]],"o":[[0.229,0.214],[0.425,0.438],[-0.474,-1.036],[0.366,-0.155],[0.637,-0.156],[0.003,-0.004]],"v":[[0.469,-1.065],[1.153,-0.422],[1.425,1.09],[-2.238,0.296],[-1.136,-0.157],[0.483,-1.086]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[99.033,54.065],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 12","np":2,"cix":2,"bm":0,"ix":12,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.732,-0.36],[2.415,-0.344],[0.018,0.114],[-2.488,0.362],[0.214,0.128]],"o":[[0.439,0.216],[-2.702,0.385],[-0.018,-0.113],[2.179,-0.317],[-0.46,-0.276],[-0.005,-0.002]],"v":[[2.183,-0.931],[3.793,-0.139],[-3.74,0.934],[-3.793,0.592],[3.052,-0.402],[2.169,-0.932]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[72.912,53.923],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 13","np":2,"cix":2,"bm":0,"ix":13,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.37,0.114],[-0.388,0.126],[-0.458,0],[-0.061,-0.135],[-0.243,0.611],[-0.429,-0.276],[0.067,-0.108],[0.351,0.206]],"o":[[0.341,-0.269],[0.414,-0.135],[0.061,0.136],[0.144,-0.362],[0.476,0.305],[-0.067,0.108],[-0.351,-0.206],[-0.583,1.178]],"v":[[-2.223,0.811],[-1.191,0.035],[0.173,0.004],[0.357,0.41],[0.889,-0.925],[2.223,-0.068],[2.022,0.255],[0.968,-0.363]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[43.493,56.323],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 14","np":2,"cix":2,"bm":0,"ix":14,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.008,0.072],[-1.488,0.068],[-0.405,-0.2],[0.028,-0.117],[1.869,0.095]],"o":[[1.484,-0.15],[0.395,-0.018],[-0.028,0.118],[-1.869,-0.095],[0.008,-0.073]],"v":[[-2.821,-0.034],[1.632,-0.451],[2.846,0.117],[2.762,0.469],[-2.846,0.183]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[114.533,0.719],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 15","np":2,"cix":2,"bm":0,"ix":15,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.005,-0.093],[1.882,-0.231],[0.109,-0.551],[0.419,0.584],[-2.324,0.162]],"o":[[-1.856,0.228],[-0.041,0.209],[-0.447,-0.622],[2.321,-0.162],[0.004,0.093]],"v":[[3.491,-0.774],[-2.104,-0.087],[-2.329,1.052],[-3.491,-0.565],[3.477,-1.052]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[104.667,54.312],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 16","np":2,"cix":2,"bm":0,"ix":16,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0.058,-0.048],[1.026,-0.226],[1.774,-0.158],[0.158,0.303],[-3.387,0.393],[-0.021,-0.118],[0.264,-0.231]],"o":[[-0.219,-0.148],[-0.946,0.779],[-1.726,0.382],[-0.142,0.013],[3.387,-0.393],[0.021,0.118],[-0.257,0.229],[-0.006,0.003]],"v":[[4.35,0.273],[3.714,-0.146],[0.643,0.206],[-4.665,0.756],[-5.113,0.409],[5.049,-0.769],[5.113,-0.416],[4.335,0.273]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[65.593,28.538],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 17","np":2,"cix":2,"bm":0,"ix":17,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.064,-0.198],[-0.873,0.27],[0.045,0.155]],"o":[[0.064,0.198],[0.874,-0.27],[-0.045,-0.155],[0,0]],"v":[[-46.909,22.412],[-46.716,23.007],[-44.096,22.197],[-44.232,21.731]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-0.005,-0.224],[0,0],[0.001,0.128]],"o":[[0.006,0.224],[0,0],[-0.001,-0.128],[0,0]],"v":[[-59.195,-11.776],[-59.178,-11.103],[-56.652,-11.391],[-56.655,-11.776]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,-0.173],[-1.029,0.078],[0.008,0.096]],"o":[[0.001,0.173],[1.029,-0.077],[-0.008,-0.096],[0,0]],"v":[[9.677,-18.163],[9.679,-17.643],[12.766,-17.875],[12.742,-18.163]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[-0.622,-0.064],[-0.038,0.151],[0.799,0.251],[-0.052,-0.01]],"o":[[0.038,-0.152],[-0.59,-0.186],[0,0.334],[0.611,0.119]],"v":[[73.124,-18.306],[73.238,-18.761],[71.259,-19.383],[71.266,-18.534]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0.2,-0.622],[-0.326,0.142],[0.034,0.144],[0.204,0.329],[0.042,-0.102]],"o":[[0.534,-0.116],[0.167,-0.073],[-0.087,-0.373],[-0.032,-0.051],[-0.224,0.544]],"v":[[65.742,-24.352],[66.976,-24.642],[67.319,-25.159],[66.836,-26.217],[66.324,-26.09]],"c":true},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[-0.81,0.507],[-0.273,-1.374]],"o":[[-2.144,-0.221],[0.643,-0.402]],"v":[[-62.015,-12.891],[-64.104,-11.583]],"c":true},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[-1.01,0.077],[0.02,0.197],[1.006,-0.114],[-0.016,-0.159]],"o":[[-0.02,-0.196],[-1.006,0.114],[0.015,0.159],[1.01,-0.076]],"v":[[-25.77,-15.988],[-25.829,-16.577],[-28.847,-16.236],[-28.8,-15.758]],"c":true},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[-0.921,0.229],[0.064,0.179],[0,0],[-0.051,-0.177]],"o":[[-0.064,-0.179],[0,0],[0.051,0.177],[0.922,-0.228]],"v":[[-41.454,-15.941],[-41.645,-16.478],[-44.371,-15.787],[-44.218,-15.255]],"c":true},"ix":2},"nm":"Path 8","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0.951,-0.196],[-0.582,0.895]],"o":[[1.202,0.57],[-1.147,0.236]],"v":[[-42.523,21.037],[-39.473,20.409]],"c":true},"ix":2},"nm":"Path 9","mn":"ADBE Vector Shape - Group","hd":false},{"ind":9,"ty":"sh","ix":10,"ks":{"a":0,"k":{"i":[[0,0],[0.073,0.227],[0.809,-0.282],[0,0]],"o":[[-0.074,-0.227],[-0.809,0.282],[0,0],[0,0]],"v":[[-75.301,10.392],[-75.521,9.711],[-77.948,10.557],[-77.797,11.007]],"c":true},"ix":2},"nm":"Path 10","mn":"ADBE Vector Shape - Group","hd":false},{"ind":10,"ty":"sh","ix":11,"ks":{"a":0,"k":{"i":[[0.424,-0.109],[0.044,0.959],[0.432,-0.065]],"o":[[1.951,0.772],[-0.441,0.021],[-0.43,0.064]],"v":[[20.362,-20.586],[22.951,-20.974],[21.635,-20.902]],"c":true},"ix":2},"nm":"Path 11","mn":"ADBE Vector Shape - Group","hd":false},{"ind":11,"ty":"sh","ix":12,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.897,1.477]],"o":[[0,0],[0.942,-0.514],[0,0]],"v":[[-18.39,-18.968],[-18.337,-18.461],[-15.32,-18.968]],"c":true},"ix":2},"nm":"Path 12","mn":"ADBE Vector Shape - Group","hd":false},{"ind":12,"ty":"sh","ix":13,"ks":{"a":0,"k":{"i":[[-1.261,0.121],[0.028,0.158],[1.249,-0.093],[-0.016,-0.187]],"o":[[-0.028,-0.157],[-1.249,0.092],[0.016,0.186],[1.261,-0.122]],"v":[[-13.714,-16.686],[-13.799,-17.159],[-17.546,-16.882],[-17.497,-16.322]],"c":true},"ix":2},"nm":"Path 13","mn":"ADBE Vector Shape - Group","hd":false},{"ind":13,"ty":"sh","ix":14,"ks":{"a":0,"k":{"i":[[-0.201,0],[0,0],[-0.214,0.077],[-0.295,0.213],[0.044,-0.004],[0.334,-0.054],[0.342,-0.057],[0.232,-0.073],[-0.232,-0.103]],"o":[[0,0],[0.241,0],[0.341,-0.122],[0.042,-0.03],[-0.334,0.035],[-0.342,0.056],[-0.237,0.04],[0.206,0.161],[0.167,0.074]],"v":[[-52.665,-14.796],[-52.665,-14.782],[-51.946,-14.797],[-50.989,-15.33],[-51.159,-15.808],[-52.151,-15.6],[-53.188,-15.492],[-53.884,-15.278],[-53.26,-14.81]],"c":true},"ix":2},"nm":"Path 14","mn":"ADBE Vector Shape - Group","hd":false},{"ind":14,"ty":"sh","ix":15,"ks":{"a":0,"k":{"i":[[-1.442,0.079],[0.009,0.172],[1.441,-0.068],[-0.008,-0.183]],"o":[[-0.008,-0.172],[-1.441,0.069],[0.007,0.183],[1.442,-0.079]],"v":[[18.716,-18.16],[18.69,-18.676],[14.367,-18.471],[14.389,-17.923]],"c":true},"ix":2},"nm":"Path 15","mn":"ADBE Vector Shape - Group","hd":false},{"ind":15,"ty":"sh","ix":16,"ks":{"a":0,"k":{"i":[[-0.09,-0.2],[-0.091,-0.007],[0,0],[0.726,0.058],[-0.129,-0.279],[-0.153,-0.244],[-0.161,0.297]],"o":[[0.09,0.007],[0,0],[-0.609,-0.048],[0.161,0.478],[0.121,0.26],[0.156,-0.289],[0.061,0.137]],"v":[[28.643,-22.922],[28.915,-22.901],[29.054,-24.227],[27.111,-24.382],[27.476,-23.321],[27.928,-22.584],[28.402,-23.459]],"c":true},"ix":2},"nm":"Path 16","mn":"ADBE Vector Shape - Group","hd":false},{"ind":16,"ty":"sh","ix":17,"ks":{"a":0,"k":{"i":[[0.373,-1.004],[-1.347,0.304]],"o":[[1.502,-0.34],[-1.697,-0.578]],"v":[[-39.926,-13.838],[-35.729,-14.786]],"c":true},"ix":2},"nm":"Path 17","mn":"ADBE Vector Shape - Group","hd":false},{"ind":17,"ty":"sh","ix":18,"ks":{"a":0,"k":{"i":[[0.623,-0.312],[-0.077,-0.198],[-0.639,0.255],[0.06,0.138],[0.129,-0.053]],"o":[[0.077,0.199],[0.659,-0.207],[0.138,-0.055],[-0.068,-0.159],[-0.643,0.262]],"v":[[-36.114,1.503],[-35.884,2.098],[-33.917,1.455],[-33.695,0.894],[-34.237,0.589]],"c":true},"ix":2},"nm":"Path 18","mn":"ADBE Vector Shape - Group","hd":false},{"ind":18,"ty":"sh","ix":19,"ks":{"a":0,"k":{"i":[[1.248,-0.098],[-0.223,1.016]],"o":[[1.146,1.007],[-1.105,0.087]],"v":[[-36.895,-18.677],[-33.441,-18.948]],"c":true},"ix":2},"nm":"Path 19","mn":"ADBE Vector Shape - Group","hd":false},{"ind":19,"ty":"sh","ix":20,"ks":{"a":0,"k":{"i":[[-0.017,-0.091],[-0.87,-0.048],[0.712,0.095],[0.579,0]],"o":[[0.907,0.051],[0.052,-0.648],[-0.474,-0.063],[0.097,0.534]],"v":[[70.737,-20.877],[73.308,-20.734],[72.11,-21.792],[70.568,-21.804]],"c":true},"ix":2},"nm":"Path 20","mn":"ADBE Vector Shape - Group","hd":false},{"ind":20,"ty":"sh","ix":21,"ks":{"a":0,"k":{"i":[[0.286,-0.482],[-0.416,0.093],[-0.142,0.207],[0.05,0.006],[0.463,-0.164]],"o":[[0.885,-0.05],[0.235,-0.053],[0.08,-0.115],[-0.522,-0.056],[-0.301,0.106]],"v":[[-13.216,-11.339],[-11.474,-11.458],[-10.854,-11.928],[-10.927,-12.462],[-12.488,-12.487]],"c":true},"ix":2},"nm":"Path 21","mn":"ADBE Vector Shape - Group","hd":false},{"ind":21,"ty":"sh","ix":22,"ks":{"a":0,"k":{"i":[[-0.616,0.659],[0.614,0.34],[0.163,-0.382],[-0.216,-0.267],[0.135,-0.281],[-0.096,-0.065]],"o":[[-0.413,-0.228],[-0.197,0.242],[-0.056,0.131],[-0.078,0.164],[0.097,0.065],[0.519,-0.555]],"v":[[-84.531,-4.358],[-85.982,-5.16],[-86.685,-4.232],[-86.127,-3.51],[-86.475,-2.784],[-86.185,-2.589]],"c":true},"ix":2},"nm":"Path 22","mn":"ADBE Vector Shape - Group","hd":false},{"ind":22,"ty":"sh","ix":23,"ks":{"a":0,"k":{"i":[[-0.234,1.036],[0.892,-1.568]],"o":[[-1.014,0.805],[1.498,0.566]],"v":[[82.942,16.051],[79.52,16.84]],"c":true},"ix":2},"nm":"Path 23","mn":"ADBE Vector Shape - Group","hd":false},{"ind":23,"ty":"sh","ix":24,"ks":{"a":0,"k":{"i":[[-0.088,0.482],[1.384,-1.313],[-0.447,0.074],[-1.069,0.185],[-0.047,-0.111]],"o":[[-1.735,0.504],[0.466,0.071],[1.071,-0.179],[0.047,0.112],[0.059,-0.328]],"v":[[-35.954,-17.492],[-40.873,-16.078],[-39.51,-16.134],[-36.301,-16.688],[-36.161,-16.354]],"c":true},"ix":2},"nm":"Path 24","mn":"ADBE Vector Shape - Group","hd":false},{"ind":24,"ty":"sh","ix":25,"ks":{"a":0,"k":{"i":[[-1.409,0.239],[-0.004,0.108],[0.762,0.213],[0.465,-1.392]],"o":[[0.003,-0.108],[-0.809,-0.046],[-1.059,-0.297],[1.514,-0.257]],"v":[[44.925,21.377],[44.936,21.054],[42.519,20.885],[40.593,22.112]],"c":true},"ix":2},"nm":"Path 25","mn":"ADBE Vector Shape - Group","hd":false},{"ind":25,"ty":"sh","ix":26,"ks":{"a":0,"k":{"i":[[-0.861,0.188],[0.029,0.171],[1.216,-0.165],[-0.04,-0.398],[0,0],[0.135,0.237]],"o":[[-0.029,-0.171],[-1.175,0.159],[0.05,0.505],[0,0],[-0.148,-0.257],[0.928,-0.202]],"v":[[-64.865,-13.399],[-64.951,-13.913],[-68.516,-13.43],[-68.389,-12.148],[-67.13,-12.148],[-67.516,-12.822]],"c":true},"ix":2},"nm":"Path 26","mn":"ADBE Vector Shape - Group","hd":false},{"ind":26,"ty":"sh","ix":27,"ks":{"a":0,"k":{"i":[[1.169,-0.465],[-0.038,-0.113],[-1.816,0.376],[0.029,0.077],[0.871,0.1]],"o":[[0.037,0.113],[1.816,-0.376],[-0.029,-0.077],[-0.695,-0.08],[-0.876,0.348]],"v":[[-50.492,-12.244],[-50.38,-11.905],[-44.932,-13.033],[-45.019,-13.263],[-47.279,-13.522]],"c":true},"ix":2},"nm":"Path 27","mn":"ADBE Vector Shape - Group","hd":false},{"ind":27,"ty":"sh","ix":28,"ks":{"a":0,"k":{"i":[[0,0],[-0.012,-0.125],[-0.273,1.049]],"o":[[0.012,0.126],[2.619,0.74],[0,0]],"v":[[-13.378,0.359],[-13.342,0.736],[-9.346,0.359]],"c":true},"ix":2},"nm":"Path 28","mn":"ADBE Vector Shape - Group","hd":false},{"ind":28,"ty":"sh","ix":29,"ks":{"a":0,"k":{"i":[[-0.217,0.422],[1.834,-0.422],[-0.029,-0.143],[-1.726,0.322]],"o":[[-2.11,0.486],[0.029,0.143],[1.735,-0.271],[0.178,-0.033]],"v":[[-45.257,-15.814],[-51.034,-14.483],[-50.948,-14.053],[-45.749,-14.897]],"c":true},"ix":2},"nm":"Path 29","mn":"ADBE Vector Shape - Group","hd":false},{"ind":29,"ty":"sh","ix":30,"ks":{"a":0,"k":{"i":[[-0.715,-0.299],[-0.052,0.131],[1.169,-0.748],[0.123,-0.3],[-0.035,0.024],[-0.233,0.215]],"o":[[0.052,-0.13],[-0.825,-1.453],[-0.25,0.159],[-0.024,0.057],[0.259,-0.179],[0.677,0.284]],"v":[[85.477,-12.354],[85.634,-12.746],[82.791,-13.78],[82.285,-12.95],[82.655,-12.61],[83.37,-13.237]],"c":true},"ix":2},"nm":"Path 30","mn":"ADBE Vector Shape - Group","hd":false},{"ind":30,"ty":"sh","ix":31,"ks":{"a":0,"k":{"i":[[0,0],[0,0.127],[1.596,0.073],[0.016,-0.141],[-0.733,-0.267],[0.022,0.062]],"o":[[0,-0.128],[-1.596,-0.073],[-0.015,0.141],[0.734,0.267],[-0.022,-0.062],[0,0]],"v":[[30.341,-20.336],[30.342,-20.719],[25.553,-20.937],[25.506,-20.514],[27.707,-19.713],[27.641,-19.899]],"c":true},"ix":2},"nm":"Path 31","mn":"ADBE Vector Shape - Group","hd":false},{"ind":31,"ty":"sh","ix":32,"ks":{"a":0,"k":{"i":[[0,0],[-0.067,0.118],[0.26,-0.034],[1.131,-0.246],[-0.019,-0.126]],"o":[[0.068,-0.119],[-0.297,-0.253],[-1.144,0.148],[0.02,0.126],[0,0]],"v":[[54.531,-17.59],[54.733,-17.945],[53.847,-18.663],[50.449,-17.968],[50.507,-17.59]],"c":true},"ix":2},"nm":"Path 32","mn":"ADBE Vector Shape - Group","hd":false},{"ind":32,"ty":"sh","ix":33,"ks":{"a":0,"k":{"i":[[-0.157,0.009],[0.097,-0.699],[-1.929,0.008],[0.822,0.327],[0.294,-0.21],[-0.048,-0.084]],"o":[[-0.116,0.837],[0.85,-1.058],[-0.896,-1.344],[-0.182,-0.073],[0.048,0.084],[0.293,-0.018]],"v":[[-26.707,-19.068],[-27.016,-16.832],[-24.005,-19.437],[-26.728,-19.863],[-27.594,-19.275],[-27.45,-19.024]],"c":true},"ix":2},"nm":"Path 33","mn":"ADBE Vector Shape - Group","hd":false},{"ind":33,"ty":"sh","ix":34,"ks":{"a":0,"k":{"i":[[0.519,-0.078],[-0.015,-0.149],[-1.944,0.089],[0.045,0.208],[0.42,-0.083],[0.72,-0.18]],"o":[[0.015,0.15],[1.944,-0.089],[-0.304,-0.415],[-0.228,-1.068],[-0.725,0.145],[-0.506,0.126]],"v":[[-25.068,-16.583],[-25.024,-16.134],[-19.193,-16.401],[-20.094,-17.123],[-21.377,-17.446],[-23.515,-16.825]],"c":true},"ix":2},"nm":"Path 34","mn":"ADBE Vector Shape - Group","hd":false},{"ind":34,"ty":"sh","ix":35,"ks":{"a":0,"k":{"i":[[1.314,-0.152],[-0.081,-0.005],[-1.144,0.021],[-0.012,0.289],[0.184,-0.015]],"o":[[0.242,0.412],[1.144,0.064],[0.111,-0.002],[0.004,-0.107],[-1.126,0.093]],"v":[[1.733,-19.425],[2.125,-18.776],[5.559,-18.675],[5.846,-19.493],[5.294,-19.819]],"c":true},"ix":2},"nm":"Path 35","mn":"ADBE Vector Shape - Group","hd":false},{"ind":35,"ty":"sh","ix":36,"ks":{"a":0,"k":{"i":[[2.353,-0.119],[-0.01,-0.127],[-0.592,-0.214],[-1.256,-0.147],[-0.702,0.839]],"o":[[0.011,0.126],[0.558,0.201],[0.519,-0.54],[1.616,0.19],[-2.503,0.127]],"v":[[-76.253,-10.518],[-76.221,-10.139],[-74.513,-9.523],[-72.214,-10.046],[-69.045,-10.883]],"c":true},"ix":2},"nm":"Path 36","mn":"ADBE Vector Shape - Group","hd":false},{"ind":36,"ty":"sh","ix":37,"ks":{"a":0,"k":{"i":[[-0.972,1.465],[1.136,-0.06],[0.125,-0.246],[-0.155,-0.089]],"o":[[-1.139,0],[-0.223,0.011],[-0.061,0.119],[1.128,0.646]],"v":[[-80.38,-5.356],[-83.795,-5.328],[-84.409,-4.737],[-84.149,-4.174]],"c":true},"ix":2},"nm":"Path 37","mn":"ADBE Vector Shape - Group","hd":false},{"ind":37,"ty":"sh","ix":38,"ks":{"a":0,"k":{"i":[[-0.378,0.139],[0.459,-1.367],[0.1,-0.016],[0.462,-1.086],[-0.555,0.953],[-0.857,-0.147],[0.184,0.348]],"o":[[-1.578,-0.576],[-0.06,0.179],[-1.355,0.224],[1.377,-0.656],[0.443,0.076],[-0.328,-0.62],[-0.048,0.018]],"v":[[-85.345,-9.681],[-87.596,-8.788],[-87.82,-8.286],[-89.293,-5.829],[-86.913,-8.472],[-85.188,-8.176],[-85.879,-9.484]],"c":true},"ix":2},"nm":"Path 38","mn":"ADBE Vector Shape - Group","hd":false},{"ind":38,"ty":"sh","ix":39,"ks":{"a":0,"k":{"i":[[-0.701,0.964],[0.823,-1.426]],"o":[[-1.927,-0.937],[1.119,0.584]],"v":[[-13.908,-11.872],[-18.32,-11.058]],"c":true},"ix":2},"nm":"Path 39","mn":"ADBE Vector Shape - Group","hd":false},{"ind":39,"ty":"sh","ix":40,"ks":{"a":0,"k":{"i":[[-1.592,0.273],[-0.022,0.168],[0.279,-0.041],[2.066,-0.361],[0.217,-0.162],[-0.23,0.025],[-0.721,0.131]],"o":[[0.022,-0.168],[-0.293,-0.055],[-2.075,0.309],[-0.237,0.042],[0.252,0.164],[0.724,-0.082],[1.589,-0.29]],"v":[[-38.705,-17.406],[-38.64,-17.91],[-39.518,-18.063],[-45.73,-17.061],[-46.383,-16.591],[-45.632,-16.13],[-43.481,-16.58]],"c":true},"ix":2},"nm":"Path 40","mn":"ADBE Vector Shape - Group","hd":false},{"ind":40,"ty":"sh","ix":41,"ks":{"a":0,"k":{"i":[[-0.422,-0.021],[-0.228,-0.317],[-0.108,0.07],[0.124,0.499],[1.377,0.031],[0.206,-0.128],[-0.188,-0.105],[-0.89,-0.468],[-0.089,0.09],[0.209,0.337]],"o":[[0.261,0.362],[0.107,-0.071],[-0.13,-0.52],[-1.449,-0.07],[-0.204,-0.004],[0.151,0.17],[0.878,0.49],[0.089,-0.09],[-0.25,-0.402],[0.456,0.023]],"v":[[4.393,-22.461],[5.109,-21.466],[5.431,-21.677],[5.047,-23.217],[0.844,-23.401],[0.225,-23.036],[0.684,-22.535],[3.348,-21.121],[3.616,-21.392],[2.907,-22.534]],"c":true},"ix":2},"nm":"Path 41","mn":"ADBE Vector Shape - Group","hd":false},{"ind":41,"ty":"sh","ix":42,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-1.178,0.074],[0.386,-0.478],[-0.945,0.203],[0.395,0.152],[-1.443,0.337],[0.036,0.176]],"o":[[0,0],[1.041,-0.065],[-0.298,0.37],[0.986,-0.212],[-0.544,-0.21],[1.589,-0.371],[-0.036,-0.177],[0,0]],"v":[[-64.342,-13.893],[-64.276,-13.366],[-61.016,-13.571],[-61.889,-12.49],[-59.283,-13.05],[-60.506,-13.521],[-56.031,-14.566],[-56.138,-15.096]],"c":true},"ix":2},"nm":"Path 42","mn":"ADBE Vector Shape - Group","hd":false},{"ind":42,"ty":"sh","ix":43,"ks":{"a":0,"k":{"i":[[-0.594,0.959],[0.178,0.024],[0.341,0.06],[-0.332,0.088],[-0.625,0.107],[-0.203,0.176],[0.211,0.03],[0.721,-0.057],[0.29,-0.403],[0.146,-0.744]],"o":[[-0.238,0],[-0.344,-0.045],[0.282,-0.274],[0.605,-0.16],[0.226,-0.039],[-0.195,-0.137],[-0.724,-0.105],[-0.605,0.048],[-0.384,0.535],[1.089,0.65]],"v":[[-0.346,-17.548],[-0.946,-17.552],[-1.971,-17.726],[-1.115,-18.516],[0.781,-18.699],[1.393,-19.206],[0.804,-19.601],[-1.383,-19.776],[-3.108,-19.207],[-3.595,-17.085]],"c":true},"ix":2},"nm":"Path 43","mn":"ADBE Vector Shape - Group","hd":false},{"ind":43,"ty":"sh","ix":44,"ks":{"a":0,"k":{"i":[[3.072,-0.279],[-0.908,0.18],[-1.144,-0.281],[-1.283,0.04],[0.013,0.92]],"o":[[-0.004,0.681],[0.975,-0.192],[1.202,0.295],[0.906,-0.028],[-3.048,0.277]],"v":[[54.905,-18.58],[55.807,-17.622],[58.814,-17.98],[62.645,-18.01],[63.998,-19.405]],"c":true},"ix":2},"nm":"Path 44","mn":"ADBE Vector Shape - Group","hd":false},{"ind":44,"ty":"sh","ix":45,"ks":{"a":0,"k":{"i":[[0.921,-0.293],[-0.012,-0.15],[-5.294,0.546],[0.018,0.179],[1.341,-0.079],[3.022,-0.24]],"o":[[0.012,0.15],[5.294,-0.545],[-0.018,-0.179],[-1.338,0.134],[-3.028,0.178],[-0.938,0.074]],"v":[[-41.304,4.852],[-41.269,5.303],[-25.386,3.667],[-25.439,3.129],[-29.453,3.521],[-38.539,4.009]],"c":true},"ix":2},"nm":"Path 45","mn":"ADBE Vector Shape - Group","hd":false},{"ind":45,"ty":"sh","ix":46,"ks":{"a":0,"k":{"i":[[0.853,-0.559],[-0.095,0.335],[0.381,-0.056],[1.123,0.171],[0.197,-1.086],[-1.129,0.056],[-1.285,1.943]],"o":[[0.155,-0.546],[-0.396,-0.048],[-1.189,0.174],[-1.615,-0.245],[1.227,-0.093],[1.897,-0.094],[-1.335,-1.237]],"v":[[-27.192,-21.496],[-26.848,-22.711],[-28.035,-22.839],[-31.573,-22.275],[-33.345,-20.534],[-29.864,-20.792],[-24.693,-22.62]],"c":true},"ix":2},"nm":"Path 46","mn":"ADBE Vector Shape - Group","hd":false},{"ind":46,"ty":"sh","ix":47,"ks":{"a":0,"k":{"i":[[-1.374,0.729],[-0.683,0.26],[-0.7,1.003],[-0.875,-0.026],[-0.442,0.038],[-0.598,0.233],[0.262,0],[1.743,-0.056],[1.417,-0.109],[1.216,-0.164]],"o":[[0.781,0],[0.749,-0.285],[0.281,-0.404],[0.449,0.013],[0.324,-0.028],[-0.403,-0.253],[-1.743,0.001],[-1.422,0.045],[-1.078,0.082],[1.11,1.53]],"v":[[10.612,-18.952],[12.935,-19.007],[15.301,-19.719],[17.83,-19.749],[19.174,-19.663],[20.405,-20.123],[19.477,-20.681],[14.248,-20.566],[9.985,-20.382],[6.622,-19.94]],"c":true},"ix":2},"nm":"Path 47","mn":"ADBE Vector Shape - Group","hd":false},{"ind":47,"ty":"sh","ix":48,"ks":{"a":0,"k":{"i":[[1.401,-0.437],[-1.904,0.394],[-0.375,-0.116],[-0.232,0.314],[-0.179,0.223],[-0.144,-0.443],[-1.558,-1.4],[-0.385,-0.015],[-0.559,0.016],[-1.433,0.109],[-0.035,-0.238],[-0.201,-0.128],[-1.067,0.106],[0.215,0.681],[0.483,0.194],[0.345,0.043],[0.298,-0.015],[1.069,-0.087],[1.773,-0.787],[-0.003,-0.045],[0.675,-0.021],[1.612,-0.04],[0.994,-0.177]],"o":[[0.445,1.688],[0.382,-0.078],[0.368,0.114],[0.171,-0.23],[0.094,0.29],[1.386,-0.242],[0.399,-0.109],[0.566,0.023],[1.377,-0.039],[0.001,0.005],[0.388,-0.09],[0.994,0.638],[0.753,-0.074],[-0.114,-0.362],[-0.312,-0.125],[-0.301,-0.037],[-0.76,0.036],[-1.363,0.815],[-0.032,-0.416],[-0.73,0.213],[-1.611,0.05],[-0.855,0.022],[-0.227,-0.327]],"v":[[-24.375,-22.891],[-21.544,-21.367],[-20.344,-21.287],[-17.594,-21.854],[-17.059,-22.526],[-16.727,-21.503],[-12.429,-22.079],[-11.252,-22.378],[-9.564,-22.084],[-5.381,-22.381],[-5.307,-21.88],[-4.273,-22.095],[-1.194,-21.748],[-0.141,-22.813],[-1.466,-23.575],[-2.495,-23.718],[-3.397,-23.824],[-5.984,-23.621],[-11.08,-23.109],[-11.13,-23.759],[-13.2,-23.183],[-18.041,-23.251],[-20.739,-22.794]],"c":true},"ix":2},"nm":"Path 48","mn":"ADBE Vector Shape - Group","hd":false},{"ind":48,"ty":"sh","ix":49,"ks":{"a":0,"k":{"i":[[-0.197,-0.164],[-0.437,-0.125],[-1.3,-0.812],[-0.157,0],[-2.455,0.302],[-2.08,0.757],[-1.221,-0.153],[-1.182,-0.553],[-0.293,0.177],[0.022,0.146],[1.156,0.011],[1.554,-0.121],[1.9,-0.14],[1.127,0.291],[0.333,-0.455],[1.03,0.127],[1.868,0.23],[1.701,0.282],[1.675,0.302],[-1.196,0.179],[-1.321,-0.172],[-0.239,-0.032],[-1.137,-0.181]],"o":[[0.6,-0.169],[1.415,0.405],[0.128,0.08],[2.491,-0.003],[2.095,-0.257],[1.134,-0.413],[1.204,0.15],[0.172,0.081],[-0.022,-0.147],[-1.154,-0.153],[-1.555,-0.014],[-1.899,0.148],[-1.213,0.09],[-0.97,-0.251],[-1.238,-0.25],[-1.869,-0.23],[-1.711,-0.209],[-1.545,-0.257],[0.049,1.088],[1.272,-0.19],[0.239,0.031],[1.141,0.154],[0.256,0.041]],"v":[[42.238,-21.024],[43.855,-21.441],[48.11,-20.248],[48.578,-20.147],[56.041,-20.239],[62.358,-20.938],[66.083,-21.221],[69.712,-20.931],[70.574,-21.426],[70.507,-21.865],[67.044,-22.295],[62.377,-22.022],[56.683,-21.534],[53.058,-21.449],[51.147,-21.22],[47.866,-21.867],[42.245,-22.432],[37.131,-23.213],[32.372,-24.066],[33.497,-22.663],[37.454,-22.282],[38.143,-21.973],[41.573,-21.553]],"c":true},"ix":2},"nm":"Path 49","mn":"ADBE Vector Shape - Group","hd":false},{"ind":49,"ty":"sh","ix":50,"ks":{"a":0,"k":{"i":[[-0.439,0.085],[0.018,0.171],[3.401,0.004],[2.458,0.057],[2.692,0.076],[0.366,-0.118],[0,0],[-0.318,-0.129],[0.017,-0.103],[3.433,-0.379],[0.038,-0.357],[1.171,-0.094],[-0.005,-0.119],[-1.502,0.044],[-2.749,0.129],[-0.915,-0.011],[-1.846,-0.022],[-0.008,0.027],[-0.12,-0.03],[-0.318,-0.021],[-1.373,0.059],[-3.495,0.265]],"o":[[-0.019,-0.172],[-3.402,0],[-2.459,-0.004],[-2.691,-0.063],[-0.362,-0.01],[0,0],[0.318,0.13],[-0.017,0.103],[-3.264,-1.171],[-0.018,0.171],[-1.213,0.097],[0.004,0.119],[1.506,0.075],[2.75,-0.079],[0.912,-0.043],[1.847,0.022],[0.141,0.002],[0.417,-1.288],[0.545,-0.227],[1.386,0.093],[3.5,-0.151],[0.443,-0.034]],"v":[[40.578,-12.366],[40.523,-12.88],[30.319,-12.881],[22.943,-12.916],[14.871,-13.214],[13.774,-12.877],[13.82,-12.595],[14.773,-12.207],[14.722,-11.898],[4.683,-12.636],[4.595,-11.813],[1.041,-11.528],[1.055,-11.17],[5.571,-10.965],[13.816,-11.398],[16.561,-11.362],[22.1,-11.301],[22.504,-11.26],[23.426,-11.296],[24.626,-11.773],[28.773,-11.388],[39.261,-12.118]],"c":true},"ix":2},"nm":"Path 50","mn":"ADBE Vector Shape - Group","hd":false},{"ind":50,"ty":"sh","ix":51,"ks":{"a":0,"k":{"i":[[-0.137,0.191],[-0.399,0.092],[-1.149,0.232],[-1.242,0.201],[-0.862,0.339],[-0.4,-0.486],[1.209,-0.131],[0.757,-0.019],[1.979,0],[-0.041,-0.376],[1.62,-0.113],[-0.1,-0.29],[0.092,-0.101],[1.167,-0.132],[0.564,-0.732],[-1.135,0.062],[-1.625,0.173]],"o":[[0.384,-0.089],[0.039,0.504],[1.228,-0.248],[0.777,-0.125],[0.019,0.023],[0.092,-1.162],[-0.758,0.081],[-1.845,0.045],[0.053,0.467],[-1.28,-1.769],[0.141,0.409],[-0.091,0.102],[-0.654,-1.984],[-0.438,0.049],[1.573,0],[1.632,-0.089],[0.155,-0.017]],"v":[[15.078,-22.79],[16.245,-23.06],[17.264,-22.093],[21.035,-22.411],[23.401,-23.308],[24.03,-22.545],[22.898,-24.303],[20.632,-24],[14.962,-23.986],[15.1,-22.763],[10.506,-23.642],[10.847,-22.653],[10.573,-22.348],[7.276,-23.474],[5.93,-21.811],[9.78,-21.823],[14.665,-22.241]],"c":true},"ix":2},"nm":"Path 51","mn":"ADBE Vector Shape - Group","hd":false},{"ind":51,"ty":"sh","ix":52,"ks":{"a":0,"k":{"i":[[0,0],[-1.009,-0.392],[-0.043,1.262],[0.939,0.08],[-0.002,0.121],[-1.274,0.139],[-1.274,0.048],[-0.736,-1.292],[-0.055,0.41],[-1.237,1.347],[0.853,-0.216],[1.062,-0.05],[2.902,-0.279],[1.344,-0.28],[0.467,0.14],[0.683,-0.813],[0.082,0.057],[1.176,-0.015],[0.525,0.081],[0.242,-0.04],[1.093,-0.203],[0.183,-0.121],[1.877,0.366],[0.088,-0.154],[0.882,0.006],[0.682,-0.089],[1.869,-0.077],[1.481,-0.038],[0.969,-0.231],[-0.003,0.006],[0.698,-0.043],[2.024,-0.273],[-0.645,-0.879],[0.597,-0.103],[0.017,0.062],[-0.126,0.175],[-0.139,0.381],[0.28,-0.045],[1.525,-0.29],[-0.144,0.326],[0.379,-0.197],[0.268,-0.361],[0.989,-0.261],[1.505,-0.096],[0.727,-0.963],[0.801,-1.119],[1.223,1.12],[-0.279,0.632],[0.405,0.937],[-0.447,0.8],[-0.595,1.407],[0.461,0.094],[-1.157,0.489],[-1.491,0.686],[-0.809,0.144],[0.256,-0.125],[1.681,-0.826],[0.258,-0.198],[-0.089,-0.161],[-1.864,0.727],[-0.175,-0.328],[-0.299,0.503],[-0.086,-0.043],[0.304,-0.459],[-1.119,0.197],[0.64,-0.823],[-0.032,0.052],[-1.31,0.335],[-0.896,0.079],[-0.501,-0.132],[-1.078,-0.577],[-0.64,0.095],[-2.182,0.292],[-0.756,0.175],[-0.014,0.036],[-0.354,0.054],[-2.448,0.458],[-2.032,0.4],[-2.782,0.553],[-0.146,0.467],[0.569,0.029],[-0.773,0.214],[0.025,0.15],[1.116,-0.19],[1.946,-0.406],[1.804,0.004],[2.475,-0.272],[1.134,-0.091],[-0.021,-0.064],[0.681,-0.079],[1.548,-0.127],[0.149,-0.141],[-1.123,0.638],[-0.081,-0.327],[-0.961,0.44],[-0.543,0.751],[-0.404,-1.192],[-0.095,0.088],[-0.434,-0.011],[-0.311,0.215],[-0.344,0.123],[-0.459,0.104],[-0.284,-0.451],[-0.436,0.474],[-0.247,-0.265],[-1.139,-1.054],[-0.535,0.175],[-0.064,-0.2],[-1.578,0.665],[-0.187,-0.414],[-0.359,0.336],[-0.564,1.091],[-0.203,-0.051],[-0.006,0.076],[-0.693,0.05],[-2.611,0.366],[-0.489,-0.114],[-1.002,-1.141],[-1.312,0.23],[-1.005,0.072],[-0.064,-0.236],[-0.003,0.006],[-0.677,0.307],[-0.216,0.199],[-0.453,-0.952],[-0.751,-1.154],[-0.726,0.738],[-0.621,-0.241],[-0.805,0.369],[-0.369,-0.446],[-0.108,0.333],[-3.593,-0.14],[-1.074,0.257],[-0.29,-0.472],[-0.022,0.173],[-1.106,0.036],[-0.828,0.398],[-1.911,0.153],[-2.121,-0.072],[-2.499,-0.137],[-0.31,-0.061],[-0.554,-0.136],[-0.658,-0.228],[-0.961,1.083],[-1.425,-0.333],[0.064,0.276],[0,-0.013],[-0.919,0.099],[-0.889,0.851],[-0.707,-0.274],[-0.087,0.885],[-0.161,-0.215],[-0.001,0.034],[0.042,0.423],[-0.615,-1.382],[-0.655,1.444],[2.119,1.022],[-1.571,-1.113],[-0.26,0.461],[-0.804,1.074],[-0.403,-0.089],[-0.194,0.312],[-1.386,-1.282],[0.034,0.137],[-0.561,-0.155],[-0.607,-0.383],[-1.111,-0.963],[-0.454,-0.032],[-2.084,-0.04],[-1.205,0.318],[-0.043,-1.938],[-0.159,-0.801],[0.144,-0.559],[1.054,-1.153],[-0.787,-1.45],[-0.071,-0.658],[-0.017,-1.146],[0.083,-0.745],[-0.572,-0.665],[-0.192,-0.842],[0.487,-0.716],[0.289,-0.903],[0.155,0.323],[0.222,-0.033],[0.23,0.267],[0.485,-0.6],[1.354,-1.179],[-0.111,-0.036],[0.101,-0.71],[0.112,-1.442],[-0.215,-0.198],[-0.4,-1.253],[-1.213,0.415],[-0.34,-0.538],[-0.352,-1.765],[0.289,-0.906],[0.125,0.043],[-0.157,0.563],[1.505,-0.101],[1.923,-0.089],[2.753,-0.117],[2.523,-0.212],[2.076,-0.161],[1.74,-0.109],[0.15,-0.085],[0.119,0.081],[0.94,-0.093],[1.432,-0.144],[0.981,0.483],[0.263,0.501],[0.222,-0.683],[-0.225,-0.103],[0.022,-0.091],[1.327,0.364],[0.097,-0.219],[0.155,-0.134],[0.343,1.147],[0.77,-0.166],[-0.226,-0.068],[0.235,-0.319],[0.191,0.148],[0.402,0.066],[0.807,-0.55],[0.361,0.012],[0.401,0.021],[0.258,0.358],[-1.308,0.211],[0.011,0.115],[0.361,-0.05],[0.521,0.672],[1.032,-0.094],[-0.299,-0.167],[1.357,0.471],[1.028,-0.096],[-0.028,0.089],[0.617,0.029],[0.364,0.26],[0.049,-0.272],[0,0],[0.901,0.008],[0.515,0.208],[-0.199,0.355],[1.407,-0.672],[1.885,0.255],[0.27,-0.383],[0.277,0.019],[-0.232,0.497],[0.582,0.199],[-0.235,0.116],[0.736,-1.047],[-0.429,-0.37],[0.785,-0.337],[0.596,-0.829],[1.163,-0.114],[0.015,-0.103],[-0.22,-0.032],[0,0],[0.108,0.056],[1.358,-0.112],[0.7,0],[1.668,-0.157],[-0.511,-0.868],[0,0],[0,0],[0,0],[1.634,-0.264],[-0.242,0.124],[1.203,-1],[0.414,-0.569],[0.18,-0.343],[0.628,0.467],[-0.119,1.682],[0,0],[-0.318,0.426],[1.356,-0.776],[0.873,-0.135],[2.065,-0.946],[0.185,-0.149],[-0.221,-0.017],[-0.357,0.055],[0.156,0.368],[0.519,-0.326],[0.427,-0.4],[-0.192,-0.053],[0.105,-0.079],[0.007,0.087],[0.712,-0.328],[2.659,-0.293],[0.778,-0.223],[0.205,-0.219],[0.576,0.134],[-0.25,-0.441],[0.592,0.546],[-0.145,0.299],[-0.417,0.786],[0,0],[-1.348,-0.668],[-0.147,0.231],[-0.068,-0.018],[0.028,-0.387],[-0.542,0.135],[0.207,0.841],[1.114,0.104],[1.497,-0.723],[-0.301,-0.281],[0.433,0.104],[0.093,-0.086],[-0.294,-0.39],[0.316,0.276],[0.186,0.551],[1.255,1.023],[0.515,-0.612],[-0.348,-0.082],[-0.725,-1.062],[-0.162,-0.296],[0.393,1.301],[0.132,-0.064],[1.106,0.873],[0.046,-0.017],[0.033,0.896],[-0.306,0.918],[-0.058,1.452],[0.629,0.2],[-1.21,0.676],[0,0],[0.704,-0.088],[0.03,0.064],[-1.344,0.841],[0.053,0.116],[0,0],[0.036,0.439],[-0.652,0.521],[0.027,0.13],[0.443,-0.046],[1.586,-0.27],[1.954,-0.106],[1.152,-0.399],[0.51,-0.228],[0.125,0.53],[0.051,0.596],[0.007,0.156],[-0.284,0.262],[-0.864,0.375],[-1.012,0.209],[-2.727,0.466],[-0.978,0.116],[-0.015,0.144],[1.069,0.385],[0.048,-0.112],[-0.114,-0.207],[0.587,-0.193],[-0.292,0.507],[0.405,-0.139],[-0.606,0.021],[-2.667,0.009],[-0.164,-0.268],[1.12,-0.102],[-0.096,-0.535],[-1.259,0.415],[-0.165,-0.033],[-0.18,0.715],[-0.729,-0.421],[-0.837,0.019],[-0.716,0.034],[-2.516,0.106],[-2.113,0.123],[0.155,0.44],[-1.78,0.534],[0.354,-0.665],[-0.342,0.02],[-1.294,0.157],[-0.806,0.31],[-0.296,0.382],[-0.086,-0.07],[0.19,-0.117],[-0.054,0.003],[-1.315,0.104],[-0.192,0.118],[0.156,0.16]],"o":[[1.028,0.344],[0.745,0.29],[-0.93,-0.08],[0.002,-0.12],[1.27,-0.19],[1.267,-0.138],[1.299,-0.05],[0.077,-0.571],[1.219,-0.495],[-0.649,-0.437],[-1.001,0.254],[-2.914,0.138],[-1.352,0.13],[-0.466,0.096],[-0.839,-0.251],[-0.108,0.128],[-1.192,-0.816],[-0.521,0.007],[-0.246,-0.038],[-1.097,0.181],[-0.228,0.043],[-1.706,1.125],[-0.222,-0.043],[-0.736,1.283],[-0.663,0.239],[-1.856,0.242],[-1.48,0.061],[-0.993,0.025],[-0.224,0.053],[-0.828,-0.236],[-2.035,0.124],[-0.975,0.131],[-0.618,0.108],[-0.018,-0.062],[0.267,-0.073],[0.228,-0.317],[-0.303,-0.1],[-1.526,0.245],[0.15,-0.339],[-0.422,0.115],[-0.242,0.125],[-0.288,-0.982],[-1.437,0.38],[-1.204,0.077],[-0.635,0.149],[-0.72,-1.286],[-0.367,-0.336],[0.403,-0.913],[-0.301,-0.696],[0.749,-1.337],[-0.412,-0.083],[-0.403,-1.538],[1.509,-0.637],[0.564,-0.259],[-0.328,0.262],[-1.681,0.825],[-0.287,0.141],[0.089,0.161],[1.772,-0.692],[0.132,0.247],[0.356,-0.598],[0.086,0.044],[-0.175,0.265],[1.3,-0.23],[-0.693,0.891],[0.274,0.049],[0.882,-1.484],[0.868,-0.222],[0.318,-0.028],[0.871,-0.701],[0.836,-0.263],[2.177,-0.324],[0.771,-0.103],[0.126,-0.03],[0.356,0.12],[2.462,-0.375],[2.036,-0.38],[2.784,-0.549],[0.196,-0.039],[-0.529,-0.028],[0.769,-0.213],[-0.025,-0.15],[-1.129,0.115],[-1.959,0.334],[-1.81,0.377],[-2.586,-0.005],[-1.131,0.125],[-0.045,0.004],[-0.743,0.267],[-1.541,0.181],[-0.17,0.014],[-0.857,-0.622],[0.081,0.33],[0.998,-0.457],[0.249,0.557],[0.289,-0.398],[0.437,-0.406],[0.699,0.317],[0.279,0.006],[0.302,-0.207],[0.357,-0.128],[0.19,0.302],[0.393,-0.428],[0.193,0.206],[0.682,-1.331],[0.183,0.169],[-0.008,-0.024],[1.567,-0.661],[0.114,0.252],[0.427,-0.402],[0.934,0.813],[0.25,0.359],[0.303,0.077],[0.083,-1.106],[2.636,-0.189],[0.424,-0.06],[0.851,-0.983],[0.977,-1.521],[0.953,-0.167],[0.066,0.247],[0.114,0.031],[0.719,-1.68],[0.287,-0.129],[0.662,-0.611],[0.384,-0.485],[0.632,-0.773],[0.149,-0.151],[0.552,-0.253],[0.325,0.392],[0.126,-0.387],[3.426,0.134],[0.794,-0.189],[0.123,0.2],[0.055,-0.435],[1.124,-0.094],[0.769,-0.025],[1.85,-0.89],[2.107,-0.17],[2.501,0.084],[0.308,0.017],[0.56,0.111],[0.519,0.128],[0.668,-0.788],[0.796,1.296],[-0.108,-0.468],[0.066,0.009],[0.033,0.868],[0.914,-0.099],[0.642,0.931],[0.844,0.327],[0.172,0.347],[0.04,0.053],[0.01,-0.271],[0.82,0.499],[1.566,0.293],[-2.198,-0.346],[1.44,0.269],[0.188,-0.333],[1.26,0.91],[0.647,0.259],[0.076,0.017],[1.23,0.023],[-0.049,-0.198],[0.587,0.028],[0.474,0.131],[0.747,-0.537],[0.242,0.21],[2.083,0.15],[1.239,0.024],[1.923,-0.506],[1.737,0.236],[1.435,0.177],[0.916,0.811],[-1.276,1.395],[0.298,0.549],[0.124,1.142],[0.011,0.741],[-0.07,0.632],[0.483,0.561],[0.178,0.779],[-0.418,0.615],[-0.219,-0.454],[-0.39,0.057],[-0.313,-0.363],[-0.257,0.318],[-1.097,0.353],[0.111,0.037],[-0.102,0.71],[-0.203,1.435],[-0.019,0.246],[-0.54,0.02],[0.967,-0.331],[0.128,0.361],[1.101,1.746],[0.163,0.815],[-0.125,-0.042],[0.158,-0.562],[-1.289,1.09],[-1.922,0.128],[-2.753,0.128],[-2.529,0.107],[-2.076,0.174],[-1.737,0.135],[-0.144,0.009],[-0.255,0.143],[-0.977,-0.669],[-1.42,0.142],[-0.841,-2.075],[-0.235,-0.449],[-0.214,0.659],[-0.026,-0.012],[-0.022,0.092],[-1.207,-0.331],[-0.033,0.255],[-0.075,0.17],[-0.306,-1.118],[-0.01,-0.035],[0.537,0.162],[-0.141,0.191],[-0.268,-0.209],[-0.619,0.139],[-0.975,-0.16],[-0.22,0.15],[-0.403,-0.014],[-0.303,-0.015],[1.309,-0.211],[-0.012,-0.115],[-0.372,-0.023],[-0.58,0.079],[-0.246,-0.318],[0.426,0.237],[-1.26,0.231],[-0.901,-0.313],[-0.073,0.007],[-0.782,0.101],[-0.295,-0.013],[-0.031,0.174],[0,0],[-0.902,0.127],[-0.524,-0.005],[0.159,-0.284],[-1.976,-0.181],[-2.127,-0.288],[-0.144,0.594],[-0.121,0.172],[0.261,-0.559],[-0.564,-0.192],[0.401,-0.197],[-1.363,-1.519],[0.455,0.391],[-0.71,0.306],[-0.533,-0.325],[-1.322,0.13],[-0.014,0.102],[0.221,0.031],[0,0],[-0.173,0.071],[-1.371,-0.705],[-0.671,0.054],[-0.187,-1.25],[0.346,0.587],[0,0],[0,0],[0,0],[-0.34,-1.096],[0.562,-0.288],[-0.649,-0.129],[-0.533,0.444],[-0.273,0.377],[-0.493,-0.367],[0.479,-0.677],[0,0],[0.255,-0.341],[-1.409,0.062],[-0.674,0.385],[-2.185,0.335],[-0.209,0.096],[0.213,0.131],[0.344,0.026],[-0.228,0.426],[-0.494,-1.172],[-0.15,0.094],[0.192,0.053],[-0.032,0.023],[-0.083,-0.063],[-0.059,-0.678],[-2.44,1.125],[-0.803,0.089],[-0.248,0.07],[0.141,-1.567],[0.144,0.254],[-0.655,-0.603],[0.059,-0.122],[1.375,0.451],[0,0],[0.85,-0.384],[0.104,-0.164],[0.068,0.018],[-0.014,0.197],[0.687,-0.171],[-0.171,-0.696],[-0.862,1.491],[-1.506,-0.142],[0.23,0.215],[-0.606,-0.146],[-0.093,0.086],[0.27,0.36],[-0.371,-0.148],[-0.238,-0.209],[-0.861,1.709],[-0.42,0.499],[0.407,0.097],[-0.187,1.974],[0.147,0.214],[-0.736,-0.27],[-0.048,-0.159],[-1.228,0.597],[-0.061,-0.049],[-0.648,0.238],[-0.022,-0.607],[-0.891,-1.756],[-0.228,-0.073],[1.437,-0.803],[0,0],[-0.704,0.088],[-0.03,-0.064],[1.344,-0.842],[-0.053,-0.117],[0,0],[-0.037,-0.44],[0.502,-0.4],[-0.027,-0.13],[-0.448,0],[-1.602,0.168],[-1.95,0.333],[-1.231,0.066],[-0.527,0.182],[-0.198,-0.514],[-0.135,-0.579],[-0.014,-0.154],[-0.028,-0.615],[0.67,-0.616],[0.957,-0.415],[2.707,-0.56],[0.969,-0.165],[0.015,-0.145],[-1.068,-0.385],[-0.047,0.112],[0.085,0.154],[-0.378,0.124],[0.195,-0.339],[-0.669,0.23],[-0.342,-0.937],[2.664,-0.092],[0.019,0],[-1.119,0.102],[0.043,0.235],[1.366,-0.464],[0.155,-0.051],[0.64,0.131],[0.125,-0.499],[0.663,0.384],[0.714,-0.017],[2.515,-0.117],[1.963,-0.083],[-0.197,-0.56],[1.374,-0.412],[-0.413,0.775],[0.471,0.077],[1.303,-0.075],[0.867,-0.105],[0.386,-0.148],[0.086,0.071],[-0.178,0.11],[0.15,0.123],[1.318,-0.068],[0.201,-0.016],[-0.155,-0.16],[0,0]],"v":[[-20.991,-0.671],[-17.911,0.373],[-16.71,-1.01],[-19.519,-1.251],[-19.512,-1.612],[-15.703,-2.172],[-11.886,-2.433],[-9.849,-1.162],[-9.672,-2.48],[-5.611,-3.24],[-7.656,-3.625],[-10.835,-3.552],[-19.571,-3.043],[-23.573,-2.071],[-25.049,-2.204],[-27.356,-1.883],[-27.85,-1.67],[-31.387,-1.671],[-32.954,-1.942],[-33.703,-1.967],[-36.987,-1.379],[-37.656,-1.199],[-43.075,-0.572],[-43.779,-0.377],[-46.401,0.31],[-48.393,1.004],[-53.987,1.519],[-58.437,1.41],[-61.397,1.865],[-61.736,2.411],[-63.987,1.807],[-70.073,2.484],[-70.658,4.336],[-72.47,4.651],[-72.523,4.465],[-71.747,4.226],[-71.305,3.101],[-72.211,2.823],[-76.778,3.67],[-76.339,2.679],[-77.595,3.045],[-78.236,3.869],[-79.951,2.988],[-84.443,3.44],[-87.38,4.894],[-88.764,4.409],[-90.295,0.449],[-90.268,-1.714],[-90.123,-4.33],[-90.012,-6.518],[-88.175,-10.742],[-89.577,-11.027],[-87.99,-13.577],[-83.59,-15.792],[-81.529,-16.184],[-82.317,-15.566],[-87.375,-13.122],[-88.154,-12.535],[-87.888,-12.052],[-82.48,-14.162],[-82.028,-13.315],[-81.075,-14.919],[-80.817,-14.788],[-81.472,-13.8],[-78.037,-14.406],[-79.93,-11.972],[-79.332,-11.872],[-75.544,-13.331],[-72.873,-13.726],[-71.716,-13.439],[-68.607,-13.986],[-66.519,-14.627],[-59.973,-15.496],[-57.674,-15.888],[-57.486,-16.321],[-56.371,-15.966],[-49.004,-17.219],[-42.916,-18.465],[-34.561,-20.084],[-34.062,-20.819],[-35.688,-20.903],[-33.374,-21.544],[-33.449,-21.995],[-36.833,-21.636],[-42.687,-20.497],[-48.102,-19.374],[-55.427,-17.928],[-58.824,-17.59],[-58.918,-17.842],[-60.99,-17.126],[-65.638,-16.793],[-66.105,-16.371],[-66.095,-18.207],[-65.866,-17.278],[-62.998,-18.591],[-61.886,-18.71],[-60.548,-18.59],[-59.658,-19.417],[-58.1,-18.758],[-57.24,-19.46],[-56.257,-19.962],[-55.057,-20.245],[-54.353,-19.125],[-53.14,-20.444],[-52.528,-19.788],[-49.904,-20.329],[-48.437,-20.777],[-48.314,-20.389],[-43.641,-22.36],[-43.19,-21.364],[-42.04,-22.443],[-39.946,-23.224],[-39.37,-22.444],[-38.413,-22.569],[-36.777,-23.64],[-28.931,-24.643],[-27.551,-24.343],[-24.187,-24.139],[-20.326,-25.116],[-17.385,-25.346],[-17.183,-24.592],[-16.995,-24.543],[-14.997,-24.48],[-14.132,-24.843],[-11.951,-24.304],[-10.529,-24.706],[-8.163,-25.207],[-6.594,-24.629],[-4.464,-25.606],[-3.501,-24.444],[-3.187,-25.408],[7.302,-24.998],[10.131,-25.674],[10.719,-24.715],[10.83,-25.59],[14.163,-25.854],[16.48,-25.695],[22.209,-26.029],[28.573,-25.968],[36.072,-25.611],[36.985,-25.347],[38.675,-25.059],[40.35,-24.489],[43.379,-24.827],[47.077,-23.656],[46.841,-24.682],[47.038,-24.652],[48.34,-23.656],[51.124,-23.845],[53.344,-23.573],[54.688,-24.459],[55.118,-23.635],[55.531,-23.71],[55.456,-24.677],[58.105,-23.851],[61.096,-25.995],[54.583,-25.996],[58.708,-26.585],[59.341,-27.709],[62.639,-27.672],[64.068,-27.133],[64.504,-27.814],[68.736,-27.147],[68.605,-27.681],[70.374,-27.566],[71.858,-26.663],[74.711,-26.605],[76.055,-26.677],[82.299,-26.204],[86.019,-26.718],[88.561,-24.95],[89.227,-22.768],[89.508,-21.29],[89.499,-18.103],[89.274,-14.018],[89.609,-12.071],[89.902,-8.638],[89.601,-6.41],[89.964,-4.584],[90.481,-2.09],[90.119,0.045],[89.319,2.4],[88.812,1.348],[87.819,1.494],[87.046,0.598],[86.046,1.835],[81.816,2.705],[82.15,2.814],[81.842,4.942],[81.281,9.252],[82.038,9.986],[81.175,11.401],[84.279,10.339],[84.86,11.919],[84.769,17.093],[83.979,19.795],[83.605,19.667],[84.078,17.98],[79.801,19.22],[74.047,19.791],[65.779,19.953],[58.202,20.507],[51.981,21.095],[46.76,21.385],[46.342,21.687],[45.576,22.049],[42.736,22.085],[38.464,22.513],[35.481,22.379],[34.747,20.98],[34.123,22.9],[34.547,23.094],[34.481,23.369],[30.741,22.343],[30.629,23.087],[30.18,23.497],[27.949,22.123],[26.322,22.47],[27.319,22.77],[26.785,23.496],[25.917,22.819],[24.446,23.123],[21.857,23.734],[20.799,23.608],[19.588,23.664],[18.729,23.172],[22.654,22.539],[22.62,22.193],[21.508,22.137],[19.982,21.72],[17.546,21.884],[18.444,22.384],[14.835,22.815],[11.769,22.955],[11.681,23.205],[9.658,23.434],[8.72,22.797],[8.59,23.515],[8.607,23.49],[5.901,23.833],[4.342,23.24],[4.818,22.392],[-0.264,23.175],[-6.293,22.359],[-6.721,23.901],[-7.755,23.863],[-7.053,22.36],[-8.565,21.844],[-7.707,21.421],[-10.124,20.879],[-8.781,22.036],[-10.884,22.941],[-12.788,22.746],[-16.436,23.104],[-16.479,23.412],[-15.817,23.507],[-15.836,23.504],[-16.347,23.701],[-20.423,23.723],[-22.474,23.732],[-24.31,21.934],[-23.11,23.972],[-26.481,23.972],[-26.481,23.689],[-24.104,23.689],[-26.078,22.857],[-25.027,22.319],[-26.69,21.418],[-28.054,23.03],[-28.681,24.2],[-30.434,22.896],[-28.434,21.927],[-29.845,21.927],[-29.045,20.856],[-33.08,21.252],[-35.721,21.341],[-42.231,22.606],[-42.789,23.047],[-42.148,23.417],[-41.092,23.274],[-43.69,23.911],[-45.171,23.811],[-45.949,24.319],[-45.373,24.478],[-45.541,24.604],[-45.816,24.383],[-46.832,23.739],[-54.518,25.712],[-56.9,26.201],[-57.522,26.837],[-59.013,26.319],[-58.475,27.268],[-60.203,25.676],[-59.853,24.955],[-53.164,24.1],[-57.149,24.1],[-54.458,23.067],[-54.061,22.441],[-53.856,22.494],[-53.911,23.275],[-52.055,22.814],[-52.563,20.748],[-55.731,21.766],[-60.204,22.378],[-59.518,23.019],[-60.989,22.664],[-61.267,22.922],[-60.432,24.032],[-61.604,23.527],[-62.047,22.31],[-64.34,23.044],[-65.697,24.657],[-64.652,24.904],[-61.925,27.36],[-61.336,27.993],[-63.527,27.128],[-64.139,26.819],[-67.63,26.559],[-67.828,26.444],[-69.212,25.88],[-68.539,23.733],[-66.401,21.135],[-67.532,20.775],[-63.676,18.62],[-63.693,18.466],[-65.805,18.731],[-65.894,18.539],[-61.863,16.015],[-62.022,15.666],[-62.968,15.666],[-63.079,14.32],[-61.273,12.879],[-61.353,12.489],[-62.695,12.496],[-67.494,13.062],[-73.314,14.182],[-76.874,14.722],[-78.409,15.398],[-78.987,13.854],[-79.196,12.073],[-79.124,11.601],[-79.186,9.818],[-76.719,8.472],[-73.778,7.401],[-65.614,5.92],[-62.682,5.564],[-62.636,5.131],[-65.842,3.976],[-65.984,4.311],[-65.701,4.825],[-67.029,5.26],[-66.451,4.254],[-67.918,4.758],[-66.673,3.7],[-58.675,3.63],[-58.473,3.957],[-61.709,4.252],[-61.505,5.383],[-57.626,4.072],[-57.114,4.064],[-55.871,3.336],[-54.886,2.974],[-52.405,3.252],[-50.27,2.905],[-42.72,2.645],[-36.682,2.3],[-37.17,0.911],[-32.52,-0.484],[-33.536,1.424],[-32.372,1.604],[-28.471,1.29],[-25.912,0.73],[-25.009,-0.375],[-24.751,-0.164],[-25.298,0.173],[-25.035,0.382],[-21.083,0.146],[-20.504,-0.194],[-20.97,-0.674]],"c":true},"ix":2},"nm":"Path 52","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[90.912,29.485],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 18","np":54,"cix":2,"bm":0,"ix":18,"mn":"ADBE Vector Group","hd":false}],"ip":65,"op":1266,"st":65,"bm":1},{"ddd":0,"ind":3,"ty":4,"nm":"Paper/Folder.ai","cl":"ai","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":20,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":40,"s":[-10]},{"t":60,"s":[10]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":20,"s":[255.723,255.721,0],"to":[-22.167,-14.5,0],"ti":[-5,1.667,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":40,"s":[122.723,168.721,0],"to":[5,-1.667,0],"ti":[-27.167,-12.833,0]},{"t":60,"s":[285.723,245.721,0]}],"ix":2},"a":{"a":0,"k":[116.723,153.721,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":20,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":40,"s":[79,79,100]},{"t":60,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,206],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 4","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,176],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 3","np":3,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,141],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 2","np":3,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,111],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[-6.851,-0.025],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.024,6.838],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-96.825,-134.815],[29.272,-134.357],[29.099,-86.723],[41.468,-74.276],[97.808,-74.073],[97.049,134.828],[-97.802,134.12],[-96.838,-134.815]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[47.859,-124.875],[84.225,-92.729],[47.743,-92.862]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-6.838,-0.025],[0,0],[-0.025,6.838],[0,0],[3.916,3.44],[0,0],[4.945,0.018],[0,0],[0.025,-6.838],[0,0]],"o":[[0,0],[6.851,0.024],[0,0],[0.019,-5.254],[0,0],[-3.71,-3.259],[0,0],[-6.837,-0.025],[0,0],[-0.024,6.838]],"v":[[-104.089,152.693],[103.189,153.446],[115.648,141.09],[116.451,-80.056],[109.718,-95.046],[50.619,-147.272],[35.688,-152.941],[-102.978,-153.445],[-115.424,-141.09],[-116.446,140.247]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[116.72,153.721],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":5,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0.168,-46.135]],"o":[[0,0],[0,0],[0,0],[46.136,0.167],[0,0]],"v":[[105.07,141.066],[-105.955,140.3],[-104.934,-141.066],[22.554,-140.604],[105.787,-56.764]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.92,153.396],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":40,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Paper/Folder.ai 2","cl":"ai","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":20,"s":[10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":40,"s":[20]},{"t":60,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":20,"s":[285.723,245.721,0],"to":[13.5,4.333,0],"ti":[5,-1.667,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":40,"s":[366.723,271.721,0],"to":[-5,1.667,0],"ti":[18.5,2.667,0]},{"t":60,"s":[255.723,255.721,0]}],"ix":2},"a":{"a":0,"k":[116.723,153.721,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,206],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 4","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,176],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 3","np":3,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,141],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 2","np":3,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,111],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[-6.851,-0.025],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.024,6.838],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-96.825,-134.815],[29.272,-134.357],[29.099,-86.723],[41.468,-74.276],[97.808,-74.073],[97.049,134.828],[-97.802,134.12],[-96.838,-134.815]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[47.859,-124.875],[84.225,-92.729],[47.743,-92.862]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-6.838,-0.025],[0,0],[-0.025,6.838],[0,0],[3.916,3.44],[0,0],[4.945,0.018],[0,0],[0.025,-6.838],[0,0]],"o":[[0,0],[6.851,0.024],[0,0],[0.019,-5.254],[0,0],[-3.71,-3.259],[0,0],[-6.837,-0.025],[0,0],[-0.024,6.838]],"v":[[-104.089,152.693],[103.189,153.446],[115.648,141.09],[116.451,-80.056],[109.718,-95.046],[50.619,-147.272],[35.688,-152.941],[-102.978,-153.445],[-115.424,-141.09],[-116.446,140.247]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[116.72,153.721],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":5,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0.168,-46.135]],"o":[[0,0],[0,0],[0,0],[46.136,0.167],[0,0]],"v":[[105.07,141.066],[-105.955,140.3],[-104.934,-141.066],[22.554,-140.604],[105.787,-56.764]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.92,153.396],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Paper/Folder.ai 3","cl":"ai","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":20,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":40,"s":[-10]},{"t":60,"s":[10]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":20,"s":[255.723,255.721,0],"to":[-22.167,-14.5,0],"ti":[-5,1.667,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":40,"s":[122.723,168.721,0],"to":[5,-1.667,0],"ti":[-27.167,-12.833,0]},{"t":60,"s":[285.723,245.721,0]}],"ix":2},"a":{"a":0,"k":[116.723,153.721,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":20,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":40,"s":[79,79,100]},{"t":60,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,206],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 4","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,176],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 3","np":3,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,141],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 2","np":3,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[170,13],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.290196078431,0.290196078431,0.290196078431,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.5,111],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[-6.851,-0.025],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[-0.024,6.838],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-96.825,-134.815],[29.272,-134.357],[29.099,-86.723],[41.468,-74.276],[97.808,-74.073],[97.049,134.828],[-97.802,134.12],[-96.838,-134.815]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[47.859,-124.875],[84.225,-92.729],[47.743,-92.862]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-6.838,-0.025],[0,0],[-0.025,6.838],[0,0],[3.916,3.44],[0,0],[4.945,0.018],[0,0],[0.025,-6.838],[0,0]],"o":[[0,0],[6.851,0.024],[0,0],[0.019,-5.254],[0,0],[-3.71,-3.259],[0,0],[-6.837,-0.025],[0,0],[-0.024,6.838]],"v":[[-104.089,152.693],[103.189,153.446],[115.648,141.09],[116.451,-80.056],[109.718,-95.046],[50.619,-147.272],[35.688,-152.941],[-102.978,-153.445],[-115.424,-141.09],[-116.446,140.247]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[116.72,153.721],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":5,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0.168,-46.135]],"o":[[0,0],[0,0],[0,0],[46.136,0.167],[0,0]],"v":[[105.07,141.066],[-105.955,140.3],[-104.934,-141.066],[22.554,-140.604],[105.787,-56.764]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[115.92,153.396],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false}],"ip":40,"op":1201,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/animations/No Favorites.json b/assets/animations/No Favorites.json new file mode 100644 index 0000000..b0039f7 --- /dev/null +++ b/assets/animations/No Favorites.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":29.9700012207031,"ip":0,"op":113.000004602584,"w":512,"h":512,"nm":"No Favorites","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[262,289.301,0],"ix":2},"a":{"a":0,"k":[6,33.301,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-74.452,1.379],[113,1],[-157,-54],[0,0]],"o":[[0,0],[108,-2],[-84.05,-0.744],[157,54],[0,0]],"v":[[-252,-6],[-65,100],[12,-45],[60,103],[264,15]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Heart 4","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,266.048,0],"ix":2},"a":{"a":0,"k":[256,266.048,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[96.004,-145.341],[-13.306,-126.952],[-125.142,-53.221],[-14.812,141.328]],"o":[[-96.004,-145.341],[14.812,141.328],[125.142,-53.221],[13.306,-126.952]],"v":[[0,-102.214],[-245.231,-21.941],[0,235.5],[245.231,-21.941]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[256,235.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Paper","tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":70,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.711,"y":0.415},"o":{"x":0.409,"y":0},"t":20,"s":[4,250,0],"to":[0,0,0],"ti":[-74.452,1.379,0]},{"i":{"x":0.647,"y":0.645},"o":{"x":0.328,"y":0.295},"t":39.131,"s":[191,356,0],"to":[108,-2,0],"ti":[139,14,0]},{"i":{"x":0.616,"y":0.692},"o":{"x":0.294,"y":0.343},"t":49.803,"s":[268,211,0],"to":[-121.05,-2.744,0],"ti":[-157,-54,0]},{"i":{"x":0.546,"y":1},"o":{"x":0.237,"y":0.569},"t":62.278,"s":[316,359,0],"to":[157,54,0],"ti":[0,0,0]},{"t":100.000004073084,"s":[560,271,0]}],"ix":2},"a":{"a":0,"k":[414.83,412.114,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":1,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-11.65,-5.122],[17.55,-11.584],[15.844,3.047],[5.511,23.547]],"o":[[-0.641,24.358],[-9.187,-7.396],[16.79,-12.606],[15.285,2.541]],"v":[[29.458,-22.564],[4.293,33.631],[-29.459,19.163],[-11.548,-33.63]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[414.83,445.744],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Spider","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":27.858,"s":[-10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":55.714,"s":[10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":83.571,"s":[-10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":111.429,"s":[10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":139.286,"s":[-10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":167.143,"s":[10]},{"t":195.000007942513,"s":[-10]}],"ix":10},"p":{"a":0,"k":[381.198,128.074,0],"ix":2},"a":{"a":0,"k":[393.198,118.486,0],"ix":1},"s":{"a":0,"k":[101,101,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.221,0.218],[0.249,-0.249],[0.901,-1.084],[1.073,-1.387],[0,0],[0.33,-0.455],[0,0],[0.746,-1.1],[0,0],[0.299,0.066],[0.389,0.074],[0,0],[0,0],[0.237,0.835],[0,0],[-0.078,0.241],[0,0],[0,0],[0.264,0.148],[0.163,-0.047],[0.086,-0.148],[0.482,-1.077],[0.54,-1.368],[0,0],[0.155,-0.443],[0,0],[0.33,-1.057],[0.226,-0.059],[0.287,-0.07],[0.38,-0.108],[0,0],[0,0],[0.074,0.14],[1.694,0.832],[1.393,0.039],[-0.116,3.195],[-0.053,2],[0,0],[0,0],[0.092,2],[0.412,3.999],[0,0],[0.03,0],[0,-0.032],[0,0],[0,0],[1.63,-3.039],[0.07,-0.144],[0,0],[0,0],[0.397,0.094],[0.287,0.07],[0.222,0.058],[0.264,0.785],[0,0],[0.171,0.443],[0,0],[0.517,1.142],[0.703,1.247],[0.167,0.047],[0.148,-0.085],[-0.089,-0.287],[0,0],[0,0],[-0.249,-0.051],[0,0],[0.023,-0.875],[0,0],[0,0],[0.393,-0.093],[0.296,-0.066],[0,0],[0.572,0.812],[0,0],[0.338,0.447],[0,0],[0.972,1.154],[1.189,1.216],[0.252,-0.245],[-0.175,-0.256],[0,0],[0,0],[-0.28,0.078],[0,0],[-0.688,-1.391],[0,0],[0,0],[0,0],[0.393,-0.055],[0.295,-0.034],[0.548,-0.086],[0.167,-0.602],[0,0],[0.265,-1.143],[0,0],[0.081,-0.432],[0,0],[0.143,-1.17],[0.035,-1.341],[-0.354,-0.011],[0,0],[-0.074,0.288],[0,0],[0,0],[0,0],[-0.152,-0.217],[-0.043,-0.067],[0,0],[0,0],[0.377,-0.155],[0.28,-0.105],[0.509,-0.214],[-0.206,-0.77],[0,0],[-0.35,-1.135],[0,0],[-0.147,-0.423],[0,0],[-0.47,-1.1],[-0.653,-1.201],[-0.307,0.167],[0.085,0.287],[0,0],[0,0],[0,0],[0.008,-0.28],[-0.008,-0.284],[0,-0.105],[-1.457,-1.022],[-0.113,-0.52],[-0.396,-0.078],[-0.222,0.33],[-0.455,0.097],[-0.124,0.008],[-0.388,-0.575],[-0.392,0.077],[-0.085,0.389],[0.171,0.474],[-0.039,1.955],[0,0.105],[0.004,0.295],[-0.046,0.275],[0,0],[0,0],[0,0],[-0.264,-0.14],[-0.105,0],[-0.058,0.02],[-0.082,0.151],[-0.443,1.038],[-0.486,1.313],[0,0],[-0.136,0.427],[0,0],[-0.334,1.236],[0,0],[0.734,0.311],[0.513,0.198],[0.28,0.113],[0.377,0.132],[0,0],[0,0],[-0.047,0.067],[-0.144,0.229],[0,0],[0,0],[0,0],[0,0],[-0.307,0.024],[0,0],[0.007,0.353],[0.14,1.099],[0.233,1.352],[0,0],[0.097,0.428],[0,0],[0.334,1.212],[0,0],[0.618,0.097],[0.552,0.07],[0.295,0.039],[0.389,0.039],[0,0],[0,0],[-0.194,1.375],[0,0],[-0.167,0.245],[0,0],[0,0]],"o":[[-0.253,-0.245],[-1.197,1.228],[-0.972,1.15],[0,0],[-0.338,0.447],[0,0],[-0.576,0.816],[0,0],[-0.3,-0.066],[-0.389,-0.093],[0,0],[0,0],[-0.023,-0.875],[0,0],[0.249,-0.047],[0,0],[0,0],[0.089,-0.287],[-0.148,-0.085],[-0.167,0.047],[-0.703,1.255],[-0.517,1.138],[0,0],[-0.167,0.439],[0,0],[-0.268,0.793],[-0.226,0.058],[-0.287,0.07],[-0.393,0.09],[0,0],[0,0],[-0.07,-0.144],[-0.944,-1.753],[-1.184,-0.583],[0.269,-3.195],[0.091,-2],[0,0],[0,0],[-0.055,-2],[-0.145,-4],[0,0],[-0.003,-0.029],[-0.032,0],[0,0],[0,0],[-3.482,0.023],[-0.073,0.136],[0,0],[0,0],[-0.377,-0.108],[-0.283,-0.07],[-0.222,-0.059],[-0.33,-1.057],[0,0],[-0.155,-0.447],[0,0],[-0.544,-1.376],[-0.482,-1.073],[-0.09,-0.156],[-0.163,-0.047],[-0.264,0.148],[0,0],[0,0],[0.074,0.234],[0,0],[-0.238,0.835],[0,0],[0,0],[-0.389,0.074],[-0.295,0.066],[0,0],[-0.746,-1.1],[0,0],[-0.326,-0.455],[0,0],[-1.08,-1.392],[-0.905,-1.08],[-0.252,-0.257],[-0.226,0.222],[0,0],[0,0],[0.171,0.241],[0,0],[0.194,1.375],[0,0],[0,0],[0,0],[-0.385,0.039],[-0.291,0.039],[-0.548,0.07],[-0.618,0.097],[0,0],[-0.334,1.212],[0,0],[-0.097,0.428],[0,0],[-0.241,1.364],[-0.14,1.099],[-0.012,0.365],[0,0],[0.3,0],[0,0],[0,0],[0,0],[0.148,0.229],[0.047,0.067],[0,0],[0,0],[-0.377,0.132],[-0.279,0.109],[-0.513,0.198],[-0.735,0.311],[0,0],[0.334,1.244],[0,0],[0.136,0.427],[0,0],[0.49,1.321],[0.443,1.034],[0.175,0.322],[0.264,-0.14],[0,0],[0,0],[0,0],[0.042,0.275],[-0.004,0.299],[-0.004,0.081],[0.043,1.963],[-0.167,0.478],[0.085,0.393],[0.393,0.077],[0.268,-0.397],[0.21,-0.042],[0.389,0.024],[0.225,0.33],[0.397,-0.078],[0.113,-0.521],[1.457,-1.026],[0.004,-0.101],[0.004,-0.272],[-0.004,-0.28],[0,0],[0,0],[0,0],[-0.085,0.287],[0.093,0.05],[0.063,0],[0.167,-0.046],[0.657,-1.209],[0.47,-1.096],[0,0],[0.148,-0.419],[0,0],[0.354,-1.151],[0,0],[0.206,-0.77],[-0.505,-0.214],[-0.28,-0.105],[-0.38,-0.151],[0,0],[0,0],[0.043,-0.067],[0.155,-0.217],[0,0],[0,0],[0,0],[0,0],[0.074,0.296],[0,0],[0.354,-0.011],[-0.039,-1.353],[-0.144,-1.17],[0,0],[-0.081,-0.428],[0,0],[-0.268,-1.155],[0,0],[-0.167,-0.606],[-0.548,-0.086],[-0.295,-0.034],[-0.393,-0.055],[0,0],[0,0],[0.684,-1.391],[0,0],[0.284,0.078],[0,0],[0,0],[0.174,-0.264]],"v":[[26.97,1],[26.064,1.008],[22.878,4.587],[19.919,8.283],[18.497,10.169],[17.503,11.524],[17.107,12.076],[15.039,15.045],[14.577,14.944],[13.682,14.746],[12.504,14.501],[11.168,14.245],[9.504,13.973],[9.116,11.404],[15.198,10.203],[15.723,9.736],[19.357,-1.429],[20.546,-5.16],[20.246,-5.913],[19.76,-5.972],[19.371,-5.669],[17.595,-2.066],[16.073,1.583],[15.38,3.425],[14.906,4.75],[14.724,5.279],[13.784,8.156],[13.111,8.326],[12.253,8.539],[11.09,8.85],[9.776,9.22],[8.439,9.632],[8.225,9.208],[4.177,5.275],[0.279,4.338],[0.829,-5.247],[0.995,-11.247],[1.049,-17.245],[0.997,-23.245],[0.832,-29.245],[0.06,-41.244],[0.059,-41.25],[0,-41.301],[-0.057,-41.244],[-0.116,-17.245],[-0.064,4.325],[-8.221,9.208],[-8.439,9.632],[-9.763,9.223],[-11.09,8.85],[-12.255,8.539],[-13.113,8.326],[-13.783,8.156],[-14.719,5.287],[-14.905,4.755],[-15.384,3.421],[-16.072,1.591],[-17.595,-2.07],[-19.366,-5.661],[-19.759,-5.972],[-20.246,-5.913],[-20.544,-5.16],[-19.355,-1.429],[-15.721,9.74],[-15.197,10.203],[-9.115,11.404],[-9.504,13.973],[-11.151,14.245],[-12.504,14.501],[-13.685,14.746],[-14.576,14.944],[-15.038,15.045],[-17.102,12.08],[-17.505,11.524],[-18.496,10.169],[-19.911,8.291],[-22.876,4.583],[-26.056,1.016],[-26.965,0.996],[-27.051,1.82],[-24.384,5.699],[-16.328,17.281],[-15.573,17.552],[-9.395,15.85],[-8.069,20.012],[-8.983,20.066],[-10.258,20.156],[-11.648,20.292],[-12.827,20.424],[-13.712,20.536],[-15.357,20.762],[-16.647,21.912],[-16.659,21.963],[-17.548,25.542],[-17.664,26.074],[-17.936,27.361],[-18.286,29.16],[-18.858,32.837],[-19.181,36.587],[-18.562,37.259],[-18.543,37.259],[-17.918,36.777],[-15.271,26.094],[-14.517,22.965],[-7.152,21.644],[-6.702,22.316],[-6.565,22.519],[-7.98,22.977],[-9.267,23.436],[-10.41,23.859],[-11.249,24.182],[-12.784,24.792],[-13.708,26.686],[-13.697,26.731],[-12.639,30.33],[-12.473,30.843],[-12.049,32.125],[-11.431,33.886],[-10.052,37.407],[-8.419,40.867],[-7.544,41.134],[-7.233,40.392],[-8.276,36.808],[-11.296,26.665],[-5.901,24.26],[-5.842,25.091],[-5.842,25.966],[-5.842,26.261],[-3.526,30.87],[-3.612,32.37],[-2.819,33.144],[-1.805,32.729],[-0.514,32.028],[0.003,31.954],[1.806,32.729],[2.819,33.144],[3.612,32.374],[3.527,30.874],[5.84,26.269],[5.844,25.954],[5.844,25.095],[5.905,24.26],[11.297,26.665],[8.276,36.805],[7.234,40.392],[7.546,41.134],[7.849,41.212],[8.031,41.184],[8.417,40.874],[10.052,37.403],[11.428,33.894],[12.049,32.125],[12.47,30.855],[12.637,30.342],[13.698,26.731],[13.71,26.686],[12.784,24.792],[11.25,24.182],[10.409,23.855],[9.267,23.436],[7.996,22.985],[6.566,22.519],[6.698,22.316],[7.15,21.644],[9.966,22.153],[14.517,22.965],[17.025,33.214],[17.918,36.773],[18.56,37.259],[18.564,37.259],[19.185,36.599],[18.858,32.837],[18.292,29.173],[17.938,27.357],[17.665,26.074],[17.552,25.554],[16.659,21.963],[16.647,21.916],[15.357,20.762],[13.71,20.536],[12.823,20.424],[11.646,20.292],[10.273,20.156],[8.07,20.012],[9.396,15.85],[15.574,17.552],[16.328,17.276],[24.385,5.699],[27.051,1.824]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.247058838489,0.20000001496,0.388235324037,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[393.197,159.788],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Heart 3","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,266.048,0],"ix":2},"a":{"a":0,"k":[256,266.048,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[96.004,-145.341],[-13.306,-126.952],[-125.142,-53.221],[-14.812,141.328]],"o":[[-96.004,-145.341],[14.812,141.328],[125.142,-53.221],[13.306,-126.952]],"v":[[0,-102.214],[-245.231,-21.941],[0,235.5],[245.231,-21.941]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[256,235.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Web","tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[381.006,104.871,0],"ix":2},"a":{"a":0,"k":[376.006,99.871,0],"ix":1},"s":{"a":0,"k":[110,110,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.189,-1.013],[0.632,-1.307],[0.486,-0.623],[0,0],[0.519,-0.505],[1.2,-0.773],[0.15,-0.204],[0,0],[0,0],[-0.578,0.878],[-0.407,1.069],[0.579,2.2],[0.981,1.33]],"o":[[0.526,0.909],[0.252,1.384],[-0.29,0.62],[0,0],[-0.447,0.605],[-1.166,1.095],[-0.216,0.14],[0,0],[0,0],[0.621,-0.68],[0.64,-0.92],[0.856,-2.182],[-0.405,-1.569],[0,0]],"v":[[-47.233,-37.005],[-46.145,-34.079],[-46.727,-29.962],[-47.88,-28.12],[-47.893,-28.104],[-49.402,-26.443],[-53.152,-23.638],[-53.706,-23.118],[-57.457,-21.787],[-60.979,-20.479],[-59.099,-22.832],[-57.521,-25.83],[-57.089,-32.629],[-59.193,-37.025]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-0.059,-0.332],[0.453,-0.953],[0.347,-0.444],[0,0],[0.391,-0.38],[0.907,-0.584],[0.131,-0.187],[0,0],[-0.428,1.138],[0.469,1.784],[0.436,0.778]],"o":[[0.125,0.349],[0.176,1.037],[-0.217,0.471],[0,0],[-0.334,0.452],[-0.881,0.828],[-0.194,0.126],[0,0],[0.891,-1.117],[0.692,-1.764],[-0.221,-0.854],[0,0]],"v":[[-35.171,-36.985],[-34.895,-35.96],[-35.319,-32.914],[-36.168,-31.539],[-36.181,-31.521],[-37.312,-30.273],[-40.147,-28.151],[-40.641,-27.673],[-46.441,-25.679],[-44.475,-29.042],[-44.128,-34.549],[-45.117,-37.002]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-0.3,0.798],[0.366,1.394],[0.067,0.199],[0,0],[0.28,-0.541],[0.601,-0.544],[0.462,-0.298],[0,0],[0,0],[1.716,-0.577]],"o":[[0.54,-1.376],[-0.052,-0.199],[0,0],[0.059,0.611],[-0.284,0.553],[-0.453,0.407],[0,0],[0,0],[-1.68,0.557],[0.591,-0.782]],"v":[[-33.294,-32.085],[-33.022,-36.385],[-33.203,-36.982],[-23.126,-36.964],[-23.462,-35.2],[-24.776,-33.571],[-26.212,-32.513],[-28.852,-31.643],[-29.51,-31.426],[-34.625,-29.724]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[-0.164,-0.185],[-0.218,-0.585],[0.044,-0.596],[0.153,-0.489],[0,0],[1.106,-0.978],[0.393,0.948],[0.99,1.005],[0.164,0.149]],"o":[[0.203,0.183],[0.486,0.533],[0.226,0.64],[-0.028,0.407],[0,0],[-1.153,0.962],[-0.057,-1.042],[-0.499,-1.197],[-0.156,-0.158],[0,0]],"v":[[-17.353,-31.221],[-16.796,-30.662],[-15.738,-28.981],[-15.465,-27.139],[-15.734,-25.805],[-15.824,-25.728],[-19.227,-22.79],[-19.905,-25.806],[-22.15,-29.123],[-22.63,-29.583]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[-0.039,0.101],[0.137,0.867],[0,0],[0.079,-0.153],[0.338,-0.327],[0,0],[0,0]],"o":[[0.325,-0.833],[0,0],[-0.038,0.166],[-0.173,0.329],[0,0],[0,0],[0.045,-0.101]],"v":[[-21.449,-34.348],[-21.16,-36.96],[-16.156,-36.952],[-16.331,-36.473],[-17.089,-35.497],[-19.276,-34.801],[-21.574,-34.042]],"c":true},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[-0.087,-0.247],[0.029,-0.348],[0.136,-0.362],[0,0],[0.014,-0.048],[0.692,-0.58],[0.233,0.564],[0.587,0.651]],"o":[[0.169,0.24],[0.139,0.427],[-0.032,0.452],[0,0],[-0.018,0.047],[-0.697,0.574],[-0.069,-0.615],[-0.316,-0.757],[0,0]],"v":[[-11.103,-33.163],[-10.715,-32.427],[-10.553,-31.291],[-10.884,-30.005],[-10.895,-29.977],[-10.941,-29.835],[-13.029,-28.1],[-13.483,-29.882],[-14.844,-32]],"c":true},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[-0.006,0.199],[0,0],[0,0]],"o":[[0,0],[0,0],[0.036,-0.194]],"v":[[-14.315,-36.949],[-12.539,-36.946],[-14.379,-36.359]],"c":true},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[1.424,-1.142],[0.156,0.377],[0.109,0.191]],"o":[[-1.36,1.034],[-0.058,-0.412],[-0.083,-0.198],[0,0]],"v":[[-3.962,-35.379],[-8.13,-32.122],[-8.453,-33.31],[-8.742,-33.895]],"c":true},"ix":2},"nm":"Path 8","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0,0],[0.074,0.029],[0.639,0.077],[0,0]],"o":[[-0.072,-0.033],[-0.521,-0.203],[0,0],[0,0]],"v":[[-3.882,-29.824],[-4.1,-29.915],[-5.848,-30.339],[-1.962,-34.036]],"c":true},"ix":2},"nm":"Path 9","mn":"ADBE Vector Shape - Group","hd":false},{"ind":9,"ty":"sh","ix":10,"ks":{"a":0,"k":{"i":[[-0.122,0.018],[0,0],[0.55,0.006],[0,0],[-0.487,1.05]],"o":[[0,0],[-0.512,-0.094],[0,0],[0.482,-1.025],[0.111,-0.02]],"v":[[-0.164,-27.57],[-0.164,-24.242],[-1.758,-24.395],[-1.969,-24.395],[-0.513,-27.513]],"c":true},"ix":2},"nm":"Path 10","mn":"ADBE Vector Shape - Group","hd":false},{"ind":10,"ty":"sh","ix":11,"ks":{"a":0,"k":{"i":[[1.589,0.37],[2.159,0.004],[0,0],[2.194,-0.361],[1.138,-0.29],[0,0],[-0.986,1.947],[-0.008,0.003],[-0.685,0.208],[-0.809,0.18],[-1.862,0.134],[-0.5,0],[-1.094,-0.188],[-0.968,-0.331],[0,0]],"o":[[-2.351,-0.545],[0,0],[-2.175,0],[-1.264,0.215],[0,0],[0.884,-1.728],[0.008,-0.001],[0.728,-0.301],[0.799,-0.244],[1.49,-0.338],[0.51,-0.033],[1.195,0],[1.056,0.185],[0,0],[-1.719,-0.846]],"v":[[-5.095,16.294],[-11.891,15.468],[-12.087,15.468],[-18.672,16.012],[-22.258,16.765],[-20.681,13.755],[-17.901,8.294],[-17.879,8.287],[-15.585,7.501],[-13.161,6.863],[-8.182,6.162],[-6.659,6.113],[-3.211,6.395],[-0.164,7.173],[-0.164,18.112]],"c":true},"ix":2},"nm":"Path 11","mn":"ADBE Vector Shape - Group","hd":false},{"ind":11,"ty":"sh","ix":12,"ks":{"a":0,"k":{"i":[[0,0],[0.757,0.502],[1.293,0.524],[2.796,0.265],[1.295,0],[1.439,-0.115],[1.45,-0.253],[0,0],[0,0],[-0.167,0.036],[-1.076,0.14],[-0.989,0.062],[-0.884,0],[-0.126,-0.001],[0,0],[-0.934,-0.08],[-1.629,-0.59],[-1.102,-0.911]],"o":[[-0.688,-0.62],[-1.075,-0.69],[-2.311,-0.907],[-1.189,-0.119],[-1.294,0],[-1.531,0.135],[0,0],[0,0],[0.178,0.001],[0.825,-0.178],[1.002,-0.13],[0.855,-0.053],[0.125,0],[0,0],[0.954,0],[2.09,0.183],[1.574,0.549],[0,0]],"v":[[-25.247,17.02],[-27.422,15.333],[-30.984,13.507],[-38.676,11.744],[-42.419,11.566],[-46.48,11.739],[-50.958,12.323],[-42.831,4.687],[-42.82,4.687],[-42.298,4.633],[-39.393,4.148],[-36.393,3.86],[-33.772,3.779],[-33.396,3.782],[-33.275,3.781],[-30.427,3.901],[-24.822,5.065],[-20.798,7.262]],"c":true},"ix":2},"nm":"Path 12","mn":"ADBE Vector Shape - Group","hd":false},{"ind":12,"ty":"sh","ix":13,"ks":{"a":0,"k":{"i":[[-0.529,-1.374],[-0.127,-0.75],[0.04,-0.912],[0.663,-1.666],[0,0],[0.025,-0.128],[1.443,-1.417],[0,0],[-0.035,0.644],[0.95,2.281],[1.837,1.864],[1.292,0.875],[0,0],[-0.307,-0.25],[-0.571,-0.618]],"o":[[0.255,0.69],[0.108,0.632],[-0.093,1.384],[0,0],[-0.048,0.12],[-1.272,1.226],[0,0],[0.105,-0.662],[0.139,-2.527],[-0.914,-2.207],[-1.136,-1.143],[0,0],[0.345,0.238],[0.601,0.487],[1.126,1.208]],"v":[[-33.763,-18.204],[-33.186,-16.029],[-33.087,-13.795],[-34.212,-9.261],[-34.219,-9.247],[-34.328,-8.873],[-38.501,-4.82],[-40.493,-2.812],[-40.284,-4.774],[-41.525,-12.123],[-45.671,-18.259],[-49.32,-21.294],[-39.012,-24.495],[-38.022,-23.755],[-36.257,-22.092]],"c":true},"ix":2},"nm":"Path 13","mn":"ADBE Vector Shape - Group","hd":false},{"ind":13,"ty":"sh","ix":14,"ks":{"a":0,"k":{"i":[[0.026,-0.573],[0.307,-0.883],[0,0],[0.221,-0.194],[1.592,-1.479],[0.571,-0.53],[-0.016,0.255],[0,0],[0.15,0.843],[0.36,0.884],[1.414,1.438],[0.569,0.454],[0,0],[-0.13,-0.11],[-0.383,-0.427],[-0.319,-0.865],[-0.078,-0.47]],"o":[[-0.051,0.691],[0,0],[-0.219,0.195],[-1.65,1.492],[-0.572,0.53],[0.028,-0.258],[0,0],[0.041,-1.125],[-0.167,-0.957],[-0.71,-1.706],[-0.501,-0.503],[0,0],[0.15,0.113],[0.374,0.314],[0.707,0.776],[0.15,0.429],[0.063,0.38]],"v":[[-22.223,-21.976],[-22.746,-19.662],[-22.893,-19.532],[-23.552,-18.947],[-28.441,-14.446],[-30.156,-12.855],[-30.09,-13.625],[-30.09,-13.643],[-30.251,-16.527],[-31.046,-19.302],[-34.245,-24.037],[-35.852,-25.476],[-25.715,-28.624],[-25.293,-28.287],[-24.169,-27.186],[-22.624,-24.714],[-22.276,-23.354]],"c":true},"ix":2},"nm":"Path 14","mn":"ADBE Vector Shape - Group","hd":false},{"ind":14,"ty":"sh","ix":15,"ks":{"a":0,"k":{"i":[[-0.495,0],[-0.443,-0.031],[-0.804,-0.28],[0,0],[-0.406,-0.244],[0,0],[1.154,0.446],[1.812,0.2],[1.108,0],[0.584,-0.026],[0,0],[-0.092,0.019],[-1.031,0.068]],"o":[[0.497,0],[1.015,0.077],[0,0],[0.481,0.156],[0,0],[-0.942,-0.732],[-1.46,-0.568],[-0.995,-0.113],[-0.545,0],[0,0],[0.097,-0.006],[0.878,-0.188],[0.579,-0.031]],"v":[[-15.936,-16.608],[-14.539,-16.56],[-11.798,-16.023],[-11.785,-16.018],[-10.453,-15.416],[-14.367,-6.835],[-17.52,-8.607],[-22.452,-9.765],[-25.622,-9.936],[-27.324,-9.895],[-20.777,-16.125],[-20.495,-16.164],[-17.535,-16.56]],"c":true},"ix":2},"nm":"Path 15","mn":"ADBE Vector Shape - Group","hd":false},{"ind":15,"ty":"sh","ix":16,"ks":{"a":0,"k":{"i":[[-0.311,-0.024],[-0.548,-0.193],[-0.246,-0.139],[0,0],[0.521,0.201],[1.261,0.14],[0.775,0],[0.239,-0.008],[0,0],[-0.527,0.034],[-0.339,0]],"o":[[0.698,0.053],[0.291,0.095],[0,0],[-0.47,-0.291],[-1.018,-0.399],[-0.698,-0.08],[-0.228,0],[0,0],[0.507,-0.086],[0.393,-0.022],[0.352,0]],"v":[[-9.931,-23.157],[-8.055,-22.788],[-7.251,-22.436],[-9.322,-17.897],[-10.811,-18.637],[-14.246,-19.449],[-16.467,-19.57],[-17.169,-19.559],[-13.581,-22.976],[-12.007,-23.16],[-10.917,-23.193]],"c":true},"ix":2},"nm":"Path 16","mn":"ADBE Vector Shape - Group","hd":false},{"ind":16,"ty":"sh","ix":17,"ks":{"a":0,"k":{"i":[[0,0],[0.326,0.126],[0.903,0.1],[0.378,0.011],[0,0],[-0.294,0.02],[-0.261,0],[-0.178,-0.011],[-0.359,-0.121],[-0.014,-0.005]],"o":[[-0.296,-0.172],[-0.73,-0.285],[-0.355,-0.04],[0,0],[0.294,-0.046],[0.319,-0.017],[0.199,0],[0.46,0.028],[0,0],[0,0]],"v":[[-6.298,-24.528],[-7.23,-24.975],[-9.691,-25.556],[-10.788,-25.634],[-8.475,-27.835],[-7.574,-27.937],[-6.707,-27.964],[-6.147,-27.948],[-4.913,-27.724],[-4.85,-27.704]],"c":true},"ix":2},"nm":"Path 17","mn":"ADBE Vector Shape - Group","hd":false},{"ind":17,"ty":"sh","ix":18,"ks":{"a":0,"k":{"i":[[0.963,0.011],[0.059,0],[0.717,-0.094],[0,0],[-0.38,0.804],[0,0],[-0.471,0.05],[-0.231,0],[-0.278,-0.032],[0,0]],"o":[[-0.06,0],[-0.682,0],[0,0],[0.394,-0.813],[0,0],[0.385,-0.076],[0.229,-0.022],[0.28,0],[0,0],[-0.851,-0.196]],"v":[[-2.895,-17.788],[-3.074,-17.789],[-5.177,-17.649],[-4.191,-19.711],[-3.025,-22.159],[-2.975,-22.266],[-1.697,-22.453],[-1,-22.486],[-0.164,-22.435],[-0.164,-17.474]],"c":true},"ix":2},"nm":"Path 18","mn":"ADBE Vector Shape - Group","hd":false},{"ind":18,"ty":"sh","ix":19,"ks":{"a":0,"k":{"i":[[0.476,0.116],[1.486,0.015],[0.08,0],[1.344,-0.223],[0.117,-0.022],[-1.466,3.062],[-0.399,0.098],[-0.942,0.092],[-0.346,0],[-0.528,-0.078],[0,0]],"o":[[-1.297,-0.321],[-0.078,-0.002],[-1.27,0],[-0.116,0.021],[1.129,-2.312],[0.393,-0.13],[0.74,-0.186],[0.345,-0.028],[0.557,0],[0,0],[-0.484,-0.174]],"v":[[-1.605,-6.842],[-5.802,-7.349],[-6.039,-7.351],[-9.978,-7.015],[-10.328,-6.952],[-6.53,-14.82],[-5.339,-15.164],[-2.84,-15.577],[-1.794,-15.621],[-0.164,-15.501],[-0.164,-6.404]],"c":true},"ix":2},"nm":"Path 19","mn":"ADBE Vector Shape - Group","hd":false},{"ind":19,"ty":"sh","ix":20,"ks":{"a":0,"k":{"i":[[0,0],[1.573,0.613],[2.41,0.271],[1.431,0],[0.796,-0.042],[0.594,-0.053],[0,0],[-1.235,0.077],[-0.679,0],[-0.751,-0.066],[-1.244,-0.451],[-0.847,-0.694]],"o":[[-1.205,-0.947],[-1.905,-0.743],[-1.331,-0.147],[-0.764,0],[-0.592,0.033],[0,0],[1.171,-0.208],[0.768,-0.042],[0.847,0],[1.567,0.133],[1.157,0.398],[0,0]],"v":[[-19.48,4.374],[-23.66,2.027],[-30.073,0.52],[-34.237,0.3],[-36.587,0.362],[-38.366,0.492],[-30.949,-6.475],[-27.277,-6.91],[-25.126,-6.972],[-22.751,-6.875],[-18.514,-5.994],[-15.501,-4.349]],"c":true},"ix":2},"nm":"Path 20","mn":"ADBE Vector Shape - Group","hd":false},{"ind":20,"ty":"sh","ix":21,"ks":{"a":0,"k":{"i":[[-1.135,2.324],[-0.13,0.267],[-0.049,0.097],[-0.131,0.04],[-0.612,0.136],[-1.333,0.083],[-0.335,0],[-1.425,-0.434],[0,0],[0.877,0.213],[1.931,0.02],[0.103,0],[1.75,-0.291],[0.759,-0.179]],"o":[[0.129,-0.262],[0.048,-0.097],[0.133,-0.042],[0.608,-0.185],[1.169,-0.263],[0.335,-0.019],[1.629,0],[0,0],[-0.854,-0.344],[-1.685,-0.416],[-0.105,0],[-1.654,0],[-0.835,0.141],[1.374,-2.734]],"v":[[-12.307,-2.926],[-11.915,-3.721],[-11.772,-4.011],[-11.376,-4.134],[-9.539,-4.616],[-5.771,-5.137],[-4.757,-5.165],[-0.164,-4.508],[-0.164,5.193],[-2.764,4.353],[-8.217,3.693],[-8.529,3.692],[-13.658,4.131],[-16.042,4.611]],"c":true},"ix":2},"nm":"Path 21","mn":"ADBE Vector Shape - Group","hd":false},{"ind":21,"ty":"sh","ix":22,"ks":{"a":0,"k":{"i":[[0.333,1.605],[0.716,1.531],[2.489,2.402],[2.076,1.255],[0,0],[-0.033,-0.019],[0,0],[-0.436,-0.304],[-0.41,-0.333],[-0.76,-0.823],[-0.697,-1.826],[0.135,-1.933],[0.916,-2.312],[0,0],[-0.039,-0.414],[0,0],[1.723,-1.893],[-0.028,1.161]],"o":[[-0.325,-1.499],[-1.257,-2.69],[-1.834,-1.75],[0,0],[0.032,0.022],[0,0],[0.377,0.211],[0.445,0.311],[0.789,0.638],[1.498,1.601],[0.73,1.949],[-0.103,1.801],[0,0],[-0.158,0.396],[0,0],[-2.042,2.13],[0.212,-1.192],[0.02,-1.586]],"v":[[-51.44,0.19],[-53.009,-4.375],[-58.655,-12.048],[-64.538,-16.569],[-53.142,-20.108],[-53.043,-20.047],[-52.932,-19.984],[-51.634,-19.163],[-50.346,-18.193],[-48.012,-15.992],[-44.707,-10.83],[-43.807,-4.978],[-45.302,1.047],[-45.31,1.063],[-45.488,2.291],[-45.712,2.528],[-51.332,8.532],[-50.97,4.996]],"c":true},"ix":2},"nm":"Path 22","mn":"ADBE Vector Shape - Group","hd":false},{"ind":22,"ty":"sh","ix":23,"ks":{"a":0,"k":{"i":[[0,0],[-1.012,0.189],[-1.308,-0.632],[-0.623,-0.487],[0,0],[-0.506,-0.519],[-0.773,-1.2],[-0.203,-0.15],[0,0],[0,0],[0.877,0.577],[1.069,0.407],[2.199,-0.579],[1.33,-0.981]],"o":[[0.909,-0.526],[1.385,-0.252],[0.62,0.289],[0,0],[0.606,0.448],[1.095,1.166],[0.139,0.216],[0,0],[0,0],[-0.681,-0.622],[-0.92,-0.64],[-2.183,-0.855],[-1.57,0.405],[0,0]],"v":[[2.007,9.404],[4.931,8.315],[9.049,8.897],[10.892,10.05],[10.906,10.062],[12.568,11.572],[15.374,15.322],[15.892,15.876],[17.224,19.626],[18.533,23.15],[16.18,21.269],[13.181,19.69],[6.383,19.259],[1.986,21.363]],"c":true},"ix":2},"nm":"Path 23","mn":"ADBE Vector Shape - Group","hd":false},{"ind":23,"ty":"sh","ix":24,"ks":{"a":0,"k":{"i":[[0,0],[-0.332,0.06],[-0.953,-0.452],[-0.444,-0.348],[0,0],[-0.38,-0.391],[-0.583,-0.908],[-0.188,-0.132],[0,0],[1.137,0.429],[1.783,-0.469],[0.777,-0.437]],"o":[[0.349,-0.125],[1.037,-0.175],[0.471,0.218],[0,0],[0.452,0.335],[0.827,0.881],[0.127,0.194],[0,0],[-1.117,-0.892],[-1.765,-0.691],[-0.854,0.221],[0,0]],"v":[[2.026,-2.659],[3.051,-2.936],[6.098,-2.512],[7.473,-1.662],[7.49,-1.65],[8.738,-0.517],[10.859,2.318],[11.339,2.811],[13.331,8.612],[9.969,6.645],[4.462,6.298],[2.009,7.287]],"c":true},"ix":2},"nm":"Path 24","mn":"ADBE Vector Shape - Group","hd":false},{"ind":24,"ty":"sh","ix":25,"ks":{"a":0,"k":{"i":[[0,0],[-0.541,-0.28],[-0.545,-0.6],[-0.297,-0.462],[0,0],[0,0],[-0.577,-1.716],[0.798,0.3],[1.394,-0.366],[0.199,-0.067]],"o":[[0.612,-0.06],[0.552,0.285],[0.406,0.454],[0,0],[0,0],[0.557,1.68],[-0.782,-0.591],[-1.377,-0.54],[-0.199,0.052],[0,0]],"v":[[2.047,-14.704],[3.811,-14.368],[5.44,-13.054],[6.497,-11.617],[7.367,-8.978],[7.586,-8.319],[9.288,-3.205],[6.926,-4.536],[2.625,-4.807],[2.03,-4.627]],"c":true},"ix":2},"nm":"Path 25","mn":"ADBE Vector Shape - Group","hd":false},{"ind":25,"ty":"sh","ix":26,"ks":{"a":0,"k":{"i":[[0,0],[-0.153,-0.08],[-0.327,-0.338],[0,0],[0,0],[0.102,0.039],[0.867,-0.136]],"o":[[0.166,0.037],[0.329,0.172],[0,0],[0,0],[-0.102,-0.046],[-0.832,-0.326],[0,0]],"v":[[2.06,-21.674],[2.538,-21.499],[3.514,-20.742],[4.211,-18.555],[4.969,-16.256],[4.663,-16.381],[2.051,-16.671]],"c":true},"ix":2},"nm":"Path 26","mn":"ADBE Vector Shape - Group","hd":false},{"ind":26,"ty":"sh","ix":27,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.199,0.007]],"o":[[0,0],[-0.194,-0.035],[0,0]],"v":[[2.065,-25.291],[2.652,-23.452],[2.062,-23.516]],"c":true},"ix":2},"nm":"Path 27","mn":"ADBE Vector Shape - Group","hd":false},{"ind":27,"ty":"sh","ix":28,"ks":{"a":0,"k":{"i":[[-1.142,-1.424],[0.377,-0.157],[0.191,-0.109],[0,0]],"o":[[-0.411,0.058],[-0.199,0.083],[0,0],[1.034,1.359]],"v":[[6.888,-29.7],[5.702,-29.376],[5.116,-29.087],[3.632,-33.868]],"c":true},"ix":2},"nm":"Path 28","mn":"ADBE Vector Shape - Group","hd":false},{"ind":28,"ty":"sh","ix":29,"ks":{"a":0,"k":{"i":[[0,0],[0.028,-0.074],[0.077,-0.638],[0,0]],"o":[[-0.033,0.072],[-0.203,0.521],[0,0],[0,0]],"v":[[9.188,-33.948],[9.096,-33.73],[8.672,-31.983],[4.975,-35.868]],"c":true},"ix":2},"nm":"Path 29","mn":"ADBE Vector Shape - Group","hd":false},{"ind":29,"ty":"sh","ix":30,"ks":{"a":0,"k":{"i":[[0.563,-0.234],[0.65,-0.587],[0,0],[-0.247,0.088],[-0.347,-0.028],[-0.361,-0.136],[0,0],[-0.049,-0.014],[-0.581,-0.691]],"o":[[-0.757,0.316],[0,0],[0.239,-0.169],[0.428,-0.139],[0.452,0.033],[0,0],[0.047,0.019],[0.574,0.698],[-0.615,0.069]],"v":[[9.129,-24.346],[7.012,-22.987],[5.849,-26.728],[6.583,-27.116],[7.719,-27.277],[9.005,-26.947],[9.034,-26.936],[9.176,-26.889],[10.911,-24.802]],"c":true},"ix":2},"nm":"Path 30","mn":"ADBE Vector Shape - Group","hd":false},{"ind":30,"ty":"sh","ix":31,"ks":{"a":0,"k":{"i":[[-0.011,0.178],[-0.12,0.358],[-0.005,0.014],[0,0],[0.127,-0.325],[0.1,-0.903],[0.011,-0.379],[0,0],[0.02,0.295],[0,0.261]],"o":[[0.028,-0.46],[0,0],[0,0],[-0.172,0.295],[-0.285,0.731],[-0.041,0.355],[0,0],[-0.045,-0.295],[-0.018,-0.319],[0,-0.199]],"v":[[11.064,-31.682],[11.286,-32.917],[11.307,-32.979],[14.483,-31.532],[14.035,-30.6],[13.456,-28.139],[13.378,-27.042],[11.176,-29.354],[11.074,-30.256],[11.047,-31.122]],"c":true},"ix":2},"nm":"Path 31","mn":"ADBE Vector Shape - Group","hd":false},{"ind":31,"ty":"sh","ix":32,"ks":{"a":0,"k":{"i":[[0,0],[0.006,-0.578],[0,0],[1.049,0.486],[0.018,0.124],[0.003,0.025]],"o":[[-0.103,0.536],[0,0],[-1.025,-0.482],[-0.021,-0.113],[-0.003,-0.023],[0,0]],"v":[[14.78,-37.748],[14.616,-36.073],[14.616,-35.861],[11.499,-37.316],[11.44,-37.67],[11.431,-37.742]],"c":true},"ix":2},"nm":"Path 32","mn":"ADBE Vector Shape - Group","hd":false},{"ind":32,"ty":"sh","ix":33,"ks":{"a":0,"k":{"i":[[-0.023,0.311],[-0.192,0.547],[-0.139,0.246],[0,0],[0.202,-0.521],[0.141,-1.261],[0,-0.774],[-0.008,-0.24],[0,0],[0.035,0.527],[0,0.34]],"o":[[0.053,-0.698],[0.096,-0.291],[0,0],[-0.291,0.469],[-0.399,1.019],[-0.08,0.698],[0,0.229],[0,0],[-0.086,-0.507],[-0.022,-0.393],[0,-0.352]],"v":[[15.853,-27.899],[16.223,-29.775],[16.574,-30.578],[21.113,-28.508],[20.374,-27.019],[19.561,-23.583],[19.441,-21.363],[19.452,-20.66],[16.035,-24.249],[15.85,-25.823],[15.818,-26.914]],"c":true},"ix":2},"nm":"Path 33","mn":"ADBE Vector Shape - Group","hd":false},{"ind":33,"ty":"sh","ix":34,"ks":{"a":0,"k":{"i":[[-0.039,0.305],[0,0],[0.011,-0.998],[0,-0.06],[-0.094,-0.717],[0,0],[0.805,0.38],[0,0],[0.05,0.471],[0,0.232]],"o":[[0,0],[-0.21,0.876],[0,0.059],[0,0.682],[0,0],[-0.814,-0.394],[0,0],[-0.077,-0.385],[-0.022,-0.228],[0,-0.308]],"v":[[16.585,-37.751],[21.556,-37.759],[21.224,-34.935],[21.221,-34.755],[21.362,-32.652],[19.301,-33.638],[16.852,-34.805],[16.745,-34.855],[16.557,-36.134],[16.525,-36.83]],"c":true},"ix":2},"nm":"Path 34","mn":"ADBE Vector Shape - Group","hd":false},{"ind":34,"ty":"sh","ix":35,"ks":{"a":0,"k":{"i":[[-0.031,0.442],[-0.28,0.804],[0,0],[-0.245,0.405],[0,0],[0.446,-1.155],[0.2,-1.811],[0,-1.108],[-0.027,-0.583],[0,0],[0.018,0.093],[0.067,1.031],[0,0.494]],"o":[[0.077,-1.016],[0,0],[0.157,-0.482],[0,0],[-0.732,0.941],[-0.568,1.46],[-0.113,0.996],[0,0.544],[0,0],[-0.007,-0.097],[-0.188,-0.877],[-0.031,-0.579],[0,-0.498]],"v":[[22.452,-23.29],[22.987,-26.031],[22.992,-26.044],[23.595,-27.377],[32.177,-23.462],[30.404,-20.31],[29.246,-15.379],[29.076,-12.207],[29.116,-10.507],[22.887,-17.053],[22.848,-17.336],[22.452,-20.294],[22.402,-21.893]],"c":true},"ix":2},"nm":"Path 35","mn":"ADBE Vector Shape - Group","hd":false},{"ind":35,"ty":"sh","ix":36,"ks":{"a":0,"k":{"i":[[-0.088,0.557],[0,0],[0.125,-0.513],[0.016,-1.487],[0,-0.08],[-0.224,-1.343],[-0.022,-0.117],[3.061,1.466],[0.099,0.399],[0.093,0.942],[0,0.346]],"o":[[0,0],[-0.192,0.521],[-0.321,1.297],[-0.001,0.078],[0,1.27],[0.02,0.116],[-2.313,-1.13],[-0.13,-0.392],[-0.186,-0.74],[-0.028,-0.346],[0,-0.589]],"v":[[23.521,-37.762],[32.646,-37.779],[32.168,-36.224],[31.661,-32.028],[31.66,-31.79],[31.996,-27.853],[32.06,-27.502],[24.191,-31.301],[23.846,-32.491],[23.434,-34.99],[23.391,-36.037]],"c":true},"ix":2},"nm":"Path 36","mn":"ADBE Vector Shape - Group","hd":false},{"ind":36,"ty":"sh","ix":37,"ks":{"a":0,"k":{"i":[[-0.695,0.846],[0,0],[0.614,-1.572],[0.27,-2.409],[0,-1.431],[-0.042,-0.796],[-0.054,-0.595],[0,0],[0.077,1.234],[0,0.679],[-0.065,0.751],[-0.45,1.244]],"o":[[0,0],[-0.946,1.205],[-0.743,1.906],[-0.147,1.332],[0,0.764],[0.033,0.591],[0,0],[-0.208,-1.172],[-0.042,-0.768],[0,-0.846],[0.133,-1.568],[0.399,-1.158]],"v":[[34.663,-22.328],[43.384,-18.35],[41.038,-14.171],[39.531,-7.758],[39.31,-3.593],[39.374,-1.243],[39.504,0.536],[32.536,-6.88],[32.102,-10.552],[32.039,-12.705],[32.135,-15.078],[33.017,-19.315]],"c":true},"ix":2},"nm":"Path 37","mn":"ADBE Vector Shape - Group","hd":false},{"ind":37,"ty":"sh","ix":38,"ks":{"a":0,"k":{"i":[[-0.457,1.457],[0,0],[0.224,-0.923],[0.02,-1.93],[0,-0.104],[-0.291,-1.749],[-0.18,-0.759],[2.325,1.134],[0.268,0.13],[0.097,0.048],[0.041,0.132],[0.137,0.612],[0.083,1.333],[0,0.334]],"o":[[0,0],[-0.37,0.897],[-0.416,1.685],[0,0.105],[0,1.653],[0.141,0.836],[-2.735,-1.374],[-0.261,-0.13],[-0.097,-0.049],[-0.042,-0.133],[-0.184,-0.607],[-0.262,-1.168],[-0.018,-0.334],[0,-1.673]],"v":[[34.534,-37.783],[44.257,-37.8],[43.365,-35.065],[42.704,-29.613],[42.702,-29.301],[43.142,-24.173],[43.622,-21.788],[36.085,-25.523],[35.289,-25.914],[35,-26.058],[34.876,-26.454],[34.395,-28.291],[33.874,-32.06],[33.845,-33.073]],"c":true},"ix":2},"nm":"Path 38","mn":"ADBE Vector Shape - Group","hd":false},{"ind":38,"ty":"sh","ix":39,"ks":{"a":0,"k":{"i":[[-0.188,1.093],[-0.354,1.008],[0,0],[0.382,-1.638],[0.005,-2.159],[0,0],[-0.362,-2.194],[-0.289,-1.137],[0,0],[1.946,0.985],[0.003,0.008],[0.208,0.685],[0.18,0.809],[0.135,1.862],[0,0.499]],"o":[[0.194,-1.106],[0,0],[-0.887,1.777],[-0.544,2.351],[0,0],[0,2.175],[0.214,1.264],[0,0],[-1.727,-0.884],[-0.002,-0.008],[-0.3,-0.727],[-0.244,-0.8],[-0.338,-1.489],[-0.032,-0.51],[0,-1.195]],"v":[[45.406,-34.619],[46.229,-37.803],[57.197,-37.823],[55.305,-32.735],[54.478,-25.939],[54.478,-25.742],[55.023,-19.158],[55.776,-15.573],[52.766,-17.15],[47.306,-19.928],[47.297,-19.952],[46.513,-22.245],[45.874,-24.669],[45.172,-29.647],[45.125,-31.171]],"c":true},"ix":2},"nm":"Path 39","mn":"ADBE Vector Shape - Group","hd":false},{"ind":39,"ty":"sh","ix":40,"ks":{"a":0,"k":{"i":[[0.502,-0.757],[0.524,-1.292],[0.264,-2.796],[0,-1.296],[-0.116,-1.439],[-0.254,-1.451],[0,0],[0,0],[0.036,0.167],[0.139,1.077],[0.061,0.989],[0,0.884],[-0.002,0.127],[0,0],[-0.08,0.934],[-0.59,1.628],[-0.91,1.101],[0,0]],"o":[[-0.69,1.075],[-0.907,2.311],[-0.119,1.189],[0,1.293],[0.135,1.53],[0,0],[0,0],[0.002,-0.178],[-0.178,-0.825],[-0.13,-1.001],[-0.053,-0.856],[0,-0.125],[0,0],[0,-0.954],[0.183,-2.09],[0.549,-1.574],[0,0],[-0.619,0.689]],"v":[[54.345,-10.408],[52.518,-6.846],[50.755,0.846],[50.577,4.59],[50.75,8.651],[51.335,13.129],[43.698,5.001],[43.698,4.99],[43.645,4.468],[43.159,1.562],[42.871,-1.437],[42.79,-4.058],[42.793,-4.435],[42.792,-4.555],[42.913,-7.403],[44.077,-13.008],[46.272,-17.032],[56.03,-12.583]],"c":true},"ix":2},"nm":"Path 40","mn":"ADBE Vector Shape - Group","hd":false},{"ind":40,"ty":"sh","ix":41,"ks":{"a":0,"k":{"i":[[-0.251,0.306],[-0.618,0.571],[-1.374,0.529],[-0.749,0.126],[-0.912,-0.039],[-1.666,-0.663],[0,0],[-0.128,-0.025],[-1.417,-1.442],[0,0],[0.645,0.034],[2.281,-0.95],[1.863,-1.837],[0.874,-1.293],[0,0]],"o":[[0.486,-0.601],[1.207,-1.127],[0.689,-0.255],[0.632,-0.108],[1.385,0.094],[0,0],[0.121,0.049],[1.227,1.272],[0,0],[-0.661,-0.105],[-2.526,-0.139],[-2.208,0.913],[-1.144,1.136],[0,0],[0.237,-0.346]],"v":[[15.257,0.192],[16.919,-1.573],[20.807,-4.067],[22.982,-4.644],[25.215,-4.743],[29.75,-3.618],[29.763,-3.612],[30.138,-3.502],[34.191,0.67],[36.198,2.664],[34.237,2.454],[26.888,3.695],[20.753,7.841],[17.717,11.491],[14.517,1.182]],"c":true},"ix":2},"nm":"Path 41","mn":"ADBE Vector Shape - Group","hd":false},{"ind":41,"ty":"sh","ix":42,"ks":{"a":0,"k":{"i":[[1.004,-0.991],[0.148,-0.164],[0,0],[-0.184,0.164],[-0.585,0.218],[-0.596,-0.044],[-0.49,-0.153],[0,0],[-0.978,-1.106],[0.949,-0.392]],"o":[[-0.158,0.156],[0,0],[0.183,-0.204],[0.534,-0.487],[0.64,-0.227],[0.407,0.028],[0,0],[0.962,1.153],[-1.042,0.056],[-1.196,0.5]],"v":[[9.888,-15.68],[9.428,-15.2],[7.79,-20.477],[8.349,-21.034],[10.03,-22.092],[11.871,-22.366],[13.206,-22.095],[13.284,-22.006],[16.221,-18.603],[13.204,-17.926]],"c":true},"ix":2},"nm":"Path 42","mn":"ADBE Vector Shape - Group","hd":false},{"ind":42,"ty":"sh","ix":43,"ks":{"a":0,"k":{"i":[[-0.109,0.13],[-0.428,0.384],[-0.866,0.319],[-0.469,0.078],[-0.572,-0.027],[-0.882,-0.307],[0,0],[-0.194,-0.22],[-1.479,-1.593],[-0.531,-0.571],[0.255,0.016],[0,0],[0.843,-0.151],[0.884,-0.359],[1.438,-1.414],[0.453,-0.57],[0,0]],"o":[[0.315,-0.374],[0.776,-0.707],[0.428,-0.151],[0.38,-0.062],[0.692,0.05],[0,0],[0.196,0.219],[1.493,1.651],[0.53,0.571],[-0.258,-0.028],[0,0],[-1.125,-0.04],[-0.958,0.167],[-1.705,0.711],[-0.504,0.501],[0,0],[0.112,-0.15]],"v":[[10.724,-12.537],[11.826,-13.661],[14.297,-15.206],[15.656,-15.554],[17.034,-15.607],[19.349,-15.084],[19.478,-14.937],[20.064,-14.279],[24.565,-9.388],[26.156,-7.673],[25.387,-7.741],[25.367,-7.741],[22.484,-7.579],[19.708,-6.785],[14.974,-3.585],[13.535,-1.978],[10.387,-12.115]],"c":true},"ix":2},"nm":"Path 43","mn":"ADBE Vector Shape - Group","hd":false},{"ind":43,"ty":"sh","ix":44,"ks":{"a":0,"k":{"i":[[1.161,0.028],[1.605,-0.334],[1.532,-0.717],[2.401,-2.489],[1.255,-2.076],[0,0],[-0.019,0.033],[0,0],[-0.303,0.437],[-0.333,0.41],[-0.823,0.761],[-1.826,0.696],[-1.934,-0.134],[-2.312,-0.917],[0,0],[-0.415,0.039],[0,0],[-1.893,-1.722]],"o":[[-1.586,-0.021],[-1.499,0.325],[-2.689,1.256],[-1.751,1.833],[0,0],[0.021,-0.031],[0,0],[0.211,-0.377],[0.312,-0.444],[0.639,-0.788],[1.6,-1.497],[1.95,-0.731],[1.801,0.104],[0,0],[0.396,0.158],[0,0],[2.131,2.042],[-1.192,-0.211]],"v":[[44.008,13.14],[39.202,13.611],[34.635,15.18],[26.964,20.825],[22.441,26.707],[18.904,15.311],[18.965,15.213],[19.026,15.102],[19.848,13.803],[20.818,12.515],[23.02,10.181],[28.181,6.877],[34.034,5.977],[40.059,7.473],[40.074,7.479],[41.302,7.658],[41.539,7.883],[47.543,13.501]],"c":true},"ix":2},"nm":"Path 44","mn":"ADBE Vector Shape - Group","hd":false},{"ind":44,"ty":"sh","ix":45,"ks":{"a":0,"k":{"i":[[-0.466,-0.002],[0,0],[-0.291,-0.557],[-0.199,-1.139],[0.785,-1.649],[0.595,-0.758],[0,0],[0.657,-0.639],[1.509,-0.973],[0.194,-0.349],[0.05,-0.183],[0,0],[0,0],[-0.129,-0.419],[-0.373,0],[-0.081,0.025],[0,0],[-0.285,-0.158],[0,0],[-0.288,-0.182],[-0.34,-0.232],[-0.509,-0.393],[-1.037,-1.058],[-0.994,-2.289],[0,0],[-0.106,-0.293],[0,0],[-0.063,-0.235],[0,0],[-0.041,-0.127],[-0.047,-0.182],[0,0],[0.028,-1.269],[1.141,-2.888],[0,0],[-0.179,-0.657],[-0.015,-0.048],[0.77,-0.96],[0,0],[-0.285,-0.305],[-0.233,0],[-0.157,0.147],[0,0],[-0.566,0],[-0.266,0.072],[-0.464,0.098],[-0.53,0.09],[-1.173,0.111],[-1.236,0.022],[-0.369,0],[-0.766,-0.058],[-1.995,-0.723],[-0.867,-0.506],[-0.79,-0.737],[0,0],[0,0],[-0.386,-0.211],[-0.143,0],[-0.148,0.272],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.038,0.009],[-0.095,0.039],[-0.552,0.188],[-0.491,0.148],[-1.103,0.246],[-2.324,0.162],[-0.542,0],[-1.752,-0.244],[0,0],[-0.295,-0.091],[-0.235,-0.059],[0,0],[-0.149,-0.061],[-0.097,-0.038],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.121,-0.146],[0,0],[-0.44,-0.002],[-0.002,0.466],[0,0],[-0.557,0.291],[-1.139,0.198],[-1.649,-0.785],[-0.757,-0.594],[0,0],[-0.638,-0.657],[-0.973,-1.51],[-0.349,-0.194],[-0.183,-0.05],[0,0],[0,0],[-0.419,0.13],[0,0.372],[0.025,0.081],[0,0],[-0.158,0.285],[0,0],[-0.181,0.288],[-0.232,0.339],[-0.393,0.509],[-1.057,1.038],[-2.289,0.993],[0,0],[-0.292,0.107],[0,0],[-0.234,0.062],[0,0],[-0.126,0.041],[-0.182,0.047],[0,0],[-1.268,-0.028],[-2.888,-1.14],[0,0],[-0.657,0.178],[-0.049,0.016],[-0.961,-0.77],[0,0],[-0.305,0.284],[0,0.233],[0.147,0.156],[0,0],[0,0.566],[0.072,0.266],[0.099,0.465],[0.089,0.53],[0.111,1.173],[0.022,1.236],[0,0.369],[-0.058,0.765],[-0.723,1.995],[-0.505,0.866],[-0.737,0.79],[0,0],[0,0],[-0.211,0.387],[0,0.142],[0.272,0.149],[0,0],[0,0],[0,0],[0,0],[0,0],[0.009,0.037],[0.039,0.095],[0.188,0.552],[0.149,0.491],[0.245,1.103],[0.163,2.323],[0,0.543],[-0.244,1.753],[0,0],[-0.09,0.294],[-0.06,0.234],[0,0],[-0.061,0.148],[-0.038,0.097],[0,0],[0,0],[-0.033,0.438],[0,0],[0,0],[0.094,0.136],[0,0],[0,0],[0,0],[0,0],[0,0],[0.001,-0.44]],"o":[[0,0],[0.375,0.497],[0.552,1.049],[0.302,1.803],[-0.37,0.8],[0,0],[-0.57,0.77],[-1.477,1.388],[-0.341,0.22],[-0.093,0.166],[0,0],[0,0],[-0.421,0.166],[0.111,0.357],[0.086,0],[0,0],[0.197,0.255],[0,0],[0.237,0.131],[0.266,0.165],[0.613,0.413],[1.049,0.825],[2.105,2.134],[0,0],[0.14,0.283],[0,0],[0.096,0.252],[0,0],[0.038,0.128],[0.064,0.195],[0,0],[0.254,1.306],[-0.072,2.381],[0,0],[-0.25,0.632],[0.014,0.048],[-0.929,1.108],[0,0],[-0.261,0.324],[0.16,0.169],[0.216,0],[0,0],[0.48,0.286],[0.274,0],[0.536,-0.145],[0.653,-0.135],[1.191,-0.203],[1.134,-0.108],[0.389,-0.013],[0.823,0],[2.448,0.167],[1.146,0.419],[0.914,0.554],[0,0],[0,0],[-0.182,0.402],[0.124,0.068],[0.308,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0.037,-0.008],[0.1,-0.027],[0.361,-0.149],[0.501,-0.169],[0.951,-0.294],[1.892,-0.424],[0.514,-0.035],[1.402,0],[0,0],[0.272,0.055],[0.217,0.067],[0,0],[0.136,0.044],[0.095,0.04],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0.202],[0,0],[0.033,0.449],[0.466,0.001],[0,0],[0.497,-0.376],[1.048,-0.552],[1.802,-0.302],[0.799,0.369],[0,0],[0.77,0.569],[1.388,1.477],[0.221,0.341],[0.166,0.092],[0,0],[0,0],[0.166,0.421],[0.357,-0.111],[0,-0.086],[0,0],[0.255,-0.197],[0,0],[0.132,-0.238],[0.166,-0.266],[0.413,-0.614],[0.824,-1.05],[2.134,-2.104],[0,0],[0.284,-0.139],[0,0],[0.252,-0.095],[0,0],[0.128,-0.037],[0.196,-0.064],[0,0],[1.307,-0.253],[2.382,0.072],[0,0],[0.632,0.25],[0.049,-0.014],[1.108,0.93],[0,0],[0.323,0.261],[0.169,-0.16],[0,-0.216],[0,0],[0.287,-0.481],[0,-0.274],[-0.146,-0.537],[-0.134,-0.652],[-0.203,-1.191],[-0.108,-1.135],[-0.012,-0.39],[0,-0.823],[0.168,-2.448],[0.419,-1.147],[0.554,-0.914],[0,0],[0,0],[0.402,0.181],[0.067,-0.123],[0,-0.308],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.008,-0.038],[-0.027,-0.1],[-0.149,-0.362],[-0.169,-0.501],[-0.294,-0.952],[-0.424,-1.891],[-0.034,-0.515],[0,-1.402],[0,0],[0.055,-0.272],[0.068,-0.217],[0,0],[0.044,-0.136],[0.041,-0.096],[0,0],[0,0],[0.441,-0.002],[0,0],[0,0],[0,-0.175],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.449,0.033],[-0.002,0.466]],"v":[[-76.07,-37.055],[-61.432,-37.03],[-60.428,-35.444],[-59.284,-32.124],[-60.022,-26.845],[-61.473,-24.501],[-61.484,-24.484],[-63.397,-22.378],[-68.128,-18.836],[-68.943,-17.968],[-69.158,-17.442],[-71.655,-16.513],[-76.367,-14.664],[-76.876,-13.623],[-76.068,-13.029],[-75.818,-13.066],[-68.72,-15.271],[-67.992,-14.646],[-67.862,-14.574],[-67.01,-14.067],[-66.124,-13.487],[-64.397,-12.226],[-61.251,-9.386],[-56.582,-2.72],[-56.57,-2.69],[-56.21,-1.806],[-56.141,-1.625],[-55.892,-0.9],[-55.885,-0.88],[-55.764,-0.498],[-55.595,0.065],[-55.365,1.032],[-55.025,4.912],[-56.828,12.745],[-56.845,12.786],[-56.953,14.756],[-56.91,14.901],[-59.439,17.98],[-59.449,17.996],[-59.406,19.101],[-58.789,19.367],[-58.212,19.138],[-55.529,16.618],[-53.935,17.059],[-53.121,16.949],[-51.453,16.557],[-49.695,16.223],[-46.13,15.749],[-42.559,15.554],[-41.419,15.535],[-39.026,15.623],[-32.333,16.965],[-29.341,18.342],[-26.77,20.291],[-26.747,20.312],[-30.944,29.509],[-30.579,30.601],[-30.173,30.705],[-29.432,30.265],[-27.188,26.16],[-25.01,22.02],[-24.557,21.153],[-24.557,21.136],[-24.473,20.994],[-24.362,20.967],[-24.068,20.869],[-22.671,20.355],[-21.172,19.883],[-18.12,19.08],[-11.854,18.209],[-10.263,18.156],[-5.577,18.519],[-3.997,18.825],[-3.152,19.057],[-2.475,19.252],[-1.704,19.471],[-1.279,19.636],[-0.991,19.753],[-0.164,20.09],[-0.164,32.016],[-0.085,33.468],[0.022,34.926],[0.026,37.151],[0.224,37.685],[0.267,38.29],[1.109,39.083],[1.956,38.24],[1.982,23.602],[3.568,22.599],[6.887,21.454],[12.167,22.192],[14.509,23.642],[14.526,23.655],[16.633,25.567],[20.174,30.298],[21.043,31.113],[21.569,31.327],[22.499,33.824],[24.348,38.537],[25.388,39.045],[25.983,38.238],[25.944,37.988],[23.741,30.891],[24.365,30.162],[24.436,30.032],[24.944,29.181],[25.525,28.294],[26.785,26.568],[29.625,23.42],[36.292,18.752],[36.32,18.739],[37.204,18.379],[37.387,18.31],[38.111,18.062],[38.132,18.055],[38.513,17.935],[39.077,17.764],[40.043,17.534],[43.923,17.195],[51.757,18.997],[51.797,19.015],[53.767,19.124],[53.913,19.08],[56.991,21.609],[57.008,21.62],[58.112,21.576],[58.378,20.959],[58.15,20.382],[55.629,17.699],[56.069,16.105],[55.961,15.291],[55.568,13.623],[55.234,11.865],[54.76,8.301],[54.564,4.729],[54.547,3.59],[54.633,1.196],[55.977,-5.497],[57.353,-8.488],[59.302,-11.06],[59.323,-11.082],[68.521,-6.886],[69.612,-7.251],[69.715,-7.656],[69.276,-8.398],[65.171,-10.643],[61.031,-12.819],[60.164,-13.273],[60.147,-13.273],[60.004,-13.357],[59.978,-13.468],[59.879,-13.762],[59.366,-15.159],[58.893,-16.658],[58.091,-19.711],[57.22,-25.975],[57.167,-27.568],[57.53,-32.254],[57.836,-33.832],[58.068,-34.677],[58.263,-35.354],[58.483,-36.126],[58.646,-36.551],[58.764,-36.839],[59.167,-37.826],[76.161,-37.856],[77.004,-38.64],[77.004,-38.667],[77.004,-38.701],[76.858,-39.175],[1.345,-39.175],[-0.164,-39.175],[-69.845,-39.175],[-71.298,-39.095],[-76.12,-38.743],[-76.913,-37.901]],"c":true},"ix":2},"nm":"Path 45","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.011764706817,0.070588235294,0.098039223166,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[375.96,99.917],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":47,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Heart","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,266.048,0],"ix":2},"a":{"a":0,"k":[256,266.048,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[96.004,-145.341],[-13.306,-126.952],[-125.142,-53.221],[-14.812,141.328]],"o":[[-96.004,-145.341],[14.812,141.328],[125.142,-53.221],[13.306,-126.952]],"v":[[0,-102.214],[-245.231,-21.941],[0,235.5],[245.231,-21.941]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[256,235.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1799.00007327477,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/animations/Wifi Lottie.json b/assets/animations/Wifi Lottie.json new file mode 100644 index 0000000..73d0fb6 --- /dev/null +++ b/assets/animations/Wifi Lottie.json @@ -0,0 +1 @@ +{"v":"5.6.10","fr":60,"ip":0,"op":151,"w":512,"h":512,"nm":"Wifi","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"x","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":63,"s":[-360]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":83,"s":[15]},{"t":98,"s":[0]}],"ix":10},"p":{"a":0,"k":[359.892,199.158,0],"ix":2},"a":{"a":0,"k":[58.033,58.033,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":63,"s":[0,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":83,"s":[110,110,100]},{"t":98,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-13.19,-20.774],[-20.773,-13.189],[13.19,20.774],[20.773,13.191]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.31,56.234],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[20.774,-13.19],[13.191,-20.774],[-20.774,13.19],[-13.189,20.774]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.295,56.274],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-5.14,29.073],[29.074,5.142],[5.143,-29.072],[-29.074,-5.141]],"o":[[5.143,-29.073],[-29.071,-5.142],[-5.142,29.073],[29.072,5.143]],"v":[[52.64,9.31],[9.309,-52.641],[-52.641,-9.311],[-9.31,52.64]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.796078491211,0.270588235294,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[58.033,58.033],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":63,"op":1264,"st":63,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":11,"s":[259,254,0],"to":[-0.833,-6.667,0],"ti":[0.833,6.667,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":21,"s":[254,214,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":26,"s":[254,214,0],"to":[0,-10,0],"ti":[0,10,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":36,"s":[254,154,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":41,"s":[254,154,0],"to":[0,-11.667,0],"ti":[0,11.667,0]},{"t":51,"s":[254,84,0]}],"ix":2},"a":{"a":0,"k":[-7,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[65.486,-3.728],[32.31,-48.573],[-37.204,-20.613],[-53.174,1.881],[-35.068,19.912],[24.003,43.753]],"o":[[-58.243,3.315],[-23.557,35.413],[46.541,25.786],[40.302,-1.426],[43.397,-24.641],[-31.548,-57.506]],"v":[[-12,-116],[-157,-18],[-162,109.5],[-9,64],[106.5,100],[168,-36.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":63,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Signal","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[248.713,276.649,0],"ix":2},"a":{"a":0,"k":[117.252,89.109,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-8.636,9.22],[-12.091,5.447],[-13.283,0.187],[-12.241,-5.106],[-9.141,-9.54],[8.849,9.011],[14.624,6.085],[15.864,-0.178],[14.481,-6.413],[10.705,-11.587]],"o":[[8.865,-9.793],[12.09,-5.445],[13.282,-0.184],[12.242,5.108],[8.849,8.966],[-10.966,-11.343],[-14.623,-6.086],[-15.863,0.177],[-14.48,6.412],[-8.509,9.178]],"v":[[-70.899,21.022],[-39.124,-2.085],[-0.651,-10.626],[38.051,-3.165],[70.474,19.044],[84.428,5.316],[45.632,-21.107],[-0.585,-30.064],[-46.587,-20.073],[-84.768,7.212]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[116.116,82.273],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-35.162,0.084],[-25.888,-23.672],[9.138,8.578],[40.226,-0.282],[30.276,-25.943],[-9.516,8.156]],"o":[[26.318,-22.705],[35.098,-0.5],[9.096,8.409],[-29.51,-27.293],[-40.466,0],[-9.474,8.2],[0,0]],"v":[[-93.86,24.508],[-0.967,-12.578],[93.986,23.499],[107.798,9.833],[-0.758,-32.214],[-107.462,10.548],[-93.734,24.34]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[117.185,32.746],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-5.982,2.583],[-6.544,0.084],[-6.05,-2.429],[-4.581,-4.55],[8.919,8.765],[8.418,3.373],[9.104,-0.074],[8.36,-3.509],[6.305,-6.392],[-8.751,8.929]],"o":[[4.454,-4.668],[5.982,-2.584],[6.545,-0.086],[6.051,2.429],[8.92,8.767],[-6.415,-6.289],[-8.42,-3.373],[-9.105,0.071],[-8.361,3.508],[-8.709,8.89],[0,0]],"v":[[-35.194,12.566],[-19.376,1.576],[-0.391,-2.47],[18.698,1.081],[34.812,11.657],[48.747,-1.781],[26.274,-16.421],[-0.275,-21.421],[-26.737,-15.995],[-48.957,-0.996],[-35.109,12.566]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[117.31,125.297],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.557],[1.899,-2.83],[3.154,-1.294],[3.341,0.674],[2.401,2.419],[0.652,3.347],[-1.318,3.145],[-2.843,1.88],[-3.408,-0.017],[-3.211,-3.233]],"o":[[-0.007,3.408],[-1.902,2.827],[-3.152,1.295],[-3.34,-0.677],[-2.402,-2.418],[-0.651,-3.343],[1.317,-3.142],[2.842,-1.882],[4.557,0.032],[3.211,3.233]],"v":[[17.391,-0.116],[14.462,9.451],[6.71,15.775],[-3.251,16.725],[-12.057,11.975],[-16.74,3.134],[-15.717,-6.818],[-9.337,-14.523],[0.251,-17.382],[12.378,-12.281]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.270588235294,0.352941176471,0.392156892664,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[117.085,160.624],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"BG","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[255.923,255.923,0],"ix":2},"a":{"a":0,"k":[232.564,232.563,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-27.344,113.201],[113.204,27.345],[27.345,-113.202],[-113.202,-27.344]],"o":[[27.344,-113.203],[-113.2,-27.344],[-27.344,113.202],[113.202,27.345]],"v":[[204.97,49.512],[49.51,-204.969],[-204.969,-49.512],[-49.512,204.968]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.937254961799,0.6,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[232.564,232.564],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1201,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/fonts/Poppins-Bold.ttf b/assets/fonts/Poppins-Bold.ttf new file mode 100644 index 0000000..89b46e7 Binary files /dev/null and b/assets/fonts/Poppins-Bold.ttf differ diff --git a/assets/fonts/Poppins-Medium.ttf b/assets/fonts/Poppins-Medium.ttf new file mode 100644 index 0000000..937b1e9 Binary files /dev/null and b/assets/fonts/Poppins-Medium.ttf differ diff --git a/assets/fonts/Poppins-Regular.ttf b/assets/fonts/Poppins-Regular.ttf new file mode 100644 index 0000000..e48144e Binary files /dev/null and b/assets/fonts/Poppins-Regular.ttf differ diff --git a/assets/icons/@.svg b/assets/icons/@.svg new file mode 100644 index 0000000..858fdb8 --- /dev/null +++ b/assets/icons/@.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Email.svg b/assets/icons/Email.svg new file mode 100644 index 0000000..ff85575 --- /dev/null +++ b/assets/icons/Email.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Logout.svg b/assets/icons/Logout.svg new file mode 100644 index 0000000..afb1be1 --- /dev/null +++ b/assets/icons/Logout.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/about us.svg b/assets/icons/about us.svg new file mode 100644 index 0000000..19e656d --- /dev/null +++ b/assets/icons/about us.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arabic.svg b/assets/icons/arabic.svg new file mode 100644 index 0000000..41c62c6 --- /dev/null +++ b/assets/icons/arabic.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/icons/arrow right.svg b/assets/icons/arrow right.svg new file mode 100644 index 0000000..5b342d7 --- /dev/null +++ b/assets/icons/arrow right.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow-left.svg b/assets/icons/arrow-left.svg new file mode 100644 index 0000000..f45b058 --- /dev/null +++ b/assets/icons/arrow-left.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/arrow.svg b/assets/icons/arrow.svg new file mode 100644 index 0000000..2a7e5dc --- /dev/null +++ b/assets/icons/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chinese.svg b/assets/icons/chinese.svg new file mode 100644 index 0000000..03fa029 --- /dev/null +++ b/assets/icons/chinese.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/delete.svg b/assets/icons/delete.svg new file mode 100644 index 0000000..b57df26 --- /dev/null +++ b/assets/icons/delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/edit-2.svg b/assets/icons/edit-2.svg new file mode 100644 index 0000000..3e9fd48 --- /dev/null +++ b/assets/icons/edit-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/edit.svg b/assets/icons/edit.svg new file mode 100644 index 0000000..ed0954e --- /dev/null +++ b/assets/icons/edit.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/english.svg b/assets/icons/english.svg new file mode 100644 index 0000000..c31e895 --- /dev/null +++ b/assets/icons/english.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/icons/gallery.svg b/assets/icons/gallery.svg new file mode 100644 index 0000000..7c45208 --- /dev/null +++ b/assets/icons/gallery.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg new file mode 100644 index 0000000..31f6f40 --- /dev/null +++ b/assets/icons/heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/heart_fill.svg b/assets/icons/heart_fill.svg new file mode 100644 index 0000000..2ea0bf6 --- /dev/null +++ b/assets/icons/heart_fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/home.svg b/assets/icons/home.svg new file mode 100644 index 0000000..5774354 --- /dev/null +++ b/assets/icons/home.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/language.svg b/assets/icons/language.svg new file mode 100644 index 0000000..79fe788 --- /dev/null +++ b/assets/icons/language.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/location.svg b/assets/icons/location.svg new file mode 100644 index 0000000..3326447 --- /dev/null +++ b/assets/icons/location.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/log out.svg b/assets/icons/log out.svg new file mode 100644 index 0000000..88ff3b7 --- /dev/null +++ b/assets/icons/log out.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/love-svgrepo-com 1.svg b/assets/icons/love-svgrepo-com 1.svg new file mode 100644 index 0000000..7f075a0 --- /dev/null +++ b/assets/icons/love-svgrepo-com 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/love-svgrepo-com 2.svg b/assets/icons/love-svgrepo-com 2.svg new file mode 100644 index 0000000..7e70368 --- /dev/null +++ b/assets/icons/love-svgrepo-com 2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/love-svgrepo-com 3.svg b/assets/icons/love-svgrepo-com 3.svg new file mode 100644 index 0000000..50bbd3c --- /dev/null +++ b/assets/icons/love-svgrepo-com 3.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/message.svg b/assets/icons/message.svg new file mode 100644 index 0000000..c624a47 --- /dev/null +++ b/assets/icons/message.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/my cards.svg b/assets/icons/my cards.svg new file mode 100644 index 0000000..cbb663b --- /dev/null +++ b/assets/icons/my cards.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/notification.svg b/assets/icons/notification.svg new file mode 100644 index 0000000..66a6ad8 --- /dev/null +++ b/assets/icons/notification.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/option.svg b/assets/icons/option.svg new file mode 100644 index 0000000..a3fccd1 --- /dev/null +++ b/assets/icons/option.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/pdf.svg b/assets/icons/pdf.svg new file mode 100644 index 0000000..64b610b --- /dev/null +++ b/assets/icons/pdf.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/phone.svg b/assets/icons/phone.svg new file mode 100644 index 0000000..11611e2 --- /dev/null +++ b/assets/icons/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/play_voice-2.svg b/assets/icons/play_voice-2.svg new file mode 100644 index 0000000..e6f53e2 --- /dev/null +++ b/assets/icons/play_voice-2.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/assets/icons/play_voice.svg b/assets/icons/play_voice.svg new file mode 100644 index 0000000..267fbb1 --- /dev/null +++ b/assets/icons/play_voice.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/plus.svg b/assets/icons/plus.svg new file mode 100644 index 0000000..87f3639 --- /dev/null +++ b/assets/icons/plus.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/privacy.svg b/assets/icons/privacy.svg new file mode 100644 index 0000000..04ea672 --- /dev/null +++ b/assets/icons/privacy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/search.svg b/assets/icons/search.svg new file mode 100644 index 0000000..80b1840 --- /dev/null +++ b/assets/icons/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/tafee icon.svg b/assets/icons/tafee icon.svg new file mode 100644 index 0000000..8187189 --- /dev/null +++ b/assets/icons/tafee icon.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/icons/x.svg b/assets/icons/x.svg new file mode 100644 index 0000000..fcfbe8d --- /dev/null +++ b/assets/icons/x.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/Add-New-Card.png b/assets/images/Add-New-Card.png new file mode 100644 index 0000000..8179cbb Binary files /dev/null and b/assets/images/Add-New-Card.png differ diff --git a/assets/images/Ellipse 8.png b/assets/images/Ellipse 8.png new file mode 100644 index 0000000..6640ee6 Binary files /dev/null and b/assets/images/Ellipse 8.png differ diff --git a/assets/images/ball.png b/assets/images/ball.png new file mode 100644 index 0000000..5482964 Binary files /dev/null and b/assets/images/ball.png differ diff --git a/assets/images/cars.png b/assets/images/cars.png new file mode 100644 index 0000000..d027317 Binary files /dev/null and b/assets/images/cars.png differ diff --git a/assets/images/default_user_avatar.png b/assets/images/default_user_avatar.png new file mode 100644 index 0000000..bdba4c2 Binary files /dev/null and b/assets/images/default_user_avatar.png differ diff --git a/assets/images/download (3) 3.png b/assets/images/download (3) 3.png new file mode 100644 index 0000000..a165538 Binary files /dev/null and b/assets/images/download (3) 3.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000..a93e648 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/no result.png b/assets/images/no result.png new file mode 100644 index 0000000..4dcacba Binary files /dev/null and b/assets/images/no result.png differ diff --git a/assets/images/onboarding 1.svg b/assets/images/onboarding 1.svg new file mode 100644 index 0000000..953ef08 --- /dev/null +++ b/assets/images/onboarding 1.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/onboarding 2.svg b/assets/images/onboarding 2.svg new file mode 100644 index 0000000..45a8c0e --- /dev/null +++ b/assets/images/onboarding 2.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/onboarding 3.svg b/assets/images/onboarding 3.svg new file mode 100644 index 0000000..5d06c61 --- /dev/null +++ b/assets/images/onboarding 3.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/sent message shape.png b/assets/images/sent message shape.png new file mode 100644 index 0000000..de1d719 Binary files /dev/null and b/assets/images/sent message shape.png differ diff --git a/assets/images/sent message.png b/assets/images/sent message.png new file mode 100644 index 0000000..781f19a Binary files /dev/null and b/assets/images/sent message.png differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f0946eb --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,614 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..87131a0 --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..43df4bb --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Taafee Mobile + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + taafee_mobile + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/lib/common/const/const.dart b/lib/common/const/const.dart new file mode 100644 index 0000000..5be8e44 --- /dev/null +++ b/lib/common/const/const.dart @@ -0,0 +1,117 @@ +import 'package:flutter/material.dart'; + +enum Languages { english, arabic, chinese } + +String networkImageTest = + "public/images/jcjxzIQCgFSHW9j5Tu1JBgvAkQqIGOC9qmeUatzY.jpg"; + +extension Code on Languages { + String get code { + switch (this) { + case Languages.english: + return 'en'; + case Languages.arabic: + return 'ar'; + case Languages.chinese: + return "cn"; + } + } +} + +class AppColors { + static Color sentMessageColor = const Color(0xffDAC439); + static Color primeColor = const Color(0xff7986ca); + static Color tailAuthColor = const Color(0xffFEE64B); + static Color textButtonColor = const Color(0xff484848); + static Color textColor = Colors.black; + static Color borderColor = const Color(0xffD9D9D9); + static Color backGroundColor = const Color(0xffF5F5F5); + static Color dividerColor = const Color(0xffECECEC); + static Color textMessageColor = const Color(0xff4E5D78); + static Color timeMessageColor = const Color(0xff9FA6B5); + static Color secondaryColor = const Color(0xff44bee8); + static Color emailColor = const Color(0xff76BAD0); + static Color callColor = const Color(0xff76D095); + static Color messageColor = const Color(0xff4E5D78); + static Color circleAvatarColor = const Color(0xffE7E7E7); + static Color borderTextFiled = const Color(0xffC2B55B); + static Color redColor = const Color(0xffFF8078); + // yellow pages colors + // static Color sentMessageColor = const Color(0xffDAC439); + // static Color primeColor = const Color(0xffFFEF99); + // static Color tailAuthColor = const Color(0xffFEE64B); + // static Color textButtonColor = const Color(0xff484848); + // static Color textColor = const Color(0xff666666); + // static Color borderColor = const Color(0xffD9D9D9); + // static Color backGroundColor = const Color(0xffF5F5F5); + // static Color dividerColor = const Color(0xffECECEC); + // static Color textMessageColor = const Color(0xff4E5D78); + // static Color timeMessageColor = const Color(0xff9FA6B5); + // static Color secondaryColor = const Color(0xffFFCB45); + // static Color emailColor = const Color(0xff76BAD0); + // static Color callColor = const Color(0xff76D095); + // static Color messageColor = const Color(0xff4E5D78); + // static Color circleAvatarColor = const Color(0xffE7E7E7); + // static Color borderTextFiled = const Color(0xffC2B55B); + // static Color redColor = const Color(0xffFF8078); +} + +class AppAssets { + static String logo = "assets/images/logo.png"; +} + +class AppFont { + static String bold = 'bold'; + static String regular = 'regular'; + static String medium = 'medium'; +} + +class Domain { + static String domain = 'https://pages-back-dev.octa-apps.com/storage/'; + static String chatFiles = 'https://pages-chat-dev.octa-apps.com/room/file/'; +} + +class Constants { + static List defaulWaveFormData = [ + 0.0, + 0.3, + 0.0, + 0.20, + 0.3, + 0.8, + 0.20, + 0.3, + 0.20, + 0.1, + 0.3, + 0.8, + 0.20, + 0.3, + 0.8, + 0.20, + 0.3, + 0.8, + 0.20, + 0.3, + 0.0, + 0.3, + 0.20, + 0.1, + 0.3, + 0.0, + 0.20, + 0.3, + 0.8, + 0.20, + 0.3, + 0.20, + 0.1, + ]; +} + +class Responsive { + static bool isTablet() { + final data = MediaQueryData.fromWindow(WidgetsBinding.instance.window); + return data.size.shortestSide < 550 ? false : true; + } +} diff --git a/lib/common/extensions/widget_extension.dart b/lib/common/extensions/widget_extension.dart new file mode 100644 index 0000000..9ca4267 --- /dev/null +++ b/lib/common/extensions/widget_extension.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; + +extension MyExtension on Widget { + Widget makeSafeArea() { + return SafeArea(child: this); + } + + Widget center() => Center( + child: this, + ); + + Widget expanded(int? flex) => Expanded( + flex: flex ?? 0, + child: this, + ); + + Widget padding(EdgeInsets? padding) => Padding( + padding: padding ?? const EdgeInsets.symmetric(vertical: 8, horizontal: 8), + child: this, + ); + Widget align({required AlignmentGeometry alignment}) { + return Align( + alignment: alignment, + child: this, + ); + } + + Widget fittedBox() { + return FittedBox( + child: this, + ); + } + + Widget onTap(VoidCallback onTap) => InkWell( + onTap: onTap, + child: this, + ); + Widget onDoubleTap(VoidCallback onDoubleTap) { + return GestureDetector( + onDoubleTap: onDoubleTap, + child: this, + ); + } + + Widget onLongPress(VoidCallback onLongPress) { + return GestureDetector( + onLongPress: onLongPress, + child: this, + ); + } +} diff --git a/lib/common/widgets/button.dart b/lib/common/widgets/button.dart new file mode 100644 index 0000000..3964a4b --- /dev/null +++ b/lib/common/widgets/button.dart @@ -0,0 +1,85 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; + +class ButtonWidget extends StatelessWidget { + final VoidCallback onTap; + final String title; + final Color? color; + final bool? haveIcon; + final Widget? child; + final double? width; + final Color? textColor; + final Color? loaderColor; + final bool? isLoading; + final double? buttonHeight; + final bool hideTextOnLoading; + const ButtonWidget( + {super.key, + required this.onTap, + required this.title, + this.color, + this.hideTextOnLoading = false, + this.haveIcon = false, + this.child, + this.loaderColor, + this.width, + this.buttonHeight, + this.textColor, + this.isLoading = false}); + + @override + Widget build(BuildContext context) { + return Container( + alignment: Alignment.center, + width: width ?? Get.width * 0.9, + height: buttonHeight ?? 55, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: color ?? AppColors.primeColor), + child: haveIcon! + ? Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + child ?? Container(), + BoldTextWidget( + title, + color: textColor, + ).paddingSymmetric(horizontal: 10), + ]) + : isLoading! + //wrap (Loader with visibility instead of repeating it) + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Visibility( + visible: !((isLoading != null) && + hideTextOnLoading && + isLoading!), + child: BoldTextWidget( + title, + color: textColor, + ).paddingSymmetric(horizontal: 20), + ), + SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + color: loaderColor ?? Colors.white, + ), + ), + ], + ) + : BoldTextWidget( + title, + color: textColor, + ), + ).onTap(() { + if (isLoading == null || !isLoading!) onTap(); + }); + // return InkWell( + // onTap: onTap, + // child: BoldTextWidget(title), + // ); + } +} diff --git a/lib/common/widgets/drop_down.dart b/lib/common/widgets/drop_down.dart new file mode 100644 index 0000000..2de8d1b --- /dev/null +++ b/lib/common/widgets/drop_down.dart @@ -0,0 +1,73 @@ +import 'package:dropdown_search/dropdown_search.dart'; +import 'package:flutter/material.dart'; + +class DropDownWidget extends StatelessWidget { + final List item; + final T selectItem; + final void Function(T?) onChanged; + final bool Function(T, T)? compareFunction; + final String Function(T)? toStr; + final EdgeInsets? padding; + final EdgeInsetsGeometry? margin; + final String? Function(T?)? validator; + // Future> Function(String)? asyncItems; + + const DropDownWidget( + {super.key, + required this.item, + required this.selectItem, + required this.onChanged, + this.compareFunction, + this.validator, + this.toStr, + this.padding, + this.margin + // required this.asyncItems + }); + + @override + Widget build(BuildContext context) { + return DropdownSearch( + // asyncItems:asyncItems , + validator: validator, + dropdownButtonProps: DropdownButtonProps( + + // color: AppColors.secondaryColor, + icon: const Icon( + Icons.arrow_drop_down, + size: 45, + ), + // alignment: Alignment.centerLeft, + padding: padding ?? const EdgeInsets.all(8) + + // iconSize: 50 + ), + + popupProps: const PopupProps.menu( + fit: FlexFit.loose, + // showSelectedItems: true, + ), + + items: item, + compareFn: compareFunction, + itemAsString: toStr, + + dropdownDecoratorProps: DropDownDecoratorProps( + textAlignVertical: TextAlignVertical.center, + textAlign: TextAlign.left, + baseStyle: const TextStyle( + fontSize: 16, + // fontWeight: FontWeight, + ), + dropdownSearchDecoration: InputDecoration( + contentPadding: margin, + helperStyle: const TextStyle(color: Colors.red), + hintStyle: const TextStyle(color: Colors.red), + border: InputBorder.none, + ), + ), + onChanged: onChanged, + selectedItem: selectItem, + ); + } +} diff --git a/lib/common/widgets/gridview.dart b/lib/common/widgets/gridview.dart new file mode 100644 index 0000000..54e711a --- /dev/null +++ b/lib/common/widgets/gridview.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +class GridViewWidget extends StatelessWidget { + final Widget Function(int) child; + final int itemCount; + final int? count; + final double? mainAxisExtent; + final ScrollController? scrollController; + const GridViewWidget( + {super.key, + required this.child, + this.scrollController, + this.mainAxisExtent, + required this.itemCount, + this.count}); + + @override + Widget build(BuildContext context) { + return GridView.builder( + controller: scrollController, + itemCount: itemCount, + physics: const NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + padding: const EdgeInsets.symmetric(horizontal: 20), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: count ?? 3, + mainAxisSpacing: 15, + crossAxisSpacing: 15, + mainAxisExtent: mainAxisExtent, + ), + shrinkWrap: true, + itemBuilder: (context, index) { + return child(index); + }); + } +} diff --git a/lib/common/widgets/header_screen.dart b/lib/common/widgets/header_screen.dart new file mode 100644 index 0000000..60a5c0f --- /dev/null +++ b/lib/common/widgets/header_screen.dart @@ -0,0 +1,50 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../core/routing/routing_manager.dart'; +import '../const/const.dart'; +import 'text.dart'; + +class HeaderScreen extends StatelessWidget { + final String title; + final Color? textColor; + final Color? iconColor; + final void Function()? additionalOnTap; + final HomeController homeController = Get.find(); + HeaderScreen(this.title, + {super.key, this.additionalOnTap, this.iconColor, this.textColor}); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Obx(() => (!homeController.isArabic.value) + ? SvgPicture.asset( + "assets/icons/arrow-left.svg", + width: Responsive.isTablet() ? 25 : null, + colorFilter: (iconColor != null) + ? ColorFilter.mode(iconColor!, BlendMode.srcIn) + : null, + ) + : SvgPicture.asset( + "assets/icons/arrow right.svg", + width: Responsive.isTablet() ? 20 : null, + colorFilter: (iconColor != null) + ? ColorFilter.mode(iconColor!, BlendMode.srcIn) + : null, + )).onTap(() { + RoutingManager.back(); + }), + BoldTextWidget( + title, + fontSize: Responsive.isTablet() ? 24 : 18, + color: textColor ?? AppColors.textColor, + ).paddingSymmetric(horizontal: 10), + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 2 : 4); + } +} diff --git a/lib/common/widgets/listview.dart b/lib/common/widgets/listview.dart new file mode 100644 index 0000000..716a30f --- /dev/null +++ b/lib/common/widgets/listview.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class ListViewWidget extends StatelessWidget { + final Widget Function(int) childBuilder; + final int itemCount; + final ScrollPhysics? physics; + final Axis? scrollDirection; + final ScrollController? scrollController; + final double? itemExtent; + const ListViewWidget( + {super.key, + required this.itemCount, + required this.childBuilder, + this.itemExtent, + this.physics, + this.scrollDirection, + this.scrollController}); + + @override + Widget build(BuildContext context) { + return ListView.builder( + itemExtent: itemExtent, + controller: scrollController, + scrollDirection: scrollDirection ?? Axis.vertical, + physics: physics ?? const NeverScrollableScrollPhysics(), + itemCount: itemCount, + shrinkWrap: true, + itemBuilder: (BuildContext context, index) { + return childBuilder(index); + }); + } +} diff --git a/lib/common/widgets/loader.dart b/lib/common/widgets/loader.dart new file mode 100644 index 0000000..0b0aa5f --- /dev/null +++ b/lib/common/widgets/loader.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; +import 'package:lottie/lottie.dart'; + +class Loader extends StatelessWidget { + final double? width; + final double? height; + final Color? color; + + // ignore: prefer_const_constructors_in_immutables + Loader({super.key, this.height, this.width, this.color}); + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + alignment: Alignment.center, + width: 120, //width ?? 20, + height: 120, // height ?? 20, + child: //FadeTransition(opacity: ,) + // CircularProgressIndicator( + // color: color ?? AppColors.primeColor, + // ), + Lottie.asset('assets/animations/Loader.json'), + ), + ], + ); + } +} diff --git a/lib/common/widgets/notification_message.dart b/lib/common/widgets/notification_message.dart new file mode 100644 index 0000000..cd952dc --- /dev/null +++ b/lib/common/widgets/notification_message.dart @@ -0,0 +1,29 @@ +// import 'package:firebase_messaging/firebase_messaging.dart'; +// import 'package:get/get.dart'; +// import 'package:flutter/material.dart'; +// import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +// import '../../core/routing/routing_manager.dart'; +// import '../const/const.dart'; + +// void notificationMessage(RemoteMessage message, CardModel cardModel, +// {String? color}) { +// Get.showSnackbar(GetSnackBar( + +// messageText: Text( +// '${message.notification!.title!} : ${message.notification!.body!}', +// textAlign: TextAlign.center, +// style: TextStyle( +// color: Colors.black, +// ), +// ), +// backgroundColor: Colors.white, +// snackPosition: SnackPosition.TOP, + +// duration: const Duration(seconds: 5), + +// onTap: (snackbar) { +// RoutingManager.to(RouteName.cardDetails, arguments: cardModel); +// }, +// )); +// } diff --git a/lib/common/widgets/responsive_view.dart b/lib/common/widgets/responsive_view.dart new file mode 100644 index 0000000..7853928 --- /dev/null +++ b/lib/common/widgets/responsive_view.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:taafee_mobile/common/widgets/gridview.dart'; +import 'package:taafee_mobile/common/widgets/listview.dart'; +import 'package:taafee_mobile/common/const/const.dart'; + +class ResponsiveView extends StatelessWidget { + const ResponsiveView({ + super.key, + required this.itemCount, + required this.childBuilder, + this.scrollController, + this.mainAxisExtent, + this.count, + }); + final int itemCount; + final int? count; + final double? mainAxisExtent; + final ScrollController? scrollController; + final Widget Function(int) childBuilder; + @override + Widget build(BuildContext context) { + bool isTabletResult = Responsive.isTablet(); + if (isTabletResult) { + return GridViewWidget( + scrollController: scrollController, + child: childBuilder, + count: count ?? 2, + mainAxisExtent: mainAxisExtent, + itemCount: itemCount); + } else { + return ListViewWidget( + itemExtent: mainAxisExtent, + itemCount: itemCount, + childBuilder: childBuilder, + scrollController: scrollController, + ); + } + } +} diff --git a/lib/common/widgets/rx_viewer.dart b/lib/common/widgets/rx_viewer.dart new file mode 100644 index 0000000..4bdc2bf --- /dev/null +++ b/lib/common/widgets/rx_viewer.dart @@ -0,0 +1,106 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/loader.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:rx_future/rx_future.dart'; + +import '../const/const.dart'; + +// ignore: must_be_immutable +class RxViewer extends StatelessWidget { + final RxFuture rxFuture; + final double? width; + final double? height; + final double? loaderWidth; + final double? loaderHeight; + final double? errorWidth; + final double? errorHeight; + final bool? withSizedBox; + final Color? color; + final Function() child; + final Widget? errorWidget; + final Widget? customLoader; + bool _isLoading = false; + final bool? withPagination; + RxViewer( + {super.key, + required this.rxFuture, + this.color, + this.height, + this.width, + this.loaderHeight, + this.loaderWidth, + this.errorHeight, + this.errorWidth, + this.withSizedBox, + this.errorWidget, + this.customLoader, + this.withPagination, + required this.child}); + + @override + Widget build(BuildContext context) { + return Obx(() { + if (withPagination != null) { + if (withPagination!) { + _isLoading = rxFuture.loading && rxFuture.result.isFirstPage; + } else { + _isLoading = rxFuture.loading; + } + } else { + _isLoading = rxFuture.loading; + } + if (_isLoading) { + return (customLoader != null) + ? customLoader! + : (withSizedBox ?? false) + ? SizedBox( + width: loaderWidth, + height: loaderHeight, + child: Loader( + width: width, + height: height, + color: color, + ).center(), + ) + : SizedBox( + width: width, + height: height, + child: Loader( + width: width, + height: height, + color: color, + ).center(), + ); + } + if (rxFuture.hasError) { + return errorWidget ?? + SizedBox( + width: errorWidth, + height: errorHeight, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Lottie.asset( + 'assets/animations/Wifi Lottie.json', + repeat: false, + width: 120, + ).paddingAll(5), + RegularTextWidget( + 'you_have_no_internet_connection'.tr, + textAlign: TextAlign.center, + color: AppColors.textColor, + fontSize: 18.0, + ) + ], + ).center(), + ); + } else { + return child(); + } + }); + } +} diff --git a/lib/common/widgets/search_area.dart b/lib/common/widgets/search_area.dart new file mode 100644 index 0000000..afd9d92 --- /dev/null +++ b/lib/common/widgets/search_area.dart @@ -0,0 +1,383 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; + +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../features/home/presentation_layer/widgets/search_bar.dart'; +import '../../features/home/presentation_layer/widgets/search_category.dart'; +import '../../features/home/presentation_layer/widgets/search_location.dart'; +import '../const/const.dart'; +import 'listview.dart'; +import 'text.dart'; + +// ignore: must_be_immutable +class SearchAreaWidget extends StatelessWidget { + SearchAreaWidget({super.key, this.textEditingController}); + + final CategoryController categoryController = Get.find(); + Timer? debouncer; + final HomeController homeController = Get.find(); + TextEditingController? textEditingController; + + void dialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: + RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + contentPadding: EdgeInsets.zero, + actionsPadding: EdgeInsets.zero, + title: RegularTextWidget( + "choose_city_please".tr, + fontSize: 14, + ), + content: Container( + decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), + width: Get.width * .89, + height: Get.height * .58, + child: SingleChildScrollView( + child: Column( + children: [ + SearchBarWidget( + onChanged: (value) { + if (debouncer?.isActive ?? false) { + debouncer!.cancel(); + } + debouncer = Timer(const Duration(seconds: 1), () { + homeController.getCities(value: value); + }); + }, + onSearch: () {}, + hint: "search_city_or_country_name".tr, + ).paddingSymmetric(horizontal: 17, vertical: 20), + RxViewer( + width: 300, + height: 300, + color: AppColors.primeColor, + rxFuture: homeController.cityState, + child: () => ListViewWidget( + itemCount: homeController.cityState.result.length, + childBuilder: (index) { + return SearchLocationWidget( + homeController.cityState.result[index]) + .onTap(() { + homeController.searchModel.value.cityId = + homeController.cityState.result[index].id; + RoutingManager.back(); + + homeController.setCityName( + homeController.cityState.result[index].name); + homeController.search(); + RoutingManager.back(); + }); + }), + ) + ], + ), + ), + ), + ); + }); + } + + void categoryDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + contentPadding: EdgeInsets.zero, + actionsPadding: EdgeInsets.zero, + shape: + RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + title: RegularTextWidget( + "choose_category_please".tr, + fontSize: 14, + ), + content: Container( + decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), + width: Get.width * .89, + height: Get.height * .58, + child: SingleChildScrollView( + child: Column( + children: [ + SearchBarWidget( + onChanged: (value) { + if (debouncer?.isActive ?? false) { + debouncer!.cancel(); + } + debouncer = Timer(const Duration(seconds: 1), () { + categoryController.searchCategories(value: value); + }); + }, + onSearch: () {}, + hint: 'search_category_name'.tr, + ).paddingSymmetric(horizontal: 17, vertical: 20), + RxViewer( + width: 300, + height: 300, + color: AppColors.primeColor, + rxFuture: categoryController.searchCategoriesState, + child: () => ListViewWidget( + itemCount: categoryController + .searchCategoriesState.result.length, + childBuilder: (index) { + return SearchCategoryWidget( + categoryModel: categoryController + .searchCategoriesState.result[index], + ).onTap(() { + homeController.searchModel.value.categoryId = + categoryController + .searchCategoriesState.result[index].id; + homeController.setCategoryName(categoryController + .searchCategoriesState.result[index].name); + homeController.searchState.result.clear(); + homeController.search(); + RoutingManager.back(); + }); + }), + ) + ], + ), + ), + ), + ); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.only(top: 5), + width: Get.width * .89, + height: Responsive.isTablet() ? 70 : 108, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: (Responsive.isTablet()) + ? Row( + children: [ + SearchBarWidget( + controller: textEditingController, + onChanged: (value) async { + if (debouncer?.isActive ?? false) debouncer!.cancel(); + debouncer = + Timer(const Duration(milliseconds: 1000), () { + if (value == '') { + homeController.searchModel.value.searchWords = + value; + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(false); + } else { + homeController.searchState.result.clear(); + + homeController.changeUserSearchingState(true); + + homeController.searchModel.value.searchWords = + value; + homeController.search(); + } + }); + }, + onSearch: () { + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(true); + homeController.search(); + }) + .paddingSymmetric(horizontal: 10) + .paddingOnly( + bottom: Responsive.isTablet() ? 8 : 0, + ) + .expanded(4), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + child: Row( + children: [ + Obx( + () => RegularTextWidget( + homeController.searchModel.value.cityName ?? + "city".tr, + color: Colors.black, + fontSize: 14, + ).paddingSymmetric(horizontal: 5), + ), + SvgPicture.asset("assets/icons/arrow.svg") + ], + ).onTap(() async { + dialog(context); + await homeController.getCities(); + }), + ), + Container( + child: Row( + children: [ + Obx( + () => RegularTextWidget( + homeController.searchModel.value.categoryName ?? + "categories".tr, + fontSize: 14, + color: Colors.black, + ).paddingSymmetric(horizontal: 5), + ), + SvgPicture.asset("assets/icons/arrow.svg") + ], + ).onTap(() async { + categoryDialog(context); + await categoryController.searchCategories(); + }), + ), + Obx(() { + return Visibility( + visible: (homeController.searchModel.value.categoryId != + null) || + (homeController.searchModel.value.cityId != null) || + (homeController.searchModel.value.searchWords != + null), + child: SvgPicture.asset('assets/icons/x.svg').onTap(() { + homeController.clearSearchFilters(); + textEditingController!.clear(); + + homeController.searchState.result.clear(); + homeController.search(); + }), + ); + }), + Container( + alignment: Alignment.center, + width: 79, + height: 38, + decoration: BoxDecoration( + color: AppColors.secondaryColor, + borderRadius: BorderRadius.circular(30)), + child: RegularTextWidget( + "search".tr, + fontSize: 14, + color: Colors.white, + ), + ).onTap(() { + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(true); + homeController.search(); + }), + ], + ) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 16 : 4, vertical: 8) + .expanded(4) + ], + ) + : Column( + children: [ + SearchBarWidget( + controller: textEditingController, + onChanged: (value) async { + if (debouncer?.isActive ?? false) debouncer!.cancel(); + debouncer = Timer(const Duration(milliseconds: 1000), () { + if (value == '') { + homeController.searchModel.value.searchWords = value; + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(false); + } else { + homeController.searchState.result.clear(); + + homeController.changeUserSearchingState(true); + + homeController.searchModel.value.searchWords = value; + homeController.search(); + } + }); + }, + onSearch: () { + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(true); + homeController.search(); + }).paddingSymmetric(horizontal: 10), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + child: Row( + children: [ + Obx( + () => RegularTextWidget( + homeController.searchModel.value.cityName ?? + "city".tr, + fontSize: 14, + color: Colors.black, + ).paddingSymmetric(horizontal: 5), + ), + SvgPicture.asset("assets/icons/arrow.svg") + ], + ).onTap(() async { + dialog(context); + await homeController.getCities(); + }), + ), + Container( + child: Row( + children: [ + Obx( + () => RegularTextWidget( + homeController.searchModel.value.categoryName ?? + "categories".tr, + color: Colors.black, + fontSize: 14, + ).paddingSymmetric(horizontal: 5), + ), + SvgPicture.asset("assets/icons/arrow.svg") + ], + ).onTap(() async { + categoryDialog(context); + await categoryController.searchCategories(); + }), + ), + Obx(() { + return Visibility( + visible: (homeController.searchModel.value.categoryId != + null) || + (homeController.searchModel.value.cityId != null) || + (homeController.searchModel.value.searchWords != + null), + child: SvgPicture.asset('assets/icons/x.svg').onTap(() { + homeController.clearSearchFilters(); + textEditingController!.clear(); + + homeController.searchState.result.clear(); + homeController.search(); + }), + ); + }), + Container( + alignment: Alignment.center, + width: 79, + height: 38, + decoration: BoxDecoration( + color: AppColors.secondaryColor, + borderRadius: BorderRadius.circular(30)), + child: RegularTextWidget( + "search".tr, + fontSize: 14, + color: Colors.white, + ), + ).onTap(() { + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(true); + homeController.search(); + }), + ], + ).paddingSymmetric(horizontal: 10, vertical: 7) + ], + ), + ); + } +} diff --git a/lib/common/widgets/text.dart b/lib/common/widgets/text.dart new file mode 100644 index 0000000..444697b --- /dev/null +++ b/lib/common/widgets/text.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; + +import 'package:taafee_mobile/common/const/const.dart'; + +class BoldTextWidget extends StatelessWidget { + final String title; + final Color? color; + final double? fontSize; + final TextAlign? textAlign; + final TextDecoration? decoration; + final TextOverflow? overflow; + const BoldTextWidget(this.title, + {super.key, + this.color, + this.fontSize, + this.overflow, + this.decoration, + this.textAlign}); + + @override + Widget build(BuildContext context) { + return Text( + title, + textAlign: textAlign, + style: TextStyle( + color: color ?? Colors.black, + fontSize: fontSize ?? (Responsive.isTablet() ? 17 : 14), + fontFamily: AppFont.bold, + decoration: decoration, + overflow: overflow), + ); + } +} + +class MediumTextWidget extends StatelessWidget { + final String title; + final Color? color; + final TextOverflow? overflow; + final double? fontSize; + final TextAlign? textAlign; + const MediumTextWidget(this.title, + {super.key, this.textAlign, this.color, this.overflow, this.fontSize}); + + @override + Widget build(BuildContext context) { + return Text( + title, + textAlign: textAlign, + style: TextStyle( + color: color ?? AppColors.textColor, + fontSize: fontSize ?? (Responsive.isTablet() ? 15 : 12), + fontFamily: AppFont.medium, + overflow: overflow, + ), + ); + } +} + +class RegularTextWidget extends StatelessWidget { + final String title; + final Color? color; + final double? fontSize; + final TextOverflow? overflow; + final TextAlign? textAlign; + final int? maxLines; + const RegularTextWidget(this.title, + {super.key, + this.color, + this.fontSize, + this.maxLines, + this.overflow, + this.textAlign}); + + @override + Widget build(BuildContext context) { + return Text( + title, + maxLines: maxLines, + textAlign: textAlign, + overflow: overflow, + style: TextStyle( + color: color ?? AppColors.textColor, + fontSize: fontSize ?? (Responsive.isTablet() ? 15 : 12), + fontFamily: AppFont.regular, + ), + ); + } +} diff --git a/lib/common/widgets/textfiled.dart b/lib/common/widgets/textfiled.dart new file mode 100644 index 0000000..e76d32d --- /dev/null +++ b/lib/common/widgets/textfiled.dart @@ -0,0 +1,104 @@ +import 'package:flutter/material.dart'; + +import '../const/const.dart'; + +class TextFieldWidget extends StatelessWidget { + final void Function(String) onChange; + final TextInputType keyboardType; + final String label; + final String? Function(String?)? validate; + final bool? obscure; + final String? initValue; + final TextInputAction? textInputAction; + final double? height; + final Widget? suffix; + final Widget? prefix; + final int? maxLines; + final String? suffixText; + const TextFieldWidget( + {super.key, + required this.onChange, + required this.keyboardType, + required this.label, + required this.validate, + this.initValue, + this.obscure, + this.textInputAction, + this.height, + this.suffix, + this.prefix, + this.maxLines, + this.suffixText}); + + @override + Widget build(BuildContext context) { + return Container( + transformAlignment: Alignment.topLeft, + // padding: const EdgeInsets.only(top: 1.5), + + width: MediaQuery.of(context).size.width, + height: height ?? 55, + child: TextFormField( + textInputAction: textInputAction, + initialValue: initValue ?? '', + autovalidateMode: AutovalidateMode.onUserInteraction, + + obscureText: obscure ?? false, + validator: validate, + + cursorColor: AppColors.primeColor, + style: const TextStyle(decorationThickness: 0 + + // height: 1.6, + ), + onChanged: onChange, + maxLines: maxLines ?? 1, + // minLines: 1, + keyboardType: keyboardType, + + decoration: InputDecoration( + constraints: const BoxConstraints(maxHeight: 50), + suffixText: suffixText, + alignLabelWithHint: true, + prefixIcon: prefix, + prefixIconConstraints: + const BoxConstraints(maxWidth: 30, maxHeight: 30), + suffixIcon: suffix, + // suffixIconConstraints: const BoxConstraints(maxHeight: 20), + isDense: true, + errorStyle: const TextStyle( + height: 0.1, + fontSize: 10, + ), + filled: true, + fillColor: Colors.white, + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.borderColor, + ), + borderRadius: BorderRadius.circular(5), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: AppColors.borderColor), + borderRadius: BorderRadius.circular(5), + ), + labelText: label, + labelStyle: TextStyle( + color: AppColors.textColor, + ), + border: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.borderColor, + ), + borderRadius: BorderRadius.circular(5), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.borderTextFiled, + ), + borderRadius: BorderRadius.circular(5), + )), + ), + ); + } +} diff --git a/lib/common/widgets/toast.dart b/lib/common/widgets/toast.dart new file mode 100644 index 0000000..46dbb35 --- /dev/null +++ b/lib/common/widgets/toast.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:taafee_mobile/common/const/const.dart'; + +class Toast { + static void showToast(String msg) { + Fluttertoast.showToast( + msg: msg, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + // backgroundColor: Colors.black, + textColor: AppColors.textMessageColor, + backgroundColor: Colors.white, + fontSize: 16.0); + } +} diff --git a/lib/core/apis/apis.dart b/lib/core/apis/apis.dart new file mode 100644 index 0000000..53d7679 --- /dev/null +++ b/lib/core/apis/apis.dart @@ -0,0 +1,26 @@ +class EndPoint { + static String terminate = 'user/terminate'; + static String feedback = '/feedback'; + static String guest = '/guest'; + static String deleteCardImage(int id) => '/card/image/$id'; + static String editCardImages = '/card/image'; + static String editAccount = 'user'; + static String register = "register"; + static String verificationCode = "auth/verify"; + static String login = "login"; + static String logout = 'logout'; + static String resendCode = 'auth/code-resend'; + static String forgotPassword = 'auth/forgot_password'; + static String verifyForgotPassword = 'auth/forgot_password/verify'; + static String changePassword = 'auth/reset_password'; + static String deleteAccount = 'user'; + static String city = 'city'; + static String category = 'category'; + static String card = 'card'; + static String addToFavorite = 'favorite'; + static String removeFromFavorite(int id) => 'favorite/$id'; + static String params = 'params'; + static String favorite = 'favorite'; + static String editCard(int id) => 'card/$id'; + static String search = 'card'; +} diff --git a/lib/core/errors/custom_exception.dart b/lib/core/errors/custom_exception.dart new file mode 100644 index 0000000..01e0577 --- /dev/null +++ b/lib/core/errors/custom_exception.dart @@ -0,0 +1,142 @@ +enum ExceptionType { + ConnectionError, + // related to http status code exceptions + NotAuthorized, + NotAuthenticated, + NotFound, + InternalServerException, + ServiceUnavailableException, + PageGone, + ResourceAlreadyExists, + UnAcceptableOperation, + + // related to bad request status code + // related to auth requests + EmailAlreadyExists, + UserNameAlreadyExists, + PasswordInvalid, + InvalidCredentials, + VerifyTokenInvalid, + ResetCodeInvalid, + InvalidResetToken, + + // SQL Lite Exceptions + + duplicatedIdEntry, + duplicatedColumnName, + tableNotFound, + duplicateColumn, + dataBaseClose, + columnShouldNotNull, + syntaxError, + + validationError, + + // socket exception + + // other + Other, +} + +class GenericException implements Exception { + ExceptionType type; + String errorMessage; + GenericException({required this.type, this.errorMessage = "Unknown Error"}); + + @override + String toString() { + return errorMessage; + } +} + +class ValidationError extends GenericException { + String fieldName; + ValidationError({required this.fieldName}) + : super( + type: ExceptionType.validationError, + errorMessage: "$fieldName is required", + ); +} + +Map badRequestException = { + "RESOURCE_ALREADY_EXISTS": GenericException( + type: ExceptionType.EmailAlreadyExists, + errorMessage: "email_already_exists", + ), + "USERNAME_ALREADY_EXISTS": GenericException( + type: ExceptionType.UserNameAlreadyExists, + errorMessage: "username_already_exists", + ), + "PASSWORD_INVALID": GenericException( + type: ExceptionType.PasswordInvalid, + errorMessage: "invalid_password", + ), + "INVALID_CREDENTIALS": GenericException( + type: ExceptionType.InvalidCredentials, + errorMessage: "invalid_credentials", + ), + "VERIFY_TOKEN_INVALID": GenericException( + type: ExceptionType.VerifyTokenInvalid, + errorMessage: "invalid_verify_token", + ), + "RESET_CODE_INVALID": GenericException( + type: ExceptionType.ResetCodeInvalid, + errorMessage: "invalid_reset_code", + ), + "INVALID_RESET_TOKEN": GenericException( + type: ExceptionType.InvalidResetToken, + errorMessage: "invalid_reset_token", + ), + "NOT_VERIFIED": GenericException( + //*********add*********** + type: ExceptionType.InvalidResetToken, + errorMessage: "User is not verified", + ), + "UN_ACCEPTABLE_OPERATION": GenericException( + type: ExceptionType.UnAcceptableOperation, + errorMessage: "un_acceptable_operation", + ), + "RESOURCE_NOT_FOUND": GenericException( + type: ExceptionType.NotFound, + errorMessage: "resource_not_found", + ), + "INTERNAL_SERVER_ERROR": GenericException( + type: ExceptionType.InternalServerException, + errorMessage: "internal_error", + ), + "NOT_AUTHENTICATED": GenericException( + type: ExceptionType.NotAuthenticated, + errorMessage: "not_authenticated", + ), + "NOT_AUTHORIZED": GenericException( + type: ExceptionType.NotAuthorized, + errorMessage: "you_are_not_authorized", + ), +}; + +Map statusCodesException = { + 403: GenericException( + type: ExceptionType.NotAuthorized, + errorMessage: "you_are_not_authorized", + ), + 401: GenericException( + type: ExceptionType.NotAuthorized, + errorMessage: "you_are_not_authorized", + ), + 404: GenericException( + type: ExceptionType.NotFound, + errorMessage: "page_not_found", + ), + 410: GenericException( + type: ExceptionType.PageGone, + errorMessage: "page_gone", + ), + 500: GenericException( + type: ExceptionType.InternalServerException, + errorMessage: "server_down", + ), + 503: GenericException( + type: ExceptionType.ServiceUnavailableException, + errorMessage: "service_unavailable", + ), +}; diff --git a/lib/core/init/dependency_injection.dart b/lib/core/init/dependency_injection.dart new file mode 100644 index 0000000..88f8439 --- /dev/null +++ b/lib/core/init/dependency_injection.dart @@ -0,0 +1,26 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/network/socket/socket.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import 'package:taafee_mobile/features/onboarding/business_logic_layer/onboarding_controller.dart'; +import 'package:taafee_mobile/features/splash/business_logic_layer/splash_controller.dart'; +import '../../features/account/business_logic_layer/account_controller.dart'; + +class DependencyInjection { + static void injectDependencies() { + Get.put(SocketIO(uri: 'https://pages-chat-dev.octa-apps.com')); + Get.put(ChatController()); + Get.put(AuthController()); + Get.put(HomeController()); + Get.put(SplashController()); + Get.put(OnboardingController()); + Get.put(CategoryController()); + Get.put(CardController()); + Get.put(FavoriteController()); + Get.put(AccountController()); + } +} diff --git a/lib/core/init/language_init.dart b/lib/core/init/language_init.dart new file mode 100644 index 0000000..b718c95 --- /dev/null +++ b/lib/core/init/language_init.dart @@ -0,0 +1,25 @@ +import 'package:get/get.dart'; + +import '../../features/home/business_logic_layer/home_controller.dart'; +import '../local_storage/local_storage.dart'; + +class LanguageInit { + static LocalStorage storage = LocalStorage(); + static String? language; + static String deviceLanguage = 'en'; + + static void langugeInite() { + deviceLanguage = Get.deviceLocale!.languageCode; + if (deviceLanguage.substring(0, 2) == 'zh') { + deviceLanguage = 'cn'; + } else if (deviceLanguage.substring(0, 2) == 'ar') { + deviceLanguage = 'ar'; + } else { + deviceLanguage = 'en'; + } + language = storage.getLanguage() ?? deviceLanguage; + HomeController homeController = Get.find(); + homeController + .setUiLanguage(LanguageInit.language ?? LanguageInit.deviceLanguage); + } +} diff --git a/lib/core/local_storage/cache_service.dart b/lib/core/local_storage/cache_service.dart new file mode 100644 index 0000000..e8e2722 --- /dev/null +++ b/lib/core/local_storage/cache_service.dart @@ -0,0 +1,27 @@ +import 'dart:convert'; +import 'dart:io'; +import 'package:path_provider/path_provider.dart'; +import 'package:hive/hive.dart'; + +class CacheService { + static late Box _cacheBox; + static Future inite() async { + Directory appDocDirectory = await getApplicationDocumentsDirectory(); + var path = '${appDocDirectory.path}/'; + Hive.init(path); + _cacheBox = await Hive.openBox('requests'); + } + + static Future>? getRequest( + {required String request}) async { + String encodedMap = await _cacheBox.get(request); + return jsonDecode(encodedMap); + } + + static Future cacheRequest( + {required String request, + required Map lastResponse}) async { + String encodedMap = jsonEncode(lastResponse); + await _cacheBox.put(request, encodedMap); + } +} diff --git a/lib/core/local_storage/local_storage.dart b/lib/core/local_storage/local_storage.dart new file mode 100644 index 0000000..5daa877 --- /dev/null +++ b/lib/core/local_storage/local_storage.dart @@ -0,0 +1,79 @@ +import 'dart:developer'; + +import 'package:get_storage/get_storage.dart'; + +import '../../features/auth/data_layer/model/user.dart'; + +class LocalStorage { + final GetStorage storage = GetStorage(); + + Future saveUser(User user) async { + await storage.write("user", user.toJson()); + } + + Future saveLanguage(String langCode) async { + await storage.write("language", langCode); + } + + String? getLanguage() { + return storage.read("language"); + } + + User? getUser() { + return User.fromJson(storage.read("user")); + } + + Future saveIsGuest(bool isGuest) async { + await storage.write('isGuest', isGuest); + } + + bool? getIsGuest() { + return storage.read('isGuest'); + } + + Future savefirstTimeOpened() async { + await storage.write('firstTime', false); + } + + bool getfirstTimeOpened() { + return storage.read('firstTime') ?? true; + } + + Future saveToken(String token) async { + await storage.write("token", token); + } + + String? getToken() { + return storage.read("token"); + } + + Future saveFCMToken(String fcmToken) async { + await storage.write('fcm_token', fcmToken); + } + + String? getFCMToken() { + String? fcmToken = storage.read('fcm_token'); + log('my fcm token : $fcmToken'); + return fcmToken; + } + + Future saveChatToken(String chatToken) async { + await storage.write("chat_token", chatToken); + } + + String? getChatToken() { + return storage.read("chat_token"); + } + + Future saveChatUserId(int chatUserId) async { + await storage.write("chat_user_id", chatUserId); + } + + int? getChatUserId() { + return storage.read("chat_user_id"); + } + + Future clearCache() async { + await storage.erase(); + } +} diff --git a/lib/core/localization/localization.dart b/lib/core/localization/localization.dart new file mode 100644 index 0000000..0d28666 --- /dev/null +++ b/lib/core/localization/localization.dart @@ -0,0 +1,525 @@ +import 'package:get/get.dart'; + +class PagesTranslations implements Translations { + @override + Map> get keys => { + 'en': { + 'There are no notifications to display at this time.': + 'There are no notifications to display at this time.', + 'no_previous_conversations_!': 'No Previous Conversations !', + 'add_some_by_contact_with_others': 'Add Some By Contact With Others', + 'this_session_is_terminated': 'This session is terminated', + 'cancel': 'Cancel', + "log_out_from_other_devices": "Log out from other devices", + 'version_update': 'Version Update', + 'new_version_is_available_!': 'New Version is Available !', + 'quit': 'Quit', + 'later': 'Later', + 'update': 'Update', + 'could_not_open_app_store': 'Could not open App Store', + 'could_not_open_play_store': 'Could not open Google Play', + 'you_have_blocked_this_user': 'You have blocked this user', + 'this_user_has_blocked_you': 'This user has blocked you', + 'unblock': 'Unblock', + "today": "Today", + "yesterday": "Yesterday", + "last_week": "Last Week", + "2_weeks_ago": "2 Weeks Ago", + "long_time_ago": "Long time ago", + "Monday": "Monday", + "Tuesday": "Tuesday", + "Wednesday": "Wednesday", + "Thursday": "Thursday", + "Friday": "Friday", + "Saturday": "Saturday", + "Sunday": "Sunday", + "message_can't_be_empty": "message can't be empty", + 'photo': 'Photo', + 'voice': 'Voice', + "go_to_support": "Go to support", + 'add_some_favorite_cards !': 'Add some favorite cards !', + 'please_enter_your_message': 'please enter your message', + 'you_have_to_sign_in': 'You have to sign in', + 'yes': 'Yes', + 'no': 'No', + 'are_you_sure_you_want_to_exit?': 'Are You sure you want to exit?', + 'press_(new_card)_to_add_new_card!': + 'Press (new card) to add new card!', + 'could_not_send_email': 'Could not send e-mail', + 'could_not_make_call': 'Could not make call', + 'card_images': 'Card Images', + 'save_to_gallery': 'Save to gallery', + 'delete_card': 'Delete Card', + 'try_again': "Tap to try again", + 'contact_us_content': + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt', + 'about_us_content': + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt', + 'privacy_content': + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt", + 'terms_content': + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt", + 'profile_edited_succesfully': 'Profile edited succesfully', + 'search_category_name': 'Search Category Name', + "choose_category_please": "Choose Category Please", + 'search': 'Search', + 'search_results': 'Search Results', + 'no_internert_connection': 'No Internet Connection', + 'no_results_found': 'No Results Found', + 'city': 'City', + 'category': 'Category', + 'categories': 'Categories', + 'see_all': 'See All', + 'sports': 'Sports', + 'pharmacy': 'Pharmacy', + 'test': 'testoo', + 'latest_add': 'Latest add', + 'favorite': 'Favorite', + 'chats': 'Chats', + 'search_chats': 'Search Chats', + 'block_user': 'Block User', + 'page_details': 'Page Details', + 'service': 'Service', + 'more_details': 'More Details', + 'images': 'images', + 'email': 'E-mail', + 'start_conversation': 'Start Conversation', + 'notifications': 'Notifications', + 'all_categories': 'All Categories', + 'choose_city_please': 'Choose City Please', + 'search_city_or_country_name': 'Search City Or Country Name', + 'choose_categor_please': 'Choose Category Please', + 'log_out': 'Log Out', + 'sign_in': 'Sign In', + 'sign_up': 'Sign Up', + 'skip': 'Skip', + 'next': 'Next', + 'change_password': 'Change Password', + 'password': 'Password', + 'new_password': 'New Password', + 'confirm_new_password': 'Confirm New Password', + 'first_name': 'First Name', + 'last_name': 'Last Name', + 'create_account': 'Create Account', + 'you_have_account?': 'You Have account?', + 'forgot_password?': 'Forgot Password?', + 'reset_password': 'Reset Password', + 'you_don\'t_have_account?': 'You don\'t have account?', + 'resend_code': 'Resend Code', + 'verification_code': 'Verification Code', + 'edit_profile': 'Edit Profile', + 'save_changes': 'Save Changes', + 'my_cards': 'My Cards', + 'about_us': 'About Us', + 'contact_us': 'Contact Us', + 'privacy_and_terms': 'Privacy and terms', + 'app_language': 'App language', + 'delete_account': 'Delete account', + 'new_card': 'New Card', + 'add_new_card': 'Add New Card', + 'phone_number': 'Phone Number', + 'location': 'Location', + 'add_translated_language': 'Add Translated Language', + 'edit_card': 'Edit Card', + 'old_password': 'Old Password', + 'change_oil,clean,check_engine': 'Change Oil, Clean, Check Engine', + 'When_your_car\'s_internal_computer_identifies_a_problem_with_the_engine_or_transmission': + 'When your car\'s internal computer identifies a problem with the engine or transmission', + 'translated_language': 'Translated Language', + 'language_name': 'Language Name', + 'translated_more_details': 'Translated More Details', + 'translated_service': 'Translated Service', + 'your_card_added_successfully': 'Your Card Added Successfully', + 'delete_your_account': 'Delete Your Account', + 'enter_your_password': 'Enter Your Password', + 'delete': 'Delete', + 'call_owner': 'Call Owner', + 'send_message': 'Send Message', + 'privacy': 'Privacy', + 'terms': 'Terms', + "forgot_password": 'Forgot Password', + "please_enter_the_email": "Please Enter The Email", + 'no_cards_in_this_category': 'No Cards in This Category', + "the_selected_email_is_invalid": "The Selected Email is Invalid", + 'you_have_no_internet_connection': 'You Have no Internet Connection', + "please_enter_the_password": "Please enter the password", + "the_password_is_short": "The password is short", + "invalid_credentials": 'Invalid Credentials', + "you_are_not_verified_yet": "You are not verified yet", + "please_enter_the_first_name": 'Please Enter The First Name', + "please_enter_the_last_name": "please Enter The Last Name", + "password_is_short": 'Password is short', + 'confirm_password': 'Confirm Password', + "password_did't_identical": "Password did't identical", + 'email_is_already_exist': 'Email is already exist', + "password_changed_successfully": "Password Changed Successfully", + "the_verify_code_is_invalid": "The Verify Code is Invalid", + "please_enter_the_code": "Please enter the code", + "name": 'Name', + "please_enter_the_name": "Please Enter The Name", + "please_enter_the_phone_number": "Please Enter The Phone Number", + "optional": "optional", + "address": "Address", + "postal_code": "Postal Code", + "website": "Website", + "the_card_has_been_edited_successfully": + "The Card Has been edited Successfully", + "please_enter_the_website": "Please Enter The Website", + "please_enter_the_service": "please Enter The Service", + "please_enter_the_details": "Please Enter The Details", + "the_card_has_been_added_successfully": + "The Card Has been added Successfully", + "add_card": "Add Card", + "your_message": "Your Message", + 'search_chat': 'Search Chat', + 'photo_has_been_saved_successfully': + 'Photo has been saved successfully', + 'failed_to_save': 'Failed to Save', + 'unknown_error': 'UnKnown error', + 'the_card_has_been_deleted_successfully': + 'The Card has been deleted successfully', + 'enter_your_email_to_reset_your_password_please_\n_we_will_send_verification_code_to_your_email.': + 'Enter your email to reset your password please \n We will send verification code to your Email.', + }, + 'ar': { + 'There are no notifications to display at this time.': + 'لا توجد إشعارات لعرضها في الوقت الحالي.', + 'no_previous_conversations_!': 'لا توجد محادثات سابقة!', + 'add_some_by_contact_with_others': + 'أضف بعضها عن طريق التواصل مع الآخرين', + "this_session_is_terminated": "تم إنهاء هذه الجلسة", + "cancel": "إلغاء", + "log_out_from_other_devices": "تسجيل الخروج من الأجهزة الأخرى", + 'version_update': 'تحديث الإصدار', + 'new_version_is_available_!': 'الإصدار الجديد متاح!', + 'quit': 'إنهاء', + 'later': 'لاحقًا', + 'update': 'تحديث', + 'could_not_open_app_store': 'تعذر فتح متجر التطبيقات', + 'could_not_open_play_store': 'تعذر فتح جوجل بلاي', + "you_have_blocked_this_user": "لقد قمت بحظر هذا المستخدم", + "this_user_has_blocked_you": "هذا المستخدم قام بحظرك", + "unblock": "إلغاء الحظر", + "today": "اليوم", + "yesterday": "أمس", + "last_week": "الأسبوع الماضي", + "2_weeks_ago": "منذ 2 أسابيع", + "long_time_ago": "منذ وقت طويل", + "Monday": "الاثنين", + "Tuesday": "الثلاثاء", + "Wednesday": "الأربعاء", + "Thursday": "الخميس", + "Friday": "الجمعة", + "Saturday": "السبت", + "Sunday": "الأحد", + "message_can't_be_empty": "لا يمكن أن تكون الرسالة فارغة", + 'photo': 'صورة', + 'voice': 'صوت', + "go_to_support": 'الدعم', + 'add_some_favorite_cards !': 'أضف بعض البطاقات المفضلة !', + 'unknown_error': 'حدث خطأ ما', + 'please_enter_your_message': 'يرجى إدخال رسالتك', + 'you_have_to_sign_in': 'يجب عليك تسجيل الدخول', + 'yes': 'نعم', + 'no': 'لا', + 'are_you_sure_you_want_to_exit?': 'هل تريد الخروج من التطبيق؟', + 'press_(new_card)_to_add_new_card!': + 'اضغط (بطاقة جديدة) لإضافة بطاقة جديدة!', + 'card_images': 'صور البطاقة', + 'photo_has_been_saved_successfully': 'تم حفظ الصورة بنجاح', + 'save_to_gallery': 'حفظ في المعرض', + 'delete_card': 'حذف البطاقة', + 'the_card_has_been_deleted_successfully': 'تم حذف البطاقة بنجاح', + "the_card_has_been_edited_successfully": "تم تعديل البطاقة بنجاح", + 'try_again': "اضغط لإعادة المحاولة", + 'contact_us_content': + 'تواصل معنا, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt', + 'about_us_content': + 'من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن من نحن', + 'terms_content': + "الشروط الشروط الشروط الشروط الشروط الشروط الشروط والخصوصية والخصوصية والخصوصية", + 'privacy_content': + "الشروط الشروط الشروط الشروط الشروط الشروط الشروط والخصوصية والخصوصية والخصوصية", + 'profile_edited_succesfully': 'تم تعديل الملف الشخصي بنجاح', + "enter_your_email_to_reset_your_password_please_\n_we_will_send_verification_code_to_your_email.": + "يرجى إدخال بريدك الإلكتروني لإعادة تعيين كلمة المرور \n سنرسل رمز التحقق إلى بريدك الإلكتروني.", + "forgot_password": 'نسيت كلمة المرور', + 'password_is_short': 'كلمة المرور قصيرة', + 'search_category_name': 'البحث عن اسم الفئة', + "choose_category_please": "يرجى اختيار الفئة", + 'search': 'البحث', + 'search_results': 'نتائج البحث', + 'no_internert_connection': 'لا يوجد اتصال بالإنترنت', + 'no_results_found': 'لم يتم العثور على نتائج', + 'city': 'المدينة', + 'category': 'الفئة', + 'categories': 'الفئات', + 'see_all': 'عرض الكل', + 'sports': 'الرياضة', + 'pharmacy': 'الصيدلية', + 'test': 'اختبار', + 'latest_add': 'أحدث إضافة', + 'favorite': 'المفضلة', + 'chats': 'الدردشات', + 'search_chats': 'البحث في الدردشات', + 'block_user': 'حظر المستخدم', + 'page_details': 'تفاصيل الصفحة', + 'service': 'الخدمة', + 'more_details': 'المزيد من التفاصيل', + 'images': 'الصور', + 'email': 'البريد الإلكتروني', + 'start_conversation': 'بدء المحادثة', + 'notifications': 'الإشعارات', + 'all_categories': 'كل الفئات', + 'choose_city_please': 'يرجى اختيار المدينة', + 'search_city_or_country_name': 'البحث عن اسم المدينة أو الدولة', + 'choose_categor_please': 'يرجى اختيار الفئة', + 'log_out': 'تسجيل الخروج', + 'sign_in': 'تسجيل الدخول', + 'sign_up': 'تسجيل الحساب', + 'skip': 'تخطي', + 'next': 'التالي', + 'change_password': 'تغيير كلمة المرور', + 'password': 'كلمة المرور', + 'new_password': 'كلمة المرور الجديدة', + 'confirm_new_password': 'تأكيد كلمة المرور الجديدة', + 'first_name': 'الاسم الأول', + 'last_name': 'الاسم الأخير', + 'create_account': 'إنشاء حساب', + 'you_have_account?': 'هل لديك حساب؟', + 'forgot_password?': 'نسيت كلمة المرور؟', + 'reset_password': 'إعادة تعيين كلمة المرور', + "you_don't_have_account?": 'ليس لديك حساب؟', + 'resend_code': 'إعادة إرسال الكود', + 'verification_code': 'كود التحقق', + 'edit_profile': 'تعديل الملف الشخصي', + 'save_changes': 'حفظ التغييرات', + 'my_cards': 'بطاقاتي', + 'about_us': 'من نحن', + 'contact_us': 'اتصل بنا', + 'privacy_and_terms': 'الخصوصية والشروط', + 'app_language': 'لغة التطبيق', + 'delete_account': 'حذف الحساب', + 'new_card': 'بطاقة جديدة', + 'add_new_card': 'إضافة بطاقة جديدة', + 'phone_number': 'رقم الهاتف', + 'location': 'الموقع', + 'add_translated_language': 'إضافة لغة مترجمة', + 'edit_card': 'تعديل البطاقة', + 'change_oil,clean,check_engine': 'تغيير الزيت ، تنظيف ، فحص المحرك', + "When_your_car's_internal_computer_identifies_a_problem_with_the_engine_or_transmission": + 'عندما يتعرف الكمبيوتر الداخلي لسيارتك على مشكلة في المحرك أو ناقل الحركة', + 'translated_language': 'اللغة المترجمة', + 'language_name': 'اسم اللغة', + 'translated_more_details': 'المزيد من التفاصيل المترجمة', + 'translated_service': 'الخدمة المترجمة', + 'your_card_added_successfully': 'تمت إضافة بطاقتك بنجاح', + 'delete_your_account': 'حذف حسابك', + 'enter_your_password': 'أدخل كلمة المرور الخاصة بك', + 'delete': 'حذف', + 'call_owner': 'اتصال بالمالك', + 'send_message': 'إرسال رسالة', + 'privacy': 'الخصوصية', + 'terms': 'الشروط', + "please_enter_the_email": "الرجاء إدخال البريد الإلكتروني", + 'no_cards_in_this_category': 'لا توجد بطاقات في هذه الفئة', + "the_selected_email_is_invalid": "البريد الإلكتروني المحدد غير صالح", + 'you_have_no_internet_connection': 'لا يوجد لديك اتصال بالإنترنت', + "please_enter_the_password": "الرجاء إدخال كلمة المرور", + "the_password_is_short": "كلمة المرور قصيرة", + "invalid_credentials": 'بيانات الاعتماد غير صالحة', + "you_are_not_verified_yet": "لم يتم التحقق من حسابك بعد", + "please_enter_the_first_name": 'الرجاء إدخال الاسم الأول', + "please_enter_the_last_name": "الرجاء إدخال الاسم الأخير", + 'confirm_password': 'تأكيد كلمة المرور', + "password_did't_identical": "كلمة المرور غير متطابقة", + 'email_is_already_exist': 'البريد الإلكتروني موجود بالفعل', + "password_changed_successfully": "تم تغيير كلمة المرور بنجاح", + "the_verify_code_is_invalid": "رمز التحقق غير صالح", + "please_enter_the_code": "الرجاء إدخال الرمز", + "name": 'الاسم', + "please_enter_the_name": "الرجاء إدخال الاسم", + "please_enter_the_phone_number": "الرجاء إدخال رقم الهاتف", + "optional": "اختياري", + "address": "العنوان", + "postal_code": "الرمز البريدي", + "website": "الموقع الإلكتروني", + "please_enter_the_website": "يرجى إدخال الموقع الإلكتروني", + "please_enter_the_service": "الرجاء إدخال الخدمة", + "please_enter_the_details": "الرجاء إدخال التفاصيل", + "the_card_has_been_added_successfully": "تمت إضافة البطاقة بنجاح", + "add_card": "إضافة بطاقة", + 'old_password': 'كلمة المرور القديمة', + "your_message": "رسالتك", + 'search_chat': 'البحث في الدردشات', + 'failed_to_save': 'فشل الحفظ', + }, + "cn": { + 'There are no notifications to display at this time.': '目前没有要显示的通知。', + 'no_previous_conversations_!': '没有以前的对话!', + 'add_some_by_contact_with_others': '通过与他人联系添加一些', + "this_session_is_terminated": "此会话已终止", + "cancel": "取消", + "log_out_from_other_devices": "从其他设备退出登录", + 'version_update': '版本更新', + 'new_version_is_available_!': '新版本可用!', + 'quit': '退出', + 'later': '稍后', + 'update': '更新', + 'could_not_open_app_store': '无法打开应用商店', + 'could_not_open_play_store': '无法打开谷歌Play商店', + "you_have_blocked_this_user": "您已屏蔽此用户", + "this_user_has_blocked_you": "此用户已屏蔽您", + "unblock": "解除屏蔽", + "today": "今天", + "yesterday": "昨天", + "last_week": "上周", + "2_weeks_ago": "2周前", + "long_time_ago": "很久以前", + "Monday": "星期一", + "Tuesday": "星期二", + "Wednesday": "星期三", + "Thursday": "星期四", + "Friday": "星期五", + "Saturday": "星期六", + "Sunday": "星期日", + "message_can't_be_empty": "消息不能为空", + 'photo': '照片', + 'voice': '语音', + "go_to_support": "前往支持", + 'add_some_favorite_cards !': '添加一些收藏卡片!', + 'unknown_error': '未知错误', + 'please_enter_your_message': '请输入您的消息', + 'you_have_to_sign_in': '您必须登录', + 'yes': '是', + 'no': '否', + 'are_you_sure_you_want_to_exit?': '确定要退出吗?', + 'press_(new_card)_to_add_new_card!': '点击(新卡片)添加新卡片!', + 'photo_has_been_saved_successfully': '照片已成功保存', + 'save_to_gallery': '保存到图库', + 'delete_card': '删除卡片', + 'the_card_has_been_deleted_successfully': '卡片已成功删除', + "the_card_has_been_edited_successfully": "卡片已成功编辑", + "try_again": "点击重试", + 'contact_us_content': + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididuntLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt', + 'about_us_content': '', + 'privacy_content': '', + 'terms_content': '', + 'profile_edited_succesfully': '个人资料编辑成功', + "enter_your_email_to_reset_your_password_please_\n_we_will_send_verification_code_to_your_email.": + "请输入您的电子邮件以重置密码\n我们将向您的电子邮件发送验证码。", + "forgot_password": '忘记密码', + 'search_category_name': '搜索类别名称', + "choose_category_please": "请选择类别", + 'search': '搜索', + 'failed_to_save': '保存失败', + 'search_results': '搜索结果', + 'no_internert_connection': '没有网络连接', + 'no_results_found': '没有找到结果', + 'city': '城市', + 'category': '分类', + 'card_images': '卡片图片', + 'categories': '分类', + 'see_all': '查看全部', + 'sports': '运动', + 'pharmacy': '药房', + 'test': '测试', + 'latest_add': '最新添加', + 'favorite': '收藏', + 'chats': '聊天', + 'search_chats': '搜索聊天', + 'block_user': '封锁用户', + 'page_details': '页面详情', + 'service': '服务', + 'more_details': '更多细节', + 'images': '图像', + 'email': '电子邮件', + 'start_conversation': '开始交谈', + 'notifications': '通知', + 'all_categories': '所有分类', + 'choose_city_please': '请选择城市', + 'search_city_or_country_name': '搜索城市或国家名称', + 'choose_categor_please': '请选择类别', + 'log_out': '退出登录', + 'sign_in': '登录', + 'sign_up': '注册', + 'skip': '跳过', + 'next': '下一个', + 'change_password': '更改密码', + 'password': '密码', + 'new_password': '新密码', + 'confirm_new_password': '确认新密码', + 'first_name': '名字', + 'last_name': '姓氏', + 'create_account': '创建账户', + 'you_have_account?': '已经注册了吗?', + 'forgot_password?': '忘记密码?', + 'reset_password': '重设密码', + 'you_don\'t_have_account?': '没有账户?', + 'resend_code': '重新发送验证码', + 'verification_code': '验证码', + 'edit_profile': '编辑个人资料', + 'save_changes': '保存更改', + 'my_cards': '我的卡片', + 'about_us': '关于我们', + 'contact_us': '联系我们', + 'privacy_and_terms': '隐私和条款', + 'app_language': '应用语言', + 'delete_account': '删除账户', + 'new_card': '新卡片', + 'add_new_card': '添加新卡片', + 'phone_number': '电话号码', + 'location': '位置', + 'add_translated_language': '添加翻译语言', + 'edit_card': '编辑卡片', + 'old_password': '旧密码', + 'change_oil,clean,check_engine': '更换机油,清洁,检查发动机', + 'When_your_car\'s_internal_computer_identifies_a_problem_with_the_engine_or_transmission': + '当您的汽车内部计算机识别发动机或传动系统的问题时', + 'translated_language': '翻译语言', + 'language_name': '语言名称', + 'translated_more_details': '翻译更多细节', + 'translated_service': '翻译服务', + 'your_card_added_successfully': '您的卡片已成功添加', + 'delete_your_account': '删除您的账户', + 'enter_your_password': '输入您的密码', + 'delete': '删除', + 'call_owner': '拨打业主电话', + 'send_message': '发送消息', + 'privacy': '隐私', + 'terms': '条款', + "please_enter_the_email": "请输入电子邮件", + 'no_cards_in_this_category': '此类别没有卡片', + "the_selected_email_is_invalid": "所选电子邮件无效", + 'you_have_no_internet_connection': '您当前没有网络连接', + "please_enter_the_password": "请输入密码", + "the_password_is_short": "密码太短", + "invalid_credentials": '凭据无效', + "you_are_not_verified_yet": "您尚未进行验证", + "please_enter_the_first_name": '请输入名字', + "please_enter_the_last_name": "请输入姓氏", + "password_is_short": '密码太短', + 'confirm_password': '确认密码', + "password_did't_identical": "密码不一致", + 'email_is_already_exist': '电子邮件已存在', + "password_changed_successfully": "密码已成功更改", + "the_verify_code_is_invalid": "验证码无效", + "please_enter_the_code": "请输入验证码", + "name": '姓名', + "please_enter_the_name": "请输入姓名", + "please_enter_the_phone_number": "请输入电话号码", + "optional": "可选", + "address": "地址", + "postal_code": "邮政编码", + "website": "网站", + "please_enter_the_website": "请输入网站", + "please_enter_the_service": "请输入服务", + "please_enter_the_details": "请输入详情", + "the_card_has_been_added_successfully": "卡片已成功添加", + "add_card": "添加卡片", + "your_message": "您的消息", + 'search_chat': '搜索聊天', + } + }; +} diff --git a/lib/core/network/dio.dart b/lib/core/network/dio.dart new file mode 100644 index 0000000..c95c240 --- /dev/null +++ b/lib/core/network/dio.dart @@ -0,0 +1,27 @@ +import 'package:dio/dio.dart'; + +class DioInstance { + Dio? _dio; + + Dio get dio => _dio ?? _instantiate(); + + Dio _instantiate() { + _dio = Dio( + BaseOptions( + baseUrl: "https://pages-back-dev.octa-apps.com/api/", + receiveDataWhenStatusError: true, + ), + ); + + _dio!.interceptors.add( + LogInterceptor( + responseHeader: false, + requestHeader: false, + requestBody: true, + responseBody: true, + ), + ); + + return _dio!; + } +} diff --git a/lib/core/network/http.dart b/lib/core/network/http.dart new file mode 100644 index 0000000..7f6a87d --- /dev/null +++ b/lib/core/network/http.dart @@ -0,0 +1,160 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:dio/dio.dart'; + +import 'package:taafee_mobile/core/local_storage/cache_service.dart'; + +import '../local_storage/local_storage.dart'; +import '../network/dio.dart'; + +import "../errors/custom_exception.dart"; + +enum RequestMethod { get, post, delete, put, patch } + +extension RequestTypeString on RequestMethod { + String? get methodString { + switch (this) { + case RequestMethod.get: + return 'GET'; + case RequestMethod.post: + return 'POST'; + case RequestMethod.delete: + return 'DELETE'; + case RequestMethod.put: + return 'PUT'; + case RequestMethod.patch: + return 'PATCH'; + } + } +} + +class Request { + final String endPoint; + final bool authorized; + final bool isFormData; + final bool removeMockMatch; + final bool cacheable; + final RequestMethod method; + Map? headers; + final Map? body; + final Map? queryParams; + + Request( + this.endPoint, + this.method, { + this.authorized = false, + this.removeMockMatch = false, + this.isFormData = + false, // TODO: formData should be handled in different way. + this.headers, + this.cacheable = false, + this.body, + this.queryParams, + }) { + if (authorized) { + // AuthController authController = stateGet.Get.find(); + LocalStorage local = LocalStorage(); + + log('my toooken : ${local.getToken()}'); + if (headers == null) { + headers = { + "Authorization": "Bearer " '${local.getToken()}', + }; + } else { + headers!['Authorization'] = "Bearer " '${local.getToken()}'; + } + } + + if (isFormData) { + log('im form data'); + FormData f = FormData.fromMap(body!); + for (var pair in f.fields) { + log('${pair.key}/${pair.value}'); + } + } + } + + Future> sendRequest( + {void Function(Object)? onConnectionError}) async { + Response? response; + try { + response = await DioInstance().dio.request( + endPoint, + queryParameters: queryParams, + data: isFormData ? FormData.fromMap(body!) : body, + options: Options( + method: method.methodString, //Utils.requestTypeToString(method), + headers: headers, + //contentType: 'application/json', + ), + ); + + if (response.statusCode! >= 200 && response.statusCode! < 300) { + //TODO: this should be handled in different way. + if (response.data is String) return json.decode(response.data); + if (method == RequestMethod.get && cacheable) { + await CacheService.cacheRequest( + request: toString(), lastResponse: response.data); + } + + return response.data; + } + } on DioError catch (error) { + // handling http status code exceptions + if (error.type == DioErrorType.badResponse) { + // handling bad requests. + if (error.response!.statusCode == 400) { + // this line is really depends on what server responds, and how it reply with errors. + throw badRequestException[error.response!.data["error"]] ?? + GenericException( + type: ExceptionType.Other, + ); + } + + // handling other status codes. + throw statusCodesException[error.response!.statusCode] ?? + GenericException( + type: ExceptionType.Other, + ); + } + + // handling connection problems. + if (error.type == DioErrorType.connectionTimeout || + error.type == DioErrorType.sendTimeout || + error.type == DioErrorType.receiveTimeout || + error.type == DioErrorType.unknown) { + if (method == RequestMethod.get && cacheable) { + onConnectionError?.call(error); + Map? lastResponse = + await CacheService.getRequest(request: toString()); + if (lastResponse != null) { + return lastResponse; + } + } + throw GenericException( + type: ExceptionType.ConnectionError, + errorMessage: "You Have no Internet Connection", + ); + } + } + return {}; + } + + Map toJson() { + return { + 'endPoint': endPoint, + 'authorized': authorized, + 'isFormData': isFormData, + 'removeMockMatch': removeMockMatch, + 'headers': headers, + 'body': body, + 'queryParams': queryParams, + }; + } + + @override + String toString() { + return jsonEncode(toJson()); + } +} diff --git a/lib/core/network/socket/event.dart b/lib/core/network/socket/event.dart new file mode 100644 index 0000000..52dfb48 --- /dev/null +++ b/lib/core/network/socket/event.dart @@ -0,0 +1,6 @@ +class Event { + String name; + Map body; + + Event(this.name, [this.body = const {}]); +} diff --git a/lib/core/network/socket/events.dart b/lib/core/network/socket/events.dart new file mode 100644 index 0000000..6b293cb --- /dev/null +++ b/lib/core/network/socket/events.dart @@ -0,0 +1,17 @@ +class Events { + static String sessionTerminated = "session:terminated"; + static String roomUpdated = "room:updated"; + static String roomUnblocked = "room:unblocked"; + static String roomUnblock = "room:unblock"; + static String roomBlock = "room:block"; + static String roomBlocked = "room:blocked"; + static String roomBlocking = "room:blocking"; + static String roomGet = "room:get"; + static String roomCreate = "room:create"; + static String supportRoomStatus = "room:status-support"; + static String supportRoomCreate = "room:create-support"; + static String messageIncome = 'message:income'; + static String messageCreate = "message:create"; + static String messageGet = "message:get"; + static String messageRead = "message:read"; +} diff --git a/lib/core/network/socket/extension.dart b/lib/core/network/socket/extension.dart new file mode 100644 index 0000000..1dfcb60 --- /dev/null +++ b/lib/core/network/socket/extension.dart @@ -0,0 +1,73 @@ +import 'dart:async'; + +import 'package:socket_io_client/socket_io_client.dart'; + +import '../../errors/custom_exception.dart'; + +extension Converter on Socket { + Future emitAsync(String event, dynamic body) async { + Future convert( + String eventName, + dynamic body, + void Function( + String eventName, + dynamic body, { + void Function(dynamic)? ack, + }) + func, + ) { + Completer completer = Completer(); + + func(eventName, body, ack: (result) { + if (completer.isCompleted) return; + completer.complete(result); + }); + + Future.delayed(const Duration(seconds: 2)).then((value) { + if (completer.isCompleted) return; + completer.completeError( + GenericException(type: ExceptionType.ConnectionError)); + }); + + return completer.future; + } + + return await convert(event, body, emitWithAck); + } + + Future connectAsync() async { + Completer completer = Completer(); + + connect(); + + onConnect((data) { + if (completer.isCompleted) return; + completer.complete(data); + }); + + onConnectError((data) { + if (completer.isCompleted) return; + completer + .completeError(GenericException(type: ExceptionType.ConnectionError)); + }); + + onConnectTimeout((data) { + if (completer.isCompleted) return; + completer + .completeError(GenericException(type: ExceptionType.ConnectionError)); + }); + + return completer.future; + } + + Future disconnectAsync() async { + Completer completer = Completer(); + + disconnect(); + + onDisconnect( + (data) => completer.isCompleted ? null : completer.complete(data)); + + return completer.future; + } +} diff --git a/lib/core/network/socket/socket.dart b/lib/core/network/socket/socket.dart new file mode 100644 index 0000000..9cabb13 --- /dev/null +++ b/lib/core/network/socket/socket.dart @@ -0,0 +1,161 @@ +import 'dart:async'; +import 'dart:developer'; +import 'package:taafee_mobile/core/errors/custom_exception.dart'; + +import 'package:socket_io_client/socket_io_client.dart'; + +import './event.dart'; +import './extension.dart'; + +class SocketIO { + // @attributes + final String uri; + Function()? onConnect; + Function()? onDisconnect; + Function()? onConnecting; + Function()? onError; + Map extraHeaders = {}; + + // @constructors + SocketIO({ + required this.uri, + this.onConnect, + this.onConnecting, + this.onError, + this.onDisconnect, + }); + + // @privates + Socket? _socket; // suggest late instead of nullable + + bool _initialized = false; + + Status _status = Status.notConnected; + + final Map _socketOptions = { + 'transports': ['websocket'], + 'autoConnect': true, + }; + + // @getters + bool get initialized => _initialized; + + Status get status => _status; + + // @methods + Future boot() async { + init(); + await connect(); + } + + Future restart() async { + _assertInitialized(); + await disconnect(); + await boot(); + } + + void init() { + _socketOptions["extraHeaders"] = extraHeaders; + _socket = io(uri, _socketOptions); + _initialized = true; + } + + Future connect() async { + _assertInitialized(); + + _status = Status.connecting; + onConnecting?.call(); + + await _socket!.connectAsync().timeout(const Duration(seconds: 10), + onTimeout: () { + onError?.call(); + throw GenericException( + type: ExceptionType.ConnectionError, + errorMessage: "You Have no Internet Connection", + ); + }); + + onConnect?.call(); + _status = Status.connected; + } + + void setOnDisconnect(Function() trigger) { + onDisconnect = trigger; + _socket?.onDisconnect((_) => trigger()); + } + + void setOnConnect(Function() trigger) { + onConnect = trigger; + _socket?.onConnect((data) => trigger()); + } + + void setOnConnectionError(Function() trigger) { + onError = trigger; + _socket?.onerror((_) => trigger()); + } + + void setOnConnecting(Function() trigger) { + onConnecting = trigger; + _socket?.onerror((_) => trigger()); + } + + Future disconnect() async { + _assertInitialized(); + + await _socket!.disconnectAsync(); + // suggest onDisconnect?.call(); + _status = Status.notConnected; + } + + Future emit(Event event, {bool reciveDataOnError = false}) async { + _assertInitialized(); + + dynamic ack = {}; + + try { + ack = await _socket!.emitAsync(event.name, event.body); + if (ack["status"] == "failed") { + if (reciveDataOnError) { + return ack; + } + throw badRequestException[ + ack["error"]["name"] ?? "INTERNAL_SERVER_ERROR"] ?? + GenericException( + type: ExceptionType.InternalServerException, + ); + } + } catch (e) { + if (e is GenericException) { + rethrow; + } + throw GenericException( + type: ExceptionType.InternalServerException, + ); + } + return ack["data"]; + } + + void listen(String eventName, Function(dynamic) handler) { + // there is no need to check if initialized here, it is just registering a handler. + _socket!.on(eventName, (data) { + log('event:$eventName'); + handler(data); + }); + } + + void setAuthentication(String token) { + extraHeaders["authorization"] = token; + } + + void _assertInitialized() { + if (!initialized) { + throw Exception("Object is not initialized, do call .init() method"); + } + } + + void clearListeners() { + _socket?.clearListeners(); + } +} + +enum Status { connected, connecting, notConnected } diff --git a/lib/core/routing/routing_manager.dart b/lib/core/routing/routing_manager.dart new file mode 100644 index 0000000..2650ad5 --- /dev/null +++ b/lib/core/routing/routing_manager.dart @@ -0,0 +1,174 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/about_us.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/add_card.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/contact_us.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/my_cards.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/privacy.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/screens/forgot_password.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/screens/reset_password.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/screens/verification_code_reset_password.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/screens/card_details.dart'; +import 'package:taafee_mobile/features/category/presentation_layer/screens/category_details.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/screens/chat_details.dart'; +import 'package:taafee_mobile/features/home/presentation_layer/screens/super_home.dart'; +import 'package:taafee_mobile/features/splash/presentation_layer.dart/screens.dart/splash.dart'; + +import '../../features/account/presentation_layer/screens/change_password.dart'; +import '../../features/account/presentation_layer/screens/edit_profile.dart'; +import '../../features/auth/presentation_layer/screens/login.dart'; +import '../../features/auth/presentation_layer/screens/register.dart'; +import '../../features/auth/presentation_layer/screens/verification_code.dart'; +import '../../features/card/presentation_layer/screens/images_gallery_view.dart'; +import '../../features/category/presentation_layer/screens/category.dart'; +import '../../features/favorite/presentation_layer/screens/favorite.dart'; +import '../../features/home/presentation_layer/screens/home.dart'; +import '../../features/notification/presentation_layer/screens/notification.dart'; +import '../../features/onboarding/presentation/onboarding.dart'; + +class RouteName { + static String changePassword = '/changePassword'; + static String editProfile = '/editProfile'; + static String onboarding = '/onboarding'; + static String splash = '/'; + static String login = '/login'; + static String register = '/register'; + static String verificationCodePage = '/verification-code'; + static String imagesGalleryView = '/images-gallery-view'; + static String home = '/home-screen'; + + static String superHome = '/super_home'; + + static String categoryScreen = '/category_screen'; + + static String favoriteScreen = '/favorite-screen'; + static String categoryDetails = '/category-details'; + static String chatDetails = '/chat-details'; + static String resetPassword = '/reset-password-screen'; + static String verificationCodeResetPassword = + '/verification-code-reset-password-screen'; + static String cardDetails = '/card-details-screen'; + static String addCard = '/add-card-screen'; + static String notification = '/notification-screen'; + static String myCards = '/my-cards-screen'; + static String aboutUs = '/about-us-screen'; + static String contactUs = '/contact-us-screen'; + static String privacy = '/privacy-screen'; + static String forgotPassword = '/forgot-password-screen'; +} + +class RoutingManager { + static List> pages = [ + GetPage( + name: RouteName.imagesGalleryView, + page: () => ImagesGalleryView(), + ), + GetPage( + name: RouteName.changePassword, + page: () => ChangePassword(), + ), + GetPage( + name: RouteName.editProfile, + page: () => EditProfile(), + ), + GetPage( + name: RouteName.onboarding, + page: () => Onboarding(), + ), + GetPage( + name: RouteName.splash, + page: () => SplashScreen(), + ), + GetPage( + name: RouteName.login, + page: () => LoginScreen(), + ), + GetPage( + name: RouteName.register, + page: () => RegisterScreen(), + ), + GetPage( + name: RouteName.verificationCodePage, + page: () => VerificationCodeScreen(), + ), + GetPage( + name: RouteName.home, + page: () => HomeScreen(), + ), + GetPage( + name: RouteName.superHome, + page: () => SuperHome(), + ), + GetPage( + name: RouteName.categoryScreen, + page: () => CategoryScreen(), + ), + GetPage( + name: RouteName.favoriteScreen, + page: () => FavoriteScreen(), + ), + GetPage( + name: RouteName.categoryDetails, + page: () => CategoryDetailsScreen(), + ), + GetPage( + name: RouteName.chatDetails, + page: () => ChatDetails(), + ), + GetPage( + name: RouteName.resetPassword, + page: () => ResetPasswordScreen(), + ), + GetPage( + name: RouteName.verificationCodeResetPassword, + page: () => VerificationCodeResetPasswordScreen(), + ), + GetPage( + name: RouteName.cardDetails, + page: () => CardDetailsScreen(), + ), + GetPage( + name: RouteName.addCard, + page: () => AddCardScreen(), + ), + GetPage( + name: RouteName.notification, + page: () => const NotificationScreen(), + ), + GetPage( + name: RouteName.myCards, + page: () => MyCardsScreen(), + ), + GetPage( + name: RouteName.aboutUs, + page: () => const AboutUsScreen(), + ), + GetPage( + name: RouteName.contactUs, + page: () => ContactUsScreen(), + ), + GetPage( + name: RouteName.privacy, + page: () => const PrivacyScreen(), + ), + GetPage( + name: RouteName.forgotPassword, + page: () => ForgotPasswordScreen(), + ), + ]; + + static void off(String route) { + Get.offNamed(route); + } + + static void offAll(String route) { + Get.offAllNamed(route); + } + + static void to(String route, {dynamic arguments}) { + Get.toNamed(route, arguments: arguments); + } + + static void back() { + Get.back(); + } +} diff --git a/lib/core/url launcher/url_launcher_service.dart b/lib/core/url launcher/url_launcher_service.dart new file mode 100644 index 0000000..9e6071c --- /dev/null +++ b/lib/core/url launcher/url_launcher_service.dart @@ -0,0 +1,30 @@ +import 'package:get/get.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../common/widgets/toast.dart'; + +class UrlLauncherService { + /// ----------------send email --------------/// + static Future sendEmail(String email) async { + final Uri url = Uri( + scheme: 'mailto', + path: email, + ); + + if (await canLaunchUrl(url)) { + await launchUrl(url); + } else { + Toast.showToast('could_not_send_email'.tr); + } + } + + /// ------make call-------------- /// + static Future makePhoneCall(String phoneNumber) async { + Uri callUrl = Uri(scheme: 'tel', path: phoneNumber); + if (await canLaunchUrl(callUrl)) { + await launchUrl(callUrl); + } else { + Toast.showToast('could_not_make_call'.tr); + } + } +} diff --git a/lib/core/utils/pagination_list.dart b/lib/core/utils/pagination_list.dart new file mode 100644 index 0000000..8b71c1d --- /dev/null +++ b/lib/core/utils/pagination_list.dart @@ -0,0 +1,62 @@ +class Pagination { + List data; + + // @privates + int _page = 0; + + bool _moreData = true; + + // @getters + bool get moreData => _moreData; + + int get page => _page; + + int get length => data.length; + + bool get isFirstPage => _page == 1 || _page == 0; + + // @constructors + Pagination({this.data = const []}); + + factory Pagination.zero() => Pagination(); + + // @methods + Future nextPage( + Future> Function(int currentPage) getData, { + InsertPlace place = InsertPlace.end, + }) async { + try { + if (!moreData) return; + + _page++; + + List result = await getData(page); + + if (result.isEmpty) _moreData = false; + + if (page == 1) { + data = result; + return; + } + + if (place == InsertPlace.start) { + data.insertAll(0, result); + return; + } + + data.addAll(result); + } catch (e) { + _page--; + + rethrow; + } + } + + void clear() { + _page = 0; + data = []; + _moreData = true; + } +} + +enum InsertPlace { start, end } diff --git a/lib/core/utils/rx_futures.dart b/lib/core/utils/rx_futures.dart new file mode 100644 index 0000000..fdc948e --- /dev/null +++ b/lib/core/utils/rx_futures.dart @@ -0,0 +1,126 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/utils/utils.dart'; + +import 'package:rx_future/rx_future.dart'; + +// class Utils { +// +// } + +class RxFutures extends Rx>> { + RxFutures() : super({}); + + // @getters + Map> get futures => value; + + bool get allLoading { + bool result = true; + value.forEach((key, value) { + result &= value.loading; + }); + return result; + } + + bool get anyLoading { + bool result = false; + value.forEach((key, value) { + result |= value.loading; + }); + return result; + } + + int get loadingCounts { + int count = 0; + + value.forEach((key, value) { + if (value.loading) count++; + }); + + return count; + } + + int get length => value.length; + + double get loadingPercentage => loadingCounts / length; + + RxFuture _getFuture(String id) => value[id]!; + + T? result(String id) => value[id]!.result; + + Object? error(String id) => value[id]!.error; + + bool loading(String id) => value[id]!.loading; + + bool hasError(String id) => value[id]!.hasError; + + bool isStable(String id) => value[id]!.isStable; + + String init(RxFuture future) { + String id = Utils.randomString(); + + if (value.containsKey(id)) return init(future); + + value[id] = future; + + return id; + } + + Future observe( + String id, + Future Function(T?) callback, { + void Function(T)? onSuccess, + void Function(Object)? onError, + void Function()? onMultipleCalls, + void Function()? onCancel, + MultipleCallsBehavior multipleCallsBehavior = + MultipleCallsBehavior.abortNew, + }) async { + RxFuture future = _getFuture(id); + + update((val) {}); + + future.observe( + callback, + onSuccess: (value) { + update((val) {}); + onSuccess?.call(value); + }, + onError: (error) { + update((val) {}); + onError?.call(error); + }, + onCancel: () { + update((val) {}); + onCancel?.call(); + }, + onMultipleCalls: onMultipleCalls, + multipleCallsBehavior: multipleCallsBehavior, + ); + } + + void remove(String id) { + value[id]?.cancel(); + value.remove(id); + } + + void cancel(String id) { + value[id]?.cancel(); + } + + void cancelAll() { + value.forEach((key, value) { + value.cancel(); + }); + update((val) {}); + } + + void clear({bool cancel = true, bool stableOnly = false}) { + if (cancel && !stableOnly) cancelAll(); + + if (stableOnly) return value.removeWhere((key, value) => value.isStable); + + value.clear(); + + update((val) {}); + } +} diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart new file mode 100644 index 0000000..23d8907 --- /dev/null +++ b/lib/core/utils/utils.dart @@ -0,0 +1,109 @@ +import 'dart:io'; +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:intl/intl.dart'; +import 'package:wechat_assets_picker/wechat_assets_picker.dart'; + +class Utils { + // static String? requestTypeToString(RequestMethod requestType) { + // String? type = ''; + // switch (requestType) { + // case RequestMethod.get: + // { + // type = 'GET'; + // } + // break; + // case RequestMethod.post: + // { + // type = 'POST'; + // } + // break; + // case RequestMethod.delete: + // { + // type = 'DELETE'; + // } + // break; + // case RequestMethod.patch: + // { + // type = 'PATCH'; + // } + // break; + // case RequestMethod.put: + // { + // type = 'PUT'; + // } + // break; + // } + // return type; + // } + + static String formatDateDifference(DateTime date) { + final now = DateTime.now(); + final difference = now.difference(date).inDays; + + if (difference == 0) { + return 'today'.tr; + } else if (difference == 1) { + return 'yesterday'.tr; + } else if (difference >= 2 && difference <= 6) { + final weekdayFormat = DateFormat.EEEE(); // Format to get the weekday name + return weekdayFormat.format(date).tr; + } else if (difference >= 7 && difference <= 13) { + return 'last_week'.tr; + } else if (difference >= 14 && difference <= 20) { + return '2_weeks_ago'.tr; + } else { + return 'long_time_ago'.tr; + } + } + + static Future?> pickImage(BuildContext context) async { + return await AssetPicker.pickAssets( + context, + pickerConfig: const AssetPickerConfig(maxAssets: 50), + ); + } + + static Future pickSingleImage(BuildContext context) async { + List? pickedAssets = await AssetPicker.pickAssets( + context, + pickerConfig: const AssetPickerConfig(maxAssets: 1), + ); + if (pickedAssets != null) { + AssetEntity assetEntity = pickedAssets[0]; + return await assetEntity.file; + } + return null; + } + + static String randomString([int length = 10]) { + var random = Random(); + const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return String.fromCharCodes(Iterable.generate( + length, (_) => chars.codeUnitAt(random.nextInt(chars.length)))); + } + + static MaterialColor createMaterialColor(Color color) { + List strengths = [.05]; + Map swatch = {}; + final int r = color.red, g = color.green, b = color.blue; + + for (int i = 1; i < 10; i++) { + strengths.add(0.1 * i); + } + + for (final double strength in strengths) { + final double ds = 0.5 - strength; + swatch[(strength * 1000).round()] = Color.fromRGBO( + r + ((ds < 0 ? r : (255 - r)) * ds).round(), + g + ((ds < 0 ? g : (255 - g)) * ds).round(), + b + ((ds < 0 ? b : (255 - b)) * ds).round(), + 1, + ); + } + + return MaterialColor(color.value, swatch); + } +} diff --git a/lib/features/account/business_logic_layer/account_controller.dart b/lib/features/account/business_logic_layer/account_controller.dart new file mode 100644 index 0000000..aea19c5 --- /dev/null +++ b/lib/features/account/business_logic_layer/account_controller.dart @@ -0,0 +1,114 @@ +import 'dart:ui'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/features/account/data_layer/model/change_password.dart'; +import 'package:taafee_mobile/features/account/data_layer/model/feedback.dart'; +import 'package:taafee_mobile/features/account/data_layer/source/account_service.dart'; +import 'package:taafee_mobile/features/auth/data_layer/source/auth_service.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:rx_future/rx_future.dart'; +import '../data_layer/model/edit_account.dart'; + +class AccountController extends GetxController { + AccountService accountService = AccountService(); + AuthService authService = AuthService(); + LocalStorage storage = LocalStorage(); + + /// ------------------edit profile-----------------/// + EditAccountModel editAccountModel = EditAccountModel(); + RxFuture editAccountState = RxFuture(null); + + Future editProfile({ + void Function()? onSuccess, + void Function(Object)? onError, + void Function(Object)? onConnectionError, + }) async { + editAccountState.observe((value) async { + await accountService.editProfile(editAccountModel); + }, onSuccess: (value) async { + await authService + .showUser(onConnectionError: onConnectionError) + .then((user) { + storage.saveUser(user); + }); + onSuccess?.call(); + }, onError: onError); + } + + ///------------------change password----------------/// + ChangePasswordModel changePasswordModel = ChangePasswordModel.zero(); + RxFuture changePasswordState = RxFuture(null); + + Future changePassword({ + void Function()? onSuccess, + void Function(Object)? onError, + }) { + return changePasswordState.observe( + (value) async { + return await accountService.changePassword(changePasswordModel); + }, + onSuccess: (value) { + onSuccess?.call(); + }, + onError: onError, + ); + } + + ///----------select language-------/// + RxString selectedLanguageSvg = 'english'.obs; + + void getSelectedLanguageIcon() { + String selectedLanguage = storage.getLanguage() ?? 'en'; + switch (selectedLanguage) { + case 'en': + selectedLanguageSvg.value = 'english'; + break; + case 'ar': + selectedLanguageSvg.value = 'arabic'; + break; + case "cn": + selectedLanguageSvg.value = 'chinese'; + } + selectedLanguageSvg.refresh(); + } + + Future changeLanguage(Languages language) async { + if (language == Languages.english) { + selectedLanguageSvg.value = 'english'; + } + if (language == Languages.arabic) { + selectedLanguageSvg.value = 'arabic'; + } + if (language == Languages.chinese) { + selectedLanguageSvg.value = 'chinese'; + } + Get.updateLocale(Locale(language.code)); + String languageCode = language.code; + await storage.saveLanguage(languageCode); + selectedLanguageSvg.refresh(); + } + + ///----------------user card-----------/// + RxFuture> userCardsState = RxFuture([]); + void getUserCards() { + userCardsState.observe((p0) async { + return await accountService.getUserCards(); + }); + } + + ///----------------feedbackmessage-----------/// + RxFuture sendFeedbackState = RxFuture(null); + FeedbackMessage feedbackMessageModel = FeedbackMessage(message: ''); + Future sendFeedback( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + sendFeedbackState.observe( + (p0) async { + await accountService.sendFeedback(feedbackMessageModel); + }, + onSuccess: onSuccess, + onError: onError, + ); + } +} diff --git a/lib/features/account/data_layer/model/change_password.dart b/lib/features/account/data_layer/model/change_password.dart new file mode 100644 index 0000000..c620470 --- /dev/null +++ b/lib/features/account/data_layer/model/change_password.dart @@ -0,0 +1,13 @@ +class ChangePasswordModel { + String oldPassword; + String newPassword; + ChangePasswordModel({required this.newPassword, required this.oldPassword}); + factory ChangePasswordModel.zero() => + ChangePasswordModel(newPassword: '', oldPassword: ''); + Map toJson() { + return { + 'old_password': oldPassword, + 'password': newPassword, + }; + } +} diff --git a/lib/features/account/data_layer/model/edit_account.dart b/lib/features/account/data_layer/model/edit_account.dart new file mode 100644 index 0000000..dc7129c --- /dev/null +++ b/lib/features/account/data_layer/model/edit_account.dart @@ -0,0 +1,32 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; + +class EditAccountModel { + String? newLastName; + String? newFirstName; + String? password; + File? avatarImage; + EditAccountModel({this.password, this.newFirstName, this.newLastName}); + + factory EditAccountModel.zero() => EditAccountModel(); + + Future> toJson() async { + String? fileName = avatarImage?.path.split('/').last; + MultipartFile? file; + if (avatarImage != null) { + file = + await MultipartFile.fromFile(avatarImage!.path, filename: fileName); + } + + Map data = { + "password": password, + "_method": 'put', + if (newFirstName != null) "first_name": newFirstName, + if (newLastName != null) "last_name": newLastName, + if (avatarImage != null) 'avatar': file, + }; + + return data; + } +} diff --git a/lib/features/account/data_layer/model/feedback.dart b/lib/features/account/data_layer/model/feedback.dart new file mode 100644 index 0000000..1685e7a --- /dev/null +++ b/lib/features/account/data_layer/model/feedback.dart @@ -0,0 +1,9 @@ +class FeedbackMessage { + String message; + FeedbackMessage({required this.message}); + Map toJson() { + return { + 'message': message, + }; + } +} diff --git a/lib/features/account/data_layer/source/account_service.dart b/lib/features/account/data_layer/source/account_service.dart new file mode 100644 index 0000000..49411ff --- /dev/null +++ b/lib/features/account/data_layer/source/account_service.dart @@ -0,0 +1,51 @@ +import 'package:taafee_mobile/core/network/http.dart'; +import 'package:taafee_mobile/features/account/data_layer/model/change_password.dart'; +import 'package:taafee_mobile/features/account/data_layer/model/edit_account.dart'; +import 'package:taafee_mobile/features/account/data_layer/model/feedback.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +import '../../../../core/apis/apis.dart'; + +class AccountService { + Future editProfile(EditAccountModel editAccountModel) async { + Request request = Request( + EndPoint.editAccount, + RequestMethod.post, + isFormData: true, + body: await editAccountModel.toJson(), + authorized: true, + ); + await request.sendRequest(); + } + + Future changePassword(ChangePasswordModel changePasswordModel) async { + Request request = Request( + EndPoint.changePassword, + RequestMethod.post, + authorized: true, + isFormData: true, + body: changePasswordModel.toJson(), + ); + await request.sendRequest(); + } + + ///-----------------user cards---------------/// + Future> getUserCards() async { + Request request = + Request(EndPoint.editAccount, RequestMethod.get, authorized: true); + Map response = await request.sendRequest(); + return CardModel.fromJsonList(response); + } + + /// --------------- feedback ---------------/// + Future sendFeedback(FeedbackMessage feedbackMessage) async { + Request request = Request( + EndPoint.feedback, + RequestMethod.post, + authorized: true, + isFormData: true, + body: feedbackMessage.toJson(), + ); + await request.sendRequest(); + } +} diff --git a/lib/features/account/presentation_layer/screens/about_us.dart b/lib/features/account/presentation_layer/screens/about_us.dart new file mode 100644 index 0000000..6b1589c --- /dev/null +++ b/lib/features/account/presentation_layer/screens/about_us.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; + +import '../../../../common/widgets/header_screen.dart'; +import '../../../splash/data layer/model/params.dart'; + +class AboutUsScreen extends StatelessWidget { + const AboutUsScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: Column( + children: [ + HeaderScreen("about_us".tr) + .paddingOnly(top: 20, bottom: 80) + .paddingSymmetric(horizontal: 30), + Image.asset("assets/images/logo.png"), + MediumTextWidget( + Params.aboutUs, + fontSize: Responsive.isTablet() ? 24 : null, + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 60 : 35, vertical: 40) + ], + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/account/presentation_layer/screens/account.dart b/lib/features/account/presentation_layer/screens/account.dart new file mode 100644 index 0000000..a140494 --- /dev/null +++ b/lib/features/account/presentation_layer/screens/account.dart @@ -0,0 +1,431 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/account/business_logic_layer/account_controller.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/room.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart'; +import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../../../common/widgets/toast.dart'; +import '../../../auth/data_layer/model/user.dart'; +import '../widgets/account_widget.dart'; + +class AccountScreen extends StatelessWidget { + final AuthController authController = Get.find(); + final HomeController homeController = Get.find(); + final CardController cardController = Get.find(); + final AccountController accountController = Get.find(); + final ChatController chatController = Get.find(); + final FavoriteController favoriteController = Get.find(); + final _formKey = GlobalKey(); + + AccountScreen({super.key}); + + @override + Widget build(BuildContext context) { + accountController.getSelectedLanguageIcon(); + homeController.readUser(); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + children: [ + Container( + width: Get.width, + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 30, vertical: 15), + child: Obx(() { + return (!authController.isGuest.value) + ? Row( + mainAxisAlignment: !homeController.isArabic.value + ? MainAxisAlignment.end + : MainAxisAlignment.start, + children: [ + SvgPicture.asset( + "assets/icons/log out.svg", + ).paddingSymmetric(horizontal: 5), + MediumTextWidget( + "log_out".tr, + fontSize: 14, + ), + const SizedBox( + width: 8, + ), + Visibility( + visible: authController.logoutState.loading, + child: SizedBox( + width: 16, + height: 16, + child: const CircularProgressIndicator() + .center())), + ], + ).onTap(() { + authController.logout( + onSuccess: (value) async { + homeController.storage.savefirstTimeOpened(); + RoutingManager.offAll(RouteName.login); + homeController.selectIndex.value = 0; + chatController.io.disconnect(); + chatController.clear(); + homeController.user.value = User.zero(); + favoriteController.getFavoriteState.update((val) { + val!.value = []; + }); + favoriteController.getFavoriteState.refresh(); + }, + ); + }) + : Row( + mainAxisAlignment: !homeController.isArabic.value + ? MainAxisAlignment.end + : MainAxisAlignment.start, + children: [ + SvgPicture.asset( + "assets/icons/log out.svg", + ).paddingSymmetric(horizontal: 5), + MediumTextWidget( + "sign_in".tr, + fontSize: 14, + ), + const SizedBox( + width: 8, + ), + Visibility( + visible: authController.logoutState.loading, + child: SizedBox( + width: 16, + height: 16, + child: const CircularProgressIndicator() + .center())), + ], + ).onTap(() { + RoutingManager.offAll(RouteName.login); + homeController.storage.clearCache(); + homeController.storage.savefirstTimeOpened(); + }); + }), + ).paddingOnly( + top: Responsive.isTablet() ? 30 : 0, + right: Responsive.isTablet() ? 20 : 0, + ), + CircleAvatarWidget( + isUserAvatar: true, + radius: Responsive.isTablet() ? 80 : 40, + ).paddingOnly(bottom: 10), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Obx( + () => BoldTextWidget( + " ${homeController.user.value!.firstName} " + " ${homeController.user.value!.lastName} ", + fontSize: Responsive.isTablet() ? 22 : 14, + color: AppColors.textColor, + ), + ), + if (!authController.isGuest.value) + SvgPicture.asset( + "assets/icons/edit-2.svg", + ).onTap(() { + RoutingManager.to(RouteName.editProfile); + }), + ], + ), + MediumTextWidget( + homeController.user.value!.email, + fontSize: Responsive.isTablet() ? 22 : 14, + ).paddingOnly(bottom: 20), + AccountWidget( + icon: "my cards.svg", + title: "my_cards".tr, + ).onTap(() async { + if (authController.isGuest.value) { + Get.defaultDialog( + title: '', + content: Column( + children: [ + BoldTextWidget('you_have_to_sign_in'.tr), + const SizedBox( + height: 20, + ), + ButtonWidget( + onTap: () { + RoutingManager.off(RouteName.login); + }, + title: 'sign_in'.tr) + ], + )); + return; + } + RoutingManager.to(RouteName.myCards); + }), + AccountWidget( + icon: "about us.svg", + title: "about_us".tr, + ).onTap(() { + RoutingManager.to(RouteName.aboutUs); + }), + AccountWidget( + icon: "phone.svg", + title: "contact_us".tr, + ).onTap(() { + RoutingManager.to(RouteName.contactUs); + }), + AccountWidget( + icon: "privacy.svg", + title: "privacy_and_terms".tr, + ).onTap(() { + RoutingManager.to(RouteName.privacy); + }), + AccountWidget( + icon: "privacy.svg", + title: "go_to_support".tr, + ).onTap(() async { + await chatController.checkSupportRoomStatus(onSuccess: (room) { + room?.type = RoomType.support; + RoutingManager.to(RouteName.chatDetails, arguments: room); + }, onError: (err) { + Toast.showToast(err.toString().tr); + }); + }), + Divider( + color: AppColors.dividerColor, + thickness: 1, + ).paddingSymmetric(horizontal: 30), + SizedBox( + width: Get.width, + height: 67, + child: Row( + children: [ + SvgPicture.asset( + "assets/icons/language.svg", + width: Responsive.isTablet() ? 20 : null, + ).expanded(2), + RegularTextWidget( + "app_language".tr, + fontSize: Responsive.isTablet() ? 22 : 14, + ).expanded(6), + const SizedBox( + width: 20, + ), + if (Responsive.isTablet()) Container().expanded(7), + DropdownButton( + value: accountController.selectedLanguageSvg.value, + items: [ + DropdownMenuItem( + value: 'english', + child: SizedBox( + width: 40, + height: 40, + child: SvgPicture.asset('assets/icons/english.svg'), + ), + ), + DropdownMenuItem( + value: 'arabic', + child: SizedBox( + width: 40, + height: 40, + child: SvgPicture.asset('assets/icons/arabic.svg'), + ), + ), + DropdownMenuItem( + value: 'chinese', + child: SizedBox( + width: 40, + height: 40, + child: SvgPicture.asset('assets/icons/chinese.svg'), + ), + ), + ], + onChanged: (value) { + if (value == 'english') { + accountController.changeLanguage(Languages.english); + homeController.setUiLanguage(Languages.english.code); + } + if (value == 'arabic') { + accountController.changeLanguage(Languages.arabic); + homeController.setUiLanguage(Languages.arabic.code); + } + if (value == 'chinese') { + accountController.changeLanguage(Languages.chinese); + homeController.setUiLanguage(Languages.chinese.code); + } + }) + ], + ).paddingSymmetric(horizontal: 15), + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? Get.width * 0.15 : 0), + Divider( + color: AppColors.dividerColor, + thickness: 1, + ).paddingSymmetric(horizontal: 30), + if (!authController.isGuest.value) + AccountWidget( + isShowCircleAvatar: false, + icon: "Logout.svg", + title: "log_out_from_other_devices".tr, + ).onTap(() { + otherDevicesLogOutDialog(context); + }), + if (!authController.isGuest.value) + AccountWidget( + isShowCircleAvatar: false, + icon: "delete.svg", + title: "delete_account".tr, + color: Colors.red, + ).onTap(() { + dialog(context); + }) + ], + ), + ), + ).makeSafeArea(); + } + + Future dialog(BuildContext context) async { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + content: Container( + color: Colors.white, + height: Get.height * .34, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + "delete_your_account".tr, + fontSize: 18, + color: AppColors.textColor, + ), + Form( + key: _formKey, + child: TextFieldWidget( + onChange: (value) { + authController.password = value; + }, + keyboardType: TextInputType.text, + label: "enter_your_password".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return "The_password_is_short".tr; + } + return null; + }, + ), + ), + Obx(() { + return ButtonWidget( + isLoading: authController.deleteAccountState.loading, + width: Get.width * .35, + textColor: Colors.white, + color: AppColors.redColor, + onTap: () async { + if (_formKey.currentState!.validate()) { + await authController.deleteAccount( + onSuccess: (p0) { + RoutingManager.offAll(RouteName.login); + }, + onError: (error) { + if (error.toString() == "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + }, + ); + } + }, + title: "delete".tr, + ).center(); + }) + ], + ), + ), + ); + }); + } + + Future otherDevicesLogOutDialog(BuildContext context) async { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + content: Container( + color: Colors.white, + height: 150, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + '${"log_out_from_other_devices".tr} ?', + fontSize: 18, + color: AppColors.textColor, + ), + SizedBox( + width: 300, + child: Row( + children: [ + ButtonWidget( + width: 100, + onTap: () { + RoutingManager.back(); + }, + title: 'cancel'.tr), + Container().expanded(1), + Obx(() { + return ButtonWidget( + hideTextOnLoading: true, + isLoading: authController + .terminateOtherSessionsState.loading, + width: 100, + textColor: Colors.white, + color: AppColors.redColor, + onTap: () async { + await authController.terminateOtherSessions( + onSuccess: (p0) { + RoutingManager.back(); + }, + onError: (error) { + if (error.toString() == + "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + }, + ); + }, + title: "log_out".tr, + ).center(); + }), + ], + ), + ) + ], + ), + ), + ); + }); + } +} diff --git a/lib/features/account/presentation_layer/screens/add_card.dart b/lib/features/account/presentation_layer/screens/add_card.dart new file mode 100644 index 0000000..b6a9cfd --- /dev/null +++ b/lib/features/account/presentation_layer/screens/add_card.dart @@ -0,0 +1,596 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/listview.dart'; +import 'package:taafee_mobile/common/widgets/loader.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/widgets/add_images.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../../../common/widgets/drop_down.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/toast.dart'; +import '../../../../core/utils/utils.dart'; +import 'package:lottie/lottie.dart'; + +import '../../../category/data_layer/model/category.dart'; +import '../../../home/data_layer/model/city.dart'; + +// ignore: must_be_immutable +class AddCardScreen extends StatelessWidget { + final CategoryController categoryController = Get.find(); + final HomeController homeController = Get.find(); + final CardController cardController = Get.find(); + final _formKey = GlobalKey(); + Timer? debouncer; + CardModel? cardModel = Get.arguments; + AddCardScreen({ + super.key, + }); + + void load() { + categoryController.searchCategories(); + cardController.cardModel.value.images = []; + cardController.editCardModel.value.images = []; + cardController.changeNetworkImages([]); + Future.wait( + [categoryController.searchCategories(), homeController.getCities()]) + .then((value) { + if (cardModel != null) { + cardController.changeNetworkImages(cardModel!.cardImages); + cardController.editCardModel.value.cardId = cardModel!.id; + } else { + cardController.cardModel.value.categoryId = 0; + cardController.editCardModel.value.cityId = 0; + } + }); + } + + @override + Widget build(BuildContext context) { + load(); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + HeaderScreen(cardModel != null ? "Edit card".tr : "add_new_card".tr) + .paddingOnly(top: 30), + Container( + margin: const EdgeInsets.symmetric(vertical: 10), + width: Get.width, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(4), + ), + child: Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (Responsive.isTablet()) + const SizedBox( + height: 24, + ), + TextFieldWidget( + initValue: cardModel != null ? cardModel!.name : '', + onChange: (value) { + cardController.cardModel.value.name = value; + cardController.editCardModel.value.name = value; + }, + keyboardType: TextInputType.text, + label: "name".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_name".tr; + } + return null; + }, + ).paddingOnly(top: 20, bottom: 6), + Container( + height: 50, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all(color: AppColors.borderColor), + ), + child: RxViewer( + customLoader: const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator()), + rxFuture: categoryController.searchCategoriesState, + child: () => DropDownWidget( + margin: const EdgeInsets.only(left: 12), + padding: const EdgeInsets.only(bottom: 5), + item: categoryController.searchCategoriesState.result, + onChanged: (value) { + cardController.cardModel.value.categoryId = + value!.id; + cardController.editCardModel.value.categoryId = + value.id; + }, + selectItem: cardModel != null + ? categoryController + .getCategoryById(cardModel!.categoryId) + : CategoryModel.zero(), + compareFunction: (p0, p1) { + return p0.compare(p1); + }, + toStr: (value) { + return value.name; + }, + ), + ), + ).paddingSymmetric(vertical: 8), + Container( + height: 50, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all(color: AppColors.borderColor), + ), + child: RxViewer( + customLoader: const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator()), + rxFuture: homeController.cityState, + child: () => DropDownWidget( + padding: const EdgeInsets.only(bottom: 5), + margin: const EdgeInsets.only(left: 12), + item: homeController.cityState.result, + onChanged: (value) { + cardController.cardModel.value.cityId = value!.id; + cardController.editCardModel.value.cityId = + value.id; + }, + selectItem: cardModel != null + ? cardModel!.cityModel + : CityModel.zero(), + compareFunction: (p0, p1) { + return p0.compare(p1); + }, + toStr: (value) { + return value.name; + }, + ), + ), + ).paddingSymmetric(vertical: 8), + TextFieldWidget( + initValue: + cardModel != null ? cardModel!.phoneNumber : '', + prefix: SvgPicture.asset("assets/icons/phone.svg") + .paddingSymmetric(horizontal: 5), + onChange: (value) { + cardController.cardModel.value.phoneNumber = value; + cardController.editCardModel.value.phoneNumber = value; + }, + keyboardType: TextInputType.phone, + label: "phone_number".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_phone_number".tr; + } + return null; + }, + ).paddingSymmetric(vertical: 6), + TextFieldWidget( + initValue: cardModel != null ? cardModel!.address : '', + suffixText: "optional".tr, + suffix: null, + prefix: SvgPicture.asset("assets/icons/location.svg") + .paddingSymmetric(horizontal: 5), + onChange: (value) { + cardController.cardModel.value.address = value; + cardController.editCardModel.value.address = value; + }, + keyboardType: TextInputType.text, + label: "address".tr, + validate: (value) { + return null; + }, + ).paddingSymmetric(vertical: 6), + TextFieldWidget( + initValue: cardModel != null ? cardModel!.postalCode : '', + suffixText: "optional".tr, + onChange: (value) { + cardController.cardModel.value.postalCode = value; + cardController.editCardModel.value.postalCode = value; + }, + keyboardType: TextInputType.text, + label: "postal_code".tr, + validate: (value) { + return null; + }, + ).paddingSymmetric(vertical: 6), + TextFieldWidget( + initValue: cardModel != null ? cardModel!.website : '', + onChange: (value) { + cardController.cardModel.value.webSite = value; + cardController.editCardModel.value.webSite = value; + }, + keyboardType: TextInputType.emailAddress, + label: "website".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_website".tr; + } + return null; + }, + ).paddingSymmetric(vertical: 6), + TextFieldWidget( + initValue: cardModel != null ? cardModel!.services : '', + onChange: (value) { + cardController.cardModel.value.service = value; + cardController.editCardModel.value.service = value; + }, + keyboardType: TextInputType.text, + label: "service".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_service".tr; + } + return null; + }, + ).paddingSymmetric(vertical: 6), + TextFieldWidget( + initValue: + cardModel != null ? cardModel!.additionalData : '', + maxLines: 5, + height: 125, + onChange: (value) { + cardController.cardModel.value.additionalData = value; + cardController.editCardModel.value.additionalData = + value; + }, + keyboardType: TextInputType.multiline, + label: "more_details".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_details".tr; + } + return null; + }, + ).paddingSymmetric(vertical: 6), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RegularTextWidget( + "images".tr, + fontSize: 14, + ), + RegularTextWidget( + "optional".tr, + fontSize: 14, + ) + ], + ), + cardModel == null + ? Obx(() { + return SizedBox( + height: Get.height * .2, + child: ListViewWidget( + scrollDirection: Axis.horizontal, + physics: const BouncingScrollPhysics(), + itemCount: cardController + .cardModel.value.images!.isEmpty + ? 1 + : cardController + .cardModel.value.images!.length + + 1, + childBuilder: (index) { + if (index == 0 || + cardController + .cardModel.value.images!.isEmpty) { + // return const AddImagesWidget(); + return const AddImagesWidget() + .onTap(() async { + await Utils.pickImage(context) + .then((value) async { + value?.forEach((element) async { + File? file = await element.file; + if (file != null) { + cardController + .addImagesToList(file); + } + }); + }); + }); + } else { + return Container( + margin: const EdgeInsets.only( + bottom: 15, top: 7, right: 5), + width: Get.width * .32, + height: Get.height * .2, + decoration: BoxDecoration( + border: Border.all( + color: Colors.transparent), + borderRadius: + BorderRadius.circular(6), + image: DecorationImage( + image: FileImage( + cardController.cardModel.value + .images![index - 1], + ), + fit: BoxFit.cover), + ), + child: Align( + alignment: Alignment.topLeft, + child: SvgPicture.asset( + 'assets/icons/x.svg', + colorFilter: const ColorFilter.mode( + Colors.grey, BlendMode.srcIn), + ).onTap(() { + cardController + .removeImageFromNewCard( + index - 1); + }), + ), + ); + } + }), + ); + // : Container(); + }) + : SizedBox( + height: Get.height * .2, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + const AddImagesWidget().onTap(() async { + await Utils.pickImage(context) + .then((value) async { + value?.forEach((element) async { + File? file = await element.file; + if (file != null) { + cardController + .editCardModel.value.images! + .add(file); + } + }); + }); + Future.delayed(const Duration(seconds: 1), + () { + cardController.uploadImages( + onSuccess: (p0) { + cardController + .updateNetworkImages(cardModel!.id); + homeController.readUser(); + cardController.getMyCards( + homeController.user.value!.id); + }); + }); + }), + Obx(() { + return Visibility( + visible: + cardController.addImagesState.loading, + child: ListViewWidget( + scrollDirection: Axis.horizontal, + physics: + const BouncingScrollPhysics(), + itemCount: 4, + childBuilder: (index) { + return Loader( + width: Get.width * .32, + height: Get.height * .2, + ); + }), + ); + }), + Obx(() { + return Visibility( + visible: cardController + .cardModelNetworkImages.isNotEmpty, + child: Obx( + () => ListViewWidget( + scrollDirection: Axis.horizontal, + physics: + const BouncingScrollPhysics(), + itemCount: cardController + .cardModelNetworkImages + .length, + childBuilder: (index) { + return Obx(() => (cardController + .deleteImageState + .loading || + cardController + .networkImagesState + .loading) + ? Loader( + width: Get.width * .32, + height: Get.height * .2, + ) + : Container( + margin: const EdgeInsets + .only( + bottom: 15, + top: 7, + right: 5), + width: Get.width * .32, + height: Get.height * .2, + decoration: + BoxDecoration( + border: Border.all( + color: Colors + .transparent), + borderRadius: + BorderRadius + .circular(6), + image: DecorationImage( + image: CachedNetworkImageProvider(Domain + .domain + + cardController + .cardModelNetworkImages[ + index] + .url + .substring( + 6)), + fit: + BoxFit.cover), + ), + child: Align( + alignment: + Alignment.topLeft, + child: + SvgPicture.asset( + 'assets/icons/x.svg', + colorFilter: + const ColorFilter + .mode( + Colors.grey, + BlendMode + .srcIn), + ).onTap(() { + cardController.deleteImage( + cardController + .cardModelNetworkImages[ + index] + .id, + cardId: + cardModel! + .id, + onSuccess: + (value) { + homeController + .readUser(); + cardController + .getMyCards( + homeController + .user + .value! + .id); + }); + }), + ), + )); + }), + )); + }), + ], + ), + ), + ) + ], + ).paddingSymmetric(horizontal: 30), + ), + ), + if (cardModel != null) + Obx(() { + return ButtonWidget( + onTap: () { + cardController.deleteCard(cardModel!.id, + onSuccess: (value) { + homeController.readUser(); + cardController.getMyCards(homeController.user.value!.id); + RoutingManager.back(); + showMessageDialog( + 'the_card_has_been_deleted_successfully'.tr); + }); + }, + title: 'delete_card'.tr, + isLoading: cardController.deleteCardState.loading, + color: AppColors.redColor, + textColor: Colors.white, + ).paddingSymmetric(vertical: 10); + }), + cardModel == null + ? Obx(() { + return ButtonWidget( + isLoading: cardController.addCardState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + cardController.addCard( + onSuccess: (p0) { + homeController.readUser(); + cardController + .getMyCards(homeController.user.value!.id); + + homeController.readUser(); + cardController + .getMyCards(homeController.user.value!.id); + RoutingManager.back(); + showMessageDialog( + "the_card_has_been_added_successfully".tr); + }, + ); + } + }, + title: "add_card".tr, + textColor: AppColors.textColor, + ).paddingOnly(bottom: 20); + }) + : Obx(() { + return ButtonWidget( + isLoading: cardController.editCardState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + cardController.editCard( + cardModel!.id, + onSuccess: (p0) async { + homeController.readUser(); + cardController + .getMyCards(homeController.user.value!.id); + cardController.cardState.result.clear(); + cardController.getCards(onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + RoutingManager.back(); + showMessageDialog( + "the_card_has_been_edited_successfully".tr); + }, + ); + } + }, + title: "save_changes".tr, + textColor: AppColors.textColor, + ).paddingOnly(bottom: 20); + }) + ], + ).paddingSymmetric(horizontal: 19), + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? Get.width * 0.1 : 0), + ).makeSafeArea(); + } +} + +showMessageDialog(String message) { + Get.defaultDialog( + radius: 12, + title: '', + contentPadding: EdgeInsets.zero, + content: SizedBox( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Lottie.asset( + 'assets/animations/Add Successfuly.json', + repeat: false, + ), + MediumTextWidget( + message, + textAlign: TextAlign.center, + fontSize: Responsive.isTablet() ? 28 : 18, + ).paddingOnly(top: 10, bottom: 20).paddingSymmetric( + horizontal: Responsive.isTablet() ? 32 : 4, + ), + ], + ), + ), + ); +} diff --git a/lib/features/account/presentation_layer/screens/change_password.dart b/lib/features/account/presentation_layer/screens/change_password.dart new file mode 100644 index 0000000..762170c --- /dev/null +++ b/lib/features/account/presentation_layer/screens/change_password.dart @@ -0,0 +1,184 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/account/business_logic_layer/account_controller.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/widgets/button.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/loader.dart'; +import '../../../../common/widgets/textfiled.dart'; +import '../../../../common/widgets/toast.dart'; + +// ignore: must_be_immutable +class ChangePassword extends StatelessWidget { + ChangePassword({super.key}); + final GlobalKey formKey = GlobalKey(); + final AccountController accountController = Get.find(); + final HomeController homeController = Get.find(); + final AuthController authController = Get.find(); + String newPassword = ''; + @override + Widget build(BuildContext context) { + return Scaffold( + body: Obx(() { + if (accountController.changePasswordState.loading) { + return Loader( + height: Get.height, + width: Get.width, + ).center(); + } else { + return SingleChildScrollView( + child: Form( + key: formKey, + child: Column( + children: [ + HeaderScreen('change_password'.tr).paddingOnly( + top: 30, + left: 20, + ), + Column( + children: [ + SizedBox( + height: Get.height * 0.18, + ), + Obx(() { + return TextFieldWidget( + onChange: (value) { + accountController.changePasswordModel.oldPassword = + value; + }, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleChangePasswordOldPasswordVisibility(); + }, + ), + obscure: !authController + .changePasswordOldPasswordVisible.value, + keyboardType: TextInputType.name, + label: 'old_password'.tr, + validate: (value) { + if (value == '' || value == null) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return 'password_is_short'; + } + return null; + }); + }), + const SizedBox( + height: 12, + ), + Obx(() { + return TextFieldWidget( + onChange: (value) { + newPassword = value; + }, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleChangePasswordNewPasswordVisibility(); + }, + ), + obscure: !authController + .changePasswordNewPasswordVisible.value, + keyboardType: TextInputType.name, + label: 'new_password'.tr, + validate: (value) { + if (value == '' || value == null) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return 'password_is_short'.tr; + } + return null; + }); + }), + const SizedBox( + height: 12, + ), + Obx(() { + return TextFieldWidget( + onChange: (value) { + accountController.changePasswordModel.newPassword = + value; + }, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleChangePasswordConfirmPasswordVisibility(); + }, + ), + obscure: !authController + .changePasswordConfirmPasswordVisible.value, + keyboardType: TextInputType.name, + label: 'confirm_new_password'.tr, + validate: (value) { + if (value != newPassword || + value == '' || + value == null) { + return "password_did't_identical".tr; + } + if (value.length < 8) { + return 'password_is_short'.tr; + } + return null; + }); + }), + ], + ) + .paddingOnly( + top: 8.0, + left: 16, + right: 16, + ) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 0), + SizedBox( + height: Get.height * 0.11, + ), + ButtonWidget( + onTap: () { + if (formKey.currentState!.validate()) { + accountController.changePassword( + onSuccess: () { + RoutingManager.back(); + }, + onError: (e) { + Toast.showToast(e.toString()); + }, + ); + } + }, + title: 'save_changes'.tr) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 0), + SizedBox( + height: Get.height * 0.1, + ), + ], + ).paddingOnly( + top: Responsive.isTablet() ? 30 : 0, + ), + ).paddingOnly( + right: (homeController.isArabic.value) ? 16 : 0, + )); + } + }), + ).makeSafeArea(); + } +} diff --git a/lib/features/account/presentation_layer/screens/contact_us.dart b/lib/features/account/presentation_layer/screens/contact_us.dart new file mode 100644 index 0000000..e066acb --- /dev/null +++ b/lib/features/account/presentation_layer/screens/contact_us.dart @@ -0,0 +1,73 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/account/business_logic_layer/account_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/textfiled.dart'; +import '../../../../common/widgets/toast.dart'; + +class ContactUsScreen extends StatelessWidget { + ContactUsScreen({super.key}); + final AccountController accountController = Get.find(); + final GlobalKey formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + return Scaffold( + body: SingleChildScrollView( + child: Form( + key: formKey, + child: Column( + children: [ + HeaderScreen("contact_us".tr).paddingOnly(top: 30, bottom: 50), + MediumTextWidget( + "contact_us_content".tr, + fontSize: Responsive.isTablet() ? 24 : null, + ), + TextFieldWidget( + maxLines: 5, + height: 125, + onChange: (value) { + accountController.feedbackMessageModel.message = value; + }, + keyboardType: TextInputType.multiline, + label: "your_message".tr, + validate: (value) { + if (value == null || value == '') { + return 'please_enter_your_message'.tr; + } + return null; + }, + ).paddingSymmetric(vertical: 15), + Obx(() { + return ButtonWidget( + isLoading: accountController.sendFeedbackState.loading, + onTap: () { + if (formKey.currentState!.validate()) { + accountController.sendFeedback(onError: (error) { + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } else { + Toast.showToast('unknown_error'.tr); + } + }, onSuccess: (value) { + RoutingManager.back(); + }); + } + }, + title: "send_message".tr) + .paddingSymmetric(vertical: 30); + }) + ], + ).paddingSymmetric(horizontal: 30), + ), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/account/presentation_layer/screens/edit_profile.dart b/lib/features/account/presentation_layer/screens/edit_profile.dart new file mode 100644 index 0000000..038e7a1 --- /dev/null +++ b/lib/features/account/presentation_layer/screens/edit_profile.dart @@ -0,0 +1,222 @@ +import 'dart:developer'; + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/header_screen.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/core/utils/utils.dart'; +import 'package:taafee_mobile/features/account/business_logic_layer/account_controller.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +class EditProfile extends StatelessWidget { + EditProfile({super.key}); + final AccountController accountController = Get.find(); + final AuthController authController = Get.find(); + final HomeController homeController = Get.find(); + final GlobalKey formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + return Scaffold( + body: SingleChildScrollView( + child: Obx(() { + return Form( + key: formKey, + child: Column( + children: [ + HeaderScreen('edit_profile'.tr).paddingOnly(top: 20, left: 20), + Column( + children: [ + const SizedBox( + height: 24, + ), + Container( + width: Responsive.isTablet() ? 200 : 120, + height: Responsive.isTablet() ? 200 : 120, + decoration: const BoxDecoration( + shape: BoxShape.circle, + ), + child: Stack( + children: [ + CircleAvatarWidget( + isUserAvatar: true, + radius: Responsive.isTablet() ? 200 : 100, + ), + Container( + width: Responsive.isTablet() ? 56 : 28, + height: Responsive.isTablet() ? 56 : 28, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + child: SvgPicture.asset( + "assets/icons/edit-2.svg", + colorFilter: const ColorFilter.mode( + Colors.black, + BlendMode.srcIn, + ), + ).paddingAll(4), + ) + .align(alignment: Alignment.bottomRight) + .paddingOnly( + right: 24, + bottom: 0, + ) + .onTap(() async { + Utils.pickSingleImage(context).then((value) { + homeController.setPickedUserImage(value); + accountController.editAccountModel.avatarImage = + value; + }); + }), + ], + ), + ), + const SizedBox( + height: 34, + ), + if (Responsive.isTablet()) + Row( + children: [ + SizedBox( + child: TextFieldWidget( + initValue: homeController.user.value?.firstName, + onChange: (value) { + accountController + .editAccountModel.newFirstName = value; + }, + keyboardType: TextInputType.name, + label: 'first_name'.tr, + validate: (value) { + return null; + }), + ).expanded(20), + Container().expanded(1), + SizedBox( + child: TextFieldWidget( + initValue: homeController.user.value?.lastName, + onChange: (value) { + accountController + .editAccountModel.newLastName = value; + }, + keyboardType: TextInputType.name, + label: 'last_name'.tr, + validate: (value) { + return null; + }), + ).expanded(20), + ], + ).paddingSymmetric(vertical: 20, horizontal: 8), + if (!Responsive.isTablet()) + TextFieldWidget( + initValue: homeController.user.value?.firstName, + onChange: (value) { + accountController.editAccountModel.newFirstName = + value; + }, + keyboardType: TextInputType.name, + label: 'first_name'.tr, + validate: (value) { + return null; + }), + const SizedBox( + height: 8, + ), + if (!Responsive.isTablet()) + TextFieldWidget( + initValue: homeController.user.value?.lastName, + onChange: (value) { + accountController.editAccountModel.newLastName = + value; + }, + keyboardType: TextInputType.name, + label: 'last_name'.tr, + validate: (value) { + return null; + }), + const SizedBox( + height: 8, + ), + RegularTextWidget( + 'change_password'.tr, + fontSize: 15, + ) + .align(alignment: Alignment.centerLeft) + .paddingOnly(left: 8, top: 8) + .onTap(() { + RoutingManager.to(RouteName.changePassword); + }), + ], + ).paddingOnly(top: 24.0, left: 16).paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 0), + SizedBox( + height: Get.height * 0.1, + ), + Obx(() { + return ButtonWidget( + isLoading: accountController.editAccountState.loading, + onTap: () { + if (formKey.currentState!.validate()) { + accountController.editProfile( + onSuccess: () async { + homeController.readUser(); + RoutingManager.back(); + + Toast.showToast( + 'profile_edited_succesfully'.tr); + homeController.clearPickedUserImage(); + homeController.readUser(); + }, onError: (error) { + homeController.clearPickedUserImage(); + homeController.readUser(); + if (error.toString() == "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == "Unknown Error") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == + "User is not verified") { + Toast.showToast( + "you_are_not_verified_yet".tr); + RoutingManager.offAll( + RouteName.verificationCodePage); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + log(error.toString()); + }, onConnectionError: (err) { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + }); + } + }, + title: 'save_changes'.tr) + .paddingSymmetric( + horizontal: + Responsive.isTablet() ? Get.width * 0.2 : 0); + }), + SizedBox( + height: Get.height * 0.1, + ), + ], + ).paddingOnly(top: Responsive.isTablet() ? 30 : 0), + ).paddingOnly( + right: (homeController.isArabic.value) ? 16 : 8, + ); + }), + ).makeSafeArea(), + ); + } +} diff --git a/lib/features/account/presentation_layer/screens/my_cards.dart b/lib/features/account/presentation_layer/screens/my_cards.dart new file mode 100644 index 0000000..9e2619d --- /dev/null +++ b/lib/features/account/presentation_layer/screens/my_cards.dart @@ -0,0 +1,123 @@ +import 'package:flutter/material.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/common/widgets/responsive_view.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../core/routing/routing_manager.dart'; +import '../../../card/presentation_layer/widgets/my_card.dart'; + +class MyCardsScreen extends StatelessWidget { + final CardController cardController = Get.find(); + final HomeController homeController = HomeController(); + MyCardsScreen({super.key}); + final ScrollController scrollController = ScrollController(); + void moreDate() { + scrollController.addListener(() { + if (scrollController.position.atEdge && scrollController.offset != 0) { + cardController.getMyCards(homeController.user.value!.id, + onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + } + }); + } + + @override + Widget build(BuildContext context) { + homeController.readUser(); + cardController.getMyCards(homeController.user.value!.id, + onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + controller: scrollController, + child: Column( + children: [ + HeaderScreen("my_cards".tr) + .paddingSymmetric(horizontal: 20) + .paddingOnly( + top: 20, + ), + Obx( + () => Row( + mainAxisAlignment: (homeController.isArabic.value) + ? MainAxisAlignment.start + : MainAxisAlignment.end, + children: [ + Container( + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: AppColors.primeColor), + height: 38, + width: 95, + child: RegularTextWidget( + "new_card".tr, + fontSize: 14, + color: Colors.white, + ), + ).onTap(() { + RoutingManager.to(RouteName.addCard); + }) + ], + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 20, + ), + ), + RxViewer( + width: Get.width, + height: Get.height * 0.8, + errorHeight: Get.width, + errorWidth: Get.height * 0.75, + rxFuture: cardController.myCardState, + child: () => (cardController.myCardState.result.data.isEmpty) + ? SizedBox( + width: Get.width, + height: Get.height * 0.7, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/Add-New-Card.png', + width: 128, + height: 128, + ), + RegularTextWidget( + 'press_(new_card)_to_add_new_card!'.tr, + fontSize: 18, + textAlign: TextAlign.center, + ).center(), + ], + ), + ) + : Obx(() { + return ResponsiveView( + mainAxisExtent: 185, + itemCount: + cardController.myCardState.result.data.length, + childBuilder: (index) { + return Obx(() { + return MyCardWidget( + cardController.myCardState.result.data[index], + isShowEditIcon: true, + ); + }); + }); + }), + ) + ], + ), + ).makeSafeArea(), + ); + } +} diff --git a/lib/features/account/presentation_layer/screens/privacy.dart b/lib/features/account/presentation_layer/screens/privacy.dart new file mode 100644 index 0000000..61f81e5 --- /dev/null +++ b/lib/features/account/presentation_layer/screens/privacy.dart @@ -0,0 +1,49 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/header_screen.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import '../../../splash/data layer/model/params.dart'; + +class PrivacyScreen extends StatelessWidget { + const PrivacyScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SingleChildScrollView( + child: Column( + children: [ + HeaderScreen("privacy_and_terms".tr) + .paddingOnly(top: 20, bottom: 30) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 20 : 20, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MediumTextWidget( + "privacy".tr, + fontSize: Responsive.isTablet() ? 32 : 16, + ).paddingOnly(bottom: 10), + MediumTextWidget( + fontSize: Responsive.isTablet() ? 24 : null, + Params.privacy, + ).paddingOnly(bottom: 20), + MediumTextWidget( + "terms".tr, + fontSize: Responsive.isTablet() ? 32 : 16, + ).paddingOnly(bottom: 10), + MediumTextWidget( + fontSize: Responsive.isTablet() ? 24 : null, + Params.terms, + ).paddingOnly(bottom: 10) + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 30 : 30), + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 30 : 0), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/account/presentation_layer/widgets/account_widget.dart b/lib/features/account/presentation_layer/widgets/account_widget.dart new file mode 100644 index 0000000..fd62c65 --- /dev/null +++ b/lib/features/account/presentation_layer/widgets/account_widget.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +// ignore: must_be_immutable +class AccountWidget extends StatelessWidget { + final String icon; + final String title; + final bool? isShowCircleAvatar; + final Color? color; + HomeController homeController = Get.find(); + AccountWidget( + {super.key, + required this.icon, + required this.title, + this.isShowCircleAvatar = true, + this.color}); + + @override + Widget build(BuildContext context) { + return Container( + margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), + width: Get.width, + height: Responsive.isTablet() ? 70 : 45, + child: Row( + children: [ + CircleAvatar( + radius: Responsive.isTablet() ? 20 : null, + backgroundColor: isShowCircleAvatar! + ? AppColors.circleAvatarColor + : Colors.transparent, + child: SvgPicture.asset("assets/icons/$icon"), + ).expanded(2), + if (Responsive.isTablet()) + const SizedBox( + width: 12, + ), + RegularTextWidget( + color: color, + title, + fontSize: Responsive.isTablet() ? 22 : 14, + ).expanded(7), + if (Responsive.isTablet()) Container().expanded(7), + isShowCircleAvatar! + ? Obx( + () => (!(homeController.isArabic.value) + ? SvgPicture.asset("assets/icons/arrow right.svg") + : SvgPicture.asset("assets/icons/arrow-left.svg")), + ).expanded(1) + : Container(), + ], + ), + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? Get.width * 0.15 : 0); + } +} diff --git a/lib/features/account/presentation_layer/widgets/add_images.dart b/lib/features/account/presentation_layer/widgets/add_images.dart new file mode 100644 index 0000000..3148009 --- /dev/null +++ b/lib/features/account/presentation_layer/widgets/add_images.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; + +import '../../../../common/const/const.dart'; + +class AddImagesWidget extends StatelessWidget { + const AddImagesWidget({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + alignment: Alignment.center, + margin: const EdgeInsets.only(bottom: 15, top: 7, right: 5), + width: Get.width * .32, + height: Get.height * .2, + decoration: BoxDecoration( + border: Border.all(color: AppColors.borderColor), + borderRadius: BorderRadius.circular(6), + ), + child: SizedBox( + width: 15, + height: 21, + child: SvgPicture.asset( + "assets/icons/plus.svg", + ), + ), + ); + } +} diff --git a/lib/features/auth/business_logic_layer/auth_controller.dart b/lib/features/auth/business_logic_layer/auth_controller.dart new file mode 100644 index 0000000..da65ef0 --- /dev/null +++ b/lib/features/auth/business_logic_layer/auth_controller.dart @@ -0,0 +1,301 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/forgot_password.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/login.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/login_response.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/register.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/reset_token.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/user.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/verification_code.dart'; +import 'package:taafee_mobile/features/auth/data_layer/source/auth_service.dart'; +import 'package:rx_future/rx_future.dart'; + +class AuthController extends GetxController { +//------------Data source + AuthService authService = AuthService(); + LocalStorage storage = LocalStorage(); + + //------------register-----------// + RegisterModel registerModel = RegisterModel.zero(); + + RxFuture registerModelState = RxFuture(null); + + Future register( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await registerModelState.observe((p0) async { + await authService.register(registerModel); + }, onSuccess: (value) { + verificationCodeModel.email = registerModel.email; + onSuccess?.call(value); + }, onError: onError); + } + + //--------------verification code------------------// + RxFuture verifyState = RxFuture(null); + VerificationCodeModel verificationCodeModel = VerificationCodeModel.zero(); + + Future verify( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await verifyState.observe( + (p0) async { + await authService.verify(verificationCodeModel); + }, + onSuccess: (value) async { + if (loginModel.email == '' || loginModel.password == '') { + loginModel.email = registerModel.email; + loginModel.password = registerModel.password; + } + + await login( + onSuccess: (p0) { + storage.saveIsGuest(false); + storage.saveUser(p0.user); + storage.saveToken(p0.token); + onSuccess?.call(value); + }, + ); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + //-----------------login---------------------// + + RxFuture loginState = RxFuture(LoginResponseModel.zero()); + + LoginModel loginModel = LoginModel.zero(); + + Future login( + {void Function(LoginResponseModel)? onSuccess, + void Function(Object)? onError}) async { + await loginState.observe( + (p0) async { + return await authService.login(loginModel); + }, + onSuccess: (value) async { + onSuccess?.call(value); + await storage.saveUser(value.user); + storage.saveToken(value.token); + storage.saveChatToken(value.chatToken); + storage.saveChatUserId(value.chatUserId); + isGuest = false.obs; + storage.saveIsGuest(false); + }, + onError: (error) { + if (error.toString() == "User is not verified") { + verificationCodeModel.email = loginModel.email; + } + onError?.call(error); + }, + ); + } + + ///---------logout--------/// + RxFuture logoutState = RxFuture(null); + + Future logout({void Function(void)? onSuccess}) async { + loginModel = LoginModel.zero(); + await logoutState.observe( + (p0) async { + await authService.logout(); + }, + onSuccess: (value) async { + isGuest = false.obs; + storage.saveIsGuest(false); + await storage.clearCache(); + onSuccess?.call(value); + }, + ); + } + + ///---------resend code----------------// + RxFuture resendCodeState = RxFuture(null); + Future resendCode(String email) async { + await resendCodeState.observe((p0) async { + await authService.resendCode(email); + }); + } + + ///----------forgot password---------// + ForgotPasswordModel forgotPasswordModel = ForgotPasswordModel.zero(); + + RxFuture forgotPasswordState = RxFuture(null); + Future forgotPassword( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await forgotPasswordState.observe( + (p0) async { + await authService.forgotPassword(forgotPasswordModel.email); + }, + onSuccess: (value) { + onSuccess?.call(value); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + ///------------verify forgot password-----------/// + RxFuture verifyForgotPasswordState = RxFuture(ResetToken.zero()); + + Future verifyForgotPassword( + {void Function(ResetToken)? onSuccess, + void Function(Object)? onError}) async { + await verifyForgotPasswordState.observe( + (p0) async { + return await authService.verifyForgotPassword( + forgotPasswordModel.email, forgotPasswordModel.code); + }, + onSuccess: (value) { + onSuccess?.call(value); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + ///------------change password----------/// + RxFuture changePasswordState = RxFuture(null); + + Future changePassword( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await changePasswordState.observe( + (p0) async { + await authService.changePassword( + verifyForgotPasswordState.result.resetToken, + forgotPasswordModel.password, + ); + }, + onSuccess: (p0) async { + loginModel.email = forgotPasswordModel.email; + loginModel.password = forgotPasswordModel.password; + await login( + onSuccess: (value) { + isGuest = false.obs; + storage.saveUser(value.user); + storage.saveToken(value.token); + onSuccess?.call(p0); + }, + ); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + ///--------delete account-----/// + RxFuture deleteAccountState = RxFuture(null); + String password = ''; + Future deleteAccount( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await deleteAccountState.observe( + (p0) async { + await authService.deleteAccount(password); + }, + onSuccess: (value) { + isGuest = true.obs; + onSuccess?.call(value); + storage.clearCache(); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + /// ------------- terminate other sessions ---------/// + RxFuture terminateOtherSessionsState = RxFuture(null); + Future terminateOtherSessions( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + terminateOtherSessionsState.observe((value) async { + return await authService.terminateOtherSessions(); + }, onSuccess: (value) { + onSuccess?.call(value); + }, onError: (err) { + onError?.call(err); + }); + } + + ///----------- obsecure password -------/// + + //register screen + RxBool registerPassowrdVisible = false.obs; + void toggleRegisterPassowrdVisibilty() { + registerPassowrdVisible.value = !registerPassowrdVisible.value; + registerPassowrdVisible.refresh(); + } + + RxBool registerConfirmPassowrdVisible = false.obs; + void toggleRegisterConfirmPassowrdVisibilty() { + registerConfirmPassowrdVisible.value = + !registerConfirmPassowrdVisible.value; + registerConfirmPassowrdVisible.refresh(); + } + + RxBool loginPasswordVisible = false.obs; + RxBool changePasswordNewPasswordVisible = false.obs; + RxBool changePasswordConfirmPasswordVisible = false.obs; + RxBool changePasswordOldPasswordVisible = false.obs; + RxBool resetPasswordNewPasswordVisible = false.obs; + RxBool resetPasswordConfirmPasswordVisible = false.obs; + void toggleLoginPasswordVisibility() { + loginPasswordVisible.value = !loginPasswordVisible.value; + loginPasswordVisible.refresh(); + } + + void toggleChangePasswordNewPasswordVisibility() { + changePasswordNewPasswordVisible.value = + !changePasswordNewPasswordVisible.value; + changePasswordNewPasswordVisible.refresh(); + } + + void toggleChangePasswordConfirmPasswordVisibility() { + changePasswordConfirmPasswordVisible.value = + !changePasswordConfirmPasswordVisible.value; + changePasswordConfirmPasswordVisible.refresh(); + } + + void toggleChangePasswordOldPasswordVisibility() { + changePasswordOldPasswordVisible.value = + !changePasswordOldPasswordVisible.value; + changePasswordOldPasswordVisible.refresh(); + } + + void toggleResetPasswordNewPasswordVisibility() { + resetPasswordNewPasswordVisible.value = + !resetPasswordNewPasswordVisible.value; + resetPasswordNewPasswordVisible.refresh(); + } + + void toggleResetPasswordConfirmPasswordVisibility() { + resetPasswordConfirmPasswordVisible.value = + !resetPasswordConfirmPasswordVisible.value; + resetPasswordConfirmPasswordVisible.refresh(); + } + + /// -------------guest--------------/// + RxBool isGuest = false.obs; + RxFuture guestState = RxFuture(''); + void guestSignIn({void Function(Object)? onError}) { + guestState.observe((p0) async { + return await authService.guest(); + }, onSuccess: (token) { + isGuest = true.obs; + storage.saveToken(token); + storage.saveIsGuest(true); + storage.saveUser(User( + id: 0, + firstName: 'guest', + lastName: '', + email: '', + chatUserId: 0, + avatarImage: null)); + RoutingManager.off(RouteName.superHome); + }, onError: onError); + } +} diff --git a/lib/features/auth/data_layer/model/forgot_password.dart b/lib/features/auth/data_layer/model/forgot_password.dart new file mode 100644 index 0000000..814ff5a --- /dev/null +++ b/lib/features/auth/data_layer/model/forgot_password.dart @@ -0,0 +1,13 @@ +class ForgotPasswordModel { + String email; + String code; + String password; + + ForgotPasswordModel({required this.email, required this.code, required this.password}); + + factory ForgotPasswordModel.zero() => ForgotPasswordModel( + email: "", + code: "", + password: "", + ); +} diff --git a/lib/features/auth/data_layer/model/login.dart b/lib/features/auth/data_layer/model/login.dart new file mode 100644 index 0000000..607fdcd --- /dev/null +++ b/lib/features/auth/data_layer/model/login.dart @@ -0,0 +1,12 @@ +class LoginModel { + String email; + String password; + LoginModel({required this.email, required this.password}); + + factory LoginModel.zero() => LoginModel(email: "", password: ""); + + Map toJson() => { + "email": email, + "password": password, + }; +} diff --git a/lib/features/auth/data_layer/model/login_response.dart b/lib/features/auth/data_layer/model/login_response.dart new file mode 100644 index 0000000..2784296 --- /dev/null +++ b/lib/features/auth/data_layer/model/login_response.dart @@ -0,0 +1,30 @@ +import 'package:taafee_mobile/features/auth/data_layer/model/user.dart'; + +class LoginResponseModel { + User user; + String token; + String chatToken; + int chatUserId; + + LoginResponseModel( + {required this.user, + required this.chatUserId, + required this.token, + required this.chatToken}); + factory LoginResponseModel.fromJson(Map json) => + LoginResponseModel( + user: User.fromJson(json["user"]), + token: json["token"], + chatToken: json["chat_token"], + chatUserId: json["user"]["chat_user_id"], + ); + factory LoginResponseModel.zero() => LoginResponseModel( + user: User.zero(), token: "", chatToken: "", chatUserId: 0); + + Map toJson() => { + "user": user.toJson(), + "token": token, + "chat_token": chatToken, + "chat_user_id": chatUserId, + }; +} diff --git a/lib/features/auth/data_layer/model/register.dart b/lib/features/auth/data_layer/model/register.dart new file mode 100644 index 0000000..1d7abf9 --- /dev/null +++ b/lib/features/auth/data_layer/model/register.dart @@ -0,0 +1,22 @@ +class RegisterModel { + String firstName; + String lastName; + String email; + String password; + + RegisterModel({required this.firstName, required this.lastName, required this.email, required this.password}); + + Map toJson() => { + "first_name": firstName, + "last_name": lastName, + "email": email, + "password": password, + }; + + factory RegisterModel.zero() => RegisterModel( + firstName: "", + lastName: "", + email: "", + password: "", + ); +} diff --git a/lib/features/auth/data_layer/model/reset_token.dart b/lib/features/auth/data_layer/model/reset_token.dart new file mode 100644 index 0000000..f1e1c97 --- /dev/null +++ b/lib/features/auth/data_layer/model/reset_token.dart @@ -0,0 +1,10 @@ +class ResetToken { + String resetToken; + ResetToken({required this.resetToken}); + + factory ResetToken.fromJson(Map json) => ResetToken( + resetToken: json["reset_token"], + ); + + factory ResetToken.zero() => ResetToken(resetToken: ""); +} diff --git a/lib/features/auth/data_layer/model/user.dart b/lib/features/auth/data_layer/model/user.dart new file mode 100644 index 0000000..796a4f6 --- /dev/null +++ b/lib/features/auth/data_layer/model/user.dart @@ -0,0 +1,43 @@ +class User { + int id; + String firstName; + String lastName; + String email; + int chatUserId; + String? avatarImage; + User({ + required this.id, + required this.firstName, + required this.lastName, + required this.email, + required this.avatarImage, + required this.chatUserId, + }); + + factory User.fromJson(Map json) => User( + id: json["id"], + firstName: json["first_name"], + lastName: json["last_name"], + email: json["email"], + avatarImage: json['avatar'], + chatUserId: json["chat_user_id"], + ); + + Map toJson() => { + "id": id, + "first_name": firstName, + "last_name": lastName, + "email": email, + "avatar": avatarImage, + "chat_user_id": chatUserId, + }; + + factory User.zero() => User( + id: 0, + firstName: "", + lastName: "", + email: "", + avatarImage: null, + chatUserId: 0, + ); +} diff --git a/lib/features/auth/data_layer/model/verification_code.dart b/lib/features/auth/data_layer/model/verification_code.dart new file mode 100644 index 0000000..1f39706 --- /dev/null +++ b/lib/features/auth/data_layer/model/verification_code.dart @@ -0,0 +1,11 @@ +class VerificationCodeModel { + String email; + String code; + VerificationCodeModel({ + required this.email, + required this.code, + }); + + Map toJson() => {"verify_code": code, "email": email}; + factory VerificationCodeModel.zero() => VerificationCodeModel(email: "", code: ""); +} diff --git a/lib/features/auth/data_layer/source/auth_service.dart b/lib/features/auth/data_layer/source/auth_service.dart new file mode 100644 index 0000000..7bcd489 --- /dev/null +++ b/lib/features/auth/data_layer/source/auth_service.dart @@ -0,0 +1,141 @@ +import 'package:taafee_mobile/core/apis/apis.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/login.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/login_response.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/register.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/reset_token.dart'; +import 'package:taafee_mobile/features/auth/data_layer/model/verification_code.dart'; + +import '../../../../core/network/http.dart'; +import '../model/user.dart'; + +class AuthService { + Future register(RegisterModel registerModel) async { + Request request = Request( + EndPoint.register, + RequestMethod.post, + body: registerModel.toJson(), + ); + // no need to use variable (response) + await request.sendRequest(); + } + + Future verify(VerificationCodeModel verificationCodeModel) async { + Request request = Request( + EndPoint.verificationCode, + RequestMethod.post, + body: verificationCodeModel.toJson(), + ); + + // no need to use variable (response) + + await request.sendRequest(); + } + + Future login(LoginModel loginModel) async { + Request request = Request( + EndPoint.login, + RequestMethod.post, + body: loginModel.toJson(), + ); + Map response = await request.sendRequest(); + return LoginResponseModel.fromJson(response["data"]); + } + + Future logout() async { + Request request = Request( + EndPoint.logout, + RequestMethod.get, + authorized: true, + ); + + // no need to use variable (response) + + await request.sendRequest(); + } + + Future resendCode(String email) async { + Request request = Request(EndPoint.resendCode, RequestMethod.post, + body: {"email": email}); + + // no need to use variable (response) + + await request.sendRequest(); + } + + Future forgotPassword(String email) async { + Request request = Request( + EndPoint.forgotPassword, + RequestMethod.post, + body: { + "email": email, + }, + ); + + // no need to use variable (response) + + await request.sendRequest(); + } + + Future verifyForgotPassword(String email, String code) async { + Request request = Request( + EndPoint.verifyForgotPassword, + RequestMethod.post, + body: { + "email": email, + "reset_code": code, + }, + ); + Map response = await request.sendRequest(); + + return ResetToken.fromJson(response); + } + + Future changePassword(String resetToken, String newPassword) async { + Request request = Request( + EndPoint.changePassword, + RequestMethod.post, + body: { + "reset_token": resetToken, + "new_password": newPassword, + }, + ); + + // no need to use variable (response) + + await request.sendRequest(); + } + + Future deleteAccount(String password) async { + Request request = Request(EndPoint.deleteAccount, RequestMethod.delete, + authorized: true, body: {"password": password}); + // no need to use variable (response) + await request.sendRequest(); + } + + ///----------------show user profile-------------/// + Future showUser({void Function(Object)? onConnectionError}) async { + Request request = Request(EndPoint.editAccount, RequestMethod.get, + authorized: true, + cacheable: true, + headers: { + 'Accept': 'application/json', + }); + Map response = + await request.sendRequest(onConnectionError: onConnectionError); + return User.fromJson(response['data']); + } + + ///---------------guest---------------------/// + Future guest() async { + Request request = Request(EndPoint.guest, RequestMethod.post); + Map response = await request.sendRequest(); + return response['token']; + } + + /// ------------- terminate other sessions --------/// + Future terminateOtherSessions() async { + Request request = + Request(EndPoint.terminate, RequestMethod.delete, authorized: true); + await request.sendRequest(); + } +} diff --git a/lib/features/auth/presentation_layer/screens/forgot_password.dart b/lib/features/auth/presentation_layer/screens/forgot_password.dart new file mode 100644 index 0000000..6f855e4 --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/forgot_password.dart @@ -0,0 +1,103 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/tail_auth.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +class ForgotPasswordScreen extends StatelessWidget { + final _formKey = GlobalKey(); + final AuthController authController = Get.find(); + final HomeController homeController = Get.find(); + ForgotPasswordScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Obx( + () => !homeController.isArabic.value + ? SvgPicture.asset('assets/icons/arrow-left.svg') + : SvgPicture.asset('assets/icons/arrow right.svg'), + ).onTap(() { + RoutingManager.back(); + }).paddingOnly(top: 16.0, left: 16.0, right: 16.0), + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().expanded(3), + Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget("forgot_password".tr), + TextFieldWidget( + onChange: (value) { + authController.forgotPasswordModel.email = value; + }, + keyboardType: TextInputType.emailAddress, + label: "email".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_email".tr; + } + return null; + }, + ).center().paddingSymmetric( + vertical: 20, + ), + RegularTextWidget( + 'enter_your_email_to_reset_your_password_please_\n_we_will_send_verification_code_to_your_email.' + .tr, + ), + Obx(() { + return ButtonWidget( + isLoading: authController.forgotPasswordState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + authController.forgotPassword( + onSuccess: (value) { + RoutingManager.to( + RouteName.verificationCodeResetPassword); + }, + onError: (error) { + if (error.toString() == "Unknown Error") { + Toast.showToast( + "the_selected_email_is_invalid".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + }, + ); + } + }, + title: "next".tr, + ).paddingOnly(top: 30, bottom: 10); + }), + ], + ).paddingSymmetric(horizontal: 20), + ).expanded(6), + const TailAuth().paddingSymmetric(horizontal: 20).expanded(2), + ], + ) + .paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0) + .paddingOnly(top: Responsive.isTablet() ? 20 : 0), + ).makeSafeArea(); + } +} diff --git a/lib/features/auth/presentation_layer/screens/login.dart b/lib/features/auth/presentation_layer/screens/login.dart new file mode 100644 index 0000000..7e51088 --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/login.dart @@ -0,0 +1,182 @@ +import 'dart:developer'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/tail_auth.dart'; + +class LoginScreen extends StatelessWidget { + final _formKey = GlobalKey(); + final AuthController authController = Get.find(); + LoginScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Obx(() { + return ButtonWidget( + loaderColor: AppColors.primeColor, + isLoading: authController.guestState.loading, + onTap: () { + authController.guestSignIn( + onError: (error) { + if (error.toString() == "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == "Unknown Error") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == "User is not verified") { + Toast.showToast("you_are_not_verified_yet".tr); + RoutingManager.offAll(RouteName.verificationCodePage); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast("you_have_no_internet_connection".tr); + } + log(error.toString()); + }, + ); + }, + title: 'skip'.tr, + width: Get.width * 0.35, + textColor: AppColors.textButtonColor, + color: Colors.transparent, + ); + }), + ], + ), + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().expanded(2), + Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + BoldTextWidget("sign_in".tr), + TextFieldWidget( + onChange: (value) { + authController.loginModel.email = value; + }, + keyboardType: TextInputType.emailAddress, + label: "email".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_email".tr; + } + return null; + }, + ).center().paddingSymmetric(vertical: 20), + Obx(() { + return TextFieldWidget( + onChange: (value) { + authController.loginModel.password = value; + }, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController.toggleLoginPasswordVisibility(); + }, + ), + obscure: !authController.loginPasswordVisible.value, + keyboardType: TextInputType.emailAddress, + label: "password".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return "password_is_short".tr; + } + return null; + }, + ).center(); + }), + Row( + children: [ + RegularTextWidget("${'forgot_password?'.tr} ", + fontSize: 14), + BoldTextWidget("reset_password".tr).onTap(() { + RoutingManager.to(RouteName.forgotPassword); + }), + ], + ), + Obx(() { + return ButtonWidget( + isLoading: authController.loginState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + authController.login( + onSuccess: (value) { + RoutingManager.offAll(RouteName.superHome); + }, + onError: (error) { + if (error.toString() == + "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == "Unknown Error") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == + "User is not verified") { + Toast.showToast( + "you_are_not_verified_yet".tr); + RoutingManager.offAll( + RouteName.verificationCodePage); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + log(error.toString()); + }, + ); + } + }, + title: "sign_in".tr) + .paddingOnly(top: 30, bottom: 10); + }), + Row( + children: [ + RegularTextWidget( + "${'you_don\'t_have_account?'.tr} ", + fontSize: 14, + ), + BoldTextWidget("sign_up".tr).onTap(() { + RoutingManager.off(RouteName.register); + }), + ], + ) + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 20), + ).expanded(6), + const TailAuth().expanded(2), + ], + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/auth/presentation_layer/screens/register.dart b/lib/features/auth/presentation_layer/screens/register.dart new file mode 100644 index 0000000..7fe014c --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/register.dart @@ -0,0 +1,263 @@ +import 'dart:developer'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/textfiled.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/tail_auth.dart'; + +import '../../../../core/routing/routing_manager.dart'; + +class RegisterScreen extends StatelessWidget { + final _formKey = GlobalKey(); + final AuthController authController = Get.find(); + RegisterScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: CustomScrollView( + slivers: [ + SliverFillRemaining( + hasScrollBody: false, + child: Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Obx(() { + return ButtonWidget( + loaderColor: AppColors.primeColor, + isLoading: authController.guestState.loading, + onTap: () { + authController.guestSignIn( + onError: (error) { + if (error.toString() == "invalid_credentials") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == "Unknown Error") { + Toast.showToast("invalid_credentials".tr); + } + if (error.toString() == + "User is not verified") { + Toast.showToast( + "you_are_not_verified_yet".tr); + RoutingManager.offAll( + RouteName.verificationCodePage); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + log(error.toString()); + }, + ); + }, + title: 'skip'.tr, + width: Get.width * 0.35, + textColor: AppColors.textButtonColor, + color: Colors.transparent, + ); + }), + ], + ), + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().paddingOnly(top: 20).expanded(1), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget( + "sign_up".tr, + ).paddingOnly(left: 4), + const SizedBox( + height: 16, + ), + TextFieldWidget( + onChange: (value) { + authController.registerModel.firstName = value; + }, + keyboardType: TextInputType.text, + label: "first_name".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_first_name".tr; + } + return null; + }, + ).center().paddingSymmetric( + vertical: 4, + ), + TextFieldWidget( + onChange: (value) { + authController.registerModel.lastName = value; + }, + keyboardType: TextInputType.text, + label: "last_name".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_last_name".tr; + } + return null; + }, + ).center().paddingSymmetric( + vertical: 4, + ), + TextFieldWidget( + onChange: (value) { + authController.registerModel.email = value; + }, + keyboardType: TextInputType.emailAddress, + label: "email".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_email".tr; + } + return null; + }, + ).center().paddingSymmetric( + vertical: 4, + ), + Obx(() { + return TextFieldWidget( + onChange: (value) { + authController.registerModel.password = value; + }, + keyboardType: TextInputType.text, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleRegisterPassowrdVisibilty(); + }, + ), + obscure: + !authController.registerPassowrdVisible.value, + label: "password".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return "password_is_short".tr; + } + return null; + }, + ).center().paddingSymmetric(vertical: 4); + }), + Obx(() { + return TextFieldWidget( + onChange: (value) {}, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleRegisterConfirmPassowrdVisibilty(); + }, + ), + obscure: !authController + .registerConfirmPassowrdVisible.value, + keyboardType: TextInputType.text, + label: "confirm_password".tr, + validate: (value) { + if (authController.registerModel.password != + value) { + return "password_did't_identical".tr; + } + return null; + }, + ).center().paddingSymmetric(vertical: 4); + }), + const SizedBox( + height: 22, + ), + Obx(() { + return ButtonWidget( + isLoading: + authController.registerModelState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + authController.register( + onSuccess: (value) { + RoutingManager.to( + RouteName.verificationCodePage); + }, + onError: (error) { + if (error.toString() == + "Unknown Error") { + Toast.showToast( + "email_is_already_exist".tr); + // RoutingManager.offAll(RouteName.login); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection" + .tr); + } + }, + ); + } + }, + title: "sign_up".tr) + .paddingOnly(bottom: 10); + }), + const SizedBox( + height: 8, + ), + Row( + children: [ + RegularTextWidget('you_have_account?'.tr, + fontSize: 14), + const SizedBox( + width: 8, + ), + BoldTextWidget( + "sign_in".tr, + decoration: TextDecoration.underline, + ).onTap(() { + RoutingManager.off(RouteName.login); + }), + ], + ).paddingOnly( + left: Responsive.isTablet() ? 12 : 8, + ) + ], + ) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 20) + .expanded(2), + ), + const SizedBox( + height: 60.0, + ), + SizedBox(height: 0.15 * Get.height, child: const TailAuth()), + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0), + ), + ), + ], + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/auth/presentation_layer/screens/reset_password.dart b/lib/features/auth/presentation_layer/screens/reset_password.dart new file mode 100644 index 0000000..2974620 --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/reset_password.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/button.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../common/widgets/textfiled.dart'; +import '../../../../common/widgets/toast.dart'; +import '../widgets/tail_auth.dart'; + +// ignore: must_be_immutable +class ResetPasswordScreen extends StatelessWidget { + AuthController authController = Get.find(); + final _formKey = GlobalKey(); + ResetPasswordScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().expanded(3), + Form( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget("reset_password".tr), + Obx(() { + return TextFieldWidget( + onChange: (value) { + authController.forgotPasswordModel.password = value; + }, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleResetPasswordNewPasswordVisibility(); + }, + ), + obscure: + !authController.resetPasswordNewPasswordVisible.value, + keyboardType: TextInputType.emailAddress, + label: "new_password".tr, + validate: (value) { + if (value == null || value.isEmpty) { + return "please_enter_the_password".tr; + } + if (value.length < 8) { + return "The_password_is_short".tr; + } + return null; + }, + ).center().paddingSymmetric(vertical: 20); + }), + Obx(() { + return TextFieldWidget( + onChange: (value) {}, + suffix: IconButton( + icon: const Icon( + Icons.remove_red_eye, + ), + onPressed: () { + authController + .toggleResetPasswordConfirmPasswordVisibility(); + }, + ), + obscure: !authController + .resetPasswordConfirmPasswordVisible.value, + keyboardType: TextInputType.emailAddress, + label: "confirm_password".tr, + validate: (value) { + if (value != + authController.forgotPasswordModel.password) { + return "password_did't_identical".tr; + } + return null; + }, + ).center(); + }), + Obx(() { + return ButtonWidget( + isLoading: authController.changePasswordState.loading, + onTap: () { + if (_formKey.currentState!.validate()) { + authController.changePassword( + onSuccess: (p0) { + Toast.showToast( + "password_changed_successfully".tr); + RoutingManager.offAll(RouteName.superHome); + }, + onError: (error) { + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + }, + ); + } + }, + title: "next".tr) + .paddingSymmetric(vertical: 40); + }), + ], + ).paddingSymmetric(horizontal: 20), + ).expanded(5), + const TailAuth().paddingSymmetric(horizontal: 20).expanded(2), + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0), + ); + } +} diff --git a/lib/features/auth/presentation_layer/screens/verification_code.dart b/lib/features/auth/presentation_layer/screens/verification_code.dart new file mode 100644 index 0000000..4800209 --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/verification_code.dart @@ -0,0 +1,125 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/p_input.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/tail_auth.dart'; + +class VerificationCodeScreen extends StatelessWidget { + final AuthController authController = Get.find(); + VerificationCodeScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + // resizeToAvoidBottomInset: false, + body: SingleChildScrollView( + child: SizedBox( + height: Get.height, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().expanded(3), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget("verification_code".tr), + PinPutWidget(onCompleted: (value) { + // if (value.length == 6) { + authController.verify( + onSuccess: (value) { + RoutingManager.offAll(RouteName.superHome); + }, + onError: (error) { + if (error.toString() == "Unknown Error") { + Toast.showToast("the_verify_code_is_invalid".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection".tr); + } + }, + ); + // } + }, onChanged: (value) { + authController.verificationCodeModel.code = value; + }).paddingSymmetric(vertical: 20), + Obx(() { + return ButtonWidget( + isLoading: authController.verifyState.loading, + onTap: () { + if (authController + .verificationCodeModel.code.isEmpty) { + Toast.showToast("please_enter_the_code".tr); + } else { + authController.verify( + onSuccess: (value) { + RoutingManager.offAll(RouteName.superHome); + }, + onError: (error) { + if (error.toString() == "Unknown Error") { + Toast.showToast( + "the_verify_code_is_invalid".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + "you_have_no_internet_connection"); + } + }, + ); + } + }, + title: "sign_up".tr, + ).paddingSymmetric(vertical: 30); + }), + Obx(() { + return authController.resendCodeState.loading + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + RegularTextWidget( + "resend_code".tr, + fontSize: 14, + ).center(), + const SizedBox( + width: 12, + ), + SizedBox( + width: 20, + height: 20, + child: const CircularProgressIndicator() + .center()), + ], + ) + : RegularTextWidget( + "resend_code".tr, + fontSize: 14, + ).center().onTap(() { + authController.resendCode( + authController.verificationCodeModel.email); + }); + }) + ], + ).paddingSymmetric(horizontal: 20), + ).expanded(5), + const TailAuth().paddingSymmetric(horizontal: 20).expanded(2), + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0), + ), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/auth/presentation_layer/screens/verification_code_reset_password.dart b/lib/features/auth/presentation_layer/screens/verification_code_reset_password.dart new file mode 100644 index 0000000..54bfa71 --- /dev/null +++ b/lib/features/auth/presentation_layer/screens/verification_code_reset_password.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/button.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../common/widgets/toast.dart'; +import '../widgets/p_input.dart'; +import '../widgets/tail_auth.dart'; + +class VerificationCodeResetPasswordScreen extends StatelessWidget { + final AuthController authController = Get.find(); + VerificationCodeResetPasswordScreen({super.key}); + final HomeController homeController = Get.find(); + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Obx( + () => !homeController.isArabic.value + ? SvgPicture.asset('assets/icons/arrow-left.svg') + : SvgPicture.asset('assets/icons/arrow right.svg'), + ).onTap(() { + RoutingManager.back(); + }).paddingOnly(top: 16.0, left: 16.0, right: 16.0), + SizedBox( + width: 120, + height: 63, + child: Image.asset(AppAssets.logo), + ).center().expanded(3), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget("verification_code".tr), + PinPutWidget(onCompleted: (value) { + authController.verifyForgotPassword( + onSuccess: (p0) { + RoutingManager.to(RouteName.resetPassword); + }, + onError: (error) { + if (error.toString() == "Unknown Error") { + Toast.showToast("the_verify_code_is_invalid"); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast('you_have_no_internet_connection'.tr); + } + }, + ); + }, onChanged: (value) { + authController.forgotPasswordModel.code = value; + }).paddingSymmetric(vertical: 30), + Obx(() { + return ButtonWidget( + isLoading: + authController.verifyForgotPasswordState.loading, + onTap: () { + if (authController + .forgotPasswordModel.code.isEmpty) { + Toast.showToast("please_enter_the_code".tr); + } else { + authController.verifyForgotPassword( + onSuccess: (p0) { + RoutingManager.to(RouteName.resetPassword); + }, + onError: (error) { + if (error.toString() == + "invalid_reset_code") { + Toast.showToast( + "the_verify_code_is_invalid".tr); + } + if (error.toString() == + "You Have no Internet Connection") { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + } + }, + ); + } + }, + title: "reset_password".tr) + .paddingSymmetric(vertical: 40); + }), + Obx(() { + return authController.resendCodeState.loading + ? Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + RegularTextWidget( + "resend_code".tr, + fontSize: 14, + ).center(), + const SizedBox( + width: 12, + ), + SizedBox( + width: 20, + height: 20, + child: + const CircularProgressIndicator().center()), + ], + ) + : RegularTextWidget( + "resend_code".tr, + fontSize: 14, + ).center().onTap(() { + authController.resendCode( + authController.forgotPasswordModel.email); + }); + }) + ], + ).paddingSymmetric(horizontal: 20), + ).expanded(5), + const TailAuth().paddingSymmetric(horizontal: 20).expanded(2), + ], + ) + .paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0) + .makeSafeArea(), + ); + } +} diff --git a/lib/features/auth/presentation_layer/widgets/p_input.dart b/lib/features/auth/presentation_layer/widgets/p_input.dart new file mode 100644 index 0000000..fd305a8 --- /dev/null +++ b/lib/features/auth/presentation_layer/widgets/p_input.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:pinput/pinput.dart'; + +class PinPutWidget extends StatelessWidget { + final void Function(String)? onCompleted; + final void Function(String)? onChanged; + + const PinPutWidget({ + super.key, + required this.onCompleted, + required this.onChanged, + }); + + @override + Widget build(BuildContext context) { + final defaultPinTheme = PinTheme( + width: 50, + height: 50, + textStyle: const TextStyle( + fontSize: 20, + color: Color.fromRGBO(30, 60, 87, 1), + fontWeight: FontWeight.w600, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: Colors.white, + border: Border.all( + color: Colors.grey.withOpacity(0.7), + ), + ), + ); + return Pinput( + onCompleted: onCompleted, + onChanged: onChanged, + defaultPinTheme: defaultPinTheme, + length: 6, + separatorBuilder: (index) => const Padding( + padding: EdgeInsets.only(left: 5, right: 5), + ), + ); + } +} diff --git a/lib/features/auth/presentation_layer/widgets/tail_auth.dart b/lib/features/auth/presentation_layer/widgets/tail_auth.dart new file mode 100644 index 0000000..cd690b0 --- /dev/null +++ b/lib/features/auth/presentation_layer/widgets/tail_auth.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; + +class TailAuth extends StatelessWidget { + const TailAuth({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + height: Responsive.isTablet() ? 400 : 200, + decoration: BoxDecoration( + color: AppColors.secondaryColor.withOpacity(0.5), + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + ), + ), + ).paddingSymmetric(horizontal: 30); + } +} diff --git a/lib/features/card/business_logic_layer/card_controller.dart b/lib/features/card/business_logic_layer/card_controller.dart new file mode 100644 index 0000000..dd4b330 --- /dev/null +++ b/lib/features/card/business_logic_layer/card_controller.dart @@ -0,0 +1,238 @@ +import 'dart:io'; +import 'dart:math'; +import 'dart:typed_data'; +import 'package:image_gallery_saver/image_gallery_saver.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/add_card.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_images.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/edit_card.dart'; +import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart'; +import 'package:rx_future/rx_future.dart'; + +import '../../../core/utils/pagination_list.dart'; + +class CardController extends GetxController { +//---------------data source-----------// + CardService cardService = CardService(); +//----------- model-----------// + Rx cardModel = AddCardModel.zero().obs; + +//-------------add card-------------// + + RxFuture addCardState = RxFuture(null); + void addImagesToList(File file) { + cardModel.update((val) { + val!.images?.add(file); + }); + } + + Future addCard( + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await addCardState.observe( + (p0) async { + await cardService.addCard(cardModel.value); + }, + onSuccess: (value) { + onSuccess?.call(value); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + +//-------------get cards-----------// + RxFuture> cardState = + RxFuture(Pagination.zero()); + + Future getCards({void Function(Object e)? onConnectionError}) async { + await cardState.observe((value) async { + await value?.nextPage((currentPage) async { + List cards = await cardService.getCards( + page: currentPage, onConnectionError: onConnectionError); + if (cards.isEmpty) return []; + + return cards; + }); + return value!; + // return await cardService.getCards(); + }, onSuccess: (value) {}); + } + + RxFuture favoriteState = RxFuture(null); + Future toggleFavorite(int id, bool removeFromFavorite, + {void Function(void)? onSuccess}) async { + List temp = cardState.result.data; + for (int i = 0; i < temp.length; i++) { + if (temp[i].id == id) { + temp[i].isFav = !cardState.result.data[i].isFav; + + break; + } + } + cardState.update((val) { + val!.value = Pagination(data: temp); + }); + cardState.refresh(); + // cardState.result.data.firstWhere((element) => element.id == id).isFav = + // !removeFromFavorite; + + update(); + await favoriteState.observe((p0) async { + removeFromFavorite + ? await cardService.removeFromFavorite(id) + : await cardService.addToFavorite(id); + }, onSuccess: onSuccess); + } + + ///-------------my cards------------/// + RxFuture> myCardState = RxFuture(Pagination.zero()); + + Future getMyCards(int userId, + {void Function(Object)? onConnectionError}) async { + myCardState.result.clear(); + await myCardState.observe((value) async { + await value?.nextPage((currentPage) async { + List cards = await cardService.getMyCards(userId, + page: currentPage, onConnectionError: onConnectionError); + if (cards.isEmpty) return []; + return cards; + }); + return value!; + + // return await cardService.getMyCards(userId); + }); + } + + //--------edit card--------// + + Rx editCardModel = EditCardModel.zero().obs; + RxFuture editCardState = RxFuture(null); + + Future editCard(int cardId, + {void Function(void)? onSuccess, void Function(Object)? onError}) async { + await editCardState.observe( + (p0) async { + await cardService.editCard(cardId, editCardModel.value); + }, + onSuccess: (value) { + onSuccess?.call(value); + }, + onError: (error) { + onError?.call(error); + }, + ); + } + + /// add images to card /// + RxFuture addImagesState = RxFuture(null); + void editingAddImagesToList(File file) { + editCardModel.value.images!.add(file); + cardModel.update((val) { + val!.images?.add(file); + }); + cardModel.refresh(); + } + + Future uploadImages({void Function(void)? onSuccess}) async { + await addImagesState.observe( + (p0) async { + await cardService.addImagesToCard(editCardModel.value); + }, + onSuccess: onSuccess, + ); + } + + /// ------------delete image from card--------/// + RxList cardModelNetworkImages = [].obs; + RxFuture deleteImageState = RxFuture(null); + RxFuture> networkImagesState = RxFuture([]); + void changeNetworkImages(List cardImages) { + cardModelNetworkImages.value = cardImages; + cardModelNetworkImages.refresh(); + cardModelNetworkImages; + } + + Future updateNetworkImages(int cardId) async { + networkImagesState.observe( + (p0) async { + return cardModelNetworkImages.value = + await cardService.getCardImages(cardId); + }, + onSuccess: (cardImages) { + cardModelNetworkImages.refresh(); + }, + ); + } + + void removeImageFromNewCard(int index) { + cardModel.value.images!.removeAt(index); + cardModel.refresh(); + } + + void deleteImage(int imageId, + {void Function(void)? onSuccess, required int cardId}) async { + if (!addImagesState.loading) { + deleteImageState.observe( + (p0) async { + return await cardService.deleteImage(imageId); + }, + onSuccess: (value) async { + await updateNetworkImages(cardId); + }, + ); + } + } + + /// ------------delete card -----------/// + RxFuture deleteCardState = RxFuture(null); + Future deleteCard(int cardId, {void Function(void)? onSuccess}) async { + deleteCardState.observe( + (value) async { + return await cardService.deleteCard(cardId); + }, + onSuccess: onSuccess, + ); + } + + /// --------- gallery view network images -----/// + List cardNetworkImagesUrls = [].obs; + void updateCardNetworkImageUrls(List cardImages) { + cardNetworkImagesUrls.clear(); + cardImages.forEach((element) { + cardNetworkImagesUrls.add(Domain.domain + element.url.substring(6)); + }); + } + + Rx pageController = PageController().obs; + int imageIndex = 0; + void pageControllerInitialValue(int index) { + pageController.value = PageController(initialPage: index); + pageController.refresh(); + } + + void changeImageIndex(int newIndex) { + imageIndex = newIndex; + } + + /// --------- save images to gallery ------/// + final Random random = Random(); + + RxFuture saveCardState = RxFuture(null); + saveNetworkImage(String imageUrl, + {void Function(Object)? onError, void Function(void)? onSuccess}) async { + saveCardState.observe((p0) async { + Uint8List image = await cardService.downloadImage(imageUrl); + await ImageGallerySaver.saveImage( + image, + quality: 60, + name: "yellow pages image ${random.nextInt(500)}", + ); + }, onError: (e) { + onError?.call(e); + }, onSuccess: onSuccess); + } +} diff --git a/lib/features/card/data_layer/model/add_card.dart b/lib/features/card/data_layer/model/add_card.dart new file mode 100644 index 0000000..453283d --- /dev/null +++ b/lib/features/card/data_layer/model/add_card.dart @@ -0,0 +1,55 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; + +class AddCardModel { + String name; + int categoryId; + int cityId; + String phoneNumber; + String? address; + String? postalCode; + String webSite; + String service; + String additionalData; + List? images; + + AddCardModel( + {required this.name, + required this.categoryId, + required this.cityId, + required this.phoneNumber, + this.address, + this.postalCode, + required this.webSite, + required this.service, + required this.additionalData, + this.images}); + + Map toJson() { + Map result = { + "name": name, + "city_id": cityId, + "category_id": categoryId, + "phone_number1": phoneNumber, + "website": webSite, + "services": service, + "additional_data": additionalData, + }; + if (address != null && postalCode != " ") { + result["address"] = address; + } + if (postalCode != null && postalCode != " ") { + result["postal_code"] = postalCode; + } + if (images != null && images != []) { + for (int i = 0; i < images!.length; i++) { + result["images[${i + 1}]"] = MultipartFile.fromFileSync(images![i].path); + } + } + return result; + } + + factory AddCardModel.zero() => AddCardModel( + name: "", categoryId: 0, cityId: 0, phoneNumber: "", webSite: "", service: "", additionalData: "", images: []); +} diff --git a/lib/features/card/data_layer/model/card_images.dart b/lib/features/card/data_layer/model/card_images.dart new file mode 100644 index 0000000..3580e57 --- /dev/null +++ b/lib/features/card/data_layer/model/card_images.dart @@ -0,0 +1,28 @@ +class CardImages { + int id; + String url; + int cardId; + + CardImages({ + required this.id, + required this.url, + required this.cardId, + }); + + factory CardImages.fromJson(Map json) => CardImages( + id: json["id"], + url: json["url"], + cardId: json["card_id"], + ); + + static List fromJsonList(Map json) { + List images = []; + + json["card_images"].forEach( + (element) => images.add( + CardImages.fromJson(element), + ), + ); + return images; + } +} diff --git a/lib/features/card/data_layer/model/card_model.dart b/lib/features/card/data_layer/model/card_model.dart new file mode 100644 index 0000000..5d3d81a --- /dev/null +++ b/lib/features/card/data_layer/model/card_model.dart @@ -0,0 +1,62 @@ +import 'package:taafee_mobile/features/home/data_layer/model/city.dart'; + +import 'card_images.dart'; +import '../../../auth/data_layer/model/user.dart'; + +class CardModel { + int id; + String name; + CityModel cityModel; + String? address; + String? postalCode; + String phoneNumber; + String services; + int categoryId; + User user; + String website; + String additionalData; + List cardImages; + bool isFav; + + CardModel( + {required this.id, + required this.name, + required this.cityModel, + this.address, + this.postalCode, + required this.phoneNumber, + required this.services, + required this.categoryId, + required this.user, + required this.website, + required this.additionalData, + required this.cardImages, + required this.isFav}); + + factory CardModel.fromJson(Map json) => CardModel( + id: json["id"], + name: json["name"], + cityModel: CityModel.fromJson(json["city"]), + address: json["address"], + postalCode: json["postal_code"], + phoneNumber: json["phone_number1"], + services: json["services"], + categoryId: json["category_id"] ?? json['category']['id'], + user: User.fromJson(json["user"]), + website: json["website"], + additionalData: json["additional_data"], + cardImages: CardImages.fromJsonList(json), + isFav: json["isFav"] == 1 ? true : false); + + static List fromJsonList(Map json) { + List cards = []; + + // ignore: avoid_function_literals_in_foreach_calls + json["data"].forEach( + (element) => cards.add( + CardModel.fromJson(element), + ), + ); + return cards; + } +} diff --git a/lib/features/card/data_layer/model/edit_card.dart b/lib/features/card/data_layer/model/edit_card.dart new file mode 100644 index 0000000..4897332 --- /dev/null +++ b/lib/features/card/data_layer/model/edit_card.dart @@ -0,0 +1,86 @@ +import 'dart:io'; + +import 'package:dio/dio.dart'; + +class EditCardModel { + String? name; + int? categoryId; + int? cityId; + int? cardId; + String? phoneNumber; + String? address; + String? postalCode; + String? webSite; + String? service; + String? additionalData; + List? images; + + EditCardModel( + {this.name, + this.categoryId, + this.cityId, + this.phoneNumber, + this.address, + this.postalCode, + this.webSite, + this.service, + this.additionalData, + this.images}); + + Map toJson() { + Map result = { + // "name": name, + // "city_id": cityId, + // "category_id": categoryId, + // "phone_number1": phoneNumber, + // "website": webSite, + // "services": service, + // "additional_data": additionalData, + }; + if (name != null && name != "") { + result["name"] = name; + } + if (cityId != null && cityId != 0) { + result["city_id"] = cityId; + } + if (categoryId != null && categoryId != 0) { + result["category_id"] = categoryId; + } + if (phoneNumber != null && phoneNumber != "") { + result["phone_number1"] = phoneNumber; + } + if (webSite != null && webSite != "") { + result["website"] = webSite; + } + if (service != null && service != "") { + result["services"] = service; + } + if (additionalData != null && additionalData != "") { + result["additional_data"] = additionalData; + } + if (address != null && postalCode != " ") { + result["address"] = address; + } + if (postalCode != null && postalCode != " ") { + result["postal_code"] = postalCode; + } + + return result; + } + + Map imagesAddingData() { + Map imagesAddingMap = { + 'card_id': cardId, + }; + + if (images != null) { + for (int i = 0; i < images!.length; i++) { + imagesAddingMap["images[${i + 1}]"] = + MultipartFile.fromFileSync(images![i].path); + } + } + return imagesAddingMap; + } + + factory EditCardModel.zero() => EditCardModel(); +} diff --git a/lib/features/card/data_layer/source/card_service.dart b/lib/features/card/data_layer/source/card_service.dart new file mode 100644 index 0000000..e0b8114 --- /dev/null +++ b/lib/features/card/data_layer/source/card_service.dart @@ -0,0 +1,151 @@ +import 'dart:typed_data'; + +import 'package:dio/dio.dart'; + +import 'package:taafee_mobile/core/apis/apis.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; + +import 'package:taafee_mobile/core/network/http.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/add_card.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_images.dart'; + +import '../model/card_model.dart'; +import '../model/edit_card.dart'; + +class CardService { + LocalStorage localStorage = LocalStorage(); + Future addCard(AddCardModel addCardModel) async { + Request request = Request(EndPoint.card, RequestMethod.post, + body: addCardModel.toJson(), isFormData: true, authorized: true); + //no need to use variable + await request.sendRequest(); + } + + Future> getCards( + {int? page, + int? categoryId, + void Function(Object)? onConnectionError}) async { + Request request = Request(EndPoint.card, RequestMethod.get, + authorized: true, + cacheable: true, + queryParams: { + "page": page, + if (categoryId != null) 'category_id': categoryId + }); + + Map response = + await request.sendRequest(onConnectionError: onConnectionError); + + return CardModel.fromJsonList(response); + } + + Future showCard({required int cardId}) async { + Request request = Request('${EndPoint.card}/$cardId', RequestMethod.get, + authorized: true); + Map response = await request.sendRequest(); + return CardModel.fromJson(response['data']); + } + + Future addToFavorite(int id) async { + Request request = Request( + EndPoint.addToFavorite, + RequestMethod.post, + authorized: true, + body: { + "card_id": id, + }, + ); + //no need to use variable + + await request.sendRequest(); + } + + Future removeFromFavorite(int id) async { + Request request = Request( + EndPoint.removeFromFavorite(id), + RequestMethod.delete, + authorized: true, + ); + //no need to use variable + + await request.sendRequest(); + } + + Future> getMyCards(int userId, + {int? page, void Function(Object)? onConnectionError}) async { + Request request = Request(EndPoint.card, RequestMethod.get, + cacheable: true, + authorized: true, + queryParams: {"user_id": userId, 'page': page}); + + Map response = + await request.sendRequest(onConnectionError: onConnectionError); + + return CardModel.fromJsonList(response); + } + + Future editCard(int cardId, EditCardModel editCardModel) async { + Request request = Request( + EndPoint.editCard(cardId), + RequestMethod.put, + body: editCardModel.toJson(), + authorized: true, + ); + await request.sendRequest(); + } + + /// -------------add images------------ /// + Future addImagesToCard(EditCardModel editCardModel) async { + Request request = Request( + EndPoint.editCardImages, + RequestMethod.post, + authorized: true, + body: editCardModel.imagesAddingData(), + isFormData: true, + ); + await request.sendRequest(); + } + + /// ----------delete image --------------/// + Future deleteImage(int imageId) async { + Request request = Request( + EndPoint.deleteCardImage(imageId), + RequestMethod.delete, + authorized: true, + ); + await request.sendRequest(); + } + + Future> getCardImages(int cardId) async { + Request request = Request( + EndPoint.editCard(cardId), + RequestMethod.get, + authorized: true, + ); + Map response = await request.sendRequest(); + + return CardImages.fromJsonList(response['data']); + } + + /// ------------delete card ------------/// + Future deleteCard(int cardId) async { + Request request = Request( + EndPoint.editCard(cardId), + RequestMethod.delete, + authorized: true, + ); + await request.sendRequest(); + } + + ///----------- save images to gallery -------/// + Future downloadImage(String imageUrl) async { + var response = await Dio().get(imageUrl, + options: Options( + responseType: ResponseType.bytes, + headers: { + "Authorization": localStorage.getChatToken(), + }, + )); + return Uint8List.fromList(response.data); + } +} diff --git a/lib/features/card/presentation_layer/screens/card_details.dart b/lib/features/card/presentation_layer/screens/card_details.dart new file mode 100644 index 0000000..b60e49a --- /dev/null +++ b/lib/features/card/presentation_layer/screens/card_details.dart @@ -0,0 +1,298 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_details.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_service.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/toast.dart'; +import '../../../../core/url launcher/url_launcher_service.dart'; +import '../../../home/business_logic_layer/home_controller.dart'; +import '../../data_layer/model/card_model.dart'; +import '../widgets/card_email.dart'; +import '../widgets/card_header.dart'; +import '../widgets/card_image.dart'; +import '../widgets/card_information.dart'; +import '../widgets/card_location.dart'; + +class CardDetailsScreen extends StatelessWidget { + final CardModel cardModel = Get.arguments; + CardDetailsScreen({super.key}); + final CardController cardController = Get.find(); + final HomeController homeController = Get.find(); + final ChatController chatController = Get.find(); + @override + Widget build(BuildContext context) { + cardController.updateCardNetworkImageUrls(cardModel.cardImages); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + children: [ + if (Responsive.isTablet()) + const SizedBox( + height: 30, + ), + HeaderScreen( + "page_details".tr, + additionalOnTap: () { + cardController.cardState.result.clear(); + cardController.getCards(); + }, + ) + .paddingOnly(top: 30, bottom: 30) + .paddingSymmetric(horizontal: Responsive.isTablet() ? 20 : 20), + if (Responsive.isTablet()) + const SizedBox( + height: 20, + ), + Container( + width: Get.width * .89, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: Colors.white, + ), + child: Column( + crossAxisAlignment: Responsive.isTablet() + ? CrossAxisAlignment.start + : CrossAxisAlignment.center, + children: [ + CardHeaderWidget( + cardModel: cardModel, + isFromDetailsScreen: true, + ), + CardInformation(cardModel: cardModel) + .paddingSymmetric( + horizontal: Responsive.isTablet() ? 0 : 5, vertical: 5) + // .paddingOnly( + // left: Responsive.isTablet() ? 8 : 0, + // ) + .paddingOnly( + left: homeController.isArabic.value ? 0 : 3, + right: homeController.isArabic.value ? 3 : 0, + ), + const SizedBox( + height: 8, + ), + CardEmailWidget( + cardModel: cardModel, + ).paddingSymmetric( + horizontal: 7, + ), + const SizedBox( + height: 8, + ), + CardLocationWidget( + cardModel: cardModel, + ).paddingSymmetric( + horizontal: 5, + vertical: 5, + ), + CardServiceWidget( + cardModel: cardModel, + maxLines: 4, + width: Get.width * 0.69, + ) + .paddingSymmetric( + horizontal: 5, + vertical: 5, + ) + .paddingOnly( + left: homeController.isArabic.value ? 0 : 8, + right: homeController.isArabic.value ? 8 : 0, + ) + .align( + alignment: homeController.isArabic.value + ? Alignment.centerRight + : Alignment.centerLeft), + CardDetailsWidget( + cardModel: cardModel, + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 0 : 15), + if (cardModel.cardImages.isEmpty) + const SizedBox( + height: 8, + ), + if (cardModel.cardImages.isNotEmpty) + Divider( + color: AppColors.dividerColor, + thickness: 1, + ).paddingSymmetric(horizontal: 15), + if (cardModel.cardImages.isNotEmpty) + MediumTextWidget( + "images".tr, + textAlign: TextAlign.left, + ).paddingSymmetric(horizontal: 15).align( + alignment: homeController.isArabic.value + ? Alignment.centerRight + : Alignment.centerLeft), + if (cardModel.cardImages.isNotEmpty) + if (Responsive.isTablet()) + Row( + children: [ + CardImageWidget( + width: Get.width * 0.4, + height: Get.width * 0.4, + cardImages: cardModel.cardImages[0], + ).onTap(() { + cardController.changeImageIndex(0); + cardController.pageControllerInitialValue(0); + RoutingManager.to(RouteName.imagesGalleryView, + arguments: cardController.cardNetworkImagesUrls); + }), + if (cardModel.cardImages.length > 1) + SizedBox( + width: Get.width * 0.4, + height: Get.width * 0.4, + child: GridView.builder( + physics: const NeverScrollableScrollPhysics(), + itemCount: cardModel.cardImages.length - 1, + shrinkWrap: true, + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: Responsive.isTablet() ? 2 : 3, + childAspectRatio: + Responsive.isTablet() ? 1 : 1.5, + ), + itemBuilder: (BuildContext context, index) { + return CardImageWidget( + cardImages: cardModel.cardImages[index + 1], + ).onTap(() { + cardController.changeImageIndex(index + 1); + cardController + .pageControllerInitialValue(index + 1); + RoutingManager.to(RouteName.imagesGalleryView, + arguments: + cardController.cardNetworkImagesUrls); + }); + }, + ), + ), + ], + ).paddingOnly(bottom: 20), + if (!Responsive.isTablet()) + GridView.builder( + physics: const NeverScrollableScrollPhysics(), + itemCount: cardModel.cardImages.length, + shrinkWrap: true, + gridDelegate: + const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + childAspectRatio: 1.5, + ), + itemBuilder: (BuildContext context, index) { + return CardImageWidget( + cardImages: cardModel.cardImages[index], + ).onTap(() { + cardController.changeImageIndex(index); + cardController.pageControllerInitialValue(index); + RoutingManager.to(RouteName.imagesGalleryView, + arguments: cardController.cardNetworkImagesUrls); + }); + }, + ) + ], + ), + ), + Row( + children: [ + ButtonWidget( + color: AppColors.callColor, + haveIcon: true, + onTap: () async { + await UrlLauncherService.makePhoneCall(cardModel.phoneNumber); + }, + title: "call_owner".tr, + textColor: Colors.white, + child: SvgPicture.asset( + "assets/icons/phone.svg", + colorFilter: + const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ), + ) + .paddingSymmetric(horizontal: 10) + .expanded(Responsive.isTablet() ? 1 : 5), + ButtonWidget( + color: AppColors.emailColor, + haveIcon: true, + onTap: () async { + await UrlLauncherService.sendEmail(cardModel.user.email); + }, + title: "email".tr, + textColor: Colors.white, + child: SvgPicture.asset("assets/icons/Email.svg"), + ) + .paddingSymmetric(horizontal: 10) + .expanded(Responsive.isTablet() ? 1 : 5), + if (Responsive.isTablet()) + Visibility( + visible: + chatController.chatUser.id != cardModel.user.chatUserId, + child: Obx(() { + return ButtonWidget( + isLoading: chatController.createRoomState.loading, + textColor: Colors.white, + color: AppColors.messageColor, + haveIcon: true, + onTap: () { + if (chatController.connectionState.value == + SocketConnectionState.connected) { + chatController.createRoom( + chatUserId: cardModel.user.chatUserId, + onSuccess: (room) { + RoutingManager.to(RouteName.chatDetails); + }); + } else { + Toast.showToast( + 'you_have_no_internet_connection.'.tr); + } + }, + title: "start_conversation".tr, + child: SvgPicture.asset("assets/icons/message.svg"), + ).expanded(2); + }), + ), + ], + ).paddingSymmetric( + vertical: Responsive.isTablet() ? 20 : 10, + horizontal: Responsive.isTablet() ? 40 : 10), + if (!Responsive.isTablet()) + Visibility( + visible: chatController.chatUser.id != cardModel.user.chatUserId, + child: Obx(() { + return ButtonWidget( + isLoading: chatController.createRoomState.loading, + textColor: Colors.white, + color: AppColors.messageColor, + haveIcon: true, + onTap: () { + if (chatController.connectionState.value == + SocketConnectionState.connected) { + chatController.createRoom( + chatUserId: cardModel.user.chatUserId, + onSuccess: (room) { + RoutingManager.to(RouteName.chatDetails, + arguments: room); + }); + } else { + Toast.showToast('you_have_no_internet_connection'.tr); + } + }, + title: "start_conversation".tr, + child: SvgPicture.asset("assets/icons/message.svg"), + ); + }), + ), + const SizedBox( + height: 60, + ) + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 20 : 0)), + ).makeSafeArea(); + } +} diff --git a/lib/features/card/presentation_layer/screens/images_gallery_view.dart b/lib/features/card/presentation_layer/screens/images_gallery_view.dart new file mode 100644 index 0000000..9da895b --- /dev/null +++ b/lib/features/card/presentation_layer/screens/images_gallery_view.dart @@ -0,0 +1,169 @@ +import 'dart:io'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/header_screen.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:photo_view/photo_view_gallery.dart'; +import 'package:smooth_page_indicator/smooth_page_indicator.dart'; + +import '../../../../core/local_storage/local_storage.dart'; + +class ImagesGalleryView extends StatelessWidget { + ImagesGalleryView({super.key}); + final Key galleryViewKey = const Key('gallery'); + var image = Get.arguments; + List? imagesUrls; + File? imageFile; + ImageProvider? imageProvider; + final CardController cardController = Get.find(); + @override + Widget build(BuildContext context) { + if (image is List) { + imagesUrls = image; + } else if (image is File) { + imageFile = image; + } else if (image is ImageProvider) { + imageProvider = image; + } + return Scaffold( + backgroundColor: Colors.black, + body: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + HeaderScreen( + 'card_images'.tr, + textColor: Colors.white, + iconColor: Colors.white, + ), + SizedBox( + width: 20, + height: 20, + child: SvgPicture.asset( + "assets/icons/option.svg", + width: Responsive.isTablet() ? 8 : 4, + colorFilter: + const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ).onTap(() { + Get.bottomSheet( + Container( + decoration: BoxDecoration( + color: Colors.grey[850], + ), + child: SingleChildScrollView( + child: Column( + children: [ + Obx(() { + return Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Icon( + Icons.vrpano, + color: Colors.white, + size: 24, + ), + const SizedBox( + width: 20, + ), + MediumTextWidget( + 'save_to_gallery'.tr, + color: Colors.white, + fontSize: Responsive.isTablet() ? 20 : 16, + ), + const SizedBox( + width: 20, + ), + if (cardController.saveCardState.loading) + const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + color: Colors.white, + ), + ), + ], + ).paddingOnly(left: 8, right: 8).onTap(() { + if (!cardController.saveCardState.loading && + imagesUrls != null) { + cardController.saveNetworkImage( + imagesUrls![cardController.imageIndex], + onError: (e) { + Toast.showToast('failed_to_save'.tr); + }, onSuccess: (value) { + RoutingManager.back(); + Toast.showToast( + 'photo_has_been_saved_successfully'.tr); + }); + } + }); + }) + .paddingSymmetric(horizontal: 8) + .paddingOnly(top: 18, bottom: 18), + ], + ), + ), + ), + ); + }), + ), + ], + ).paddingOnly(left: 20, bottom: 20, right: 20, top: 20), + SizedBox( + height: Get.height * 0.8, + child: PhotoViewGallery.builder( + onPageChanged: (index) { + cardController.changeImageIndex(index); + }, + pageController: cardController.pageController.value, + itemCount: (imagesUrls != null) ? imagesUrls!.length : 1, + builder: (context, index) { + return (imagesUrls != null) + ? PhotoViewGalleryPageOptions( + imageProvider: CachedNetworkImageProvider( + imagesUrls![index], + headers: { + "Authorization": + LocalStorage().getChatToken() ?? "", + }, + ), + ) + : ((imageFile != null) + ? PhotoViewGalleryPageOptions( + imageProvider: FileImage(imageFile!), + ) + : PhotoViewGalleryPageOptions( + imageProvider: imageProvider, + )); + }, + ), + ), + const SizedBox( + height: 20, + ), + if (imagesUrls != null) + SmoothPageIndicator( + count: imagesUrls!.length, + controller: cardController.pageController.value, + effect: ExpandingDotsEffect( + dotColor: Colors.grey, + dotHeight: 10, + dotWidth: 10, + spacing: 5, + expansionFactor: 2, + activeDotColor: AppColors.primeColor, + ), + ), + ], + ).makeSafeArea(), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card.dart b/lib/features/card/presentation_layer/widgets/card.dart new file mode 100644 index 0000000..6f78597 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card.dart @@ -0,0 +1,76 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_information.dart'; + +import 'card_header.dart'; +import 'card_location.dart'; +import 'card_service.dart'; + +class CardWidget extends StatelessWidget { + final CardModel cardModel; + const CardWidget( + this.cardModel, { + super.key, + }); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: Get.width, + height: 175, + child: Container( + margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + height: 150, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CardHeaderWidget( + cardModel: cardModel, + ), + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + height: 125, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CardInformation( + cardModel: cardModel, + ).paddingOnly( + left: Responsive.isTablet() ? 8 : 4, + ), + CardLocationWidget( + cardModel: cardModel, + ), + Divider( + color: AppColors.dividerColor, + thickness: 1, + ).paddingSymmetric(horizontal: 18), + CardServiceWidget( + cardModel: cardModel, + ).paddingOnly( + left: Responsive.isTablet() ? 8 : 8, + ), + ], + ), + ), + ], + ).onTap(() { + RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + }), + ), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_details.dart b/lib/features/card/presentation_layer/widgets/card_details.dart new file mode 100644 index 0000000..57e2175 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_details.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; + +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +class CardDetailsWidget extends StatelessWidget { + final CardModel cardModel; + const CardDetailsWidget({super.key, required this.cardModel}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: //Responsive.isTablet() + //? + CrossAxisAlignment.stretch, + // : CrossAxisAlignment.start, + children: [ + MediumTextWidget('${"more_details".tr}:'), + RegularTextWidget(cardModel.additionalData) + ], + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 13 : 0); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_email.dart b/lib/features/card/presentation_layer/widgets/card_email.dart new file mode 100644 index 0000000..7b139e7 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_email.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +import '../../../../common/widgets/text.dart'; + +class CardEmailWidget extends StatelessWidget { + final CardModel cardModel; + const CardEmailWidget({super.key, required this.cardModel}); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + SvgPicture.asset("assets/icons/@.svg"), + MediumTextWidget(" ${cardModel.user.email}") + ], + ).paddingSymmetric( + horizontal: 5, + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_header.dart b/lib/features/card/presentation_layer/widgets/card_header.dart new file mode 100644 index 0000000..99f4200 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_header.dart @@ -0,0 +1,92 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../core/routing/routing_manager.dart'; +import 'favorite.dart'; + +class CardHeaderWidget extends StatelessWidget { + final CardModel cardModel; + final double? width; + final bool isShowEditIcon; + final bool isFavoriteCardWidget; + final bool isFromDetailsScreen; + final HomeController homeController = Get.find(); + final AuthController authController = Get.find(); + + CardHeaderWidget( + {super.key, + this.width, + this.isShowEditIcon = false, + this.isFromDetailsScreen = false, + this.isFavoriteCardWidget = false, + required this.cardModel}); + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: AppColors.primeColor, + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(4), + topRight: Radius.circular(4), + ), + ), + width: Get.width, + height: 35, + child: SizedBox( + width: (isFavoriteCardWidget) + ? (Responsive.isTablet() ? (Get.width * 0.2) : Get.width * 0.35) + : null, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: (isFavoriteCardWidget) + ? (Responsive.isTablet() + ? (Get.width * 0.2) + : Get.width * 0.24) + : null, + child: BoldTextWidget( + cardModel.name, + fontSize: 12, + color: Colors.white, + overflow: TextOverflow.ellipsis, + ), + ), + Row( + children: [ + FavoriteWidget( + cardModel: cardModel, + isFavoriteCardWidget: isFavoriteCardWidget, + isFromDetailsScreen: isFromDetailsScreen, + ), + const SizedBox( + width: 8.5, + ), + if (homeController.user.value!.email == cardModel.user.email) + SizedBox( + width: 18, + height: 18, + child: SvgPicture.asset( + "assets/icons/edit.svg", + colorFilter: const ColorFilter.mode( + Colors.white, BlendMode.srcIn), + )).onTap(() { + RoutingManager.to(RouteName.addCard, arguments: cardModel); + }), + ], + ), + ], + ).paddingSymmetric(horizontal: 12), + ), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_image.dart b/lib/features/card/presentation_layer/widgets/card_image.dart new file mode 100644 index 0000000..21c7acb --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_image.dart @@ -0,0 +1,30 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/widgets.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_images.dart'; + +import '../../../../common/const/const.dart'; + +class CardImageWidget extends StatelessWidget { + final CardImages cardImages; + const CardImageWidget( + {super.key, required this.cardImages, this.width, this.height}); + final double? width; + final double? height; + @override + Widget build(BuildContext context) { + return Container( + width: width ?? Get.width * .3, + height: height ?? 63, + margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + image: DecorationImage( + image: CachedNetworkImageProvider( + Domain.domain + cardImages.url.substring(6), + ), + fit: BoxFit.cover), + ), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_information.dart b/lib/features/card/presentation_layer/widgets/card_information.dart new file mode 100644 index 0000000..1024fcc --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_information.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +import '../../../../common/widgets/text.dart'; + +class CardInformation extends StatelessWidget { + final CardModel cardModel; + const CardInformation({super.key, required this.cardModel}); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + SvgPicture.asset( + "assets/icons/love-svgrepo-com 2.svg", + ).expanded(1), + MediumTextWidget( + " ${cardModel.user.firstName}" " ${cardModel.user.lastName}", + ).expanded(Responsive.isTablet() ? 10 : 7), + if (Responsive.isTablet()) Container().expanded(1), + SvgPicture.asset("assets/icons/phone.svg").expanded(1), + RegularTextWidget( + cardModel.phoneNumber, + overflow: TextOverflow.ellipsis, + maxLines: 1, + ).expanded(Responsive.isTablet() ? 10 : 4), + ], + ).paddingSymmetric(vertical: 6); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_location.dart b/lib/features/card/presentation_layer/widgets/card_location.dart new file mode 100644 index 0000000..071e40f --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_location.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +import '../../../../common/widgets/text.dart'; + +class CardLocationWidget extends StatelessWidget { + final CardModel cardModel; + const CardLocationWidget({super.key, required this.cardModel}); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + SvgPicture.asset("assets/icons/location.svg"), + MediumTextWidget( + cardModel.cityModel.country, + ).paddingOnly(left: 8) + ], + ).paddingSymmetric( + horizontal: 5, + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/card_service.dart b/lib/features/card/presentation_layer/widgets/card_service.dart new file mode 100644 index 0000000..2a5d8c8 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/card_service.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/widgets/text.dart'; + +class CardServiceWidget extends StatelessWidget { + final CardModel cardModel; + final HomeController homeController = Get.find(); + final int maxLines; + final double? width; + CardServiceWidget( + {super.key, required this.cardModel, this.maxLines = 1, this.width}); + + @override + Widget build(BuildContext context) { + return Row( + crossAxisAlignment: CrossAxisAlignment.start, + //mainAxisSize: MainAxisSize.min, + children: [ + MediumTextWidget("${'service'.tr} : "), + + //width: Responsive.isTablet() ? Get.width * 0.3 : null, + SizedBox( + width: width ?? + (Responsive.isTablet() ? Get.width * 0.334 : Get.width * 0.669), + child: RegularTextWidget( + cardModel.services, + maxLines: maxLines, + textAlign: homeController.isArabic.value + ? TextAlign.right + : TextAlign.left, + overflow: TextOverflow.ellipsis, + ).paddingOnly( + right: Responsive.isTablet() ? 0 : 10, + left: 7.5, + ), + ), + ], + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/favorite.dart b/lib/features/card/presentation_layer/widgets/favorite.dart new file mode 100644 index 0000000..6a93740 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/favorite.dart @@ -0,0 +1,134 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart'; + +import '../../../../common/widgets/button.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../core/routing/routing_manager.dart'; + +class FavoriteWidget extends StatelessWidget { + final CardController cardController = Get.find(); + final FavoriteController favoriteController = Get.find(); + final CardModel cardModel; + final bool isFavoriteCardWidget; + final bool isFromDetailsScreen; + AuthController authController = Get.find(); + FavoriteWidget( + {super.key, + this.isFavoriteCardWidget = false, + this.isFromDetailsScreen = false, + required this.cardModel}); + + @override + Widget build(BuildContext context) { + if (authController.isGuest.value) { + return SvgPicture.asset( + 'assets/icons/heart.svg', + colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ).onTap(() { + Get.defaultDialog( + title: '', + content: Column( + children: [ + BoldTextWidget('you_have_to_sign_in'.tr), + const SizedBox( + height: 20, + ), + ButtonWidget( + onTap: () { + RoutingManager.off(RouteName.login); + }, + title: 'sign_in'.tr) + ], + )); + }); + } else { + if (isFromDetailsScreen || isFavoriteCardWidget) { + return ValueBuilder( + initialValue: favoriteController.isCardFav(cardModel.id), + builder: (bool? value, toggle) { + if (value!) { + return SvgPicture.asset( + 'assets/icons/heart_fill.svg', + ).onTap(() async { + toggle(!value); + + favoriteController.toggleFavoriteCard(cardModel.id); + + cardController.toggleFavorite(cardModel.id, true, + onSuccess: (val) {}); + }); + } + return SvgPicture.asset( + 'assets/icons/heart.svg', + colorFilter: + const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ).onTap(() async { + toggle(!value); + + favoriteController.toggleFavoriteCard( + cardModel.id, + cardModel: cardModel, + userId: cardModel.user.id, + ); + + cardController.toggleFavorite(cardModel.id, false, + onSuccess: (val) { + // if (isFromDetailsScreen) { + // favoriteController.getFavorites(); + // } + }); + + // cardModel.isFav = !cardModel.isFav; + // if (isFavoriteCardWidget || isFromDetailsScreen) { + // cardController.cardState.result.clear(); + // cardController.getCards(); + // } + }); + }, + ); + } else { + return Obx(() { + if (favoriteController.isCardFav(cardModel.id)) { + return SvgPicture.asset( + 'assets/icons/heart_fill.svg', + ).onTap(() async { + favoriteController.toggleFavoriteCard(cardModel.id); + cardController.toggleFavorite(cardModel.id, true, + onSuccess: (val) { + // favoriteController.getFavorites(); + }); + }); + } else { + return SvgPicture.asset( + 'assets/icons/heart.svg', + colorFilter: + const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ).onTap(() async { + favoriteController.toggleFavoriteCard( + cardModel.id, + cardModel: cardModel, + userId: cardModel.user.id, + ); + cardController.toggleFavorite(cardModel.id, false, + onSuccess: (val) { + // favoriteController.getFavorites(); + }); + }); + } + }); + + // // // cardModel.isFav = !cardModel.isFav; + // // // if (isFavoriteCardWidget || isFromDetailsScreen) { + // // // cardController.cardState.result.clear(); + // // // cardController.getCards(); + // // // } + } + } + } +} diff --git a/lib/features/card/presentation_layer/widgets/first_card.dart b/lib/features/card/presentation_layer/widgets/first_card.dart new file mode 100644 index 0000000..7964bfa --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/first_card.dart @@ -0,0 +1,104 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_location.dart'; + +import '../../../../core/routing/routing_manager.dart'; +import 'card_header.dart'; + +class FirstCardWidget extends StatelessWidget { + final CardModel cardModel; + const FirstCardWidget(this.cardModel, {super.key}); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.symmetric( + horizontal: Responsive.isTablet() ? 2 : 20, vertical: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + height: 195, + child: Column( + children: [ + Column( + children: [ + CardHeaderWidget( + cardModel: cardModel, + ), + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + height: 160, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: const EdgeInsets.symmetric(vertical: 10), + width: Get.width * .8, + height: 90, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + image: cardModel.cardImages.isNotEmpty + ? DecorationImage( + image: CachedNetworkImageProvider( + Domain.domain + + cardModel.cardImages[0].url.substring(6), + ), + fit: BoxFit.cover) + : null, + ), + ).center(), + Row( + children: [ + SvgPicture.asset( + "assets/icons/love-svgrepo-com 2.svg", + ), + MediumTextWidget("${cardModel.user.firstName}" + " ${cardModel.user.lastName}"), + ], + ).paddingSymmetric(horizontal: 14), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + CardLocationWidget( + cardModel: cardModel, + ).paddingSymmetric( + horizontal: 10, + ), + Row( + children: [ + SvgPicture.asset("assets/icons/phone.svg"), + RegularTextWidget(" ${cardModel.phoneNumber}"), + ], + ).paddingSymmetric(horizontal: 18), + ], + ), + // const CardInformation(), + // const CardLocationWidget(), + // Divider( + // color: AppColors.dividerColor, + // thickness: 1, + // ).paddingSymmetric(horizontal: 18), + // const CardServiceWidget(), + ], + ), + ), + ], + ).onTap(() { + RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + }), + ], + ), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/my_card.dart b/lib/features/card/presentation_layer/widgets/my_card.dart new file mode 100644 index 0000000..73191e3 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/my_card.dart @@ -0,0 +1,80 @@ +import 'package:flutter/material.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_service.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../core/routing/routing_manager.dart'; +import 'card_header.dart'; +import 'card_information.dart'; +import 'card_location.dart'; + +class MyCardWidget extends StatelessWidget { + final CardModel cardModel; + final bool? isShowEditIcon; + MyCardWidget(this.cardModel, {super.key, this.isShowEditIcon = false}); + final HomeController homeController = Get.find(); + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.symmetric( + horizontal: Responsive.isTablet() ? 2 : 20, vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + child: SizedBox( + child: Column( + children: [ + Column( + children: [ + CardHeaderWidget( + isShowEditIcon: isShowEditIcon!, + cardModel: cardModel, + ), + const SizedBox( + height: 6, + ), + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(4), + ), + width: Get.width, + height: Responsive.isTablet() ? 120 : 96, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CardInformation( + cardModel: cardModel, + ).paddingOnly( + left: homeController.isArabic.value ? 0 : 4, + right: homeController.isArabic.value ? 4 : 0, + ), + CardLocationWidget( + cardModel: cardModel, + ), + const SizedBox( + height: 6, + ), + CardServiceWidget(cardModel: cardModel).paddingOnly( + left: homeController.isArabic.value ? 0 : 8, + right: homeController.isArabic.value ? 8 : 0, + ), + ], + ), + ), + ], + ).onTap(() { + RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + }), + ], + ), + ), + ); + } +} diff --git a/lib/features/card/presentation_layer/widgets/random_card_widget.dart b/lib/features/card/presentation_layer/widgets/random_card_widget.dart new file mode 100644 index 0000000..ed04bff --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/random_card_widget.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/first_card.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/my_card.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/second_card.dart'; +import 'dart:math'; + +import '../../data_layer/model/card_model.dart'; + +class RandomCardWidget extends StatelessWidget { + RandomCardWidget(this.cardModel, {super.key}); + final Random random = Random(5); + final CardModel cardModel; + + int getRandomInt(int max) { + return random.nextInt(max); + } + + @override + Widget build(BuildContext context) { + int randomResult = getRandomInt(10); + + if (cardModel.cardImages.isEmpty) { + return MyCardWidget(cardModel); + } else { + if (randomResult >= 0 && randomResult <= 2) { + return FirstCardWidget(cardModel); + } else { + return SecondCardWidget(cardModel); + } + } + } +} diff --git a/lib/features/card/presentation_layer/widgets/second_card.dart b/lib/features/card/presentation_layer/widgets/second_card.dart new file mode 100644 index 0000000..9246cb0 --- /dev/null +++ b/lib/features/card/presentation_layer/widgets/second_card.dart @@ -0,0 +1,100 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_header.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../core/routing/routing_manager.dart'; + +class SecondCardWidget extends StatelessWidget { + final CardModel cardModel; + const SecondCardWidget(this.cardModel, {super.key}); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.symmetric( + horizontal: Responsive.isTablet() ? 2 : 20, vertical: 10), + width: Get.width, + height: 140, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: Colors.white, + ), + child: SizedBox( + height: 120, + child: Column( + children: [ + CardHeaderWidget( + cardModel: cardModel, + ).paddingOnly(bottom: 5), + Row( + children: [ + Container( + height: 95, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + image: cardModel.cardImages.isNotEmpty + ? DecorationImage( + image: CachedNetworkImageProvider( + Domain.domain + + cardModel.cardImages[0].url.substring(6), + ), + fit: BoxFit.cover) + : null, + ), + ).expanded(5), + SizedBox( + height: 75, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + SvgPicture.asset( + "assets/icons/love-svgrepo-com 2.svg") + .paddingOnly(left: 2, right: 5), + MediumTextWidget("${cardModel.user.firstName}" + " ${cardModel.user.lastName}") + ], + ), + Row( + children: [ + SvgPicture.asset("assets/icons/phone.svg") + .paddingSymmetric(horizontal: 5), + SizedBox( + width: Responsive.isTablet() + ? Get.width * 0.14 + : Get.width * 0.25, + child: MediumTextWidget( + cardModel.phoneNumber, + overflow: TextOverflow.ellipsis, + ), + ) + ], + ), + Row( + children: [ + SvgPicture.asset("assets/icons/location.svg") + .paddingSymmetric(horizontal: 5), + MediumTextWidget(cardModel.cityModel.name) + ], + ), + ], + ).paddingSymmetric(horizontal: 10), + ).expanded(5) + ], + ).paddingSymmetric(horizontal: 5), + ], + ).onTap(() { + RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + }), + ), + ); + } +} diff --git a/lib/features/category/business_logic_layer/category_controller.dart b/lib/features/category/business_logic_layer/category_controller.dart new file mode 100644 index 0000000..a5c8284 --- /dev/null +++ b/lib/features/category/business_logic_layer/category_controller.dart @@ -0,0 +1,74 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart'; +import 'package:taafee_mobile/features/category/data_layer/model/category.dart'; +import 'package:taafee_mobile/features/category/data_layer/source/category_service.dart'; +import 'package:rx_future/rx_future.dart'; + +import '../../../core/utils/pagination_list.dart'; +import '../../card/data_layer/model/card_model.dart'; + +class CategoryController extends GetxController { + ///-----------data source--------/// + CategoryService categoryService = CategoryService(); + CardService cardService = CardService(); +//-------get categories----------// + RxFuture> categoryState = RxFuture([]); + + Future getCategories({ + String? value, + void Function(Object)? onConnectionError, + }) async { + await categoryState.observe((p0) async { + return await categoryService.getCategories( + value: value, onConnectionError: onConnectionError); + }); + } + + CategoryModel getCategoryById(int id) { + for (int i = 0; i < categoryState.result.length; i++) { + if (id == categoryState.result[i].id) { + return categoryState.result[i]; + } + } + return CategoryModel.zero(); + } + + //-----get category cards------// + RxFuture> categoryCardsState = + RxFuture(Pagination.zero()); + + Future getCategoryCards({ + required int categoryId, + void Function(Pagination)? onSuccess, + void Function(Object)? onError, + void Function(Object)? onConnectionError, + }) async { + await categoryCardsState.observe( + (p0) async { + await p0!.nextPage((currentPage) async { + List cards = await cardService.getCards( + page: currentPage, + categoryId: categoryId, + onConnectionError: onConnectionError, + ); + if (cards.isEmpty) return []; + + return cards; + }); + return p0; + }, + onSuccess: onSuccess, + onError: onError, + ); + } + + /// -------------- search categories ---------------/// + RxFuture> searchCategoriesState = + RxFuture([]); + + Future searchCategories({String? value}) async { + await searchCategoriesState.observe((p0) async { + return await categoryService.getCategories(value: value); + }); + } +} diff --git a/lib/features/category/data_layer/model/category.dart b/lib/features/category/data_layer/model/category.dart new file mode 100644 index 0000000..39ee6c6 --- /dev/null +++ b/lib/features/category/data_layer/model/category.dart @@ -0,0 +1,78 @@ +import 'package:get/get.dart'; + +class CategoryModel { + int id; + + String icon; + String cardCount; + String enName; + String cnName; + String arName; + + String get name { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return arName; + case 'en': + return enName; + case 'cn': + return cnName; + } + return enName; + } + + CategoryModel({ + required this.id, + required this.enName, + required this.cnName, + required this.arName, + required this.icon, + required this.cardCount, + }); + + factory CategoryModel.from(Map json) => CategoryModel( + id: json["id"], + enName: json["en_name"] ?? 'null_en', + arName: json["ar_name"] ?? 'null_ar', + cnName: json["cn_name"] ?? 'null_cn', + icon: json["icon"], + cardCount: json["card_count"].toString(), + ); + + static List fromJsonList(Map json) { + List categories = []; + + json["data"].forEach( + (element) => categories.add( + CategoryModel.from(element), + ), + ); + return categories; + } + + bool compare(CategoryModel categoryModel) { + if (id == categoryModel.id) { + return true; + } + if (name == categoryModel.name) { + return true; + } + if (icon == categoryModel.icon) { + return true; + } + if (cardCount == categoryModel.cardCount) { + return true; + } else { + return false; + } + } + + factory CategoryModel.zero() => CategoryModel( + id: 0, + enName: 'category'.tr, + arName: 'category'.tr, + cnName: 'category'.tr, + icon: '', + cardCount: ''); +} diff --git a/lib/features/category/data_layer/source/category_service.dart b/lib/features/category/data_layer/source/category_service.dart new file mode 100644 index 0000000..014a6b6 --- /dev/null +++ b/lib/features/category/data_layer/source/category_service.dart @@ -0,0 +1,22 @@ +import 'package:taafee_mobile/core/apis/apis.dart'; +import 'package:taafee_mobile/core/network/http.dart'; +import 'package:taafee_mobile/features/category/data_layer/model/category.dart'; + +class CategoryService { + Future> getCategories( + {String? value, void Function(Object)? onConnectionError}) async { + Request request = Request( + EndPoint.category, + RequestMethod.get, + authorized: true, + cacheable: true, + queryParams: { + if (value != null) "name": value, + }, + ); + Map response = + await request.sendRequest(onConnectionError: onConnectionError); + + return CategoryModel.fromJsonList(response); + } +} diff --git a/lib/features/category/presentation_layer/screens/category.dart b/lib/features/category/presentation_layer/screens/category.dart new file mode 100644 index 0000000..bf91e3c --- /dev/null +++ b/lib/features/category/presentation_layer/screens/category.dart @@ -0,0 +1,50 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/gridview.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/category/presentation_layer/widgets/category.dart'; + +import '../../../../common/widgets/header_screen.dart'; + +class CategoryScreen extends StatelessWidget { + final CategoryController categoryController = Get.find(); + CategoryScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + children: [ + if (Responsive.isTablet()) + const SizedBox( + height: 20, + ), + HeaderScreen("all_categories".tr).paddingSymmetric( + vertical: 25, horizontal: Responsive.isTablet() ? 50 : 20), + if (Responsive.isTablet()) + const SizedBox( + height: 20, + ), + RxViewer( + rxFuture: categoryController.categoryState, + child: () => GridViewWidget( + mainAxisExtent: Responsive.isTablet() ? 155 : null, + count: Responsive.isTablet() ? 4 : 3, + itemCount: categoryController.categoryState.result.length, + child: (index) => CategoryWidget( + categoryController.categoryState.result[index], + enableTabletDesign: false, + ), + ).paddingOnly(bottom: 20), + ).paddingSymmetric(horizontal: Responsive.isTablet() ? 40 : 0) + ], + ), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/category/presentation_layer/screens/category_details.dart b/lib/features/category/presentation_layer/screens/category_details.dart new file mode 100644 index 0000000..046fe69 --- /dev/null +++ b/lib/features/category/presentation_layer/screens/category_details.dart @@ -0,0 +1,93 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/responsive_view.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/category/data_layer/model/category.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../../../../common/widgets/rx_viewer.dart'; +import '../../../../common/widgets/text.dart'; + +// ignore: must_be_immutable +class CategoryDetailsScreen extends StatelessWidget { + CategoryDetailsScreen({ + super.key, + }); + CategoryModel category = Get.arguments; + CategoryController categoryController = Get.find(); + final ScrollController scrollController = ScrollController(); + + void moreSearchResults() { + scrollController.addListener(() { + if (scrollController.position.atEdge && scrollController.offset != 0) { + categoryController.getCategoryCards( + categoryId: category.id, + onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + } + }); + } + + @override + Widget build(BuildContext context) { + moreSearchResults(); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + controller: scrollController, + child: Column( + children: [ + HeaderScreen(category.name).paddingSymmetric( + vertical: 25, horizontal: Responsive.isTablet() ? 40 : 20), + RxViewer( + withPagination: true, + withSizedBox: true, + loaderHeight: 400, + loaderWidth: 400, + rxFuture: categoryController.categoryCardsState, + child: () => + (categoryController.categoryCardsState.result.data.isNotEmpty) + ? Column( + children: [ + ResponsiveView( + mainAxisExtent: Responsive.isTablet() ? 180 : 180, + itemCount: categoryController + .categoryCardsState.result.data.length, + childBuilder: (index) => CardWidget( + categoryController + .categoryCardsState.result.data[index]), + ), + ], + ) + : Column( + children: [ + Lottie.asset( + 'assets/animations/Folder Lottie.json', + repeat: false, + ).paddingAll(40), + RegularTextWidget( + 'no_cards_in_this_category'.tr, + color: AppColors.textColor, + fontSize: 18.0, + ) + ], + ), + ) + + // ListViewWidget( + // itemCount: 6, + // childBuilder: (index) { + // return const CardWidget(); + // }).paddingOnly(bottom: 20), + ], + ), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/category/presentation_layer/widgets/category.dart b/lib/features/category/presentation_layer/widgets/category.dart new file mode 100644 index 0000000..d456d08 --- /dev/null +++ b/lib/features/category/presentation_layer/widgets/category.dart @@ -0,0 +1,70 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/category/data_layer/model/category.dart'; + +import '../../../../common/widgets/toast.dart'; + +class CategoryWidget extends StatelessWidget { + final CategoryModel categoryModel; + CategoryWidget(this.categoryModel, + {super.key, this.enableTabletDesign = true}); + final CategoryController categoryController = Get.find(); + final bool enableTabletDesign; + @override + Widget build(BuildContext context) { + return Container( + alignment: Alignment.center, + //width: Get.width * .3, + height: Get.width * .3, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + child: Responsive.isTablet() && enableTabletDesign + ? Row( + children: [ + Container().expanded(1), + CachedNetworkImage( + imageUrl: + Domain.domain + categoryModel.icon.substring(6)) + .expanded(2), + Container().expanded(1), + RegularTextWidget( + categoryModel.name, + fontSize: Responsive.isTablet() ? 16 : 12, + overflow: TextOverflow.ellipsis, + ).expanded(4), + ], + ) + : Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CachedNetworkImage( + imageUrl: Domain.domain + categoryModel.icon.substring(6), + width: Responsive.isTablet() ? 72 : null, + height: Responsive.isTablet() ? 72 : null, + fit: Responsive.isTablet() ? BoxFit.fill : null, + ).paddingSymmetric(vertical: 10), + RegularTextWidget( + categoryModel.name, + fontSize: Responsive.isTablet() ? 18 : null, + ), + ], + ), + ).onTap(() { + categoryController.categoryCardsState.result.clear(); + categoryController.getCategoryCards( + categoryId: categoryModel.id, + onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + RoutingManager.to(RouteName.categoryDetails, arguments: categoryModel); + }); + } +} diff --git a/lib/features/chat/business logic layer/chat_controller.dart b/lib/features/chat/business logic layer/chat_controller.dart new file mode 100644 index 0000000..388c767 --- /dev/null +++ b/lib/features/chat/business logic layer/chat_controller.dart @@ -0,0 +1,950 @@ +import 'dart:async'; +import 'dart:developer' as dev; +import 'dart:io'; +import 'dart:math'; +import 'package:audio_waveforms/audio_waveforms.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_sound/flutter_sound.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/utils/pagination_list.dart'; +import 'package:taafee_mobile/core/utils/rx_futures.dart'; +import 'package:taafee_mobile/core/utils/utils.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/chat_user.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/room.dart'; +import 'package:taafee_mobile/features/chat/data_layer/service/chat_resource.dart' + as resource; +import 'package:path_provider/path_provider.dart'; +import 'package:rx_future/rx_future.dart'; +import 'package:permission_handler/permission_handler.dart'; +import '../../../core/errors/custom_exception.dart'; +import '../../../core/local_storage/local_storage.dart'; +import '../../../core/network/socket/socket.dart'; +import '../data_layer/model/message.dart'; +import '../data_layer/service/chat_files_source.dart'; +import '../data_layer/service/chat_listener.dart'; + +enum SocketConnectionState { connected, connecting, notConnected, error } + +class ChatController extends GetxController { + //sources + resource.ChatResource chatResource = resource.ChatResource(); + + ChatListener chatListener = ChatListener(); + + ChatFilesSource chatFilesSource = ChatFilesSource(); + + LocalStorage localStorage = LocalStorage(); + //initialization + Future init( + {dynamic Function(MessageModel)? handler, + required Function(dynamic) onSessionTerminated}) async { + if (isInitialized) return; + chatUser = ChatUser( + id: localStorage.getChatUserId() ?? 0, + name: localStorage.getUser()!.firstName); + await socketInit(); + receiveMessagesInRoom(); + receiveMessages(handler: handler); + listenForMessagesReading(); + listenOnRoomState(); + listenOnSessionTerminated(onSessionTerminated: onSessionTerminated); + } + + //socket + + SocketIO io = Get.find(); + + bool isInitialized = false; + + Future socketInit() async { + if (isInitialized) return; + io.init(); + io.setAuthentication(localStorage.getChatToken() ?? ""); + io.setOnConnect(() { + connectionState.update((val) { + connectionState.value = SocketConnectionState.connected; + }); + connectionState.refresh(); + dev.log("Connected Successfully"); + }); + io.setOnDisconnect(() { + dev.log("Socket disconnected"); + connectionState.update((val) { + val = SocketConnectionState.notConnected; + }); + connectionState.refresh(); + }); + io.setOnConnecting(() { + connectionState.update((val) { + val = SocketConnectionState.connecting; + }); + connectionState.refresh(); + dev.log("Connecting to socket"); + }); + io.setOnConnectionError(() { + dev.log("Error Connecting to socket"); + connectionState.update((val) { + val = SocketConnectionState.error; + }); + connectionState.refresh(); + throw GenericException( + type: ExceptionType.ConnectionError, + errorMessage: "You Have no Internet Connection", + ); + }); + + isInitialized = true; + await io.connect(); + } + + // user + ChatUser chatUser = ChatUser.zero(); + + /// ------------------- connection -----------/// + RxFuture serverState = RxFuture(null); + + Rx connectionState = + SocketConnectionState.notConnected.obs; + + bool get shouldConnect => + (connectionState.value == SocketConnectionState.error) | + (connectionState.value == SocketConnectionState.notConnected); + + Future connectToServer({Function? onSuccess}) async { + if (!shouldConnect) return; + serverState.observe((_) async { + return await io.boot(); + }, onSuccess: ((p0) { + onSuccess?.call(); + })); + } + + /// ------------------- Rooms ----------------/// + RxFuture> rooms = RxFuture(Pagination()); + + int? get currentRoomId => currentRoom.value?.id; + + ChatUser? get currentChatUser => currentRoom.value!.user; + + Rx currentRoom = null.obs; + + //private + void setCurrentRoom(Room room) { + currentRoom = room.obs; + currentRoom.refresh(); + } + + Room? getRoomById(int? id) => id == null + ? null + : rooms.result.data.firstWhereOrNull((element) => element.id == id); + + // Future getRooms({int? specificPage}) async { + // await connectToServer(); + // await rooms.observe( + // (value) async { + // await value!.nextPage( + // (currentPage) async { + // return chatResource.getRooms(currentPage); + // }, + // place: InsertPlace.end, + // ); + + // return value; // there is no way that this would be null, there is a default value in rooms declaration. + // }, + // multipleCallsBehavior: MultipleCallsBehavior.abortNew, + // ); + // } + + Future getRooms({String searchQuery = '', int? specificPage}) async { + await connectToServer(); + if (specificPage != null) { + rooms.update((val) { + val!.value.clear(); + }); + rooms.refresh(); + } + await rooms.observe( + (value) async { + await value!.nextPage( + (currentPage) async { + return chatResource.getRooms( + searchQuery: searchQuery, + currentPage: specificPage ?? currentPage); + }, + place: InsertPlace.end, + ); + + return value; // there is no way that this would be null, there is a default value in rooms declaration. + }, + multipleCallsBehavior: MultipleCallsBehavior.abortNew, + ); + } + + void updateRoom() { + int index = rooms.result.data + .indexWhere((element) => (element.id == currentRoomId)); + // rooms = Pagination( + // data: rooms.result.data.insert(0, Room.copy(currentRoom.value!))); + rooms.update((val) { + if (index == -1) { + val!.value.data.insert(0, Room.copy(currentRoom.value!)); + index = 0; + } + if (currentRoom.value!.messages.data.isNotEmpty) { + val!.value.data[index].lastMessage = + currentRoom.value!.messages.data[0]; + val.value.data[index].lastMessageDate = + currentRoom.value!.messages.data[0].createdAt; + } + }); + rooms.refresh(); + } + + RxFuture createRoomState = RxFuture(null); + void createRoom( + {required int chatUserId, void Function(Room?)? onSuccess}) async { + await createRoomState.observe((value) async { + return await chatResource.createRoom(id: chatUserId); + }, onSuccess: (room) async { + await getRooms(); + Room? roomById = getRoomById(room!.id); + if (roomById != null) { + room = roomById; + } + currentRoom = room.obs; + + // currentRoom.update((val) { + // val = room; + // }); + // currentRoom.value = room; + currentRoom.refresh(); + onSuccess?.call(room); + }, onError: (err) { + if (err.toString() == 'email_already_exists') { + // getRooms() + // get the room that contains two users (chatUserId) + // setCurrentRoom + // + } + }); + } + + RxFuture blockRoomState = RxFuture(null); + void blockRoom( + {void Function()? onSuccess, void Function(Object)? onError}) async { + blockRoomState.observe((value) async { + return await chatResource.blockRoom(id: currentRoomId!); + }, onSuccess: (value) async { + if (rooms.result.data.isEmpty) { + await getRooms(); + } + int index = rooms.result.data + .indexWhere((element) => element.id == currentRoomId); + rooms.update((val) { + val!.value.data[index].state = RoomState.blocked; + }); + currentRoom.update((val) { + val!.state = RoomState.blocked; + }); + currentRoom.refresh(); + rooms.refresh(); + onSuccess?.call(); + }, onError: (err) { + onError?.call(err); + }); + } + + RxFuture unblockRoomState = RxFuture(null); + void unblockRoom( + {void Function()? onSuccess, void Function(Object)? onError}) async { + blockRoomState.observe((value) async { + return await chatResource.unblockRoom(id: currentRoomId!); + }, onSuccess: (value) { + int index = rooms.result.data + .indexWhere((element) => element.id == currentRoomId); + rooms.update((val) { + val!.value.data[index].state = RoomState.active; + }); + currentRoom.update((val) { + val!.state = RoomState.active; + }); + currentRoom.refresh(); + rooms.refresh(); + onSuccess?.call(); + }, onError: (err) { + onError?.call(err); + }); + } + + void listenOnRoomState() { + listenOnRoomBlocked(); + listenOnRoomBlocking(); + listenOnRoomUnblocked(); + // chatListener.updatedRoom((roomId, roomStatus) { + // if (rooms.result.data.isNotEmpty) { + // int index = rooms.result.data + // .indexWhere((element) => element.id == currentRoomId); + // rooms.update((val) { + // val!.value.data[index].state = Room.getRoomStateByString(roomStatus)!; + // }); + // rooms.refresh(); + // if (currentRoomId == roomId) { + // currentRoom.update((val) { + // val!.state = Room.getRoomStateByString(roomStatus)!; + // }); + // currentRoom.refresh(); + // } + // } + // }); + } + + void listenOnRoomUnblocked() { + chatListener.unblockedRoom((roomId) { + if (rooms.result.data.isNotEmpty) { + int index = rooms.result.data + .indexWhere((element) => element.id == currentRoomId); + rooms.update((val) { + val!.value.data[index].state = RoomState.active; + }); + rooms.refresh(); + if (currentRoomId == roomId) { + currentRoom.update((val) { + val!.state = RoomState.active; + }); + currentRoom.refresh(); + } + } + }); + } + + void listenOnRoomBlocked() { + chatListener.blockedRoom((roomId) { + if (rooms.result.data.isNotEmpty) { + int index = rooms.result.data + .indexWhere((element) => element.id == currentRoomId); + rooms.update((val) { + val!.value.data[index].state = RoomState.blocking; + }); + rooms.refresh(); + if (currentRoomId == roomId) { + currentRoom.update((val) { + val!.state = RoomState.blocking; + }); + currentRoom.refresh(); + } + } + }); + } + + void listenOnRoomBlocking() { + chatListener.blockingRoom((roomId) { + if (rooms.result.data.isNotEmpty) { + int index = rooms.result.data + .indexWhere((element) => element.id == currentRoomId); + rooms.update((val) { + val!.value.data[index].state = RoomState.blocked; + }); + rooms.refresh(); + if (currentRoomId == roomId) { + currentRoom.update((val) { + val!.state = RoomState.blocked; + }); + currentRoom.refresh(); + } + } + }); + } + + void listenOnSessionTerminated( + {required Function(dynamic) onSessionTerminated}) { + chatListener.termminatedSession(onSessionTerminated); + } + + //support + RxFuture supportRoomState = RxFuture(null); + Future checkSupportRoomStatus( + {void Function(Room?)? onSuccess, void Function(Object)? onError}) async { + supportRoomState.observe((value) async { + return await chatResource.checkSupportRoomStatus(); + }, onSuccess: (room) async { + if (room == null) { + Room newSupportRoom = await chatResource.createSupportRoom(); + setCurrentRoom(newSupportRoom); + //creat support room + //set current room + } else { + //set current room + setCurrentRoom(room); + } + onSuccess?.call(currentRoom.value); + }, onError: (err) { + onError?.call(err); + }); + } + + /// ------------- messages -------------- /// + + // getMessages + RxFutures messagesState = RxFutures(); + + Future getCurrentRoomMessages({int? specificPage}) async { + if (currentRoom.value == null || + (currentRoom.value!.messagesStateId != null && + messagesState.loading(currentRoom.value!.messagesStateId!))) return; + + String id = messagesState.init(RxFuture(null)); + + currentRoom.value!.messagesStateId = id; + + await messagesState.observe( + id, + (value) async { + return await currentRoom.value!.messages.nextPage((currentPage) async { + return await chatResource.getCurrentRoomMessages( + roomId: currentRoomId!, page: specificPage ?? currentPage); + }); + }, + onSuccess: (value) { + currentRoom.refresh(); + }, + multipleCallsBehavior: MultipleCallsBehavior.abortNew, + ); + } + + //read Message + RxFutures readMessageState = RxFutures(); + void readMessage({required int messageId}) async { + dev.log('i am reading message with id : $messageId'); + String sendingStateId = readMessageState.init(RxFuture(null)); + readMessageState.observe(sendingStateId, (value) async { + await chatResource.readMessage(messageId: messageId); + }, onSuccess: (value) { + int index = currentRoom.value!.messages.data + .indexWhere((element) => element.id == messageId); + currentRoom.update((val) { + val!.messages.data[index].readBy!.ids + .insert(0, val.messages.data[index].user.id); + }); + currentRoom.refresh(); + }); + } + + void listenForMessagesReading() { + chatListener.messagesReaded((messageId, userId) { + if (currentRoom.value != null && + currentRoom.value!.type == RoomType.private) { + currentRoom.update((val) { + int index = val!.messages.data + .indexWhere((element) => element.id == messageId); + + val.messages.data[index].readBy!.ids.insert(0, userId); + }); + currentRoom.refresh(); + } + }); + } + + // sendMessages + RxFutures sendingMessageState = RxFutures(); + + RxBool isMessageLoading(String? sendingMessageStateId) { + if (sendingMessageStateId != null) { + return messagesState.loading(sendingMessageStateId).obs; + } else { + return false.obs; + } + } + + Future sendMessage(MessageModel message, + {int? roomId, String? filePath, void Function(Object e)? onError}) async { + if (roomId == null && currentRoom.value == null) { + throw Exception( + "You must either provide room id, or select a room to send message", + ); + } + message.user = chatUser; + message.userId = chatUser.id; + if (shouldConnect) { + try { + await io.boot(); + await getCurrentRoomMessages(specificPage: 1); + } catch (err) { + onError?.call(err); + } + } + String sendingStateId = sendingMessageState.init(RxFuture(message)); + + message.sendingStateId = sendingStateId; + + await sendingMessageState.observe(sendingStateId, (_) async { + message.sendingStateId = sendingStateId; + + // currentRoom.value!.messages.data.insert(0, MessageModel.copy(message)); + if (message.type != MessageType.voice) { + currentRoom.update((val) { + val!.messages.data.insert(0, MessageModel.copy(message)); + }); + } + if (message.type != MessageType.text) { + await uploadFile(filePath: filePath!); + if (uploadFileState.result != null) { + int id = uploadFileState.result!; + message.content = "$id"; + } else { + onError?.call(e); + currentRoom.update((val) { + val!.messages.data.removeAt(0); + }); + return message; + } + } + if (message.type == MessageType.voice) { + currentRoom.update((val) { + // message.temporaryFile = null; + + val!.messages.data.insert(0, MessageModel.copy(message)); + + val.messages.data[0].content = '${uploadFileState.result}'; + // val.messages.data[0].temporaryFile = null; + }); + currentRoom.refresh(); + } + return await chatResource.sendMessage( + messageModel: message, roomId: currentRoomId!); + }, onSuccess: (value) { + currentRoom.update((val) { + val!.messages.data[0].id = value.id; + val.messages.data[0].sendingStateId = null; + val.messages.data[0].content = value.content; + val.messages.data[0].readBy = value.readBy; + if (message.type != MessageType.voice) { + val.messages.data[0].temporaryFile = null; + } + }); + rooms.refresh(); + }, onError: (err) { + currentRoom.update((val) { + val!.messages.data.removeAt(0); + }); + + onError?.call(err); + }); + } + + // cancel sending + void cancelSendingMessage(MessageModel message) { + if (message.sendingStateId == null || + !sendingMessageState.loading(message.sendingStateId!)) return; + + sendingMessageState.cancel(message.sendingStateId!); + } + + // receive Messages + + void receiveMessagesInRoom() async { + connectToServer(); + + chatListener.receiveMessage((message) { + currentRoom.update((val) { + val?.messages.data.insert(0, message); + }); + }); + } + + void receiveMessages({dynamic Function(MessageModel)? handler}) async { + connectToServer(); + chatListener.receiveMessage((message) async { + if (rooms.result.data.isEmpty) { + await getRooms(); + } + if (rooms.result.data + .lastIndexWhere((element) => element.id == message.roomId) == + -1) { + await getRooms(); + } + + int index = rooms.result.data + .lastIndexWhere((element) => element.id == message.roomId); + + if (index == -1) { + rooms.update((val) { + val!.value.data.insert( + 0, + Room( + id: message.roomId, + user: message.user, + lastMessageDate: message.createdAt)); + }); + index = 0; + } + rooms.update((val) { + val!.value.data[index].lastMessage = message; + }); + rooms.refresh(); + //assign when user tap . + // currentRoom.value = rooms.result.data + // .firstWhere((element) => (element.id == message.roomId)); + handler?.call(message); + }); + } + + // upload Files + RxFuture uploadFileState = RxFuture(null); + Future uploadFile({required String filePath}) async { + await uploadFileState.observe((value) async { + return await chatFilesSource.uploadFile( + roomId: currentRoomId!, filePath: filePath); + }); + } + + // Chat Details scroll controller + Rx scrollController = ScrollController().obs; + + void scrollControllerJump() { + scrollController.update((val) { + val!.jumpTo(0); + }); + scrollController.refresh(); + } + + // keyBoard opening detection + RxBool keyBoardOpened = false.obs; + void setkeyBoardOpened(bool newValue) { + keyBoardOpened.value = newValue; + keyBoardOpened.refresh(); + } + + //reply senario handling + RxBool isReplying = false.obs; + + void toggleIsReplying() => isReplying.value = !isReplying.value; + + Rx replyModel = MessageModel.zero().obs; + + void updateReplyModel({ + required MessageModel messageModel, + }) { + replyModel.value = messageModel; + + replyModel.refresh(); + } + + //voice message + FlutterSoundRecorder voiceRecorder = FlutterSoundRecorder(); + + File recordFile = File('record.wav'); + + bool isRecordReady = false; + + RxBool isRecording = false.obs; + + RxString recordingTime = '00:00'.obs; + + File? audioFile; + + toggleIsRecording() { + if (isRecording.value == false) { + recordingTime.value = '00:00'; + recordingTime.refresh(); + } + isRecording.value = !isRecording.value; + isRecording.refresh(); + } + + Future getVoiceFile({required String id}) async { + return await chatFilesSource.getVoiceFile(id); + } + + void timer() { + var startTime = DateTime.now(); + Timer.periodic(const Duration(seconds: 1), (t) { + var diff = DateTime.now().difference(startTime); + recordingTime.value = + '${diff.inHours == 0 ? '' : '${diff.inHours.toString().padLeft(2, "0")}:'}${(diff.inMinutes % 60).floor().toString().padLeft(2, "0")}:${(diff.inSeconds % 60).floor().toString().padLeft(2, '0')}'; + recordingTime.refresh(); + if (!voiceRecorder.isRecording) { + t.cancel(); + } + }); + } + + Future initRecorder() async { + final status = await Permission.microphone.request(); + if (status != PermissionStatus.granted) { + throw 'dfaf'; + } + await Permission.storage.request(); + await Permission.manageExternalStorage.request(); + + await voiceRecorder.openRecorder(); + + isRecordReady = true; + + voiceRecorder.setSubscriptionDuration(const Duration(microseconds: 500)); + } + + Future record() async { + if (!isRecordReady) return; + Directory tempDir = await getTemporaryDirectory(); + DateTime date = DateTime.now(); + await voiceRecorder.startRecorder( + toFile: '${Utils.randomString(5)}${Random().nextInt(100000)}'); + + timer(); + } + + Future cancelRecording() async { + recordingTime.value = '00:00'; + recordingTime.refresh(); + await voiceRecorder.stopRecorder(); + } + + Future stopRecording({void Function(Object)? onError}) async { + recordingTime.value = '00:00'; + recordingTime.refresh(); + if (!isRecordReady) return; + + String? path = await voiceRecorder.stopRecorder(); + audioFile = File(path!); + await sendMessage( + MessageModel( + user: chatUser, + userId: chatUser.id, + roomId: currentRoomId!, + content: '', + createdAt: DateTime.now(), + temporaryFile: File(audioFile!.path), + type: MessageType.voice, + ), + filePath: audioFile!.path, + roomId: currentRoomId, onError: (err) { + onError?.call(err); + }); + } + + RxMap voiceFiles = {}.obs; + + Map> voicePlayers = {}; + + RxMap isPlayingMap = {}.obs; + + RxMap isLoadingMap = {}.obs; + + void addVoiceFile(String id, File file) { + voiceFiles[id] = file; + voiceFiles.refresh(); + } + + Rx getVoicePlayer(String id) { + if (voicePlayers[id] != null) { + return voicePlayers[id]!; + } + voicePlayers[id] = PlayerController().obs; + return voicePlayers[id]!; + } + + void updateIsLoading(String id, bool newValue) { + isLoadingMap[id] = newValue; + isLoadingMap.refresh(); + } + + void updateIsPlaying(String id, bool newValue) { + isPlayingMap[id] = newValue; + isPlayingMap.refresh(); + } + + void clear() { + isInitialized = false; + connectionState = SocketConnectionState.notConnected.obs; + voiceFiles.clear(); + voicePlayers.clear(); + isPlayingMap.clear(); + isLoadingMap.clear(); + voiceRecorder = FlutterSoundRecorder(); + recordFile = File('record.wav'); + isRecordReady = false; + isRecording = false.obs; + recordingTime = '00:00'.obs; + isReplying = false.obs; + replyModel = MessageModel.zero().obs; + keyBoardOpened = false.obs; + scrollController = ScrollController().obs; + messagesState.clear(); + rooms = RxFuture(Pagination()); + currentRoom = null.obs; + io.clearListeners(); + } + + // RxBool isPlaying(String id) { + // if (isPlayingMap[id] != null) { + // return isPlayingMap[id]!; + // } + // isPlayingMap[id] = false.obs; + // return isPlayingMap[id]!; + // } + + // RxBool isLoading(String id) { + // if (isLoadingMap[id] != null) { + // return isLoadingMap[id]!; + // } + // isLoadingMap[id] = false.obs; + // return isLoadingMap[id]!; + // } +} + +//dummy +// RxList messages = [ +// MessageModel( +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// user: ChatUser(id: 0, name: 'name'), +// ), +// MessageModel( +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// user: ChatUser(id: 0, name: 'name'), +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// roomId: 0, +// user: ChatUser(id: 0, name: 'name'), +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// direction: MessageDirection.received, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// direction: MessageDirection.received, +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: networkImageTest, +// type: MessageType.image, +// createdAt: DateTime.now().toString(), +// direction: MessageDirection.received, +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: networkImageTest, +// type: MessageType.image, +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// repliedMessage: MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: networkImageTest, +// type: MessageType.image, +// createdAt: DateTime.now().toString(), +// direction: MessageDirection.received, +// ), +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// repliedMessage: MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// ), +// createdAt: DateTime.now().toString(), +// ), +// MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// repliedMessage: MessageModel( +// user: ChatUser(id: 0, name: 'name'), +// roomId: 0, +// userId: 0, +// content: 'message,hi', +// createdAt: DateTime.now().toString(), +// direction: MessageDirection.received, +// ), +// createdAt: DateTime.now().toString(), +// ), +// ].obs; diff --git a/lib/features/chat/data_layer/model/chat_user.dart b/lib/features/chat/data_layer/model/chat_user.dart new file mode 100644 index 0000000..ca443d1 --- /dev/null +++ b/lib/features/chat/data_layer/model/chat_user.dart @@ -0,0 +1,14 @@ +class ChatUser { + final int id; + final String name; + final String? avatar; + const ChatUser({required this.id, required this.name, this.avatar}); + + factory ChatUser.fromJson(Map jsonMap) => ChatUser( + id: jsonMap["id"], + name: jsonMap["name"], + avatar: jsonMap['avatar'], + ); + //this didn't work because default parameter value must be cosnt and factory cannot be const + factory ChatUser.zero() => ChatUser(id: 0, name: ''); +} diff --git a/lib/features/chat/data_layer/model/message.dart b/lib/features/chat/data_layer/model/message.dart new file mode 100644 index 0000000..a99a482 --- /dev/null +++ b/lib/features/chat/data_layer/model/message.dart @@ -0,0 +1,139 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'chat_user.dart'; +import 'read_by.dart'; + +class MessageModel { + int? id; + MessageType type; + String content; + MessageDirection direction; + MessageModel? repliedMessage; + DateTime createdAt; + DateTime? updatedAt; + int? userId; + int roomId; + ReadBy? readBy; + ChatUser user; + File? temporaryFile; + String? sendingStateId; + + // @constructors + MessageModel({ + this.id, + this.readBy, + this.updatedAt, + required this.user, + this.userId, + required this.roomId, + this.type = MessageType.text, + this.direction = MessageDirection.sent, + required this.content, + this.repliedMessage, + required this.createdAt, + this.temporaryFile, + this.sendingStateId, + }); + + factory MessageModel.zero() => MessageModel( + content: "", + createdAt: DateTime.now(), + user: ChatUser(id: 0, name: 'name'), + userId: 0, + roomId: 0, + //sender: const ChatUser(id: '0', name: '') + ); + factory MessageModel.copy(MessageModel messageModel) => MessageModel( + content: messageModel.content, + createdAt: messageModel.createdAt, + id: messageModel.id, + readBy: messageModel.readBy, + roomId: messageModel.roomId, + type: messageModel.type, + userId: messageModel.userId, + direction: messageModel.direction, + temporaryFile: messageModel.temporaryFile, + repliedMessage: messageModel.repliedMessage, + user: messageModel.user, + sendingStateId: messageModel.sendingStateId, + ); + factory MessageModel.fromJson(Map jsonMap, + {int? userId, int? roomId}) => + MessageModel( + id: jsonMap['id'], + roomId: roomId ?? jsonMap['roomId'] ?? jsonMap['room']['id'], + content: jsonMap['content'], + userId: userId ?? jsonMap["userId"], + repliedMessage: (jsonMap["repliedMessage"] != null) + ? MessageModel.fromJson(jsonDecode(jsonMap["repliedMessage"]), + roomId: jsonMap['roomId'] ?? jsonMap['room']['id'], + userId: jsonMap["userId"] ?? jsonMap['user']['id']) + : null, + readBy: (jsonMap['readBy'] != null) + ? ReadBy.fromJson(jsonMap['readBy']) + : null, + user: (jsonMap['User'] != null) + ? ChatUser.fromJson(jsonMap['User']) + : ((jsonMap['user'] != null) + ? ChatUser.fromJson(jsonMap['user']) + : ChatUser(id: 0, name: 'name')), + createdAt: DateTime.parse(jsonMap['createdAt']).toLocal(), + updatedAt: (jsonMap['updatedAt'] != null) + ? DateTime.parse(jsonMap['updatedAt']).toLocal() + : DateTime.parse(jsonMap['createdAt']).toLocal(), + type: getMessageType(jsonMap["type"]), + ); + + toJson() => { + "type": type.messageTypeString, + "content": content, + if (repliedMessage != null) "repliedMessage": repliedMessage!.id, + }; + static List> toJsonList( + List messagesList) { + List> jsonList = []; + messagesList.forEach((element) { + jsonList.add(element.toJson()); + }); + return jsonList; + } + + static List fromJsonList(List jsonList) { + List messages = []; + jsonList.forEach((element) { + messages.add(MessageModel.fromJson(element)); + }); + return messages; + } + + // @getters + bool get isReply => repliedMessage != null; +} + +enum MessageType { text, image, voice } + +MessageType getMessageType(String key) { + switch (key) { + case "image": + return MessageType.image; + case "voice": + return MessageType.voice; + } + return MessageType.text; +} + +extension MyStringExtension on MessageType { + String get messageTypeString { + switch (this) { + case MessageType.image: + return 'image'; + case MessageType.voice: + return 'voice'; + case MessageType.text: + return 'text'; + } + } +} + +enum MessageDirection { received, sent } diff --git a/lib/features/chat/data_layer/model/read_by.dart b/lib/features/chat/data_layer/model/read_by.dart new file mode 100644 index 0000000..4bff433 --- /dev/null +++ b/lib/features/chat/data_layer/model/read_by.dart @@ -0,0 +1,35 @@ +class ReadBy { + int id, messageId; + List ids; + ReadBy({required this.id, required this.ids, required this.messageId}); + + factory ReadBy.fromJson(Map jsonMap) => ReadBy( + id: jsonMap['id'], + messageId: jsonMap['messageId'], + ids: parsedIdsList(jsonMap['ids']), + ); + + static List parsedIdsList(String idsString) { + List parsedList = []; + String temp = ''; + for (int i = 0; i < idsString.length; i++) { + if (idsString[i] == ',' && temp != '') { + parsedList.add(int.parse(temp)); + temp = ''; + } else { + if (idsString[i] != ',') { + temp = temp + idsString[i]; + } + } + } + return parsedList; + } + + bool isReaded() { + if (ids.length > 1) { + return true; + } else { + return false; + } + } +} diff --git a/lib/features/chat/data_layer/model/replied_message.dart b/lib/features/chat/data_layer/model/replied_message.dart new file mode 100644 index 0000000..525af32 --- /dev/null +++ b/lib/features/chat/data_layer/model/replied_message.dart @@ -0,0 +1,7 @@ +import 'message.dart'; + +class RepliedMessage { + String messageText; + MessageModel replyMessageModel; + RepliedMessage({required this.messageText, required this.replyMessageModel}); +} diff --git a/lib/features/chat/data_layer/model/reply.dart b/lib/features/chat/data_layer/model/reply.dart new file mode 100644 index 0000000..a7a0b61 --- /dev/null +++ b/lib/features/chat/data_layer/model/reply.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class ReplyModel { + bool isPhoto; + bool isVoice; + + int messageId; + String messageText; + ImageProvider? image; + ReplyModel( + {this.isPhoto = false, + this.isVoice = false, + this.messageId = 0, + this.messageText = '', + this.image}); +} diff --git a/lib/features/chat/data_layer/model/room.dart b/lib/features/chat/data_layer/model/room.dart new file mode 100644 index 0000000..3e5f13b --- /dev/null +++ b/lib/features/chat/data_layer/model/room.dart @@ -0,0 +1,71 @@ +import 'package:taafee_mobile/core/utils/pagination_list.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/chat_user.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; + +class Room { + int id; + RoomType type; + ChatUser? user; + RoomState state; + MessageModel? lastMessage; + DateTime lastMessageDate; + Pagination messages = Pagination(); + + String? messagesStateId; + + // @constructors + Room({ + required this.id, + this.type = RoomType.private, + required this.user, + required this.lastMessageDate, + this.state = RoomState.active, + this.lastMessage, + }); + + factory Room.fromJson(Map jsonMap) => Room( + id: jsonMap["id"], + type: (jsonMap["type"] == "private") + ? RoomType.private + : RoomType.support, + user: jsonMap["Users"] != null + ? ChatUser.fromJson(jsonMap["Users"][0]) + : null, + lastMessageDate: DateTime.parse(jsonMap['lastMessageDate']).toLocal(), + lastMessage: + (jsonMap["Messages"] != null && jsonMap["Messages"].isNotEmpty) + ? MessageModel.fromJson(jsonMap["Messages"][0]) + : null, + state: getRoomStateByString( + jsonMap["Users"]?[0]?["user_status"]?["status"]) ?? + RoomState.active, + ); + static List fromJsonList(List jsonList) { + List rooms = []; + jsonList.forEach((element) { + if (element["type"] == "private") { + rooms.add(Room.fromJson(element)); + } + }); + return rooms; + } + + static RoomState? getRoomStateByString(String? state) { + switch (state) { + case 'active': + return RoomState.active; + case 'blocking': + return RoomState.blocking; + case 'blocked': + return RoomState.blocked; + } + return null; + } + + factory Room.copy(Room room) => + Room(id: room.id, user: room.user, lastMessageDate: room.lastMessageDate); +} + +enum RoomType { private, support } + +enum RoomState { active, blocked, blocking } diff --git a/lib/features/chat/data_layer/service/chat_files_source.dart b/lib/features/chat/data_layer/service/chat_files_source.dart new file mode 100644 index 0000000..4a5f75f --- /dev/null +++ b/lib/features/chat/data_layer/service/chat_files_source.dart @@ -0,0 +1,45 @@ +import 'dart:io'; +import 'dart:math'; +import 'package:dio/dio.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:path_provider/path_provider.dart'; + +class ChatFilesSource { + Dio _dio = Dio(BaseOptions( + baseUrl: 'https://pages-chat-dev.octa-apps.com/', + headers: { + "Authorization": LocalStorage().getChatToken(), + }, + )); + + Future uploadFile( + {required int roomId, required String filePath}) async { + Map body = { + "file": MultipartFile.fromFileSync(filePath), + "roomId": roomId, + }; + var response = await _dio.post('room/file', + data: FormData.fromMap(body), + options: Options( + headers: { + "Authorization": LocalStorage().getChatToken(), + }, + )); + return response.data['response']; + } + + Future getVoiceFile(String id) async { + Response response = await _dio.get('/room/file/$id', + options: Options( + responseType: ResponseType.bytes, + headers: { + "Authorization": LocalStorage().getChatToken(), + }, + )); + var dir = await getTemporaryDirectory(); + int random = Random(5).nextInt(10000); + var file = File('${dir.path}/audio$random.m4a'); + await file.writeAsBytes(response.data); + return file; + } +} diff --git a/lib/features/chat/data_layer/service/chat_listener.dart b/lib/features/chat/data_layer/service/chat_listener.dart new file mode 100644 index 0000000..f94f44e --- /dev/null +++ b/lib/features/chat/data_layer/service/chat_listener.dart @@ -0,0 +1,40 @@ +import 'package:get/get.dart'; + +import '../../../../core/network/socket/events.dart'; +import '../../../../core/network/socket/socket.dart'; +import '../model/message.dart'; + +class ChatListener { + SocketIO io = Get.find(); + + void receiveMessage(Function(MessageModel) handler) { + io.listen( + Events.messageIncome, (data) => handler(MessageModel.fromJson(data))); + } + + void messagesReaded(Function(int messageId, int userId) handler) { + io.listen(Events.messageRead, + (data) => handler(data['message']['id'], data['user']['id'])); + } + + // void updatedRoom(Function(int roomId, String roomStatus) handler) { + // io.listen(Events.roomUpdated, + // (data) => handler(data['roomId'], data['roomstatus'])); + // } + + void unblockedRoom(Function(int roomId) handler) { + io.listen(Events.roomUnblocked, (data) => handler(data["room"]["id"])); + } + + void blockedRoom(Function(int roomId) handler) { + io.listen(Events.roomBlocked, (data) => handler(data["room"]["id"])); + } + + void blockingRoom(Function(int roomId) handler) { + io.listen(Events.roomBlocking, (data) => handler(data["room"]["id"])); + } + + void termminatedSession(Function(dynamic) handler) { + io.listen(Events.sessionTerminated, handler); + } +} diff --git a/lib/features/chat/data_layer/service/chat_resource.dart b/lib/features/chat/data_layer/service/chat_resource.dart new file mode 100644 index 0000000..f731aa5 --- /dev/null +++ b/lib/features/chat/data_layer/service/chat_resource.dart @@ -0,0 +1,99 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/network/socket/event.dart'; +import 'package:taafee_mobile/core/network/socket/events.dart'; +import 'package:taafee_mobile/core/network/socket/socket.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/chat_user.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/room.dart'; + +class ChatResource { + SocketIO io = Get.find(); + + /// ------------- rooms ---------------- /// + //private + + Future> getRooms( + {String? searchQuery, required int currentPage}) async { + var ack = await io.emit(Event(Events.roomGet, { + "pagination": {"page": currentPage}, + if (searchQuery != null) "q": searchQuery + })); + return Room.fromJsonList(ack); + } + + Future createRoom({required int id}) async { + var ack = await io.emit( + Event(Events.roomCreate, { + "peer": {"id": id} + }), + reciveDataOnError: true); + print('my ack is $ack'); + if (ack['error'] != null && + ack['error']['msg'] == 'The resource already exists') { + print(ack['error']['justification'].toString().substring(51, 53)); + int roomId = ack['error']['meta']['roomId']; + return Room( + id: roomId, + user: ChatUser.zero(), + lastMessageDate: DateTime.now().toLocal()); + } + return Room.fromJson(ack); + } + + Future> getCurrentRoomMessages( + {required int roomId, required int page}) async { + Map> body = { + "room": {"id": roomId}, + "pagination": {"page": page} + }; + var ack = await io.emit(Event(Events.messageGet, body)); + return MessageModel.fromJsonList(ack); + } + + Future blockRoom({required int id}) async { + Map body = { + "room": {"id": id} + }; + + await io.emit(Event(Events.roomBlock, body)); + } + + Future unblockRoom({required int id}) async { + Map body = { + "room": {"id": id} + }; + await io.emit(Event(Events.roomUnblock, body)); + } + + //support + Future checkSupportRoomStatus() async { + var ack = await io.emit(Event(Events.supportRoomStatus)); + + if (ack.isEmpty) { + return null; + } + return Room.fromJson(ack[0]); + } + + Future createSupportRoom() async { + var ack = await io.emit(Event(Events.supportRoomCreate)); + + return Room.fromJson(ack); + } + + /// ------------ messages ------------ /// + Future sendMessage( + {required MessageModel messageModel, required int roomId}) async { + Map ack = await io.emit(Event(Events.messageCreate, { + "room": {"id": roomId}, + "message": messageModel.toJson(), + })); + return MessageModel.fromJson(ack); + } + + Future readMessage({required int messageId}) async { + await io.emit(Event(Events.messageRead, { + "message": {"id": messageId} + })); + } +} diff --git a/lib/features/chat/presentation_layer/screens/chat.dart b/lib/features/chat/presentation_layer/screens/chat.dart new file mode 100644 index 0000000..70178b3 --- /dev/null +++ b/lib/features/chat/presentation_layer/screens/chat.dart @@ -0,0 +1,226 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/chat_widget.dart'; +import 'package:taafee_mobile/features/home/presentation_layer/widgets/search_bar.dart'; +import '../../../../common/widgets/loader.dart'; +import '../../../../core/utils/utils.dart'; + +class ChatScreen extends StatelessWidget { + ChatScreen({super.key}); + final ChatController chatController = Get.find(); + Timer? debouncer; + TextEditingController searchFieldController = TextEditingController(); + ScrollController scrollController = ScrollController(); + String lastDate = 'today'.tr; + @override + Widget build(BuildContext context) { + if (chatController.rooms.result.data.isEmpty) { + chatController.getRooms(); + } + scrollController.addListener(() { + if (scrollController.position.atEdge && scrollController.offset != 0) { + if (searchFieldController.text != '') { + chatController.getRooms(searchQuery: searchFieldController.text); + } else { + chatController.getRooms(); + } + } + }); + int today = DateTime.now().day; + + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: RefreshIndicator( + onRefresh: () async { + if (chatController.rooms.hasError) { + await chatController.getRooms(); + } + }, + child: SingleChildScrollView( + controller: scrollController, + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget( + "chats".tr, + color: AppColors.textColor, + fontSize: 18, + ).paddingOnly(top: 30), + SearchBarWidget( + controller: searchFieldController, + onChanged: (value) { + if (debouncer?.isActive ?? false) { + debouncer!.cancel(); + } + debouncer = Timer(const Duration(seconds: 1), () async { + await chatController.getRooms( + searchQuery: value, specificPage: 1); + }); + }, + onSearch: () {}, + hint: "search_chat".tr, + radius: 7, + ), + Obx(() { + if (chatController.rooms.result.data.isNotEmpty) { + return RegularTextWidget( + Utils.formatDateDifference( + chatController.rooms.result.data[0].lastMessageDate), + ).paddingSymmetric(vertical: 20); + } + return Container(); + }), + Obx(() { + if (chatController.rooms.hasError) { + return SizedBox( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Lottie.asset( + 'assets/animations/Wifi Lottie.json', + repeat: false, + width: 120, + ).paddingAll(5).paddingOnly(top: 80), + RegularTextWidget( + 'you_have_no_internet_connection'.tr, + textAlign: TextAlign.center, + color: AppColors.textColor, + fontSize: 18.0, + ).paddingOnly(bottom: Get.height), + ], + ).center(), + ).center(); + } + if (chatController.connectionState.value == + SocketConnectionState.connected) { + if (chatController.rooms.loading && + chatController.rooms.result.data.isEmpty) { + return SizedBox(height: 300, child: Loader().center()); + } + if (chatController.connectionState.value == + SocketConnectionState.connected && + !chatController.rooms.loading && + chatController.rooms.result.data.isEmpty) { + return Column( + children: [ + Lottie.asset( + 'assets/animations/Folder Lottie.json', + repeat: false, + ), + if (searchFieldController.text == '') + RegularTextWidget('no_previous_conversations_!'.tr), + if (searchFieldController.text == '') + RegularTextWidget( + 'add_some_by_contact_with_others'.tr), + if (searchFieldController.text != '') + RegularTextWidget('no_results_found'.tr) + ], + ); + } + return Obx(() { + return ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (BuildContext context, index) { + return ChatWidget( + room: chatController.rooms.result.data[index], + ); + }, + separatorBuilder: (BuildContext context, index) { + // return Container(); + if (chatController + .rooms.result.data[index].lastMessageDate.day != + chatController.rooms.result.data[index + 1] + .lastMessageDate.day) { + String dateDifference = Utils.formatDateDifference( + chatController.rooms.result.data[index + 1] + .lastMessageDate); + if (dateDifference == lastDate) { + return Divider( + color: AppColors.dividerColor, + thickness: 2, + ).paddingSymmetric(horizontal: 20); + } + // if (dateDifference == 'last_week'.tr && + // ((chatController.rooms.result.data[index] + // .lastMessageDate.weekday < + // chatController.rooms.result.data[index + 1] + // .lastMessageDate.weekday))) { + // return Divider( + // color: AppColors.dividerColor, + // thickness: 2, + // ).paddingSymmetric(horizontal: 20); + // } + lastDate = dateDifference; + return RegularTextWidget( + dateDifference, + ).paddingSymmetric(vertical: 20); + } + + return Divider( + color: AppColors.dividerColor, + thickness: 2, + ).paddingSymmetric(horizontal: 20); + }, + itemCount: chatController.rooms.result.data.length, + ); + }); + } else { + if (chatController.connectionState.value == + SocketConnectionState.error) { + return SizedBox( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Lottie.asset( + 'assets/animations/Wifi Lottie.json', + repeat: false, + width: 120, + ).paddingAll(5).paddingOnly(top: 80), + RegularTextWidget( + 'you_have_no_internet_connection'.tr, + textAlign: TextAlign.center, + color: AppColors.textColor, + fontSize: 18.0, + ).paddingOnly(bottom: Get.height), + ], + ).center(), + ).center(); + } + return SizedBox( + width: 300, height: 300, child: Loader().center()); + } + }), + Obx(() => Visibility( + visible: (chatController.rooms.loading) && + (chatController.rooms.result.data.isNotEmpty) && + (chatController.connectionState.value != + SocketConnectionState.error), + child: Loader().center())), + Obx(() { + return Visibility( + visible: chatController.connectionState.value == + SocketConnectionState.error, + child: SizedBox( + height: Get.height * 2, + ), + ); + }) + ], + ).paddingSymmetric(horizontal: 20), + ), + ), + ).makeSafeArea(); + } +} diff --git a/lib/features/chat/presentation_layer/screens/chat_details.dart b/lib/features/chat/presentation_layer/screens/chat_details.dart new file mode 100644 index 0000000..8c103e3 --- /dev/null +++ b/lib/features/chat/presentation_layer/screens/chat_details.dart @@ -0,0 +1,421 @@ +import 'dart:developer'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/loader.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/appbar.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/chat_date_divider.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/chat_footer.dart'; +import '../../../../common/widgets/toast.dart'; +import '../../data_layer/model/room.dart'; +import '../widgets/message_widget.dart'; + +class ChatDetails extends StatelessWidget { + ChatDetails({super.key}); + + final FocusNode textFieldFocusNode = FocusNode(); + + final ChatController chatController = Get.find(); + final KeyboardVisibilityController _keyboardVisibilityController = + KeyboardVisibilityController(); + Room room = Get.arguments; + + void loadMessages() { + if (chatController.currentRoom.value!.messages.page < 2) { + chatController.getCurrentRoomMessages(); + } + } + + void loadMoreMessages() { + chatController.scrollController.value.addListener(() { + if (chatController.scrollController.value.offset > + ((chatController.currentRoom.value!.messages.length - 2) * 40)) { + chatController.getCurrentRoomMessages(); + } + }); + } + + void handleKeyBoardChanges() { + _keyboardVisibilityController.onChange.listen((bool visible) { + chatController.setkeyBoardOpened(visible); + if (visible) { + // Keyboard is opened + + log('Keyboard opened!'); + } else { + // Keyboard is closed + log('Keyboard closed!'); + } + }); + } + + void checkTablet() { + if (Responsive.isTablet()) { + Future.delayed(Duration(seconds: 2), () { + chatController.getCurrentRoomMessages(); + }); + } + } + + @override + Widget build(BuildContext context) { + loadMessages(); + loadMoreMessages(); + checkTablet(); + handleKeyBoardChanges(); + return WillPopScope( + onWillPop: () async { + if (room.type == RoomType.private) { + chatController.updateRoom(); + } + return true; + }, + child: Scaffold( + backgroundColor: AppColors.backGroundColor, + body: Stack( + children: [ + Column( + children: [ + AppBarChatWidget( + chatUser: room.user, + roomType: room.type, + avatar: room.user?.avatar, + ), + Expanded( + child: SingleChildScrollView( + physics: NeverScrollableScrollPhysics(), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Obx(() { + return SizedBox( + height: (chatController.keyBoardOpened.value) + ? (Responsive.isTablet()) + ? Get.height * 0.6 + : Get.height * 0.5 + : (Responsive.isTablet()) + ? Get.height * 0.9 + : Get.height * 0.8, + child: Obx(() { + if (chatController.currentRoom.value!.messages + .data.isEmpty && + chatController.messagesState.anyLoading) { + return Loader().center(); + } + return Obx(() { + return ListView.separated( + separatorBuilder: ((context, index) { + if (index == + chatController.currentRoom.value! + .messages.data.length - + 1) { + return ChatDateDivider( + dateTime: chatController + .currentRoom + .value! + .messages + .data[index] + .createdAt + .toString() + .substring(0, 10)); + } + if (index <= + chatController.currentRoom.value! + .messages.data.length - + 1 && + chatController + .currentRoom + .value! + .messages + .data[index] + .createdAt + .toString() + .substring(0, 10) != + chatController + .currentRoom + .value! + .messages + .data[index + 1] + .createdAt + .toString() + .substring(0, 10)) { + return ChatDateDivider( + dateTime: chatController + .currentRoom + .value! + .messages + .data[index] + .createdAt + .toString() + .substring(0, 10)); + } + + return Container(); + }), + dragStartBehavior: DragStartBehavior.down, + controller: + chatController.scrollController.value, + reverse: true, + physics: const BouncingScrollPhysics(), + itemCount: chatController.currentRoom.value! + .messages.data.length + + 1, + itemBuilder: (context, index) { + if (index > + chatController.currentRoom.value! + .messages.data.length - + 1) { + return Container(); + } + if (index == 0) { + return Obx(() { + return MessageWidget( + messageModel: chatController + .currentRoom + .value! + .messages + .data[index], + textFieldFocusNode: + textFieldFocusNode, + ).paddingOnly( + right: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection + .received) + ? Get.width * 0.5 + : 0, + left: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection.sent) + ? Get.width * 0.5 + : 0, + bottom: (chatController + .keyBoardOpened.value) + ? 100 + : 50, + ); + }); + } + if (index == + chatController.currentRoom.value! + .messages.data.length - + 1) { + if (chatController + .messagesState.anyLoading) { + return Column( + children: [ + Loader(), + Obx(() { + return MessageWidget( + messageModel: chatController + .currentRoom + .value! + .messages + .data[index], + textFieldFocusNode: + textFieldFocusNode, + ).paddingOnly( + right: (Responsive + .isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection + .received) + ? Get.width * 0.5 + : 0, + left: (Responsive + .isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection + .sent) + ? Get.width * 0.5 + : 0, + top: 16, + ); + }), + ], + ); + } + if (index == + chatController.currentRoom.value! + .messages.data.length) { + return Container(); + } + return Obx(() { + return MessageWidget( + messageModel: chatController + .currentRoom + .value! + .messages + .data[index], + textFieldFocusNode: + textFieldFocusNode, + ).paddingOnly( + right: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection + .received) + ? Get.width * 0.5 + : 0, + left: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection.sent) + ? Get.width * 0.5 + : 0, + top: 16, + ); + }); + } + return Obx(() { + return MessageWidget( + messageModel: chatController + .currentRoom + .value! + .messages + .data[index], + textFieldFocusNode: + textFieldFocusNode, + ).paddingOnly( + right: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection.received) + ? Get.width * 0.5 + : 0, + left: (Responsive.isTablet() && + chatController + .currentRoom + .value! + .messages + .data[index] + .direction == + MessageDirection.sent) + ? Get.width * 0.5 + : 0, + ); + }); + }); + }); + }), + ).paddingSymmetric(horizontal: 12); + }), + ], + ), + ), + ), + Obx(() { + return Visibility( + visible: (chatController.currentRoom.value!.state == + RoomState.active), + child: ChatFooterWidget( + focusNode: textFieldFocusNode, + ), + ); + }), + Obx(() { + return Visibility( + visible: (chatController.currentRoom.value!.state != + RoomState.active), + child: Material( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(16), + topRight: Radius.circular(16), + ), + elevation: 15, + child: Container( + width: Get.width, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(16), + topRight: Radius.circular(16), + ), + ), + child: Column( + children: [ + RegularTextWidget( + (room.state == RoomState.blocked) + ? 'you_have_blocked_this_user'.tr + : 'this_user_has_blocked_you'.tr, + fontSize: 15, + ), + Visibility( + visible: (room.state == RoomState.blocked), + child: TextButton( + onPressed: () { + if (chatController.connectionState.value == + SocketConnectionState.connected) { + chatController.unblockRoom(); + } else { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + } + }, + child: Text('unblock'.tr), + )), + ], + ).paddingOnly(top: 12, bottom: 16), + ), + ), + ); + }) + ], + ).makeSafeArea(), + Obx(() { + return Visibility( + visible: (chatController.connectionState.value != + SocketConnectionState.connected) && + chatController + .currentRoom.value!.messages.data.isNotEmpty, + child: SizedBox( + width: 160, + height: 160, + child: Lottie.asset( + 'assets/animations/Wifi Lottie.json'))) + .align(alignment: Alignment.center); + }), + ], + ), + ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/appbar.dart b/lib/features/chat/presentation_layer/widgets/appbar.dart new file mode 100644 index 0000000..10918a3 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/appbar.dart @@ -0,0 +1,116 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/chat_user.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../business logic layer/chat_controller.dart'; +import '../../data_layer/model/room.dart'; + +class AppBarChatWidget extends StatelessWidget implements PreferredSizeWidget { + @override + Size get preferredSize => const Size.fromHeight(100); + final HomeController homeController = Get.find(); + final ChatController chatController = Get.find(); + final RoomType roomType; + AppBarChatWidget( + {super.key, required this.chatUser, this.avatar, required this.roomType}); + ChatUser? chatUser; + final String? avatar; + @override + Widget build(BuildContext context) { + return Container( + color: Colors.white, + width: Get.width, + height: 70, + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Obx(() => (!homeController.isArabic.value) + ? SvgPicture.asset("assets/icons/arrow-left.svg") + : SvgPicture.asset("assets/icons/arrow right.svg")).onTap( + () { + if (roomType == RoomType.private) { + chatController.updateRoom(); + } + + RoutingManager.back(); + }, + ).expanded(Responsive.isTablet() ? 0 : 1), + if (Responsive.isTablet()) + const SizedBox( + width: 12, + ), + CircleAvatarWidget( + isUserAvatar: false, + avatarImageLink: avatar, + radius: 26, + ).expanded(Responsive.isTablet() ? 0 : 2), + if (Responsive.isTablet()) + const SizedBox( + width: 12, + ), + BoldTextWidget( + chatUser?.name ?? ('support'.tr), + color: AppColors.textColor, + fontSize: 14, + ).expanded(Responsive.isTablet() ? 0 : 6), + if (Responsive.isTablet()) Container().expanded(8), + Obx(() { + return Visibility( + visible: chatController.currentRoom.value!.state == + RoomState.active, + child: PopupMenuButton( + position: PopupMenuPosition.under, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + itemBuilder: (context) { + return [ + PopupMenuItem( + onTap: () { + if (chatController.connectionState.value == + SocketConnectionState.connected) { + chatController.blockRoom(onSuccess: () { + // RoutingManager.back(); + }); + } else { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + } + }, + child: Row( + children: [ + Icon( + Icons.block, + color: AppColors.textColor, + ), + const SizedBox( + width: 8, + ), + BoldTextWidget( + 'Block User', + color: AppColors.textColor, + ), + ], + )), + ]; + }), + ); + }) + ], + ) + .paddingSymmetric(horizontal: 10, vertical: 4) + .expanded(Responsive.isTablet() ? 4 : 4), + ], + ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/chat_date_divider.dart b/lib/features/chat/presentation_layer/widgets/chat_date_divider.dart new file mode 100644 index 0000000..d1870ad --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/chat_date_divider.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; + +class ChatDateDivider extends StatelessWidget { + const ChatDateDivider({ + super.key, + required this.dateTime, + }); + final String dateTime; + @override + Widget build(BuildContext context) { + return Row( + children: [ + Container(height: 2, color: AppColors.dividerColor).expanded(4), + RegularTextWidget( + dateTime, + fontSize: 10, + ).center().expanded(2), + Container(height: 2, color: AppColors.dividerColor).expanded(4), + ], + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/chat_footer.dart b/lib/features/chat/presentation_layer/widgets/chat_footer.dart new file mode 100644 index 0000000..a0cd90e --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/chat_footer.dart @@ -0,0 +1,224 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/replying.dart'; +import '../../../../common/const/const.dart'; +import '../../../../core/utils/utils.dart'; +import '../../data_layer/model/message.dart'; + +class ChatFooterWidget extends StatelessWidget { + final TextEditingController textController = TextEditingController(); + final ChatController chatController = Get.find(); + final FocusNode? focusNode; + ChatFooterWidget({super.key, this.focusNode}); + GlobalKey sendMessageFormKey = GlobalKey(); + + MessageModel messageModel = MessageModel.zero(); + + @override + Widget build(BuildContext context) { + messageModel.user = chatController.chatUser; + chatController.initRecorder(); + return Container( + color: Colors.transparent, + child: Column( + children: [ + Obx(() { + return Visibility( + visible: chatController.isReplying.value, + child: ReplyingWidget().paddingSymmetric( + horizontal: 10, + )); + }), + SizedBox( + height: 60, + child: Container( + color: Colors.white, + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Row( + children: [ + Obx(() { + return Visibility( + visible: !chatController.isRecording.value, + child: Form( + key: sendMessageFormKey, + child: TextFormField( + onTap: () { + chatController.scrollControllerJump(); + }, + focusNode: focusNode, + onChanged: (value) { + chatController.scrollControllerJump(); + messageModel.content = value; + }, + validator: (value) { + if (value == null || value == '') { + return "message_can't_be_empty".tr; + } + return null; + }, + textInputAction: TextInputAction.send, + cursorColor: AppColors.primeColor, + onFieldSubmitted: (value) async { + if (sendMessageFormKey.currentState!.validate()) { + messageModel.type = MessageType.text; + if (chatController.isReplying.value) { + messageModel.repliedMessage = + chatController.replyModel.value; + chatController.toggleIsReplying(); + } else { + messageModel.repliedMessage = null; + } + textController.clear(); + + await chatController.sendMessage(messageModel, + onError: (err) { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + }); + + chatController.scrollControllerJump(); + } + }, + textAlignVertical: TextAlignVertical.center, + keyboardType: TextInputType.multiline, + controller: textController, + decoration: InputDecoration( + filled: true, + fillColor: AppColors.backGroundColor, + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.backGroundColor, width: 0.5), + borderRadius: BorderRadius.circular(30), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.backGroundColor, width: 0.5), + borderRadius: BorderRadius.circular(30), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.backGroundColor, width: 5), + borderRadius: BorderRadius.circular(30), + ), + border: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.backGroundColor, width: 5), + borderRadius: BorderRadius.circular(30), + ), + contentPadding: + const EdgeInsets.symmetric(horizontal: 12), + ), + ).expanded(7), + ), + ); + }), + Obx(() { + if (chatController.isRecording.value) { + return Center( + child: RegularTextWidget( + chatController.recordingTime.value)) + .expanded(7); + } else { + return Container(); + } + }), + Obx(() { + if (chatController.isRecording.value) { + return const Icon(Icons.stop).onTap(() async { + if (chatController.isReplying.value) { + chatController.toggleIsReplying(); + } + messageModel.repliedMessage = null; + + chatController.toggleIsRecording(); + await chatController.stopRecording(onError: (err) { + Toast.showToast('you_have_no_internet_connection'.tr); + }); + chatController.scrollControllerJump(); + }).expanded(1); + } else { + return const Icon(Icons.mic).onTap(() async { + if (chatController.isReplying.value) { + chatController.toggleIsReplying(); + } + messageModel.repliedMessage = null; + chatController.toggleIsRecording(); + + await chatController.record(); + }).expanded(1); + } + }), + Obx(() { + return Visibility( + visible: chatController.isRecording.value, + child: SvgPicture.asset('assets/icons/x.svg') + .onTap(() async { + chatController.toggleIsRecording(); + await chatController.cancelRecording(); + chatController.scrollControllerJump(); + })); + }), + SvgPicture.asset("assets/icons/gallery.svg").onTap(() async { + if (chatController.isReplying.value) { + chatController.toggleIsReplying(); + } + messageModel.repliedMessage = null; + + File? pickedImage = await Utils.pickSingleImage(context); + if (pickedImage != null) { + messageModel.content = ''; + messageModel.type = MessageType.image; + messageModel.temporaryFile = pickedImage; + if (messageModel.temporaryFile != null) { + await chatController.sendMessage(messageModel, + filePath: pickedImage.path, onError: (err) { + Toast.showToast('you_have_no_internet_connection'.tr); + }); + } + } + chatController.scrollControllerJump(); + }).expanded(1), + Obx(() { + return Visibility( + visible: !chatController.isRecording.value, + child: const Icon( + Icons.send, + color: Colors.black, + ).onTap(() async { + if (sendMessageFormKey.currentState!.validate()) { + messageModel.type = MessageType.text; + if (chatController.isReplying.value) { + messageModel.repliedMessage = MessageModel.copy( + chatController.replyModel.value); + chatController.toggleIsReplying(); + } else { + messageModel.repliedMessage = null; + } + textController.clear(); + + await chatController.sendMessage(messageModel, + onError: (err) { + Toast.showToast( + 'you_have_no_internet_connection'.tr); + }); + + chatController.scrollControllerJump(); + } + }).expanded(1), + ); + }) + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/chat_widget.dart b/lib/features/chat/presentation_layer/widgets/chat_widget.dart new file mode 100644 index 0000000..2a5922b --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/chat_widget.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart'; + +import '../../data_layer/model/room.dart'; + +class ChatWidget extends StatelessWidget { + ChatWidget({super.key, required this.room}); + final Room room; + final ChatController chatController = Get.find(); + @override + Widget build(BuildContext context) { + return SizedBox( + width: Get.width, + height: 83, + child: Row( + children: [ + CircleAvatarWidget( + isUserAvatar: false, + avatarImageLink: room.user?.avatar, + ).expanded(Responsive.isTablet() ? 0 : 2), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget( + room.user?.name ?? ("support".tr), + fontSize: 14, + overflow: TextOverflow.ellipsis, + color: AppColors.textColor, + ), + if (room.lastMessage != null && + room.lastMessage!.type == MessageType.text) + SizedBox( + height: 20, + child: RegularTextWidget( + room.lastMessage!.content, + overflow: TextOverflow.ellipsis, + )), + if (room.lastMessage != null && + room.lastMessage!.type == MessageType.voice) + RegularTextWidget('voice'.tr), + if (room.lastMessage != null && + room.lastMessage!.type == MessageType.image) + RegularTextWidget('photo'.tr), + ], + ).paddingSymmetric(vertical: 13, horizontal: 20).expanded(6), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + RegularTextWidget( + room.lastMessage?.createdAt.toString().substring(11, 16) ?? + ""), + ], + ).paddingSymmetric(horizontal: 20).expanded(4), + ], + ), + ).onTap(() { + chatController.setCurrentRoom(room); + RoutingManager.to(RouteName.chatDetails, arguments: room); + }); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/circle_avatar.dart b/lib/features/chat/presentation_layer/widgets/circle_avatar.dart new file mode 100644 index 0000000..795da55 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/circle_avatar.dart @@ -0,0 +1,52 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +// ignore: must_be_immutable +class CircleAvatarWidget extends StatelessWidget { + final double? radius; + CircleAvatarWidget({ + super.key, + this.radius, + this.avatarImageLink, + required this.isUserAvatar, + }); + final HomeController homeController = Get.find(); + String? avatarImageLink; + bool isUserAvatar; + @override + Widget build(BuildContext context) { + //avatarImageLink = homeController.user.value!.avatarImage?.substring(7); + + return isUserAvatar == false + ? ((avatarImageLink == null) + ? CircleAvatar( + radius: radius ?? 30, + backgroundImage: + const AssetImage("assets/images/default_user_avatar.png"), + ) + : CircleAvatar( + radius: radius ?? 30, + backgroundImage: CachedNetworkImageProvider(Domain.domain + + homeController.user.value!.avatarImage!.substring(7)))) + : Obx(() => (homeController.isAvatarImagePicked.value == true) + ? CircleAvatar( + radius: radius ?? 30, + backgroundImage: + FileImage(homeController.pickedUserImage.value!), + ) + : (homeController.isUserHasAvatar.value == false) + ? CircleAvatar( + radius: radius ?? 30, + backgroundImage: const AssetImage( + "assets/images/default_user_avatar.png"), + ) + : CircleAvatar( + radius: radius ?? 30, + backgroundImage: CachedNetworkImageProvider(Domain.domain + + homeController.user.value!.avatarImage!.substring(7)), + )); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/image_message.dart b/lib/features/chat/presentation_layer/widgets/image_message.dart new file mode 100644 index 0000000..74ccca9 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/image_message.dart @@ -0,0 +1,117 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:chat_bubbles/bubbles/bubble_normal_image.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import '../../../../core/local_storage/local_storage.dart'; +import '../../../../core/routing/routing_manager.dart'; +import '../../business logic layer/chat_controller.dart'; + +class ImageMessage extends StatelessWidget { + ImageMessage( + {super.key, + this.dismissibleKey = const Key('image'), + required this.textFieldFocusNode, + required this.messageModel}); + + final Key dismissibleKey; + + final MessageModel messageModel; + final FocusNode textFieldFocusNode; + final ChatController chatController = Get.find(); + @override + Widget build(BuildContext context) { + return Dismissible( + key: dismissibleKey, + confirmDismiss: (direction) async { + chatController.updateReplyModel( + messageModel: messageModel, + ); + if (!chatController.isReplying.value) { + chatController.toggleIsReplying(); + } + + FocusScope.of(context).requestFocus(textFieldFocusNode); + return false; + }, + onDismissed: null, + child: BubbleNormalImage( + color: Colors.transparent, + tail: false, + isSender: messageModel.direction == MessageDirection.received + ? false + : true, + id: messageModel.id.toString(), + onTap: () { + RoutingManager.to( + RouteName.imagesGalleryView, + arguments: (messageModel.content != '') + ? [ + Domain.chatFiles + messageModel.content, + ] + : FileImage(messageModel.temporaryFile!), + ); + }, + image: messageModel.content != '' + ? CachedNetworkImage( + fit: BoxFit.cover, + imageUrl: Domain.chatFiles + messageModel.content, + httpHeaders: { + "Authorization": LocalStorage().getChatToken() ?? "", + }, + ) + : (messageModel.temporaryFile != null) + ? Image.file( + messageModel.temporaryFile!, + fit: BoxFit.cover, + ) + : Image.network( + Domain.domain + networkImageTest.substring(6), + fit: BoxFit.cover, + )), + // child: Container( + // width: Get.width * .7, + // height: 80, + // margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(8), + // image: (messageModel.content != '') + // ? DecorationImage( + // fit: BoxFit.cover, + // image: CachedNetworkImageProvider( + // Domain.chatFiles + messageModel.content, + // headers: { + // "Authorization": LocalStorage().getChatToken() ?? "", + // }, + // ), + // ) + // : (messageModel.temporaryFile != null) + // ? DecorationImage( + // fit: BoxFit.cover, + // image: FileImage(messageModel.temporaryFile!), + // ) + // : DecorationImage( + // fit: BoxFit.cover, + // image: NetworkImage(Domain.domain + networkImageTest.substring(6)), + // ), + // ), + // ).onTap(() { + // RoutingManager.to( + // RouteName.imagesGalleryView, + // arguments: (messageModel.content != '') + // ? [ + // Domain.chatFiles + messageModel.content, + // ] + // // headers: { + // // "Authorization": + // // "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJkZXZpY2VJZCI6NDE5LCJpYXQiOjE2OTI1MzIzNzV9.oju3XMeIU5ggr-L3S-kMJIZTeAs8YuD_XwcfcS8r1wY", + // // }, + // // ) + // : FileImage(messageModel.temporaryFile!), + // ); + // } + // ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/message_widget.dart b/lib/features/chat/presentation_layer/widgets/message_widget.dart new file mode 100644 index 0000000..8e136e4 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/message_widget.dart @@ -0,0 +1,145 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/room.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/recieved_message_widget.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/replied_message.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/sent_message_widget.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../data_layer/model/message.dart'; +import 'image_message.dart'; +import 'new_voice_message.dart'; + +class MessageWidget extends StatelessWidget { + MessageWidget( + {super.key, + required this.messageModel, + required this.textFieldFocusNode}); + final MessageModel messageModel; + final FocusNode textFieldFocusNode; + final ChatController chatController = Get.find(); + final HomeController homeController = Get.find(); + + @override + Widget build(BuildContext context) { + messageModel.userId ??= messageModel.user.id; + + if (messageModel.userId != chatController.chatUser.id) { + messageModel.direction = MessageDirection.received; + } + if (messageModel.direction == MessageDirection.received) { + if ((messageModel.readBy?.isReaded() != null) && + (!messageModel.readBy!.isReaded())) { + chatController.readMessage(messageId: messageModel.id!); + } + return Align( + alignment: Alignment.centerLeft, + child: Builder(builder: (context) { + if (messageModel.repliedMessage != null) { + return RepliedMessage( + messageModel: messageModel, + repliedMessageModel: messageModel.repliedMessage!, + textFieldFocusNode: textFieldFocusNode); + } + if (messageModel.type == MessageType.text) { + return RecievedMessageWidget( + textFieldFocusNode: textFieldFocusNode, + messageModel: messageModel); + } else if (messageModel.type == MessageType.image) { + return ImageMessage( + textFieldFocusNode: textFieldFocusNode, + messageModel: messageModel); + } else { + return NewVoiceMessage( + messageModel: messageModel, + //key: Key(Utils.randomString()), + textFieldFocusNode: textFieldFocusNode, + ).align(alignment: Alignment.centerLeft); + } + }), + ); + } else { + return Stack( + children: [ + Align( + alignment: Alignment.centerRight, + child: Builder(builder: (context) { + if (messageModel.repliedMessage != null) { + return RepliedMessage( + messageModel: messageModel, + repliedMessageModel: messageModel.repliedMessage!, + textFieldFocusNode: textFieldFocusNode); + } + if (messageModel.type == MessageType.text) { + return SentMessageWidget( + messageModel: messageModel, + textFieldFocusNode: textFieldFocusNode, + ); + } else if (messageModel.type == MessageType.image) { + return ImageMessage( + textFieldFocusNode: textFieldFocusNode, + messageModel: messageModel); + } else { + return NewVoiceMessage( + //key: Key(Utils.randomString()), + messageModel: messageModel, + textFieldFocusNode: textFieldFocusNode, + ); + } + }), + ), + if (messageModel.sendingStateId != null || + (messageModel.sendingStateId != null && + messageModel.type != MessageType.text && + chatController.uploadFileState.loading)) + Align( + alignment: Alignment.centerRight, + child: SizedBox( + width: 12, + height: 12, + child: CircularProgressIndicator( + color: Colors.white, + ), + ).paddingOnly(top: 12, right: 20), + ), + if ((messageModel.sendingStateId == null) && + (!messageModel.readBy!.isReaded()) && + ((messageModel.sendingStateId == null))) + Align( + alignment: Alignment.centerRight, + child: Icon( + Icons.done, + color: messageModel.type == MessageType.image + ? Colors.grey + : Colors.white, + size: 15, + ).paddingOnly( + top: 4, + right: 16, + ), + ), + if ((chatController.currentRoom.value!.type != RoomType.support) && + messageModel.sendingStateId == null && + (messageModel.readBy != null) + ? messageModel.readBy!.isReaded() + : false) + Align( + alignment: Alignment.centerRight, + child: Icon( + Icons.done_all, + color: messageModel.type == MessageType.image + ? Colors.grey + : Colors.white, + size: 15, + ).paddingOnly( + top: 4, + right: 16, + ), + ), + ], + ).paddingSymmetric( + vertical: (messageModel.type == MessageType.text) ? 4 : 0); + } + } +} diff --git a/lib/features/chat/presentation_layer/widgets/new_voice_message.dart b/lib/features/chat/presentation_layer/widgets/new_voice_message.dart new file mode 100644 index 0000000..7f91f17 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/new_voice_message.dart @@ -0,0 +1,332 @@ +import 'dart:io'; +import 'package:audio_waveforms/audio_waveforms.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; + +class NewVoiceMessage extends StatelessWidget { + NewVoiceMessage({ + super.key, + this.dismissibleKey = const Key('sent'), + required this.messageModel, + required this.textFieldFocusNode, + }); + final HomeController homeController = Get.find(); + final ChatController chatController = Get.find(); + final MessageModel messageModel; + final FocusNode textFieldFocusNode; + final Key dismissibleKey; + @override + Widget build(BuildContext context) { + PlayerController playerController = + chatController.getVoicePlayer(messageModel.content).value; + playerController.onCompletion.listen((event) { + chatController.updateIsPlaying(messageModel.content, false); + }); + playerController.onPlayerStateChanged.listen((event) { + if (event.isPaused || event.isStopped) { + chatController.updateIsPlaying(messageModel.content, false); + } + }); + return Obx(() { + return Dismissible( + confirmDismiss: (direction) async { + chatController.updateReplyModel(messageModel: messageModel); + if (chatController.isReplying.value == false) { + chatController.toggleIsReplying(); + } + + FocusScope.of(context).requestFocus(textFieldFocusNode); + return false; + }, + key: dismissibleKey, + onDismissed: null, + child: SizedBox( + width: Get.width * 0.6, + height: 90, + child: Container( + decoration: BoxDecoration( + borderRadius: + (messageModel.direction == MessageDirection.received) + ? BorderRadius.circular(10) + : null, + color: (messageModel.direction == MessageDirection.received) + ? Colors.white + : null, + image: (messageModel.direction == MessageDirection.sent) + ? const DecorationImage( + image: AssetImage('assets/images/sent message.png'), + fit: BoxFit.fill) + : null), + child: SizedBox( + width: Get.width, + height: (messageModel.direction == MessageDirection.received) + ? 100 + : null, + child: Column( + crossAxisAlignment: + (messageModel.direction == MessageDirection.received) + ? CrossAxisAlignment.start + : CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Obx(() { + return Visibility( + visible: (chatController + .isLoadingMap.value[messageModel.content] ?? + false), + child: CircleAvatar( + radius: 21.3, + backgroundColor: (messageModel.direction == + MessageDirection.received) + ? AppColors.borderColor + : Colors.white, + child: SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator( + color: (messageModel.direction == + MessageDirection.received) + ? Colors.white + : AppColors.borderColor, + ), + ), + ).paddingOnly(left: 16, top: 16), + ); + }), + Obx(() { + return Visibility( + visible: (chatController + .voiceFiles[messageModel.content] == + null && + ((chatController.isLoadingMap + .value[messageModel.content] != + null) + ? (!chatController.isLoadingMap + .value[messageModel.content]!) + : true)), + child: CircleAvatar( + radius: 21.3, + backgroundColor: (messageModel.direction == + MessageDirection.received) + ? AppColors.borderColor + : Colors.white, + child: Icon( + Icons.download, + color: (messageModel.direction == + MessageDirection.received) + ? Colors.white + : AppColors.borderColor, + ).onTap(() async { + chatController.updateIsPlaying( + messageModel.content, false); + chatController.updateIsLoading( + messageModel.content, true); + + File? file = await chatController.getVoiceFile( + id: messageModel.content); + chatController.addVoiceFile( + messageModel.content, file!); + + await playerController.preparePlayer( + path: file.path); + + chatController.updateIsLoading( + messageModel.content, false); + }), + ).paddingOnly(left: 16, top: 16), + ); + }), + Obx(() { + return Visibility( + visible: (chatController + .isPlayingMap[messageModel.content] ?? + false), + child: CircleAvatar( + radius: 21.3, + backgroundColor: (messageModel.direction == + MessageDirection.received) + ? AppColors.borderColor + : Colors.white, + child: Icon( + Icons.stop, + color: (messageModel.direction == + MessageDirection.received) + ? Colors.white + : AppColors.borderColor, + ).onTap(() async { + chatController.updateIsPlaying( + messageModel.content, false); + + await playerController.pausePlayer(); + }), + ).paddingOnly(left: 16, top: 16), + ); + }), + Obx(() { + return Visibility( + visible: ((chatController + .isPlayingMap[messageModel.content] != + null + ? !chatController + .isPlayingMap[messageModel.content]! + : true) && + chatController.voiceFiles[messageModel.content] != + null && + ((chatController.isLoadingMap + .value[messageModel.content] != + null) + ? (!chatController.isLoadingMap + .value[messageModel.content]!) + : true)), + child: SvgPicture.asset((messageModel.direction == + MessageDirection.received) + ? 'assets/icons/play_voice-2.svg' + : 'assets/icons/play_voice.svg') + .paddingOnly(top: 16, left: 16) + .onTap(() async { + chatController.updateIsPlaying( + messageModel.content, true); + await playerController.startPlayer( + finishMode: FinishMode.pause); + }), + ); + }), + Visibility( + visible: + chatController.voiceFiles[messageModel.content] == + null, + child: AudioFileWaveforms( + playerWaveStyle: (messageModel.direction == + MessageDirection.received) + ? PlayerWaveStyle( + backgroundColor: Colors.grey, + seekLineColor: Colors.grey, + fixedWaveColor: Colors.grey, + liveWaveColor: AppColors.primeColor, + ) + : const PlayerWaveStyle(), + waveformData: Constants.defaulWaveFormData, + size: homeController.isArabic.value + ? const Size(139, 30.0) + : const Size(149, 30.0), + waveformType: WaveformType.long, + playerController: playerController, + ).paddingOnly( + left: homeController.isArabic.value ? 18 : 8, + ), + ), + Visibility( + visible: + (chatController.voiceFiles[messageModel.content] != + null), + child: Builder(builder: (context) { + try { + return AudioFileWaveforms( + playerWaveStyle: (messageModel.direction == + MessageDirection.received) + ? PlayerWaveStyle( + backgroundColor: Colors.grey, + seekLineColor: Colors.grey, + fixedWaveColor: Colors.grey, + liveWaveColor: AppColors.primeColor, + ) + : const PlayerWaveStyle(), + size: homeController.isArabic.value + ? const Size(139, 30.0) + : const Size(159, 30.0), + waveformType: WaveformType.long, + playerController: playerController, + enableSeekGesture: false, + ).paddingOnly( + left: homeController.isArabic.value ? 18 : 8, + ); + } on Exception { + return AudioFileWaveforms( + playerWaveStyle: (messageModel.direction == + MessageDirection.received) + ? PlayerWaveStyle( + liveWaveColor: AppColors.primeColor, + backgroundColor: Colors.grey, + seekLineColor: Colors.grey, + fixedWaveColor: Colors.grey, + ) + : const PlayerWaveStyle(), + enableSeekGesture: false, + waveformData: Constants.defaulWaveFormData, + size: homeController.isArabic.value + ? const Size(139, 30.0) + : const Size(159, 30.0), + waveformType: WaveformType.long, + playerController: playerController, + ).paddingOnly( + left: homeController.isArabic.value ? 18 : 8, + ); + } + }), + ), + ], + ).paddingOnly( + right: homeController.isArabic.value ? 28 : 0, + ), + RegularTextWidget( + messageModel.createdAt.toString().substring(11, 16), + color: (messageModel.direction == MessageDirection.sent) + ? Colors.white + : Colors.grey, + textAlign: TextAlign.right, + fontSize: 10, + ) + .align( + alignment: (messageModel.direction == + MessageDirection.received) + ? Alignment.bottomLeft + : Alignment.bottomRight) + .paddingOnly( + right: Responsive.isTablet() ? 80 : 40, + left: (messageModel.direction == + MessageDirection.received) + ? 22 + : 0, + top: (messageModel.direction == + MessageDirection.received) + ? 8 + : 0, + ), + if (messageModel.direction == MessageDirection.sent) + const SizedBox( + height: 16, + ), + ], + ), + ).align( + alignment: (messageModel.direction == MessageDirection.received) + ? Alignment.centerLeft + : Alignment.centerRight), + ).align( + alignment: (messageModel.direction == MessageDirection.received) + ? Alignment.centerLeft + : Alignment.centerRight), + ).paddingOnly( + left: Responsive.isTablet() + ? 0 + : (messageModel.direction == MessageDirection.received) + ? 12 + : 70, + right: 0), + ).align( + alignment: (messageModel.direction == MessageDirection.received) + ? Alignment.centerLeft + : Alignment.centerRight); + }).paddingOnly( + bottom: (messageModel.direction == MessageDirection.received) ? 12 : 0); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/recieved_message_widget.dart b/lib/features/chat/presentation_layer/widgets/recieved_message_widget.dart new file mode 100644 index 0000000..80ca054 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/recieved_message_widget.dart @@ -0,0 +1,77 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../business logic layer/chat_controller.dart'; + +class RecievedMessageWidget extends StatelessWidget { + RecievedMessageWidget({ + super.key, + this.dismissibleKey = const Key('recivied'), + required this.messageModel, + required this.textFieldFocusNode, + }); + final Key dismissibleKey; + final MessageModel messageModel; + final FocusNode textFieldFocusNode; + final ChatController chatController = Get.find(); + final HomeController homeController = Get.find(); + @override + Widget build(BuildContext context) { + return Dismissible( + key: dismissibleKey, + confirmDismiss: (direction) async { + chatController.updateReplyModel( + messageModel: messageModel, + ); + if (chatController.isReplying.value == false) { + chatController.toggleIsReplying(); + } + + FocusScope.of(context).requestFocus(textFieldFocusNode); + + return false; + }, + onDismissed: null, + child: Container( + alignment: Alignment.centerLeft, + margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 7), + width: Get.width * 0.45, + //height: 66, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: Responsive.isTablet() + ? Get.width * 0.3 + : Get.width * 0.35, + child: RegularTextWidget( + messageModel.content, + color: AppColors.textMessageColor, + fontSize: 14, + ), + ).paddingOnly(top: 8), + ], + ).paddingOnly(left: 2, top: 4), + RegularTextWidget( + messageModel.createdAt.toString().substring(11, 16), + color: AppColors.timeMessageColor, + fontSize: 10, + ).paddingOnly(top: 15, left: 2, bottom: 4) + ], + ).paddingSymmetric(horizontal: 15), + ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/replied_message.dart b/lib/features/chat/presentation_layer/widgets/replied_message.dart new file mode 100644 index 0000000..9e03578 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/replied_message.dart @@ -0,0 +1,146 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/recieved_message_widget.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/sent_message_widget.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; + +class RepliedMessage extends StatelessWidget { + RepliedMessage({ + super.key, + required this.messageModel, + required this.repliedMessageModel, + required this.textFieldFocusNode, + }); + final ChatController chatController = Get.find(); + final HomeController homeController = Get.find(); + + final MessageModel repliedMessageModel; + final MessageModel messageModel; + FocusNode textFieldFocusNode; + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: homeController.isArabic.value + ? CrossAxisAlignment.start + : CrossAxisAlignment.end, + children: [ + Container( + height: 40, + decoration: BoxDecoration( + color: Colors.grey[350], + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(12), + topRight: Radius.circular(12), + ), + ), + child: SizedBox( + width: messageModel.direction == MessageDirection.sent + ? Get.width * 0.47 + : Get.width * 0.448, + child: Row( + children: [ + VerticalDivider( + width: Responsive.isTablet() ? 16 : 18, + color: Colors.white, + thickness: 4, + ).paddingOnly(top: 12, bottom: 8), + if (repliedMessageModel.type == MessageType.image) + (repliedMessageModel.content != '') + ? Image( + image: CachedNetworkImageProvider( + Domain.chatFiles + repliedMessageModel.content), + width: 100, + ).paddingSymmetric(horizontal: 6) + : Image( + image: FileImage(repliedMessageModel.temporaryFile!), + width: 100, + ).paddingSymmetric(horizontal: 6), + (repliedMessageModel.type == MessageType.image) + ? SizedBox( + width: Get.width * 0.3, + child: RegularTextWidget( + 'photo'.tr, + overflow: TextOverflow.fade, + color: Colors.white, + fontSize: 14, + maxLines: 1, + ), + ) + : (repliedMessageModel.type == MessageType.voice) + ? SizedBox( + width: Get.width * 0.3, + child: RegularTextWidget( + 'voice'.tr, + overflow: TextOverflow.fade, + color: Colors.white, + fontSize: 14, + maxLines: 1, + ), + ) + : SizedBox( + width: Get.width * 0.35, + child: RegularTextWidget( + repliedMessageModel.content, + overflow: TextOverflow.fade, + color: Colors.white, + fontSize: 14, + maxLines: 1, + ), + ), + ], + ), + ), + ).paddingOnly(right: Responsive.isTablet() ? 8 : 8).paddingOnly( + right: (messageModel.direction == MessageDirection.received) + ? (Responsive.isTablet() ? 0 : Get.width * 0.435) + : 0, + left: (messageModel.direction == MessageDirection.received) + ? ((Responsive.isTablet()) ? 8 : 0) + : 0, + ), + Stack( + children: [ + Container( + color: Colors.grey[350], + width: messageModel.direction == MessageDirection.sent + ? Get.width * 0.47 + : Get.width * 0.448, + height: 20.0, + ) + .align(alignment: Alignment.topRight) + .paddingOnly(right: Responsive.isTablet() ? 8 : 8) + .paddingOnly( + right: (messageModel.direction == MessageDirection.received) + ? (Responsive.isTablet() ? 0 : Get.width * 0.435) + : 0, + left: (messageModel.direction == MessageDirection.received) + ? ((Responsive.isTablet()) ? 8 : 0) + : 0, + ), + if (messageModel.direction == MessageDirection.sent) + SentMessageWidget( + textFieldFocusNode: textFieldFocusNode, + messageModel: messageModel) + .align( + alignment: Alignment.bottomCenter, + ), + if (messageModel.direction == MessageDirection.received) + RecievedMessageWidget( + textFieldFocusNode: textFieldFocusNode, + messageModel: messageModel) + .align( + alignment: Alignment.bottomLeft, + ), + ], + ), + ], + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/replying.dart b/lib/features/chat/presentation_layer/widgets/replying.dart new file mode 100644 index 0000000..b0603da --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/replying.dart @@ -0,0 +1,93 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; +import '../../business logic layer/chat_controller.dart'; +import '../../data_layer/model/message.dart'; + +class ReplyingWidget extends StatelessWidget { + ReplyingWidget({ + super.key, + }); + final ChatController chatController = Get.find(); + + @override + Widget build(BuildContext context) { + return Container( + height: 55, + decoration: BoxDecoration( + color: Colors.grey[350], + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(12), + topRight: Radius.circular(12), + ), + ), + child: Stack( + children: [ + Obx(() { + return Row( + children: [ + const VerticalDivider( + width: 18, + color: Colors.white, + thickness: 4, + ), + if (chatController.replyModel.value.type == MessageType.image) + (chatController.replyModel.value.content != '') + ? Image( + image: CachedNetworkImageProvider(Domain.chatFiles + + chatController.replyModel.value.content), + width: 100, + ).paddingSymmetric(horizontal: 6) + : Image( + image: FileImage( + chatController.replyModel.value.temporaryFile!), + width: 100, + ).paddingSymmetric(horizontal: 6), + (chatController.replyModel.value.type == MessageType.image) + ? RegularTextWidget( + 'photo'.tr, + overflow: TextOverflow.fade, + color: Colors.white, + fontSize: 16, + maxLines: 1, + ) + : (chatController.replyModel.value.type == + MessageType.voice) + ? RegularTextWidget( + 'voice'.tr, + overflow: TextOverflow.fade, + color: Colors.white, + fontSize: 16, + maxLines: 1, + ) + : SizedBox( + width: Get.width * 0.7, + child: RegularTextWidget( + chatController.replyModel.value.content, + overflow: TextOverflow.ellipsis, + color: Colors.white, + fontSize: 16, + maxLines: 1, + ), + ), + ], + ); + }), + SvgPicture.asset('assets/icons/x.svg') + .paddingOnly( + top: 8, + right: 8, + ) + .onTap(() { + chatController.toggleIsReplying(); + }).align(alignment: Alignment.topRight) + ], + ), + ); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/sent_message_widget.dart b/lib/features/chat/presentation_layer/widgets/sent_message_widget.dart new file mode 100644 index 0000000..74fea81 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/sent_message_widget.dart @@ -0,0 +1,122 @@ +import 'package:flutter/material.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../../../common/const/const.dart'; + +class SentMessageWidget extends StatelessWidget { + SentMessageWidget({ + super.key, + this.dismissibleKey = const Key('sent'), + required this.messageModel, + required this.textFieldFocusNode, + }); + final Key dismissibleKey; + final MessageModel messageModel; + + final ChatController chatController = Get.find(); + final HomeController homeController = Get.find(); + final FocusNode textFieldFocusNode; + @override + Widget build(BuildContext context) { + return Dismissible( + confirmDismiss: (direction) async { + chatController.updateReplyModel( + messageModel: messageModel, + ); + if (chatController.isReplying.value == false) { + chatController.toggleIsReplying(); + } + + FocusScope.of(context).requestFocus(textFieldFocusNode); + return false; + }, + key: dismissibleKey, + onDismissed: null, + child: SizedBox( + width: Get.width * 0.5, + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + Column( + children: [ + Container( + // constraints: BoxConstraints.tight(Size(400, 400)), + + decoration: BoxDecoration( + color: AppColors.sentMessageColor, + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(12), + topLeft: Radius.circular(12), + topRight: Radius.circular(12), + ), + // image: DecorationImage( + // image: AssetImage('assets/images/sent message.png'), + // fit: BoxFit.fill), + ), + child: SizedBox( + width: Get.width, + child: Column( + crossAxisAlignment: homeController.isArabic.value + ? CrossAxisAlignment.start + : CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + RegularTextWidget( + messageModel.content, + fontSize: 14, + color: Colors.white, + textAlign: homeController.isArabic.value + ? TextAlign.right + : TextAlign.left, + ) + .paddingOnly( + top: 16, + left: 8, + right: Responsive.isTablet() ? 24 : 16) + .align( + alignment: homeController.isArabic.value + ? Alignment.centerRight + : Alignment.centerLeft) + .paddingOnly( + left: 8, + right: homeController.isArabic.value ? 36 : 0), + RegularTextWidget( + messageModel.createdAt.toString().substring(11, 16), + color: Colors.white, + textAlign: TextAlign.right, + fontSize: 10, + ).paddingOnly( + right: Responsive.isTablet() ? 70 : 40, + top: 8, + bottom: (messageModel.content.length > 34) ? 8 : 0), + // const SizedBox( + // height: 16, + // ), + ], + ), + ).align(alignment: Alignment.centerRight), + ).align(alignment: Alignment.centerRight), + ], + ).paddingOnly(bottom: 8, right: 5), + Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Image.asset( + 'assets/images/sent message shape.png', + width: 20, + height: 20, + ).align(alignment: Alignment.bottomRight), + ], + ) + ], + ), + ).paddingOnly(left: Responsive.isTablet() ? 0 : 70), + ).align(alignment: Alignment.centerRight); + } +} diff --git a/lib/features/chat/presentation_layer/widgets/voice_message.dart b/lib/features/chat/presentation_layer/widgets/voice_message.dart new file mode 100644 index 0000000..7f31eb7 --- /dev/null +++ b/lib/features/chat/presentation_layer/widgets/voice_message.dart @@ -0,0 +1,200 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:audio_waveforms/audio_waveforms.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import '../../../../common/const/const.dart'; + +class VoiceMessage extends StatefulWidget { + VoiceMessage({ + super.key, + this.file, + required this.textFieldFocusNode, + required this.messageModel, + this.dismissibleKey = const Key('sent'), + }); + final Key dismissibleKey; + final FocusNode textFieldFocusNode; + final MessageModel messageModel; + File? file; + @override + State createState() => _VoiceMessageState(); +} + +class _VoiceMessageState extends State { + final ChatController chatController = Get.find(); + final PlayerController playerController = PlayerController(); + final HomeController homeController = Get.find(); + bool isPlaying = false; + bool isLoading = false; + bool showDefaulWaves = true; + String? voiceUrl; + List waveFormData = Constants.defaulWaveFormData; + + @override + void initState() { + setState(() { + if (widget.file != null) { + playerController.preparePlayer(path: widget.file!.path); + showDefaulWaves = false; + if (chatController.voiceFiles[widget.messageModel.content] == null) { + chatController.voiceFiles[widget.messageModel.content] = widget.file!; + } + } + }); + voiceUrl = Domain.chatFiles + widget.messageModel.content; + + playerController.onCompletion.listen((event) { + setState(() { + isPlaying = false; + }); + }); + playerController.onPlayerStateChanged.listen((event) { + if (event.isPaused || event.isStopped) { + setState(() { + isPlaying = false; + }); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Obx(() { + return Dismissible( + confirmDismiss: (direction) async { + chatController.updateReplyModel(messageModel: widget.messageModel); + if (chatController.isReplying.value == false) { + chatController.toggleIsReplying(); + } + + FocusScope.of(context).requestFocus(widget.textFieldFocusNode); + return false; + }, + key: widget.dismissibleKey, + onDismissed: null, + child: SizedBox( + width: Get.width * 0.7, + child: Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/images/sent message.png'), + fit: BoxFit.fill)), + child: SizedBox( + width: Get.width, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + if (isLoading) + const CircleAvatar( + radius: 21.3, + backgroundColor: Colors.white, + child: CircularProgressIndicator( + color: Colors.grey, + ), + ).paddingOnly(left: 16, top: 16), + if (widget.file == null && !isLoading) + CircleAvatar( + radius: 21.3, + backgroundColor: Colors.white, + child: const Icon( + Icons.download, + color: Colors.grey, + ).onTap(() async { + setState(() { + isPlaying = false; + isLoading = true; + }); + widget.file = await chatController.getVoiceFile( + id: widget.messageModel.content); + chatController + .voiceFiles[widget.messageModel.content] = + widget.file!; + await playerController.preparePlayer( + path: widget.file!.path); + + setState(() { + isLoading = false; + showDefaulWaves = false; + }); + }), + ).paddingOnly(left: 16, top: 16), + if (isPlaying) + CircleAvatar( + radius: 21.3, + backgroundColor: Colors.white, + child: const Icon( + Icons.stop, + color: Colors.grey, + ).onTap(() async { + setState(() { + isPlaying = false; + }); + + await playerController.pausePlayer(); + }), + ).paddingOnly(left: 16, top: 16), + if (!isPlaying && widget.file != null && !isLoading) + SvgPicture.asset('assets/icons/play_voice.svg') + .paddingOnly(top: 16, left: 16) + .onTap(() async { + setState(() { + isPlaying = true; + }); + await playerController.startPlayer( + finishMode: FinishMode.pause); + }), + Visibility( + visible: showDefaulWaves, + child: AudioFileWaveforms( + waveformData: waveFormData, + size: const Size(160, 50.0), + waveformType: WaveformType.fitWidth, + playerController: playerController, + ).paddingOnly( + left: homeController.isArabic.value ? 20 : 8, + ), + ), + Visibility( + visible: !showDefaulWaves, + child: AudioFileWaveforms( + size: const Size(160, 50.0), + waveformType: WaveformType.fitWidth, + playerController: playerController, + ).paddingOnly( + left: homeController.isArabic.value ? 20 : 8, + ), + ), + ], + ).paddingOnly( + right: homeController.isArabic.value ? 36 : 0, + ), + RegularTextWidget( + widget.messageModel.createdAt.toString().substring(11, 16), + color: Colors.white, + textAlign: TextAlign.right, + fontSize: 10, + ) + .align(alignment: Alignment.bottomRight) + .paddingOnly(right: Responsive.isTablet() ? 80 : 40), + const SizedBox( + height: 16, + ), + ], + ), + ).align(alignment: Alignment.centerRight), + ).align(alignment: Alignment.centerRight), + ).paddingOnly(left: Responsive.isTablet() ? 0 : 70, right: 0), + ).align(alignment: Alignment.centerRight); + }); + } +} diff --git a/lib/features/favorite/business_logic_layer/favorite_controller.dart b/lib/features/favorite/business_logic_layer/favorite_controller.dart new file mode 100644 index 0000000..ad01b18 --- /dev/null +++ b/lib/features/favorite/business_logic_layer/favorite_controller.dart @@ -0,0 +1,73 @@ +import 'package:get/get.dart'; +import 'package:taafee_mobile/features/favorite/data_layer/model/favorite.dart'; +import 'package:taafee_mobile/features/favorite/data_layer/source/favorite_service.dart'; +import 'package:rx_future/rx_future.dart'; + +import '../../card/data_layer/model/card_model.dart'; + +class FavoriteController extends GetxController { + FavoriteService favoriteService = FavoriteService(); + + ///-----------get favorite-----------// + RxFuture> getFavoriteState = RxFuture([]); + + Future getFavorites({void Function(Object)? onConnectionError}) async { + await getFavoriteState.observe((p0) async { + return await favoriteService.getFavorites( + onConnectionError: onConnectionError); + }); + } + + bool isCardFav(int id) { + bool isCardFav = false; + for (var element in getFavoriteState.result) { + if (element.cardModel.id == id) { + isCardFav = true; + break; + } + } + return isCardFav; + } + + FavoriteModel? getFavCardById(int id) { + for (var element in getFavoriteState.value.value) { + if (element.cardModel.id == id) { + return element; + } + } + return null; + } + + void toggleFavoriteCard(int id, {int userId = 0, CardModel? cardModel}) { + if (isCardFav(id)) { + FavoriteModel modelToRemove = getFavCardById(id)!; + getFavoriteState.update((val) { + val!.value.remove(modelToRemove); + }); + getFavoriteState.refresh(); + } else { + getFavoriteState.update((val) { + val!.value + .add(FavoriteModel(id: id, userId: userId, cardModel: cardModel!)); + }); + getFavoriteState.refresh(); + } + + // List temp = getFavoriteState.result; + // for (int i = 0; i < temp.length; i++) { + // if (temp[i].cardModel.id == id) { + // temp[i].cardModel.isFav = !getFavoriteState.result[i].cardModel.isFav; + + // break; + // } + // } + // getFavoriteState.update((val) { + // val!.value = temp; + // }); + // getFavoriteState.refresh(); + // // cardState.result.data.firstWhere((element) => element.id == id).isFav = + // // !removeFromFavorite; + + // update(); + } +} diff --git a/lib/features/favorite/data_layer/model/favorite.dart b/lib/features/favorite/data_layer/model/favorite.dart new file mode 100644 index 0000000..e7ce8e5 --- /dev/null +++ b/lib/features/favorite/data_layer/model/favorite.dart @@ -0,0 +1,27 @@ +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; + +class FavoriteModel { + int id; + int userId; + CardModel cardModel; + FavoriteModel( + {required this.id, required this.userId, required this.cardModel}); + + factory FavoriteModel.fromJson(Map json) => FavoriteModel( + id: json["id"], + userId: json["user_id"], + cardModel: CardModel.fromJson( + json["card"], + ), + ); + + static List fromJsonList(Map json) { + List favorites = []; + json["data"].forEach( + (element) => favorites.add( + FavoriteModel.fromJson(element), + ), + ); + return favorites; + } +} diff --git a/lib/features/favorite/data_layer/source/favorite_service.dart b/lib/features/favorite/data_layer/source/favorite_service.dart new file mode 100644 index 0000000..5c0c708 --- /dev/null +++ b/lib/features/favorite/data_layer/source/favorite_service.dart @@ -0,0 +1,19 @@ +import 'package:taafee_mobile/features/favorite/data_layer/model/favorite.dart'; + +import '../../../../core/apis/apis.dart'; +import '../../../../core/network/http.dart'; + +class FavoriteService { + Future> getFavorites( + {void Function(Object)? onConnectionError}) async { + Request request = Request( + EndPoint.favorite, + RequestMethod.get, + cacheable: true, + authorized: true, + ); + Map response = + await request.sendRequest(onConnectionError: onConnectionError); + return FavoriteModel.fromJsonList(response); + } +} diff --git a/lib/features/favorite/presentation_layer/screens/favorite.dart b/lib/features/favorite/presentation_layer/screens/favorite.dart new file mode 100644 index 0000000..fc22c29 --- /dev/null +++ b/lib/features/favorite/presentation_layer/screens/favorite.dart @@ -0,0 +1,98 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/gridview.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart'; +import 'package:taafee_mobile/features/favorite/presentation_layer/widgets/favorite_card.dart'; + +class FavoriteScreen extends StatelessWidget { + final CardController cardController = Get.find(); + final FavoriteController favoriteController = Get.find(); + FavoriteScreen({super.key}); + + @override + Widget build(BuildContext context) { + if (favoriteController.getFavoriteState.result.isEmpty) { + favoriteController.getFavorites(onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }); + } + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BoldTextWidget( + "favorite".tr, + fontSize: 16, + color: AppColors.textColor, + ).paddingOnly(top: 30, bottom: 20).paddingSymmetric(horizontal: 20), + RxViewer( + errorHeight: Get.width, + errorWidth: Get.height * 0.75, + width: Get.width, + height: Get.height * 0.75, + rxFuture: favoriteController.getFavoriteState, + child: () => + (favoriteController.getFavoriteState.result.isNotEmpty) + ? GridViewWidget( + mainAxisExtent: 150, + count: Responsive.isTablet() ? 3 : 2, + itemCount: + favoriteController.getFavoriteState.result.length, + child: (index) => Obx(() { + return FavoriteCardWidget( + favoriteModel: favoriteController + .getFavoriteState.result[index], + ).onTap(() { + RoutingManager.to(RouteName.cardDetails, + arguments: favoriteController.getFavoriteState + .result[index].cardModel); + }); + }), + ) + : SizedBox( + height: Get.height * 0.75, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + width: 128, + height: 128, + child: Lottie.asset( + 'assets/animations/No Favorites.json', + repeat: false, + ), + ), + RegularTextWidget( + 'add_some_favorite_cards !'.tr, + fontSize: Responsive.isTablet() ? 18 : 16, + ), + ], + ).center(), + ), + ) + // const ListViewWidget( + // itemCount: 8, + // child: CardWidget(), + // ).paddingSymmetric(vertical: 10) + , + // if (favoriteController.getFavoriteState.result.length < 10) + // SizedBox( + // height: Get.height * 0.6, + // ), + ], + ), + ), + //), + ).makeSafeArea(); + } +} diff --git a/lib/features/favorite/presentation_layer/widgets/favorite_card.dart b/lib/features/favorite/presentation_layer/widgets/favorite_card.dart new file mode 100644 index 0000000..9820a12 --- /dev/null +++ b/lib/features/favorite/presentation_layer/widgets/favorite_card.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card_header.dart'; +import 'package:taafee_mobile/features/favorite/data_layer/model/favorite.dart'; + +class FavoriteCardWidget extends StatelessWidget { + final FavoriteModel favoriteModel; + const FavoriteCardWidget({super.key, required this.favoriteModel}); + + @override + Widget build(BuildContext context) { + return Container( + color: Colors.white, + width: Get.width * .44, + height: 150, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + CardHeaderWidget( + cardModel: favoriteModel.cardModel, + isFavoriteCardWidget: true, + ), + const SizedBox( + height: 10, + ), + Row( + children: [ + SvgPicture.asset("assets/icons/love-svgrepo-com 2.svg"), + MediumTextWidget( + " ${favoriteModel.cardModel.user.firstName + ' ' + favoriteModel.cardModel.user.lastName}"), + ], + ).paddingSymmetric(horizontal: 10), + const SizedBox( + height: 10, + ), + SizedBox( + width: Responsive.isTablet() ? Get.width : null, + child: Row( + children: [ + SvgPicture.asset( + "assets/icons/phone.svg", + ), + MediumTextWidget(" ${favoriteModel.cardModel.phoneNumber}") + ], + ).paddingSymmetric(horizontal: 13), + ), + const SizedBox( + height: 10, + ), + SizedBox( + width: Responsive.isTablet() ? Get.width : null, + child: Row( + children: [ + SvgPicture.asset( + "assets/icons/location.svg", + ), + SizedBox( + width: Responsive.isTablet() + ? Get.width * 0.2 + : Get.width * 0.3, + child: MediumTextWidget( + " ${favoriteModel.cardModel.cityModel.name} , ${favoriteModel.cardModel.cityModel.country}", + overflow: TextOverflow.ellipsis, + ), + ), + ], + ).paddingOnly(left: 8), + ), + ], + ).paddingOnly(bottom: 4)); + } +} diff --git a/lib/features/home/business_logic_layer/home_controller.dart b/lib/features/home/business_logic_layer/home_controller.dart new file mode 100644 index 0000000..14ea9e4 --- /dev/null +++ b/lib/features/home/business_logic_layer/home_controller.dart @@ -0,0 +1,170 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/home/data_layer/model/city.dart'; +import 'package:taafee_mobile/features/home/data_layer/model/search.dart'; +import 'package:taafee_mobile/features/home/data_layer/source/home_service.dart'; +import 'package:rx_future/rx_future.dart'; +import '../../../core/utils/pagination_list.dart'; +import '../../auth/data_layer/model/user.dart'; + +class HomeController extends GetxController { +//---------data source----------/// + LocalStorage storage = LocalStorage(); + HomeService homeService = HomeService(); + + //------------navBar------------/// + RxInt selectIndex = 0.obs; + + void onPress(index) { + if (index == 1 || index == 2) { + if (storage.getIsGuest() ?? true) { + Get.defaultDialog( + title: '', + content: Column( + children: [ + BoldTextWidget('you_have_to_sign_in'.tr), + const SizedBox( + height: 20, + ), + ButtonWidget( + onTap: () { + RoutingManager.offAll(RouteName.login); + storage.clearCache(); + storage.savefirstTimeOpened(); + }, + title: 'sign_in'.tr) + ], + )); + return; + } + } + selectIndex.value = index; + selectIndex.refresh(); + } + + //------------read user----------//// + + //pick avatar image + Rx pickedUserImage = null.obs; + RxBool isAvatarImagePicked = false.obs; + RxBool isUserHasAvatar = false.obs; + Rx user = User.zero().obs; + + void readUser() { + user.value = storage.getUser(); + if (user.value!.avatarImage != null) { + isUserHasAvatar.value = true; + } else { + isUserHasAvatar.value = false; + } + + user.refresh(); + isUserHasAvatar.refresh(); + } + + void setPickedUserImage(File? file) async { + if (file != null) { + pickedUserImage = file.obs; + isAvatarImagePicked.value = true; + isAvatarImagePicked.refresh(); + pickedUserImage.refresh(); + update(); + } + } + + void clearPickedUserImage() async { + isAvatarImagePicked.value = false; + isAvatarImagePicked.refresh(); + pickedUserImage = null.obs; + pickedUserImage.refresh(); + } + +//---------------get cities-----------------// + RxFuture> cityState = RxFuture([]); + + Future getCities({String? value}) async { + await cityState.observe((p0) async { + return await homeService.getCities(value: value); + }); + } + +//----------------search------------------// + RxFuture> searchState = RxFuture(Pagination.zero()); + Rx searchModel = SearchModel.zero().obs; + RxBool isUserSearching = false.obs; + + void setCityName(String newCityName) { + searchModel.value.cityName = newCityName; + searchModel.refresh(); + } + + void setCategoryName(String newCategoryName) { + searchModel.value.categoryName = newCategoryName; + searchModel.refresh(); + } + + void changeUserSearchingState(bool newState) { + isUserSearching.value = newState; + if (newState == false) { + searchModel.value.categoryId = null; + searchModel.value.cityId = null; + searchModel.value.categoryName = null; + searchModel.value.cityName = null; + } + + isUserSearching.refresh(); + searchModel.refresh(); + } + + void clearSearchFilters() { + searchModel.value.categoryId = null; + searchModel.value.cityId = null; + searchModel.value.categoryName = null; + searchModel.value.cityName = null; + searchModel.value.searchWords = null; + searchModel.refresh(); + } + + Future search({ + void Function(Pagination)? onSuccess, + void Function(Object)? onError, + }) async { + if (searchModel.value.searchWords == '') { + searchModel.value.searchWords = null; + } + changeUserSearchingState(true); + await searchState.observe( + (p0) async { + await p0!.nextPage((currentPage) async { + searchModel.value.page = currentPage; + List cards = + await homeService.searchCards(searchModel.value); + if (cards.isEmpty) return []; + + return cards; + }); + return p0; + }, + onSuccess: onSuccess, + onError: onError, + ); + } + + ///------------Ui changes according to language---------/// + RxBool isArabic = false.obs; + void setUiLanguage(String languageCode) { + if (languageCode == Languages.arabic.code) { + isArabic.value = true; + } else { + isArabic.value = false; + } + isArabic.refresh(); + } +} diff --git a/lib/features/home/data_layer/model/city.dart b/lib/features/home/data_layer/model/city.dart new file mode 100644 index 0000000..17b133a --- /dev/null +++ b/lib/features/home/data_layer/model/city.dart @@ -0,0 +1,98 @@ +import 'package:get/get.dart'; + +class CityModel { + int id; + String enName; + String cnName; + String arName; + String enCountry; + String cnCountry; + String arCountry; + int countryId; + + String get name { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return arName; + case 'en': + return enName; + case 'cn': + return cnName; + } + return enName; + } + + String get country { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return arCountry; + case 'en': + return enCountry; + case 'cn': + return cnCountry; + } + return enName; + } + + CityModel({ + required this.id, + required this.enName, + required this.cnName, + required this.arName, + required this.arCountry, + required this.cnCountry, + required this.enCountry, + required this.countryId, + }); + + factory CityModel.fromJson(Map json) => CityModel( + id: json["id"], + enName: json["en_name"], + cnName: json["cn_name"], + arName: json["ar_name"], + countryId: json["country_id"], + arCountry: json["country_ar"], + enCountry: json["country_en"], + cnCountry: json["country_cn"], + ); + + factory CityModel.zero() => CityModel( + id: 0, + enName: 'city'.tr, + cnName: 'city'.tr, + arName: 'city'.tr, + arCountry: '', + cnCountry: '', + enCountry: '', + countryId: 0); + + static List fromJsonList(Map json) { + List cities = []; + + json["data"].forEach( + (element) => cities.add( + CityModel.fromJson(element), + ), + ); + return cities; + } + + bool compare(CityModel cityModel) { + if (id == cityModel.id) { + return true; + } + if (name == cityModel.name) { + return true; + } + if (countryId == cityModel.countryId) { + return true; + } + if (country == cityModel.country) { + return true; + } else { + return false; + } + } +} diff --git a/lib/features/home/data_layer/model/search.dart b/lib/features/home/data_layer/model/search.dart new file mode 100644 index 0000000..28eb2fa --- /dev/null +++ b/lib/features/home/data_layer/model/search.dart @@ -0,0 +1,21 @@ +class SearchModel { + int? categoryId; + int? cityId; + int? page; + String? searchWords; + String? cityName; + String? categoryName; + + SearchModel({this.categoryId, this.cityId, this.searchWords, this.page}); + factory SearchModel.zero() => SearchModel(); + Map toJson() { + Map data = { + if (page != null) 'page': page, + if (searchWords != null) 'name': searchWords, + if (categoryId != null) 'category_id': categoryId, + if (cityId != null) 'city_id': cityId, + }; + + return data; + } +} diff --git a/lib/features/home/data_layer/source/home_service.dart b/lib/features/home/data_layer/source/home_service.dart new file mode 100644 index 0000000..96ea6b2 --- /dev/null +++ b/lib/features/home/data_layer/source/home_service.dart @@ -0,0 +1,28 @@ +import 'package:taafee_mobile/core/apis/apis.dart'; +import 'package:taafee_mobile/core/network/http.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/home/data_layer/model/city.dart'; +import 'package:taafee_mobile/features/home/data_layer/model/search.dart'; + +class HomeService { + Future> getCities({String? value}) async { + Request request = Request( + EndPoint.city, + RequestMethod.get, + authorized: true, + queryParams: { + if (value != null) "nameAndCountry": value, + }, + ); + Map response = await request.sendRequest(); + return CityModel.fromJsonList(response); + } + + /// ------------------------search----------------------------------/// + Future> searchCards(SearchModel searchModel) async { + Request request = Request(EndPoint.search, RequestMethod.get, + queryParams: searchModel.toJson(), authorized: true); + Map response = await request.sendRequest(); + return CardModel.fromJsonList(response); + } +} diff --git a/lib/features/home/presentation_layer/screens/home.dart b/lib/features/home/presentation_layer/screens/home.dart new file mode 100644 index 0000000..89c6b8c --- /dev/null +++ b/lib/features/home/presentation_layer/screens/home.dart @@ -0,0 +1,333 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/gridview.dart'; +import 'package:taafee_mobile/common/widgets/loader.dart'; +import 'package:taafee_mobile/common/widgets/responsive_view.dart'; +import 'package:taafee_mobile/common/widgets/rx_viewer.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart'; +import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart'; +import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/card.dart'; +import 'package:taafee_mobile/features/card/presentation_layer/widgets/random_card_widget.dart'; +import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart'; +import 'package:taafee_mobile/features/category/presentation_layer/widgets/category.dart'; +import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_controller.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import 'package:taafee_mobile/features/home/presentation_layer/widgets/appbar.dart'; + +class HomeScreen extends StatelessWidget { + final HomeController homeController = Get.find(); + final CategoryController categoryController = Get.find(); + final CardController cardController = Get.find(); + final ScrollController scrollController = ScrollController(); + final ScrollController searchScrollController = ScrollController(); + final AuthController authController = Get.find(); + final ChatController chatController = Get.find(); + HomeScreen({super.key}); + + Future load() async { + await Future.wait([ + if (categoryController.categoryState.result.isEmpty) + categoryController.getCategories(onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }), + if (cardController.cardState.result.data.isEmpty) + cardController.getCards(onConnectionError: (e) { + Toast.showToast('no_internert_connection'.tr); + }) + ]); + } + + Future refresh() async { + cardController.cardState.result.clear(); + categoryController.categoryState.result.clear(); + + await load(); + } + + void moreDate() { + scrollController.addListener(() { + if (scrollController.position.atEdge && scrollController.offset != 0) { + if (homeController.isUserSearching.value) { + homeController.search(); + } else { + cardController.getCards(); + } + } + }); + } + + TextEditingController textEditingController = TextEditingController(); + @override + Widget build(BuildContext context) { + Future.delayed(const Duration(microseconds: 1), () async { + homeController.readUser(); + }); + load(); + moreDate(); + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: Obx( + () => RefreshIndicator( + onRefresh: () async { + await refresh(); + }, + child: SingleChildScrollView( + controller: scrollController, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppBarWidget( + textEditingController: textEditingController, + ), + (homeController.isUserSearching.value) + ? searchResults() + : Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + "categories".tr, + color: AppColors.textColor, + fontSize: (Responsive.isTablet() ? 18 : 16), + ), + RegularTextWidget("see_all".tr).onTap(() { + RoutingManager.to(RouteName.categoryScreen); + }) + ], + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 30 : 20, + vertical: 20), + RxViewer( + width: 150, + height: 150, + rxFuture: categoryController.categoryState, + child: () => GridViewWidget( + mainAxisExtent: + Responsive.isTablet() ? 90 : null, + count: Responsive.isTablet() ? 4 : 3, + itemCount: Responsive.isTablet() + ? ((categoryController + .categoryState.result.length < + 8) + ? categoryController + .categoryState.result.length + : 8) + : ((categoryController + .categoryState.result.length < + 6) + ? categoryController + .categoryState.result.length + : 6), + child: (index) => CategoryWidget( + categoryController + .categoryState.result[index]), + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 25 : 0, + ), + ), + BoldTextWidget( + "latest_add".tr, + fontSize: (Responsive.isTablet() ? 18 : 16), + color: AppColors.textColor, + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 30 : 20, + vertical: 10), + Obx( + () { + if (cardController.cardState.loading && + cardController + .cardState.result.isFirstPage) { + return Loader( + width: 150, + height: 150, + ).center(); + } else if (cardController.cardState.hasError) { + return Column( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Lottie.asset( + 'assets/animations/Wifi Lottie.json', + repeat: false, + width: 120, + ).paddingAll(5), + RegularTextWidget( + 'you_have_no_internet_connection'.tr, + textAlign: TextAlign.center, + color: AppColors.textColor, + fontSize: 18.0, + ), + SizedBox( + height: Get.height, + ), + ], + ).center(); + } else { + return Obx(() { + return ResponsiveView( + mainAxisExtent: + Responsive.isTablet() ? 200 : 158, + itemCount: cardController + .cardState.result.data.length, + childBuilder: (index) { + return Obx(() { + return RandomCardWidget( + cardController + .cardState.result.data[index], + ); + }); + }); + }); + } + }, + ), + if (cardController.cardState.loading && + !cardController.cardState.result.isFirstPage) + Loader( + width: 40, + height: 40, + ), + ], + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 16 : 8), + ], + ), + ), + ), + )).makeSafeArea(); + } + + RxViewer searchResults() { + return RxViewer( + // width: Get.width * 0.5, + height: Get.height * 0.5, + withPagination: true, + errorWidget: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + 'search_results'.tr, + fontSize: 18, + color: AppColors.textColor, + ) + .align(alignment: Alignment.topLeft) + .padding(const EdgeInsets.only( + left: 16, + )), + SvgPicture.asset( + "assets/icons/x.svg", + ).onTap(() { + textEditingController.clear(); + homeController.changeUserSearchingState(false); + homeController.searchState.result.clear(); + }), + ], + ).paddingOnly(top: 24, bottom: 16, right: 18), + SizedBox( + height: Get.height * 0.08, + ), + Lottie.asset( + 'assets/animations/Wifi Lottie.json', + repeat: false, + width: 120, + ).paddingAll(5), + RegularTextWidget( + 'you_have_no_internet_connection'.tr, + color: AppColors.textColor, + fontSize: 18.0, + ) + ], + ).paddingSymmetric(horizontal: (Responsive.isTablet()) ? 40 : 0).center(), + + rxFuture: homeController.searchState, + child: () => (homeController.searchState.result.data.isNotEmpty) + ? Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + 'search_results'.tr, + fontSize: 18, + color: AppColors.textColor, + ) + .align(alignment: Alignment.topLeft) + .padding(EdgeInsets.only( + left: Responsive.isTablet() ? 40 : 16, + )), + SvgPicture.asset( + "assets/icons/x.svg", + ).onTap(() { + textEditingController.clear(); + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(false); + }).paddingOnly(right: Responsive.isTablet() ? 40 : 0), + ], + ).paddingOnly(top: 24, bottom: 16, right: 18), + Obx(() { + return ResponsiveView( + mainAxisExtent: 180, + itemCount: homeController.searchState.result.length, + childBuilder: (index) => CardWidget( + homeController.searchState.result.data[index]), + ); + }), + ], + ).paddingSymmetric(horizontal: (Responsive.isTablet()) ? 40 : 0) + : Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BoldTextWidget( + 'search_results'.tr, + fontSize: 18, + color: AppColors.textColor, + ) + .align(alignment: Alignment.topLeft) + .padding(const EdgeInsets.only( + left: 16, + )), + SvgPicture.asset( + "assets/icons/x.svg", + ).onTap(() { + textEditingController.clear(); + homeController.searchState.result.clear(); + homeController.changeUserSearchingState(false); + }), + ], + ).paddingOnly(top: 24, bottom: 16, right: 18), + SizedBox( + height: Get.height * 0.08, + ), + SizedBox( + width: 120, + height: 120, + child: Lottie.asset( + 'assets/animations/Folder Lottie.json', + repeat: false, + )), + RegularTextWidget( + 'no_results_found'.tr, + color: AppColors.textColor, + fontSize: 18.0, + ) + ], + ).paddingSymmetric(horizontal: (Responsive.isTablet()) ? 40 : 0), + ); + } +} diff --git a/lib/features/home/presentation_layer/screens/super_home.dart b/lib/features/home/presentation_layer/screens/super_home.dart new file mode 100644 index 0000000..921cc53 --- /dev/null +++ b/lib/features/home/presentation_layer/screens/super_home.dart @@ -0,0 +1,214 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/account/presentation_layer/screens/account.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/chat/data_layer/model/message.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/screens/chat.dart'; +import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart'; +import 'package:taafee_mobile/features/favorite/presentation_layer/screens/favorite.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +import '../../../../common/const/const.dart'; +import '../../../auth/data_layer/model/user.dart'; +import '../../../card/data_layer/model/card_model.dart'; +import '../../../card/data_layer/source/card_service.dart'; +import '../../../chat/business logic layer/chat_controller.dart'; +import '../../../chat/data_layer/model/room.dart'; +import 'home.dart'; + +class SuperHome extends StatelessWidget { + final List screens = [ + HomeScreen(), + FavoriteScreen(), + ChatScreen(), + AccountScreen(), + ]; + final HomeController homeController = Get.find(); + final AuthController authController = Get.find(); + final ChatController chatController = Get.find(); + final FavoriteController favoriteController = Get.find(); + SuperHome({super.key}); + + @override + Widget build(BuildContext context) { + Future.delayed(const Duration(microseconds: 100), () async { + authController.isGuest.value = + homeController.storage.getIsGuest() ?? true; + if (!authController.isGuest.value) { + chatController.init(handler: (message) { + if (Get.currentRoute != RouteName.chatDetails && + chatController.chatUser.id != message.user.id) { + Get.snackbar( + 'you have a message from ${message.user.name}', + (message.type == MessageType.text) + ? message.content + : message.type.messageTypeString, + onTap: (value) { + Room room = chatController.getRoomById(message.roomId)!; + + chatController.setCurrentRoom(room); + RoutingManager.to(RouteName.chatDetails, arguments: room); + }, + backgroundColor: Colors.white, + icon: const Icon(Icons.inbox), + isDismissible: true, + duration: const Duration(seconds: 5), + dismissDirection: DismissDirection.horizontal, + ); + } + }, onSessionTerminated: (value) { + Toast.showToast('this_session_is_terminated'.tr); + RoutingManager.offAll(RouteName.login); + print('session terminated'); + authController.isGuest.update((val) { + val = false; + }); + LocalStorage().saveIsGuest(false); + LocalStorage().clearCache(); + homeController.storage.savefirstTimeOpened(); + homeController.selectIndex.value = 0; + chatController.io.disconnect(); + chatController.clear(); + homeController.user.value = User.zero(); + favoriteController.getFavoriteState.update((val) { + val!.value = []; + }); + favoriteController.getFavoriteState.refresh(); + }); + } + // FirebaseMessaging.instance + // .getInitialMessage() + // .then((remoteMessage) async { + // if (remoteMessage != null) { + // int cardId = int.parse(remoteMessage.data['id']); + // CardModel cardModel = await CardService().showCard(cardId: cardId); + // RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + // } + // }); + }); + + return WillPopScope( + onWillPop: () async { + if (homeController.selectIndex.value != 0) { + homeController.onPress(0); + return false; + } else { + bool confirmissonResult = false; + await Get.defaultDialog( + title: '', + content: Column( + children: [ + Lottie.asset( + 'assets/animations/Exit.json', + repeat: false, + ), + RegularTextWidget( + 'are_you_sure_you_want_to_exit?'.tr, + textAlign: TextAlign.center, + fontSize: Responsive.isTablet() ? 22 : 18, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: () { + confirmissonResult = true; + RoutingManager.back(); + }, + child: Text( + 'yes'.tr, + style: TextStyle( + fontSize: Responsive.isTablet() ? 22 : 18, + ), + )), + TextButton( + onPressed: () { + confirmissonResult = false; + RoutingManager.back(); + }, + child: Text( + 'no'.tr, + style: TextStyle( + fontSize: Responsive.isTablet() ? 22 : 18, + ), + )), + ], + ), + ], + ).paddingSymmetric(horizontal: 4), + ); + + return confirmissonResult; + } + }, + child: Obx(() { + return Scaffold( + body: screens.elementAt(homeController.selectIndex.value), + bottomNavigationBar: BottomNavigationBar( + currentIndex: homeController.selectIndex.value, + onTap: homeController.onPress, + selectedFontSize: 10, + type: BottomNavigationBarType.fixed, + items: [ + BottomNavigationBarItem( + icon: SvgPicture.asset( + colorFilter: ColorFilter.mode( + homeController.selectIndex.value == 0 + ? AppColors.primeColor + : Colors.black, + BlendMode.srcIn), + homeController.selectIndex.value == 0 + ? 'assets/icons/home.svg' + : 'assets/icons/home.svg', + ), + label: ''), + BottomNavigationBarItem( + icon: SvgPicture.asset( + colorFilter: ColorFilter.mode( + homeController.selectIndex.value == 1 + ? AppColors.primeColor + : Colors.black, + BlendMode.srcIn), + homeController.selectIndex.value == 1 + ? 'assets/icons/love-svgrepo-com 1.svg' + : 'assets/icons/love-svgrepo-com 1.svg', + ), + label: ''), + BottomNavigationBarItem( + icon: SvgPicture.asset( + colorFilter: ColorFilter.mode( + homeController.selectIndex.value == 2 + ? AppColors.primeColor + : Colors.black, + BlendMode.srcIn), + homeController.selectIndex.value == 2 + ? 'assets/icons/love-svgrepo-com 3.svg' + : 'assets/icons/love-svgrepo-com 3.svg', + ), + label: ''), + BottomNavigationBarItem( + icon: SvgPicture.asset( + colorFilter: ColorFilter.mode( + homeController.selectIndex.value == 3 + ? AppColors.primeColor + : Colors.black, + BlendMode.srcIn), + homeController.selectIndex.value == 3 + ? 'assets/icons/love-svgrepo-com 2.svg' + : 'assets/icons/love-svgrepo-com 2.svg', + ), + label: '', + ), + ], + ), + ); + }), + ); + } +} diff --git a/lib/features/home/presentation_layer/widgets/appbar.dart b/lib/features/home/presentation_layer/widgets/appbar.dart new file mode 100644 index 0000000..ec97038 --- /dev/null +++ b/lib/features/home/presentation_layer/widgets/appbar.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/search_area.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; + +class AppBarWidget extends StatelessWidget { + final HomeController homeController = Get.find(); + TextEditingController? textEditingController; + @override + // TODO: implement preferredSize + // Size get preferredSize => const Size.fromHeight(250); + AppBarWidget({super.key, this.textEditingController}); + + @override + Widget build(BuildContext context) { + return Container( + height: 190, + color: AppColors.primeColor, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + CircleAvatarWidget( + radius: 20, + isUserAvatar: true, + ).paddingSymmetric(horizontal: 10), + Obx(() { + return BoldTextWidget( + "${homeController.user.value?.firstName}" + " " + "${homeController.user.value?.lastName}", + color: Colors.white, + ).paddingSymmetric(horizontal: 5); + }) + ], + ).onTap(() { + homeController.onPress(3); + }), + Row( + children: [ + SvgPicture.asset( + "assets/icons/notification.svg", + colorFilter: + const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ).onTap(() { + RoutingManager.to(RouteName.notification); + }), + ], + ).paddingSymmetric(horizontal: 10) + ], + ).paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 10, vertical: 10), + SearchAreaWidget( + textEditingController: textEditingController, + ).paddingOnly(top: Responsive.isTablet() ? 8 : 0), + ], + ), + ); + } +} diff --git a/lib/features/home/presentation_layer/widgets/search_bar.dart b/lib/features/home/presentation_layer/widgets/search_bar.dart new file mode 100644 index 0000000..5339e7f --- /dev/null +++ b/lib/features/home/presentation_layer/widgets/search_bar.dart @@ -0,0 +1,81 @@ +import 'package:flutter/material.dart'; + +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; + +import '../../../../common/const/const.dart'; + +class SearchBarWidget extends StatelessWidget { + final void Function(String)? onChanged; + final VoidCallback onSearch; + final TextEditingController? controller; + final double? radius; + final String? hint; + + const SearchBarWidget({ + super.key, + required this.onChanged, + required this.onSearch, + this.radius, + this.hint, + this.controller, + }); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.only(top: 3), + width: MediaQuery.of(context).size.width, + height: 50, + child: TextFormField( + controller: controller, + textInputAction: TextInputAction.search, + // onFieldSubmitted: onFieldSubmitted ?? + // (value) { + // if (Get.currentRoute != RoutesName.search) { + // RoutingManager.to(RoutesName.search); + // controller!.clear(); + // FocusManager.instance.primaryFocus + // ?.unfocus(disposition: UnfocusDisposition.scope); + // return; + // } + + // searchController.search(); + // }, + cursorColor: AppColors.primeColor, + + style: const TextStyle( + height: 1.6, + ), + onChanged: onChanged, + keyboardType: TextInputType.text, + + decoration: InputDecoration( + fillColor: Colors.white, + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: AppColors.borderColor), + borderRadius: BorderRadius.circular(radius ?? 44), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: AppColors.borderColor), + borderRadius: BorderRadius.circular(radius ?? 44), + ), + isDense: true, + filled: true, + prefixIcon: IconButton( + onPressed: onSearch, + icon: SvgPicture.asset('assets/icons/search.svg'), + ), + contentPadding: const EdgeInsets.symmetric(horizontal: 10), + hintText: hint ?? 'search'.tr, + hintStyle: const TextStyle(fontSize: 14), + border: OutlineInputBorder( + borderSide: BorderSide( + color: AppColors.borderColor, + ), + borderRadius: BorderRadius.circular(radius ?? 44), + )), + ), + ); + } +} diff --git a/lib/features/home/presentation_layer/widgets/search_category.dart b/lib/features/home/presentation_layer/widgets/search_category.dart new file mode 100644 index 0000000..f93f1a4 --- /dev/null +++ b/lib/features/home/presentation_layer/widgets/search_category.dart @@ -0,0 +1,41 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; + +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/features/category/data_layer/model/category.dart'; + +import '../../../../common/widgets/text.dart'; + +class SearchCategoryWidget extends StatelessWidget { + final CategoryModel categoryModel; + const SearchCategoryWidget({super.key, required this.categoryModel}); + + @override + Widget build(BuildContext context) { + return Container( + margin: const EdgeInsets.symmetric(horizontal: 25), + width: Get.width, + height: 50, + child: Column( + children: [ + Row( + children: [ + SizedBox( + width: 25, + height: 25, + child: CachedNetworkImage( + imageUrl: Domain.domain + categoryModel.icon.substring(6)), + ), + RegularTextWidget( + " ${categoryModel.name}", + fontSize: 14, + ) + ], + ), + const Divider(), + ], + ), + ); + } +} diff --git a/lib/features/home/presentation_layer/widgets/search_location.dart b/lib/features/home/presentation_layer/widgets/search_location.dart new file mode 100644 index 0000000..3204a5f --- /dev/null +++ b/lib/features/home/presentation_layer/widgets/search_location.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; +import 'package:taafee_mobile/features/home/data_layer/model/city.dart'; + +class SearchLocationWidget extends StatelessWidget { + final CityModel cityModel; + const SearchLocationWidget(this.cityModel, {super.key}); + + @override + Widget build(BuildContext context) { + return Container( + margin: const EdgeInsets.symmetric(horizontal: 28), + width: Get.width, + height: 50, + child: Column( + children: [ + Row( + children: [ + SvgPicture.asset( + "assets/icons/location.svg", + ).paddingSymmetric(horizontal: 7), + RegularTextWidget( + "${cityModel.name} , ${cityModel.country}", + fontSize: 14, + ) + ], + ), + Divider( + color: AppColors.dividerColor, + thickness: 1, + ), + ], + ), + ); + } +} diff --git a/lib/features/notification/presentation_layer/screens/notification.dart b/lib/features/notification/presentation_layer/screens/notification.dart new file mode 100644 index 0000000..38c3710 --- /dev/null +++ b/lib/features/notification/presentation_layer/screens/notification.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:lottie/lottie.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/common/widgets/text.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/header_screen.dart'; +import '../widgets/notification.dart'; + +class NotificationScreen extends StatelessWidget { + const NotificationScreen({super.key}); + //dummy + final int count = 0; + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: SingleChildScrollView( + child: Column( + children: [ + HeaderScreen("notifications".tr) + // Row( + // children: [ + // SvgPicture.asset( + // "assets/icons/arrow-left.svg", + // ).onTap(() { + // RoutingManager.back(); + // }), + // BoldTextWidget( + // "Notification", + // fontSize: 18, + // color: AppColors.textColor, + // ).paddingSymmetric(horizontal: 10), + // ], + // ) + .paddingOnly( + top: 40, + ), + if (count == 0) + Column( + children: [ + Lottie.asset( + 'assets/animations/Folder Lottie.json', + repeat: false, + ), + RegularTextWidget( + 'There are no notifications to display at this time.'.tr) + ], + ), + if (count != 0) + ListView.separated( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (BuildContext context, index) { + return const NotificationWidget(); + }, + separatorBuilder: (BuildContext context, index) { + return Divider( + color: AppColors.dividerColor, + thickness: 1, + ).paddingSymmetric(horizontal: 20); + }, + itemCount: count) + ], + ).paddingSymmetric(horizontal: 20), + ).makeSafeArea(), + ); + } +} diff --git a/lib/features/notification/presentation_layer/widgets/notification.dart b/lib/features/notification/presentation_layer/widgets/notification.dart new file mode 100644 index 0000000..96022d5 --- /dev/null +++ b/lib/features/notification/presentation_layer/widgets/notification.dart @@ -0,0 +1,46 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; + +class NotificationWidget extends StatelessWidget { + const NotificationWidget({super.key}); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: Get.width, + height: Responsive.isTablet() ? 120 : 83, + child: Row( + children: [ + CircleAvatar( + radius: Responsive.isTablet() ? 60 : 30, + backgroundColor: AppColors.primeColor, + child: SvgPicture.asset( + "assets/icons/notification.svg", + width: Responsive.isTablet() ? 30 : null, + ), + ).expanded(Responsive.isTablet() ? 0 : 2), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MediumTextWidget( + "Lorem ipsum dolor sit amet,consectetur adipiscing elit", + fontSize: Responsive.isTablet() ? 20 : 10, + color: AppColors.textColor, + ), + MediumTextWidget( + "23 min", + fontSize: Responsive.isTablet() ? 20 : 10, + ) + ], + ).paddingSymmetric(vertical: 13, horizontal: 20).expanded(8), + ], + ), + ); + } +} diff --git a/lib/features/onboarding/business_logic_layer/onboarding_controller.dart b/lib/features/onboarding/business_logic_layer/onboarding_controller.dart new file mode 100644 index 0000000..2cf7c57 --- /dev/null +++ b/lib/features/onboarding/business_logic_layer/onboarding_controller.dart @@ -0,0 +1,59 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; + +import '../../../common/widgets/text.dart'; + +class OnboardingController extends GetxController { + PageController pageController = PageController(); + + RxList textList = [ + const BoldTextWidget( + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt 1', + textAlign: TextAlign.center, + ), + const BoldTextWidget( + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt 2', + textAlign: TextAlign.center, + ), + const BoldTextWidget( + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt 3', + textAlign: TextAlign.center, + ), + ].obs; + LocalStorage storage = LocalStorage(); + RxList picturesList = [ + SvgPicture.asset('assets/images/onboarding 1.svg'), + SvgPicture.asset('assets/images/onboarding 2.svg'), + SvgPicture.asset('assets/images/onboarding 3.svg'), + ].obs; + RxBool isLast = false.obs; + RxInt currentIndex = 0.obs; + void changeCurrentIndex(int newIndex) { + currentIndex.value = newIndex; + pageController.animateToPage(newIndex, + duration: const Duration(milliseconds: 200), curve: Curves.easeIn); + isLast.value = false; + if (currentIndex.value == 2) { + isLast.value = true; + } + isLast.refresh(); + currentIndex.refresh(); + } + + void increaseIndex() { + currentIndex.value++; + pageController.animateToPage(currentIndex.value, + duration: const Duration(milliseconds: 400), curve: Curves.easeIn); + if (currentIndex.value == 2) { + isLast.value = true; + } + isLast.refresh(); + currentIndex.refresh(); + } + + void setfirstTimeOpened() async { + await storage.savefirstTimeOpened(); + } +} diff --git a/lib/features/onboarding/presentation/onboarding.dart b/lib/features/onboarding/presentation/onboarding.dart new file mode 100644 index 0000000..f7b1192 --- /dev/null +++ b/lib/features/onboarding/presentation/onboarding.dart @@ -0,0 +1,123 @@ +import 'package:flutter/material.dart'; +import 'package:taafee_mobile/common/const/const.dart'; +import 'package:taafee_mobile/common/widgets/button.dart'; +import 'package:get/get.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/onboarding/business_logic_layer/onboarding_controller.dart'; + +class Onboarding extends StatelessWidget { + Onboarding({super.key}); + final OnboardingController onboardingController = + Get.find(); + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.backGroundColor, + body: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: Get.height * 0.7, + child: PageView.builder( + controller: onboardingController.pageController, + itemCount: 3, + onPageChanged: (value) { + onboardingController.changeCurrentIndex(value); + }, + itemBuilder: (context, index) { + return OnBoardingWidget( + index: index, + ).paddingSymmetric(horizontal: Get.width * 0.05); + }, + ), + ), + const SizedBox( + height: 20.0, + ), + Obx(() { + return Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: Get.width * 0.05, + ), + ButtonWidget( + onTap: () { + onboardingController.setfirstTimeOpened(); + RoutingManager.offAll(RouteName.register); + }, + title: 'skip'.tr, + width: Get.width * 0.35, + textColor: AppColors.textButtonColor, + color: AppColors.backGroundColor, + ), + SizedBox( + width: Get.width * 0.1, + ), + ButtonWidget( + onTap: () { + if (onboardingController.currentIndex.value < 2) { + onboardingController.increaseIndex(); + } else { + onboardingController.setfirstTimeOpened(); + + RoutingManager.offAll(RouteName.register); + } + }, + title: (!onboardingController.isLast.value) + ? 'next'.tr + : 'create_account'.tr, + textColor: AppColors.textButtonColor, + width: Get.width * 0.35, + ), + SizedBox( + width: Get.width * 0.05, + ), + ], + ); + }) + ], + ), + ); + } +} + +// ignore: must_be_immutable +class OnBoardingWidget extends StatelessWidget { + OnBoardingWidget({ + super.key, + required this.index, + }); + + int index; + final OnboardingController onboardingController = + Get.find(); + + @override + Widget build(BuildContext context) { + return Obx( + () => SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + onboardingController.picturesList[index], + SizedBox( + height: Get.height * 0.1, + ), + SingleChildScrollView( + child: onboardingController.textList[index].paddingSymmetric( + horizontal: Get.width * 0.1, + ), + ), + SizedBox( + height: Get.height * 0.1, + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/splash/business_logic_layer/splash_controller.dart b/lib/features/splash/business_logic_layer/splash_controller.dart new file mode 100644 index 0000000..6b49fb4 --- /dev/null +++ b/lib/features/splash/business_logic_layer/splash_controller.dart @@ -0,0 +1,120 @@ +import 'dart:io'; + +import 'package:get/get.dart'; +import 'package:package_info_plus/package_info_plus.dart'; +import 'package:taafee_mobile/common/widgets/toast.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/auth/data_layer/source/auth_service.dart'; +import 'package:taafee_mobile/features/splash/data%20layer/source/splash_source.dart'; +import 'package:rx_future/rx_future.dart'; + +import '../../auth/data_layer/model/user.dart'; +import '../data layer/model/params.dart'; + +class SplashController extends GetxController { + LocalStorage storage = LocalStorage(); + AuthService authService = AuthService(); + SplashSource splashSource = SplashSource(); + RxBool showErrorResult = false.obs; + + RxFuture paramsState = RxFuture(null); + Future getParams({ + void Function(Object)? onConnectionError, + void Function()? onSessionTerminated, + required Future Function(bool) versionAlert, + }) async { + await paramsState.observe((value) async { + return await splashSource.getParams(onConnectionError: onConnectionError); + }, onSuccess: (value) async { + bool result = await checkVersion(versionAlert: versionAlert); + if (result == true) { + await checkToken(onSessionTerminated: onSessionTerminated); + } + }, onError: (err) { + showErrorResult.value = true; + showErrorResult.refresh(); + }); + } + + ///user token state/// + RxFuture userTokenState = RxFuture(User.zero()); + Future checkToken( + {void Function()? onError, void Function()? onSessionTerminated}) async { + showErrorResult.value = false; + showErrorResult.refresh(); + bool firstTimeOpened = storage.getfirstTimeOpened(); + String? token = storage.getToken(); + bool isGuest = storage.getIsGuest() ?? false; + if (firstTimeOpened == true) { + RoutingManager.offAll(RouteName.onboarding); + + return; + } else { + if (token != null) { + if (!isGuest) { + userTokenState.observe( + (value) async { + return await authService.showUser(onConnectionError: (err) { + Toast.showToast('you_have_no_internet_connection'.tr); + }); + }, + onSuccess: (value) { + storage.saveUser(value); + RoutingManager.offAll(RouteName.superHome); + return; + }, + onError: (error) { + if (error.toString() == 'you_are_not_authorized') { + Toast.showToast('this_session_is_terminated'.tr); + onSessionTerminated?.call(); + } else { + showErrorResult.value = true; + showErrorResult.refresh(); + } + + print('err is${error.toString()}'); + + onError?.call(); + }, + ); + } else { + storage.saveUser(User( + id: 0, + firstName: 'guest', + lastName: '', + chatUserId: 0, + email: '', + avatarImage: null)); + storage.saveIsGuest(true); + RoutingManager.off(RouteName.superHome); + } + } else { + RoutingManager.offAll(RouteName.login); + return; + } + } + } + + Future checkVersion( + {required Future Function(bool forced) versionAlert}) async { + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + String appVersion = packageInfo.version; + return true; + if (Platform.isAndroid) { + if (appVersion != Params.currentAndroidVersion) { + return await versionAlert(Params.forceUpdateAndroid); + } else { + return true; + } + } + if (Platform.isIOS) { + if (appVersion != Params.currentIosVersion) { + return await versionAlert(Params.forceUpdateIos); + } else { + return true; + } + } + return false; + } +} diff --git a/lib/features/splash/data layer/model/params.dart b/lib/features/splash/data layer/model/params.dart new file mode 100644 index 0000000..95af607 --- /dev/null +++ b/lib/features/splash/data layer/model/params.dart @@ -0,0 +1,76 @@ +import 'package:get/get.dart'; + +class Params { + static dynamic params; + static late String privacyEn, privacyAr, privacyCn; + static late String termsEn, termsAr, termsCn; + static late String aboutUsEn, aboutUsAr, aboutUsCn; + static late String currentAndroidVersion, currentIosVersion; + static late bool forceUpdateAndroid, forceUpdateIos; + static fromJson(jsonMap) { + params = jsonMap; + aboutUsAr = jsonMap['about_us_ar']; + aboutUsCn = jsonMap['about_us_cn']; + aboutUsEn = jsonMap['about_us_en']; + privacyAr = jsonMap['privacy_ar']; + privacyCn = jsonMap['privacy_cn']; + privacyEn = jsonMap['privacy_en']; + termsAr = jsonMap['terms_ar']; + termsEn = jsonMap['terms_en']; + termsCn = jsonMap['terms_cn']; + currentAndroidVersion = jsonMap['current_android_version']; + currentIosVersion = jsonMap['current_ios_version']; + forceUpdateAndroid = parseBool(jsonMap['force_update_android']); + forceUpdateIos = parseBool(jsonMap['force_update_ios']); + } + + static bool parseBool(String source) { + switch (source) { + case 'true': + return true; + case 'false': + return false; + default: + return false; + } + } + + static String get privacy { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return privacyAr; + case 'en': + return privacyEn; + case 'cn': + return privacyCn; + } + return privacyEn; + } + + static String get terms { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return termsAr; + case 'en': + return termsEn; + case 'cn': + return termsCn; + } + return termsEn; + } + + static String get aboutUs { + String locale = Get.locale!.languageCode; + switch (locale) { + case 'ar': + return aboutUsAr; + case 'en': + return aboutUsEn; + case 'cn': + return aboutUsCn; + } + return aboutUsEn; + } +} diff --git a/lib/features/splash/data layer/source/splash_source.dart b/lib/features/splash/data layer/source/splash_source.dart new file mode 100644 index 0000000..e5d517b --- /dev/null +++ b/lib/features/splash/data layer/source/splash_source.dart @@ -0,0 +1,14 @@ +import 'package:taafee_mobile/core/apis/apis.dart'; +import 'package:taafee_mobile/core/network/http.dart'; +import '../model/params.dart'; + +class SplashSource { + Future getParams({void Function(Object)? onConnectionError}) async { + Request request = + Request(EndPoint.params, RequestMethod.get, cacheable: true); + var response = + await request.sendRequest(onConnectionError: onConnectionError); + print('my response $response'); + return Params.fromJson(response['data']); + } +} diff --git a/lib/features/splash/presentation_layer.dart/screens.dart/splash.dart b/lib/features/splash/presentation_layer.dart/screens.dart/splash.dart new file mode 100644 index 0000000..4e4c227 --- /dev/null +++ b/lib/features/splash/presentation_layer.dart/screens.dart/splash.dart @@ -0,0 +1,196 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:open_store/open_store.dart'; +import 'package:taafee_mobile/common/extensions/widget_extension.dart'; +import 'package:taafee_mobile/core/local_storage/local_storage.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/core/url%20launcher/url_launcher_service.dart'; +import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart'; +import 'package:taafee_mobile/features/auth/presentation_layer/widgets/tail_auth.dart'; +import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart'; +import 'package:taafee_mobile/features/splash/business_logic_layer/splash_controller.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../../../common/const/const.dart'; +import '../../../../common/widgets/text.dart'; +import '../../../../common/widgets/toast.dart'; +import '../../../auth/data_layer/model/user.dart'; + +class SplashScreen extends StatelessWidget { + SplashScreen({super.key}); + + final SplashController splashController = Get.find(); + final AuthController authController = Get.find(); + final HomeController homeController = Get.find(); + final LocalStorage localStorage = LocalStorage(); + @override + Widget build(BuildContext context) { + Future.delayed(const Duration(seconds: 2), () async { + await splashController.getParams( + onConnectionError: (err) { + Toast.showToast('you_have_no_internet_connection'.tr); + }, + onSessionTerminated: () async { + authController.isGuest.update((val) { + val = false; + }); + localStorage.saveIsGuest(false); + await localStorage.clearCache(); + homeController.storage.savefirstTimeOpened(); + RoutingManager.offAll(RouteName.login); + homeController.selectIndex.value = 0; + + homeController.user.value = User.zero(); + }, + versionAlert: versionAlertDialog); + }); + + return Scaffold( + body: WillPopScope( + onWillPop: () async { + return await splashController.checkVersion( + versionAlert: versionAlertDialog); + }, + child: Stack( + children: [ + Column( + children: [ + Container().expanded(2), + SvgPicture.asset('assets/icons/tafee icon.svg'), + // Image.asset("assets/images/logo.png").expanded(4), + Container().expanded(2), + // const TailAuth().expanded(2), + ], + ), + Center( + // alignment: Alignment.topCenter, + child: SizedBox( + height: Responsive.isTablet() ? 70 : 50, + child: Obx(() { + return Visibility( + visible: splashController.showErrorResult.value, + child: Center( + child: Container( + decoration: BoxDecoration( + color: AppColors.primeColor, + borderRadius: BorderRadius.circular(20), + ), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.signal_wifi_connected_no_internet_4, + color: AppColors.textColor, + ), + const SizedBox( + width: 10, + ), + RegularTextWidget( + '${'you_have_no_internet_connection'.tr} ${'try_again'.tr}', + textAlign: TextAlign.center, + fontSize: Responsive.isTablet() ? 22 : 11, + ).onTap(() async { + await splashController.getParams( + onConnectionError: (err) { + Toast.showToast( + 'you_have_no_internet_connection' + .tr); + }, + onSessionTerminated: () async { + authController.isGuest.update((val) { + val = false; + }); + localStorage.saveIsGuest(false); + await localStorage.clearCache(); + homeController.storage + .savefirstTimeOpened(); + RoutingManager.offAll( + RouteName.login); + homeController.selectIndex.value = 0; + + homeController.user.value = + User.zero(); + }, + versionAlert: versionAlertDialog); + }), + ], + ), + ], + ).paddingSymmetric(vertical: 4), + ), + ), + ), + ); + }), + ), + ).paddingOnly(bottom: Get.height * 0.8).paddingSymmetric( + horizontal: Responsive.isTablet() ? 40 : 20, + ), + ], + ), + ), + ); + } +} + +Future versionAlertDialog(bool isForced) async { + bool result = false; + await Get.defaultDialog( + onWillPop: () async { + exit(0); + }, + barrierDismissible: false, + title: 'version_update'.tr, + content: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + RegularTextWidget( + 'new_version_is_available_!'.tr, + textAlign: TextAlign.center, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container().expanded(1), + TextButton( + onPressed: () async { + result = false; + OpenStore.instance.open( + appStoreId: '284882215', + androidAppBundleId: 'com.facebook.katana', + ); + }, + child: Text('update'.tr), + ), + Container().expanded(1), + if (!isForced) + TextButton( + onPressed: () { + result = true; + RoutingManager.back(); + }, + child: Text('later'.tr), + ), + Container().expanded(1), + if (isForced) + TextButton( + onPressed: () { + result = false; + exit(0); + }, + child: Text('quit'.tr), + ), + ], + ), + ], + ), + ); + return result; +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..d1defa6 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,79 @@ +// import 'package:firebase_core/firebase_core.dart'; +// import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get/get.dart'; +import 'package:get_storage/get_storage.dart'; +import 'package:taafee_mobile/core/init/dependency_injection.dart'; +import 'package:taafee_mobile/core/init/language_init.dart'; +import 'package:taafee_mobile/core/localization/localization.dart'; +import 'package:taafee_mobile/core/routing/routing_manager.dart'; +import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart'; +import 'common/widgets/notification_message.dart'; +import 'core/local_storage/cache_service.dart'; +import 'core/local_storage/local_storage.dart'; +import 'features/card/data_layer/model/card_model.dart'; + +String? fcmToken; +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + DependencyInjection.injectDependencies(); + await CacheService.inite(); + await GetStorage.init(); + // await Firebase.initializeApp(); + // if (LocalStorage().getFCMToken() == null) { + // fcmToken = await FirebaseMessaging.instance.getToken(); + // if (fcmToken != null) { + // LocalStorage().saveFCMToken(fcmToken!); + // } + // } else { + // fcmToken = LocalStorage().getFCMToken(); + // } + // FirebaseMessaging.onMessageOpenedApp.listen((remoteMessage) async { + // int cardId = int.parse(remoteMessage.data['id']); + // CardModel cardModel = await CardService().showCard(cardId: cardId); + // RoutingManager.to(RouteName.cardDetails, arguments: cardModel); + // }); + // await FirebaseMessaging.instance.requestPermission(); + // FirebaseMessaging.onMessage.listen((remoteMessage) async { + // int cardId = int.parse(remoteMessage.data['id']); + // CardModel cardModel = await CardService().showCard(cardId: cardId); + + // notificationMessage( + // remoteMessage, + // cardModel, + // ); + // }); + LanguageInit.langugeInite(); + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + SystemChrome.setSystemUIOverlayStyle( + const SystemUiOverlayStyle(statusBarColor: Colors.grey)); + return GestureDetector( + onTap: () { + FocusManager.instance.primaryFocus?.unfocus(); + }, + child: GetMaterialApp( + debugShowCheckedModeBanner: false, + title: 'Yellow Pages', + theme: ThemeData( + primarySwatch: Colors.yellow, + ), + initialRoute: RouteName.splash, + getPages: RoutingManager.pages, + translations: PagesTranslations(), + locale: Locale(LanguageInit.language ?? 'en'), + ), + ); + } +} diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt new file mode 100644 index 0000000..f51dbc4 --- /dev/null +++ b/linux/CMakeLists.txt @@ -0,0 +1,139 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "taafee_mobile") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.taafee_mobile") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..fc6e2af --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,19 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) smart_auth_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "SmartAuthPlugin"); + smart_auth_plugin_register_with_registrar(smart_auth_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); +} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..e0f0a47 --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..4ebc56f --- /dev/null +++ b/linux/flutter/generated_plugins.cmake @@ -0,0 +1,25 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + smart_auth + url_launcher_linux +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/linux/main.cc b/linux/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/linux/my_application.cc b/linux/my_application.cc new file mode 100644 index 0000000..8f69b5e --- /dev/null +++ b/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "taafee_mobile"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "taafee_mobile"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/linux/my_application.h b/linux/my_application.h new file mode 100644 index 0000000..72271d5 --- /dev/null +++ b/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/macos/.gitignore b/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..9cec665 --- /dev/null +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,28 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import device_info_plus +import package_info_plus +import path_provider_foundation +import photo_manager +import shared_preferences_foundation +import smart_auth +import sqflite +import url_launcher_macos +import video_player_avfoundation + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "PhotoManagerPlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + SmartAuthPlugin.register(with: registry.registrar(forPlugin: "SmartAuthPlugin")) + SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) +} diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7b607a5 --- /dev/null +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,695 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* taafee_mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "taafee_mobile.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* taafee_mobile.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* taafee_mobile.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taafee_mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taafee_mobile"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taafee_mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taafee_mobile"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taafee_mobile.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/taafee_mobile"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..607696e --- /dev/null +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..d53ef64 --- /dev/null +++ b/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..80e867a --- /dev/null +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..07ab3f3 --- /dev/null +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = taafee_mobile + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.taafeeMobile + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..3cc05eb --- /dev/null +++ b/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..5418c9f --- /dev/null +++ b/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import FlutterMacOS +import Cocoa +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..eb73d66 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,1098 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + archive: + dependency: transitive + description: + name: archive + sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03" + url: "https://pub.dev" + source: hosted + version: "3.4.6" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + audio_waveforms: + dependency: "direct main" + description: + name: audio_waveforms + sha256: f2f81e256c5c03b64e2861e0323a77e1b6790c256c73393b671214c9846260fc + url: "https://pub.dev" + source: hosted + version: "1.0.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f + url: "https://pub.dev" + source: hosted + version: "3.3.0" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: "56aa42a7a01e3c9db8456d9f3f999931f1e05535b5a424271e9a38cabf066613" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: "759b9a9f8f6ccbb66c185df805fac107f05730b1dab9c64626d1008cca532257" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + chat_bubbles: + dependency: "direct main" + description: + name: chat_bubbles + sha256: "16b4d0f575fbd80ef7a687d6e63c56c23137c660f6de7884507c55e255ef2920" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" + source: hosted + version: "1.17.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: "7035152271ff67b072a211152846e9f1259cf1be41e34cd3e0b5463d2d6b8419" + url: "https://pub.dev" + source: hosted + version: "9.1.0" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 + url: "https://pub.dev" + source: hosted + version: "7.0.0" + dio: + dependency: "direct main" + description: + name: dio + sha256: "417e2a6f9d83ab396ec38ff4ea5da6c254da71e4db765ad737a42af6930140b7" + url: "https://pub.dev" + source: hosted + version: "5.3.3" + dropdown_search: + dependency: "direct main" + description: + name: dropdown_search + sha256: "55106e8290acaa97ed15bea1fdad82c3cf0c248dd410e651f5a8ac6870f783ab" + url: "https://pub.dev" + source: hosted + version: "5.0.6" + extended_image: + dependency: transitive + description: + name: extended_image + sha256: b4d72a27851751cfadaf048936d42939db7cd66c08fdcfe651eeaa1179714ee6 + url: "https://pub.dev" + source: hosted + version: "8.1.1" + extended_image_library: + dependency: transitive + description: + name: extended_image_library + sha256: "8bf87c0b14dcb59200c923a9a3952304e4732a0901e40811428834ef39018ee1" + url: "https://pub.dev" + source: hosted + version: "3.6.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + url: "https://pub.dev" + source: hosted + version: "3.3.1" + flutter_keyboard_visibility: + dependency: "direct main" + description: + name: flutter_keyboard_visibility + sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + url: "https://pub.dev" + source: hosted + version: "5.4.1" + flutter_keyboard_visibility_linux: + dependency: transitive + description: + name: flutter_keyboard_visibility_linux + sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_macos: + dependency: transitive + description: + name: flutter_keyboard_visibility_macos + sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_platform_interface: + dependency: transitive + description: + name: flutter_keyboard_visibility_platform_interface + sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_web: + dependency: transitive + description: + name: flutter_keyboard_visibility_web + sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_windows: + dependency: transitive + description: + name: flutter_keyboard_visibility_windows + sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_sound: + dependency: "direct main" + description: + name: flutter_sound + sha256: "090a4694b11ecc744c2010621c4ffc5fe7c3079d304ea014961a72c7b72cfe6c" + url: "https://pub.dev" + source: hosted + version: "9.2.13" + flutter_sound_platform_interface: + dependency: transitive + description: + name: flutter_sound_platform_interface + sha256: "4537eaeb58a32748c42b621ad6116f7f4c6ee0a8d6ffaa501b165fe1c9df4753" + url: "https://pub.dev" + source: hosted + version: "9.2.13" + flutter_sound_web: + dependency: transitive + description: + name: flutter_sound_web + sha256: ad4ca92671a1879e1f613e900bbbdb8170b20d57d1e4e6363018fe56b055594f + url: "https://pub.dev" + source: hosted + version: "9.2.13" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + url: "https://pub.dev" + source: hosted + version: "2.0.7" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c" + url: "https://pub.dev" + source: hosted + version: "8.2.2" + galleryimage: + dependency: "direct main" + description: + name: galleryimage + sha256: ddd6b3d06321c7e1dc8f7d92d34d9225cc47795397a34c564643aac7b2485f8a + url: "https://pub.dev" + source: hosted + version: "2.0.1" + get: + dependency: "direct main" + description: + name: get + sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e + url: "https://pub.dev" + source: hosted + version: "4.6.6" + get_storage: + dependency: "direct main" + description: + name: get_storage + sha256: "39db1fffe779d0c22b3a744376e86febe4ade43bf65e06eab5af707dc84185a2" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + hive: + dependency: "direct main" + description: + name: hive + sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + http_client_helper: + dependency: transitive + description: + name: http_client_helper + sha256: "8a9127650734da86b5c73760de2b404494c968a3fd55602045ffec789dac3cb1" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_gallery_saver: + dependency: "direct main" + description: + name: image_gallery_saver + sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + lints: + dependency: transitive + description: + name: lints + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + logger: + dependency: transitive + description: + name: logger + sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: b8bdd54b488c54068c57d41ae85d02808da09e2bee8b8dd1f59f441e7efa60cd + url: "https://pub.dev" + source: hosted + version: "2.6.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + meta: + dependency: transitive + description: + name: meta + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + open_store: + dependency: "direct main" + description: + name: open_store + sha256: "3d9f6a364a817235b779a23ba1bfcca220ab770c89e3b1f4974429e7a32b6cad" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + os_detect: + dependency: transitive + description: + name: os_detect + sha256: faf3bcf39515e64da8ff76b2f2805b20a6ff47ae515393e535f8579ff91d6b7f + url: "https://pub.dev" + source: hosted + version: "2.0.1" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + path: + dependency: transitive + description: + name: path + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" + source: hosted + version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "284a66179cabdf942f838543e10413246f06424d960c92ba95c84439154fcac8" + url: "https://pub.dev" + source: hosted + version: "11.0.1" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: f9fddd3b46109bd69ff3f9efa5006d2d309b7aec0f3c1c5637a60a2d5659e76e + url: "https://pub.dev" + source: hosted + version: "11.1.0" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + url: "https://pub.dev" + source: hosted + version: "9.1.4" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" + url: "https://pub.dev" + source: hosted + version: "3.12.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + url: "https://pub.dev" + source: hosted + version: "0.1.3" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" + source: hosted + version: "5.4.0" + photo_manager: + dependency: transitive + description: + name: photo_manager + sha256: "41eaa1d1fa51bac1c8f2f6debfd34074edcc6b330aa96bb3d33c3bc2fc6c8a5c" + url: "https://pub.dev" + source: hosted + version: "2.7.2" + photo_view: + dependency: "direct main" + description: + name: photo_view + sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" + url: "https://pub.dev" + source: hosted + version: "0.14.0" + pinput: + dependency: "direct main" + description: + name: pinput + sha256: a92b55ecf9c25d1b9e100af45905385d5bc34fc9b6b04177a9e82cb88fe4d805 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + platform: + dependency: transitive + description: + name: platform + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + url: "https://pub.dev" + source: hosted + version: "2.1.6" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" + source: hosted + version: "3.7.3" + provider: + dependency: transitive + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + rx_future: + dependency: "direct main" + description: + name: rx_future + sha256: "52f96bd6d78f14f55b80336948b6d9ebe0a2f1b561258e7770dbc68e6b030989" + url: "https://pub.dev" + source: hosted + version: "1.0.3" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" + source: hosted + version: "0.27.7" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + url: "https://pub.dev" + source: hosted + version: "2.3.4" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + url: "https://pub.dev" + source: hosted + version: "2.3.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + url: "https://pub.dev" + source: hosted + version: "2.2.1" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + smart_auth: + dependency: transitive + description: + name: smart_auth + sha256: a25229b38c02f733d0a4e98d941b42bed91a976cb589e934895e60ccfa674cf6 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + smooth_page_indicator: + dependency: "direct main" + description: + name: smooth_page_indicator + sha256: "725bc638d5e79df0c84658e1291449996943f93bacbc2cec49963dbbab48d8ae" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + socket_io_client: + dependency: "direct main" + description: + name: socket_io_client + sha256: ede469f3e4c55e8528b4e023bdedbc20832e8811ab9b61679d1ba3ed5f01f23b + url: "https://pub.dev" + source: hosted + version: "2.0.3+1" + socket_io_common: + dependency: transitive + description: + name: socket_io_common + sha256: "2ab92f8ff3ebbd4b353bf4a98bee45cc157e3255464b2f90f66e09c4472047eb" + url: "https://pub.dev" + source: hosted + version: "2.0.3" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + universal_platform: + dependency: transitive + description: + name: universal_platform + sha256: d315be0f6641898b280ffa34e2ddb14f3d12b1a37882557869646e0cc363d0cc + url: "https://pub.dev" + source: hosted + version: "1.0.0+1" + upgrader: + dependency: "direct main" + description: + name: upgrader + sha256: "889c1ece7af143df32e8ee2126f2ef17b2ab6bb7ed8fc3b1b022d7faa4fdab20" + url: "https://pub.dev" + source: hosted + version: "8.2.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + url: "https://pub.dev" + source: hosted + version: "6.1.14" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 + url: "https://pub.dev" + source: hosted + version: "6.1.0" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" + url: "https://pub.dev" + source: hosted + version: "6.1.5" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + url: "https://pub.dev" + source: hosted + version: "3.0.6" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 + url: "https://pub.dev" + source: hosted + version: "3.0.7" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" + url: "https://pub.dev" + source: hosted + version: "2.0.20" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: b16dadf7eb610e20da044c141b4a0199a5e8082ca21daba68322756f953ce714 + url: "https://pub.dev" + source: hosted + version: "1.1.9" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: a4b01403d5c613db115e30e71eca33f7e9e09f2d3c52c3fb84e16333ecddc539 + url: "https://pub.dev" + source: hosted + version: "1.1.9" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d26c0e2f237476426523eb25512e4c09fa27c6d33ed659a0e69d79e20b5dc47f + url: "https://pub.dev" + source: hosted + version: "1.1.9" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + version: + dependency: transitive + description: + name: version + sha256: "3d4140128e6ea10d83da32fef2fa4003fccbf6852217bb854845802f04191f94" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + video_player: + dependency: transitive + description: + name: video_player + sha256: "74b86e63529cf5885130c639d74cd2f9232e7c8a66cbecbddd1dcb9dbd060d1e" + url: "https://pub.dev" + source: hosted + version: "2.7.2" + video_player_android: + dependency: transitive + description: + name: video_player_android + sha256: "3fe89ab07fdbce786e7eb25b58532d6eaf189ceddc091cb66cba712f8d9e8e55" + url: "https://pub.dev" + source: hosted + version: "2.4.10" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + sha256: "6387c2de77763b45104256b3b00b660089be4f909ded8631457dc11bf635e38f" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + video_player_platform_interface: + dependency: transitive + description: + name: video_player_platform_interface + sha256: be72301bf2c0150ab35a8c34d66e5a99de525f6de1e8d27c0672b836fe48f73a + url: "https://pub.dev" + source: hosted + version: "6.2.1" + video_player_web: + dependency: transitive + description: + name: video_player_web + sha256: "2dd24f7ba46bfb5d070e9c795001db95e0ca5f2a3d025e98f287c10c9f0fd62f" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" + wechat_assets_picker: + dependency: "direct main" + description: + name: wechat_assets_picker + sha256: "00c93a04421013040b555cdcccdb8e90f142a171d6c0d968c2b5042a76013601" + url: "https://pub.dev" + source: hosted + version: "8.7.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" + url: "https://pub.dev" + source: hosted + version: "5.0.9" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + url: "https://pub.dev" + source: hosted + version: "1.0.3" + xml: + dependency: transitive + description: + name: xml + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" + source: hosted + version: "6.3.0" +sdks: + dart: ">=3.1.1 <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..1d568f8 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,136 @@ +name: taafee_mobile +description: A new Flutter project. +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.1.1 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + get: ^4.6.5 + rx_future: ^1.0.3 + flutter_svg: ^2.0.5 + pinput: ^3.0.1 + dio: ^5.1.2 + wechat_assets_picker: ^8.7.1 + fluttertoast: ^8.2.2 + get_storage: ^2.1.1 + dropdown_search: ^5.0.6 + lottie: ^2.3.2 + galleryimage: ^2.0.1 + photo_view: ^0.14.0 + smooth_page_indicator: ^1.1.0 + image_gallery_saver: ^2.0.3 + url_launcher: ^6.1.11 + flutter_sound: ^9.2.13 + audio_waveforms: ^1.0.4 + hive: ^2.2.3 + path_provider: ^2.0.15 + cached_network_image: ^3.2.3 + permission_handler: ^11.0.0 + flutter_keyboard_visibility: ^5.4.1 + socket_io_client: ^2.0.3+1 + intl: ^0.18.1 + package_info_plus: ^4.1.0 + upgrader: ^8.1.0 + open_store: ^0.5.0 + # firebase_core: ^2.15.1 + # firebase_messaging: ^14.6.7 + chat_bubbles: ^1.5.0 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + assets: + - assets/images/ + - assets/icons/ + - assets/animations/ + + fonts: + - family: bold + fonts: + - asset: assets/fonts/Poppins-Bold.ttf + - family: medium + fonts: + - asset: assets/fonts/Poppins-Medium.ttf + + - family: regular + fonts: + - asset: assets/fonts/Poppins-Regular.ttf + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..1dd8b9b --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:taafee_mobile/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..a551ebc --- /dev/null +++ b/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + taafee_mobile + + + + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..dd963f0 --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "taafee_mobile", + "short_name": "taafee_mobile", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/windows/.gitignore b/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt new file mode 100644 index 0000000..19f34a2 --- /dev/null +++ b/windows/CMakeLists.txt @@ -0,0 +1,102 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(taafee_mobile LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "taafee_mobile") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..930d207 --- /dev/null +++ b/windows/flutter/CMakeLists.txt @@ -0,0 +1,104 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + windows-x64 $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..fa58fdb --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,20 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include + +void RegisterPlugins(flutter::PluginRegistry* registry) { + PermissionHandlerWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); + SmartAuthPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SmartAuthPlugin")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); +} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..dc139d8 --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..c39b2bd --- /dev/null +++ b/windows/flutter/generated_plugins.cmake @@ -0,0 +1,26 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + permission_handler_windows + smart_auth + url_launcher_windows +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..394917c --- /dev/null +++ b/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc new file mode 100644 index 0000000..d06a87e --- /dev/null +++ b/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "taafee_mobile" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "taafee_mobile" "\0" + VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "taafee_mobile.exe" "\0" + VALUE "ProductName", "taafee_mobile" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..955ee30 --- /dev/null +++ b/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp new file mode 100644 index 0000000..066f3b8 --- /dev/null +++ b/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"taafee_mobile", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/windows/runner/resource.h b/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..c04e20c Binary files /dev/null and b/windows/runner/resources/app_icon.ico differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..a42ea76 --- /dev/null +++ b/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp new file mode 100644 index 0000000..b2b0873 --- /dev/null +++ b/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length <= 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/windows/runner/utils.h b/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp new file mode 100644 index 0000000..60608d0 --- /dev/null +++ b/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h new file mode 100644 index 0000000..e901dde --- /dev/null +++ b/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_