├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── minafarid
│ │ │ │ └── complete_advanced_flutter
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-ar
│ │ │ └── strings.xml
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── color.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── fonts
│ ├── Montserrat-Bold.ttf
│ ├── Montserrat-Light.ttf
│ ├── Montserrat-Medium.ttf
│ ├── Montserrat-Regular.ttf
│ └── Montserrat-SemiBold.ttf
├── images
│ ├── 1.5x
│ │ └── splash_logo.png
│ ├── 2.0x
│ │ └── splash_logo.png
│ ├── 3.0x
│ │ └── splash_logo.png
│ ├── 4.0x
│ │ └── splash_logo.png
│ ├── change_lang_ic.svg
│ ├── contact_us_ic.svg
│ ├── hollow_cirlce_ic.svg
│ ├── invite_friends_ic.svg
│ ├── left_arrow_ic.svg
│ ├── logout_ic.svg
│ ├── onboarding_logo1.svg
│ ├── onboarding_logo2.svg
│ ├── onboarding_logo3.svg
│ ├── onboarding_logo4.svg
│ ├── photo_camera_ic.svg
│ ├── right_arrow_ic.svg
│ ├── settings_right_arrow_ic.svg
│ ├── solid_circle_ic.svg
│ └── splash_logo.png
├── json
│ ├── empty.json
│ ├── error.json
│ ├── loading.json
│ └── success.json
└── translations
│ ├── ar-SA.json
│ └── en-US.json
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x-1.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x-1.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x-1.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x-1.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ ├── Icon-App-83.5x83.5@2x.png
│ │ └── ItunesArtwork@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── app
│ ├── app.dart
│ ├── app_prefs.dart
│ ├── constant.dart
│ ├── di.dart
│ ├── extensions.dart
│ └── functions.dart
├── data
│ ├── data_source
│ │ ├── local_data_source.dart
│ │ └── remote_data_source.dart
│ ├── mapper
│ │ └── mapper.dart
│ ├── network
│ │ ├── app_api.dart
│ │ ├── app_api.g.dart
│ │ ├── dio_factory.dart
│ │ ├── error_handler.dart
│ │ ├── failure.dart
│ │ └── network_info.dart
│ ├── repository
│ │ └── repository_impl.dart
│ ├── request
│ │ └── request.dart
│ └── responses
│ │ ├── responses.dart
│ │ └── responses.g.dart
├── domain
│ ├── model
│ │ └── model.dart
│ ├── repository
│ │ └── repository.dart
│ └── usecase
│ │ ├── base_usecase.dart
│ │ ├── forgot_password_usecase.dart
│ │ ├── home_usecase.dart
│ │ ├── login_usecase.dart
│ │ ├── register_usecase.dart
│ │ └── store_details_usecase.dart
├── main.dart
├── presentation
│ ├── base
│ │ └── baseviewmodel.dart
│ ├── common
│ │ ├── freezed_data_classes.dart
│ │ ├── freezed_data_classes.freezed.dart
│ │ └── state_renderer
│ │ │ ├── state_render_impl.dart
│ │ │ └── state_renderer.dart
│ ├── forgot_password
│ │ ├── forgot_password.dart
│ │ └── forgot_password_viewmodel.dart
│ ├── login
│ │ ├── login.dart
│ │ └── login_viewmodel.dart
│ ├── main
│ │ ├── home
│ │ │ ├── home_page.dart
│ │ │ └── home_viewmodel.dart
│ │ ├── main_view.dart
│ │ ├── notifications_page.dart
│ │ ├── search_page.dart
│ │ └── settings_page.dart
│ ├── onboarding
│ │ ├── onboarding.dart
│ │ └── onboarding_viewmodel.dart
│ ├── register
│ │ ├── register.dart
│ │ └── register_viewmodel.dart
│ ├── resources
│ │ ├── assets_manager.dart
│ │ ├── color_manager.dart
│ │ ├── font_manager.dart
│ │ ├── language_manager.dart
│ │ ├── routes_manager.dart
│ │ ├── strings_manager.dart
│ │ ├── styles_manager.dart
│ │ ├── theme_manager.dart
│ │ └── values_manager.dart
│ ├── splash
│ │ └── splash.dart
│ └── store_details
│ │ ├── store_details.dart
│ │ └── store_details_viewmodel.dart
└── test.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # complete_advanced_flutter
2 |
3 | A new Flutter application.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.minafarid.complete_advanced_flutter"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
9 |
16 |
20 |
23 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
38 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/minafarid/complete_advanced_flutter/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.minafarid.complete_advanced_flutter
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-ar/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | تطبيق توت
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ED9728
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Tut App
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/fonts/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/fonts/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/assets/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/assets/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/Montserrat-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/fonts/Montserrat-SemiBold.ttf
--------------------------------------------------------------------------------
/assets/images/1.5x/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/images/1.5x/splash_logo.png
--------------------------------------------------------------------------------
/assets/images/2.0x/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/images/2.0x/splash_logo.png
--------------------------------------------------------------------------------
/assets/images/3.0x/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/images/3.0x/splash_logo.png
--------------------------------------------------------------------------------
/assets/images/4.0x/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/images/4.0x/splash_logo.png
--------------------------------------------------------------------------------
/assets/images/change_lang_ic.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/assets/images/contact_us_ic.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/assets/images/hollow_cirlce_ic.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/images/invite_friends_ic.svg:
--------------------------------------------------------------------------------
1 |
30 |
--------------------------------------------------------------------------------
/assets/images/left_arrow_ic.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/images/logout_ic.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/assets/images/onboarding_logo3.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/images/photo_camera_ic.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/assets/images/right_arrow_ic.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/images/settings_right_arrow_ic.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/assets/images/solid_circle_ic.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/images/splash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/assets/images/splash_logo.png
--------------------------------------------------------------------------------
/assets/translations/ar-SA.json:
--------------------------------------------------------------------------------
1 | {
2 | "no_route_found": "لا توجد شاشه",
3 | "on_boarding_title1": "شاهد افضل كورس #١",
4 | "on_boarding_title2": "شاهد افضل كورس #٢",
5 | "on_boarding_title3": "شاهد افضل كورس #٣",
6 | "on_boarding_title4": "شاهد افضل كورس #٤",
7 | "on_boarding_desc1": "تطبيق توت يكون تطبيق رائع باستخدام اساس منظم #١",
8 | "on_boarding_desc2": "تطبيق توت يكون تطبيق رائع باستخدام اساس منظم #٢",
9 | "on_boarding_desc3": "تطبيق توت يكون تطبيق رائع باستخدام اساس منظم #٣",
10 | "on_boarding_desc4": "تطبيق توت يكون تطبيق رائع باستخدام اساس منظم #٤",
11 | "skip": "تخطي",
12 | "invalid_password": "يجب أن تتكون كلمة المرور من 8 أحرف مع حرف واحد كبير وحرف صغير وحرف رقمي واحد على الأقل",
13 | "username_hint": "اسم المستخدم",
14 | "password_hint": "كلمه السر",
15 | "login_button": "تسجيل الدخول",
16 | "forgot_password_text": "نسيت كلمه السر",
17 | "register_text": "لم تقم بالتسجيل؟ سجل الان",
18 | "loading": "جاري التحميل...",
19 | "retry_again": "حاول مره اخرق",
20 | "error_occurred": "حصل خطآ",
21 | "ok": "موافق",
22 | "invalid_user_name": "اسم المستخدم غير صحيح",
23 | "invalid_mobile_number": "رقم الهاتف غير صحيح",
24 | "invalid_email": "البريد الاليكتروني غير صحيح",
25 | "register": "التسجيل",
26 | "already_have_account": "لديك جساب بالفعل؟ قم بتسجيل الدخول",
27 | "upload_profile_picture": "حمل الصوره الشخصيه",
28 | "photo_gallery": "مكتبه الصور",
29 | "camera": "الكاميرا",
30 | "mobile_number_hint": "رقم الهاتف",
31 | "email_hint": "البريذ الالكتروني",
32 | "notification": "الاشعارات",
33 | "search": "البحث",
34 | "home": "الرىيسيه",
35 | "settings": "الاعدادات",
36 | "services": "الخدمات",
37 | "stores": "المتاجر",
38 | "about": "عن المتجر",
39 | "details": "التفاصيل",
40 | "store_details": "تفصايل المتجر",
41 | "success": "تم النجاح",
42 | "bad_request_error": "طلب غير صالح. حاول مرة أخرى لاحقًا",
43 | "forbidden_error": "طلب محظور. حاول مرة أخرى لاحقًا",
44 | "unauthorized_error": "مستخدم غير مصرح له , حاول مرة أخرى لاحقًا",
45 | "not_found_error": "url غير موجود , حاول مرة أخرى لاحقًا",
46 | "تعارض_خطأ": "تم العثور على تعارض , حاول مرة أخرى لاحقًا",
47 | "Internal_server_error": "حدث خطأ ما , حاول مرة أخرى لاحقًا",
48 | "unknown_error": "حدث خطأ ما , حاول مرة أخرى لاحقًا",
49 | "timeout_error": "انتهت المهلة , حاول مرة أخرى متأخرًا",
50 | "default_error": "حدث خطأ ما , حاول مرة أخرى لاحقًا",
51 | "cache_error": "خطأ في ذاكرة التخزين المؤقت , حاول مرة أخرى لاحقًا",
52 | "no_internet_error": "يُرجى التحقق من اتصالك بالإنترنت",
53 | "change_language": "تغيير اللغة",
54 | "contact_us": "اتصل بنا",
55 | "invite_your_friends": "قم بدعوة أصدقائك",
56 | "logout": "تسجيل الخروج",
57 | "reset_password": "اعاده تعيين كلمه السر"
58 |
59 | }
--------------------------------------------------------------------------------
/assets/translations/en-US.json:
--------------------------------------------------------------------------------
1 | {
2 | "no_route_found": "No Route found",
3 | "on_boarding_title1": "SEE THE BEST COURSE #1",
4 | "on_boarding_title2": "SEE THE BEST COURSE #2",
5 | "on_boarding_title3": "SEE THE BEST COURSE #3",
6 | "on_boarding_title4": "SEE THE BEST COURSE #4",
7 | "on_boarding_desc1": "Tut app is an awesome flutter application using clean architecture #1",
8 | "on_boarding_desc2": "Tut app is an awesome flutter application using clean architecture #2",
9 | "on_boarding_desc3": "Tut app is an awesome flutter application using clean architecture #3",
10 | "on_boarding_desc4": "Tut app is an awesome flutter application using clean architecture #4",
11 | "skip": "Skip",
12 | "invalid_password": "password is wrong",
13 | "username_hint": "UserName",
14 | "password_hint": "Password",
15 | "login_button": "Login",
16 | "forgot_password_text": "Forgot Password",
17 | "register_text": "Not a member ? Sign up",
18 | "loading": "Loading....",
19 | "retry_again": "Retry again",
20 | "error_occurred": "An Error Occurred",
21 | "ok": "Ok",
22 | "invalid_user_name": "Invalid User Name",
23 | "invalid_mobile_number": "Invalid Mobile Number",
24 | "invalid_email": "Invalid Email",
25 | "register": "Register",
26 | "already_have_account": "Already have an account? login",
27 | "upload_profile_pictuSearchre": "profile picture",
28 | "photo_gallery": "Photo from gallery",
29 | "camera": "Photo from camera",
30 | "mobile_number_hint": "Mobile Number",
31 | "email_hint": "Email",
32 | "notification": "Notifications",
33 | "search": "Search",
34 | "home": "Home",
35 | "settings": "Settings",
36 | "services": "Services",
37 | "stores": "Stores",
38 | "about": "About Store",
39 | "details": "Details",
40 | "store_details": "Store Details",
41 | "success": "success",
42 | "bad_request_error": "bad request. try again later",
43 | "forbidden_error": "forbidden request. try again later",
44 | "unauthorized_error": "user unauthorized, try again later",
45 | "not_found_error": "url not found, try again later",
46 | "conflict_error": "conflict found, try again later",
47 | "internal_server_error": "some thing went wrong, try again later",
48 | "unknown_error": "some thing went wrong, try again later",
49 | "timeout_error": "time out, try again late",
50 | "default_error": "some thing went wrong, try again later",
51 | "cache_error": "cache error, try again later",
52 | "no_internet_error": "Please check your internet connection",
53 | "no_content": "success with not content",
54 | "change_language": "Change Language",
55 | "contact_us": "Contact Us",
56 | "invite_your_friends": "Invite Your Friends",
57 | "logout": "Logout",
58 | "reset_password": "Reset Password"
59 | }
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/ephemeral/
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Icon-App-20x20@2x-1.png",
5 | "idiom" : "iphone",
6 | "scale" : "2x",
7 | "size" : "20x20"
8 | },
9 | {
10 | "filename" : "Icon-App-20x20@3x.png",
11 | "idiom" : "iphone",
12 | "scale" : "3x",
13 | "size" : "20x20"
14 | },
15 | {
16 | "filename" : "Icon-App-29x29@1x-1.png",
17 | "idiom" : "iphone",
18 | "scale" : "1x",
19 | "size" : "29x29"
20 | },
21 | {
22 | "filename" : "Icon-App-29x29@2x-1.png",
23 | "idiom" : "iphone",
24 | "scale" : "2x",
25 | "size" : "29x29"
26 | },
27 | {
28 | "filename" : "Icon-App-29x29@3x.png",
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "29x29"
32 | },
33 | {
34 | "filename" : "Icon-App-40x40@2x-1.png",
35 | "idiom" : "iphone",
36 | "scale" : "2x",
37 | "size" : "40x40"
38 | },
39 | {
40 | "filename" : "Icon-App-40x40@3x.png",
41 | "idiom" : "iphone",
42 | "scale" : "3x",
43 | "size" : "40x40"
44 | },
45 | {
46 | "filename" : "Icon-App-60x60@2x.png",
47 | "idiom" : "iphone",
48 | "scale" : "2x",
49 | "size" : "60x60"
50 | },
51 | {
52 | "filename" : "Icon-App-60x60@3x.png",
53 | "idiom" : "iphone",
54 | "scale" : "3x",
55 | "size" : "60x60"
56 | },
57 | {
58 | "filename" : "Icon-App-20x20@1x.png",
59 | "idiom" : "ipad",
60 | "scale" : "1x",
61 | "size" : "20x20"
62 | },
63 | {
64 | "filename" : "Icon-App-20x20@2x.png",
65 | "idiom" : "ipad",
66 | "scale" : "2x",
67 | "size" : "20x20"
68 | },
69 | {
70 | "filename" : "Icon-App-29x29@1x.png",
71 | "idiom" : "ipad",
72 | "scale" : "1x",
73 | "size" : "29x29"
74 | },
75 | {
76 | "filename" : "Icon-App-29x29@2x.png",
77 | "idiom" : "ipad",
78 | "scale" : "2x",
79 | "size" : "29x29"
80 | },
81 | {
82 | "filename" : "Icon-App-40x40@1x.png",
83 | "idiom" : "ipad",
84 | "scale" : "1x",
85 | "size" : "40x40"
86 | },
87 | {
88 | "filename" : "Icon-App-40x40@2x.png",
89 | "idiom" : "ipad",
90 | "scale" : "2x",
91 | "size" : "40x40"
92 | },
93 | {
94 | "filename" : "Icon-App-76x76@1x.png",
95 | "idiom" : "ipad",
96 | "scale" : "1x",
97 | "size" : "76x76"
98 | },
99 | {
100 | "filename" : "Icon-App-76x76@2x.png",
101 | "idiom" : "ipad",
102 | "scale" : "2x",
103 | "size" : "76x76"
104 | },
105 | {
106 | "filename" : "Icon-App-83.5x83.5@2x.png",
107 | "idiom" : "ipad",
108 | "scale" : "2x",
109 | "size" : "83.5x83.5"
110 | },
111 | {
112 | "filename" : "ItunesArtwork@2x.png",
113 | "idiom" : "ios-marketing",
114 | "scale" : "1x",
115 | "size" : "1024x1024"
116 | }
117 | ],
118 | "info" : {
119 | "author" : "xcode",
120 | "version" : 1
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minafarideleia/complete_advanced_flutter/df8528ccf35beae416d0cdef7bc7d476ef3f8d77/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | 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.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSAppTransportSecurity
6 |
7 | NSAllowsArbitraryLoads
8 |
9 |
10 | CFBundleDevelopmentRegion
11 | $(DEVELOPMENT_LANGUAGE)
12 | CFBundleExecutable
13 | $(EXECUTABLE_NAME)
14 | CFBundleIdentifier
15 | $(PRODUCT_BUNDLE_IDENTIFIER)
16 | CFBundleInfoDictionaryVersion
17 | 6.0
18 | CFBundleName
19 | Tut App
20 | CFBundlePackageType
21 | APPL
22 | CFBundleShortVersionString
23 | $(FLUTTER_BUILD_NAME)
24 | CFBundleSignature
25 | ????
26 | CFBundleVersion
27 | $(FLUTTER_BUILD_NUMBER)
28 | LSRequiresIPhoneOS
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UISupportedInterfaceOrientations
35 |
36 | UIInterfaceOrientationPortrait
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 | UIViewControllerBasedStatusBarAppearance
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/app/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/app/app_prefs.dart';
2 | import 'package:complete_advanced_flutter/app/di.dart';
3 | import 'package:complete_advanced_flutter/presentation/resources/routes_manager.dart';
4 | import 'package:complete_advanced_flutter/presentation/resources/theme_manager.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:easy_localization/easy_localization.dart';
7 |
8 | class MyApp extends StatefulWidget {
9 | MyApp._internal(); // private named constructor
10 | int appState = 0;
11 | static final MyApp instance =
12 | MyApp._internal(); // single instance -- singleton
13 |
14 | factory MyApp() => instance; // factory for the class instance
15 |
16 | @override
17 | _MyAppState createState() => _MyAppState();
18 | }
19 |
20 | class _MyAppState extends State {
21 | AppPreferences _appPreferences = instance();
22 |
23 | @override
24 | void didChangeDependencies() {
25 | _appPreferences.getLocal().then((local) => {context.setLocale(local)});
26 |
27 | super.didChangeDependencies();
28 | }
29 |
30 | @override
31 | Widget build(BuildContext context) {
32 | return MaterialApp(
33 | localizationsDelegates: context.localizationDelegates,
34 | supportedLocales: context.supportedLocales,
35 | locale: context.locale,
36 | debugShowCheckedModeBanner: false,
37 | onGenerateRoute: RouteGenerator.getRoute,
38 | initialRoute: Routes.splashRoute,
39 | theme: getApplicationTheme(),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/app/app_prefs.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/presentation/resources/language_manager.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:shared_preferences/shared_preferences.dart';
4 |
5 | const String PREFS_KEY_LANG = "PREFS_KEY_LANG";
6 | const String PREFS_KEY_ONBOARDING_SCREEN = "PREFS_KEY_ONBOARDING_SCREEN";
7 | const String PREFS_KEY_IS_USER_LOGGED_IN = "PREFS_KEY_IS_USER_LOGGED_IN";
8 | const String PREFS_KEY_TOKEN = "PREFS_KEY_TOKEN";
9 |
10 | class AppPreferences {
11 | SharedPreferences _sharedPreferences;
12 |
13 | AppPreferences(this._sharedPreferences);
14 |
15 | Future getAppLanguage() async {
16 | String? language = _sharedPreferences.getString(PREFS_KEY_LANG);
17 |
18 | if (language != null && language.isNotEmpty) {
19 | return language;
20 | } else {
21 | return LanguageType.ENGLISH.getValue();
22 | }
23 | }
24 |
25 | Future setLanguageChanged() async {
26 | String currentLanguage = await getAppLanguage();
27 | if (currentLanguage == LanguageType.ARABIC.getValue()) {
28 | // save prefs with english lang
29 | _sharedPreferences.setString(
30 | PREFS_KEY_LANG, LanguageType.ENGLISH.getValue());
31 | } else {
32 | // save prefs with arabic lang
33 | _sharedPreferences.setString(
34 | PREFS_KEY_LANG, LanguageType.ARABIC.getValue());
35 | }
36 | }
37 |
38 | Future getLocal() async {
39 | String currentLanguage = await getAppLanguage();
40 | if (currentLanguage == LanguageType.ARABIC.getValue()) {
41 | // return arabic local
42 | return ARABIC_LOCAL;
43 | } else {
44 | // return english local
45 | return ENGLISH_LOCAL;
46 | }
47 | }
48 |
49 | Future setOnBoardingScreenViewed() async {
50 | _sharedPreferences.setBool(PREFS_KEY_ONBOARDING_SCREEN, true);
51 | }
52 |
53 | Future isOnBoardingScreenViewed() async {
54 | return _sharedPreferences.getBool(PREFS_KEY_ONBOARDING_SCREEN) ?? false;
55 | }
56 |
57 | Future setUserToken(String token) async {
58 | _sharedPreferences.setString(PREFS_KEY_TOKEN, token);
59 | }
60 |
61 | Future getUserToken() async {
62 | return _sharedPreferences.getString(PREFS_KEY_TOKEN) ?? "";
63 | }
64 |
65 | Future setIsUserLoggedIn() async {
66 | _sharedPreferences.setBool(PREFS_KEY_IS_USER_LOGGED_IN, true);
67 | }
68 |
69 | Future isUserLoggedIn() async {
70 | return _sharedPreferences.getBool(PREFS_KEY_IS_USER_LOGGED_IN) ?? false;
71 | }
72 |
73 | Future logout() async {
74 | _sharedPreferences.remove(PREFS_KEY_IS_USER_LOGGED_IN);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/app/constant.dart:
--------------------------------------------------------------------------------
1 | class Constant{
2 | static const String baseUrl ="http://minafarid123.mocklab.io";
3 | static const String token ="get api token here";
4 | }
--------------------------------------------------------------------------------
/lib/app/di.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/data/data_source/local_data_source.dart';
2 | import 'package:complete_advanced_flutter/data/data_source/remote_data_source.dart';
3 | import 'package:complete_advanced_flutter/data/network/app_api.dart';
4 | import 'package:complete_advanced_flutter/data/network/dio_factory.dart';
5 | import 'package:complete_advanced_flutter/data/network/network_info.dart';
6 | import 'package:complete_advanced_flutter/data/repository/repository_impl.dart';
7 | import 'package:complete_advanced_flutter/domain/repository/repository.dart';
8 | import 'package:complete_advanced_flutter/domain/usecase/forgot_password_usecase.dart';
9 | import 'package:complete_advanced_flutter/domain/usecase/home_usecase.dart';
10 | import 'package:complete_advanced_flutter/domain/usecase/login_usecase.dart';
11 | import 'package:complete_advanced_flutter/domain/usecase/register_usecase.dart';
12 | import 'package:complete_advanced_flutter/domain/usecase/store_details_usecase.dart';
13 | import 'package:complete_advanced_flutter/presentation/forgot_password/forgot_password_viewmodel.dart';
14 | import 'package:complete_advanced_flutter/presentation/login/login_viewmodel.dart';
15 | import 'package:complete_advanced_flutter/presentation/main/home/home_viewmodel.dart';
16 | import 'package:complete_advanced_flutter/presentation/register/register_viewmodel.dart';
17 | import 'package:complete_advanced_flutter/presentation/store_details/store_details_viewmodel.dart';
18 | import 'package:data_connection_checker/data_connection_checker.dart';
19 | import 'package:get_it/get_it.dart';
20 | import 'package:image_picker/image_picker.dart';
21 | import 'package:shared_preferences/shared_preferences.dart';
22 |
23 | import 'app_prefs.dart';
24 |
25 | final instance = GetIt.instance;
26 |
27 | Future initAppModule() async {
28 | final sharedPrefs = await SharedPreferences.getInstance();
29 |
30 | // shared prefs instance
31 | instance.registerLazySingleton(() => sharedPrefs);
32 |
33 | // app prefs instance
34 | instance
35 | .registerLazySingleton(() => AppPreferences(instance()));
36 |
37 | // network info
38 | instance.registerLazySingleton(
39 | () => NetworkInfoImpl(DataConnectionChecker()));
40 |
41 | // dio factory
42 | instance.registerLazySingleton(() => DioFactory(instance()));
43 |
44 | // app service client
45 | final dio = await instance().getDio();
46 | instance.registerLazySingleton(() => AppServiceClient(dio));
47 |
48 | // remote data source
49 | instance.registerLazySingleton(
50 | () => RemoteDataSourceImplementer(instance()));
51 |
52 | // local data source
53 | instance.registerLazySingleton(
54 | () => LocalDataSourceImplementer());
55 |
56 | // repository
57 | instance.registerLazySingleton(
58 | () => RepositoryImpl(instance(), instance(), instance()));
59 | }
60 |
61 | initLoginModule() {
62 | if (!GetIt.I.isRegistered()) {
63 | instance.registerFactory(() => LoginUseCase(instance()));
64 | instance.registerFactory(() => LoginViewModel(instance()));
65 | }
66 | }
67 |
68 | initForgotPasswordModule() {
69 | if (!GetIt.I.isRegistered()) {
70 | instance.registerFactory(
71 | () => ForgotPasswordUseCase(instance()));
72 | instance.registerFactory(
73 | () => ForgotPasswordViewModel(instance()));
74 | }
75 | }
76 |
77 | initRegisterModule() {
78 | if (!GetIt.I.isRegistered()) {
79 | instance
80 | .registerFactory(() => RegisterUseCase(instance()));
81 | instance.registerFactory(
82 | () => RegisterViewModel(instance()));
83 | instance.registerFactory(() => ImagePicker());
84 | }
85 | }
86 |
87 | initHomeModule() {
88 | if (!GetIt.I.isRegistered()) {
89 | instance.registerFactory(() => HomeUseCase(instance()));
90 | instance.registerFactory(() => HomeViewModel(instance()));
91 | }
92 | }
93 |
94 | initStoreDetailsModule() {
95 | if (!GetIt.I.isRegistered()) {
96 | instance.registerFactory(
97 | () => StoreDetailsUseCase(instance()));
98 | instance.registerFactory(
99 | () => StoreDetailsViewModel(instance()));
100 | }
101 | }
102 |
103 | resetModules() {
104 | instance.reset(dispose: false);
105 | initAppModule();
106 | initHomeModule();
107 | initLoginModule();
108 | initRegisterModule();
109 | initForgotPasswordModule();
110 | initStoreDetailsModule();
111 | }
112 |
--------------------------------------------------------------------------------
/lib/app/extensions.dart:
--------------------------------------------------------------------------------
1 | // extension on String
2 |
3 | import 'package:complete_advanced_flutter/data/mapper/mapper.dart';
4 |
5 | extension NonNullString on String? {
6 | String orEmpty() {
7 | if (this == null) {
8 | return EMPTY;
9 | } else {
10 | return this!;
11 | }
12 | }
13 | }
14 |
15 | // extension on Integer
16 |
17 | extension NonNullInteger on int? {
18 | int orZero() {
19 | if (this == null) {
20 | return ZERO;
21 | } else {
22 | return this!;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/app/functions.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:complete_advanced_flutter/domain/model/model.dart';
4 | import 'package:device_info/device_info.dart';
5 | import 'package:flutter/services.dart';
6 |
7 | Future getDeviceDetails() async {
8 | String name = "Unknown";
9 | String identifier = "Unknown";
10 | String version = "Unknown";
11 |
12 | DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
13 |
14 | try {
15 | if (Platform.isAndroid) {
16 | // return android device info
17 | var build = await deviceInfoPlugin.androidInfo;
18 | name = build.brand + " " + build.model;
19 | identifier = build.androidId;
20 | version = build.version.codename;
21 | } else if (Platform.isIOS) {
22 | // return ios device info
23 | var build = await deviceInfoPlugin.iosInfo;
24 | name = build.name + " " + build.model;
25 | identifier = build.identifierForVendor;
26 | version = build.systemVersion;
27 | }
28 | } on PlatformException {
29 | // return default data here
30 | return DeviceInfo(name, identifier, version);
31 | }
32 | return DeviceInfo(name, identifier, version);
33 | }
34 |
35 | bool isEmailValid(String email) {
36 | return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email);
37 | }
--------------------------------------------------------------------------------
/lib/data/data_source/local_data_source.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/data/network/error_handler.dart';
2 | import 'package:complete_advanced_flutter/data/responses/responses.dart';
3 |
4 | const CACHE_HOME_KEY = "CACHE_HOME_KEY";
5 | const CACHE_HOME_INTERVAL = 60 * 1000; // 1 MINUTE IN MILLIS
6 |
7 | const CACHE_STORE_DETAILS_KEY = "CACHE_STORE_DETAILS_KEY";
8 | const CACHE_STORE_DETAILS_INTERVAL = 60 * 1000; // 30s in millis
9 |
10 | abstract class LocalDataSource {
11 | Future getHome();
12 |
13 | Future saveHomeToCache(HomeResponse homeResponse);
14 |
15 | void clearCache();
16 |
17 | void removeFromCache(String key);
18 |
19 | Future getStoreDetails();
20 |
21 | Future saveStoreDetailsToCache(StoreDetailsResponse response);
22 | }
23 |
24 | class LocalDataSourceImplementer implements LocalDataSource {
25 | // run time cache
26 | Map cacheMap = Map();
27 |
28 | @override
29 | Future getHome() async {
30 | CachedItem? cachedItem = cacheMap[CACHE_HOME_KEY];
31 |
32 | if (cachedItem != null && cachedItem.isValid(CACHE_HOME_INTERVAL)) {
33 | return cachedItem.data;
34 | // return the response from cache
35 | } else {
36 | // return error that cache is not valid
37 | throw ErrorHandler.handle(DataSource.CACHE_ERROR);
38 | }
39 | }
40 |
41 | @override
42 | Future saveHomeToCache(HomeResponse homeResponse) async {
43 | cacheMap[CACHE_HOME_KEY] = CachedItem(homeResponse);
44 | }
45 |
46 | @override
47 | Future getStoreDetails() async {
48 | CachedItem? cachedItem = cacheMap[CACHE_STORE_DETAILS_KEY];
49 |
50 | if (cachedItem != null &&
51 | cachedItem.isValid(CACHE_STORE_DETAILS_INTERVAL)) {
52 | return cachedItem.data;
53 | } else {
54 | throw ErrorHandler.handle(DataSource.CACHE_ERROR);
55 | }
56 | }
57 |
58 | @override
59 | Future saveStoreDetailsToCache(StoreDetailsResponse response) async {
60 | cacheMap[CACHE_STORE_DETAILS_KEY] = CachedItem(response);
61 | }
62 |
63 | @override
64 | void clearCache() {
65 | cacheMap.clear();
66 | }
67 |
68 | @override
69 | void removeFromCache(String key) {
70 | cacheMap.remove(key);
71 | }
72 | }
73 |
74 | class CachedItem {
75 | dynamic data;
76 |
77 | int cacheTime = DateTime.now().millisecondsSinceEpoch;
78 |
79 | CachedItem(this.data);
80 | }
81 |
82 | extension CachedItemExtension on CachedItem {
83 | bool isValid(int expirationTime) {
84 | // expirationTime is 60 secs
85 | int currentTimeInMillis =
86 | DateTime.now().millisecondsSinceEpoch; // time now is 1:00:00 pm
87 |
88 | bool isCacheValid = currentTimeInMillis - expirationTime <
89 | cacheTime; // cache time was in 12:59:30
90 | // false if current time > 1:00:30
91 | // true if current time <1:00:30
92 | return isCacheValid;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/lib/data/data_source/remote_data_source.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/data/network/app_api.dart';
2 | import 'package:complete_advanced_flutter/data/request/request.dart';
3 | import 'package:complete_advanced_flutter/data/responses/responses.dart';
4 |
5 | abstract class RemoteDataSource {
6 | Future login(LoginRequest loginRequest);
7 |
8 | Future register(RegisterRequest registerRequest);
9 |
10 | Future forgotPassword(String email);
11 |
12 | Future getHome();
13 |
14 | Future getStoreDetails();
15 | }
16 |
17 | class RemoteDataSourceImplementer implements RemoteDataSource {
18 | AppServiceClient _appServiceClient;
19 |
20 | RemoteDataSourceImplementer(this._appServiceClient);
21 |
22 | @override
23 | Future login(LoginRequest loginRequest) async {
24 | return await _appServiceClient.login(
25 | loginRequest.email, loginRequest.password, "", "");
26 | }
27 |
28 | @override
29 | Future forgotPassword(String email) async {
30 | return await _appServiceClient.forgotPassword(email);
31 | }
32 |
33 | @override
34 | Future register(
35 | RegisterRequest registerRequest) async {
36 | return await _appServiceClient.register(
37 | registerRequest.countryMobileCode,
38 | registerRequest.userName,
39 | registerRequest.email,
40 | registerRequest.password,
41 | registerRequest.mobileNumber,
42 | "");
43 | }
44 |
45 | @override
46 | Future getHome() async {
47 | return await _appServiceClient.getHome();
48 | }
49 |
50 | @override
51 | Future getStoreDetails() async {
52 | return await _appServiceClient.getStoreDetails();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/data/mapper/mapper.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/app/extensions.dart';
2 |
3 | // to convert the response into a non nullable object (model)
4 |
5 | import 'package:complete_advanced_flutter/data/responses/responses.dart';
6 | import 'package:complete_advanced_flutter/domain/model/model.dart';
7 |
8 | const EMPTY = "";
9 | const ZERO = 0;
10 |
11 | extension CustomerResponseMapper on CustomerResponse? {
12 | Customer toDomain() {
13 | return Customer(
14 | this?.id?.orEmpty() ?? EMPTY,
15 | this?.name?.orEmpty() ?? EMPTY,
16 | this?.numOfNotifications?.orZero() ?? ZERO);
17 | }
18 | }
19 |
20 | extension ContactsResponseMapper on ContactsResponse? {
21 | Contacts toDomain() {
22 | return Contacts(this?.email?.orEmpty() ?? EMPTY,
23 | this?.phone?.orEmpty() ?? EMPTY, this?.link?.orEmpty() ?? EMPTY);
24 | }
25 | }
26 |
27 | extension AuthenticationResponseMapper on AuthenticationResponse? {
28 | Authentication toDomain() {
29 | return Authentication(
30 | this?.customer?.toDomain(), this?.contacts?.toDomain());
31 | }
32 | }
33 |
34 | extension ForgotPasswordResponseMapper on ForgotPasswordResponse? {
35 | String toDomain() {
36 | return this?.support?.orEmpty() ?? EMPTY;
37 | }
38 | }
39 |
40 | extension ServiceResponseMapper on ServiceResponse? {
41 | Service toDomain() {
42 | return Service(this?.id?.orZero() ?? ZERO, this?.title?.orEmpty() ?? EMPTY,
43 | this?.image?.orEmpty() ?? EMPTY);
44 | }
45 | }
46 |
47 | extension StoreResponseMapper on StoreResponse? {
48 | Store toDomain() {
49 | return Store(this?.id?.orZero() ?? ZERO, this?.title?.orEmpty() ?? EMPTY,
50 | this?.image?.orEmpty() ?? EMPTY);
51 | }
52 | }
53 |
54 | extension BannerResponseMapper on BannerResponse? {
55 | BannerAd toDomain() {
56 | return BannerAd(this?.id?.orZero() ?? ZERO, this?.title?.orEmpty() ?? EMPTY,
57 | this?.image?.orEmpty() ?? EMPTY, this?.link?.orEmpty() ?? EMPTY);
58 | }
59 | }
60 |
61 | extension HomeResponseMapper on HomeResponse? {
62 | HomeObject toDomain() {
63 | List mappedServices =
64 | (this?.data?.services?.map((service) => service.toDomain()) ??
65 | Iterable.empty())
66 | .cast()
67 | .toList();
68 |
69 | List mappedStores =
70 | (this?.data?.stores?.map((store) => store.toDomain()) ??
71 | Iterable.empty())
72 | .cast()
73 | .toList();
74 |
75 | List mappedBanners =
76 | (this?.data?.banners?.map((bannerAd) => bannerAd.toDomain()) ??
77 | Iterable.empty())
78 | .cast()
79 | .toList();
80 |
81 | var data = HomeData(mappedServices, mappedStores, mappedBanners);
82 | return HomeObject(data);
83 | }
84 | }
85 | extension StoreDetailsResponseMapper on StoreDetailsResponse? {
86 | StoreDetails toDomain() {
87 | return StoreDetails(
88 | this?.id?.orZero() ?? ZERO,
89 | this?.title?.orEmpty() ?? EMPTY,
90 | this?.image?.orEmpty() ?? EMPTY,
91 | this?.details?.orEmpty() ?? EMPTY,
92 | this?.services?.orEmpty() ?? EMPTY,
93 | this?.about?.orEmpty() ?? EMPTY);
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/lib/data/network/app_api.dart:
--------------------------------------------------------------------------------
1 | import 'package:complete_advanced_flutter/app/constant.dart';
2 | import 'package:complete_advanced_flutter/data/responses/responses.dart';
3 | import 'package:dio/dio.dart';
4 | import 'package:retrofit/http.dart';
5 |
6 | part 'app_api.g.dart';
7 |
8 | @RestApi(baseUrl: Constant.baseUrl)
9 | abstract class AppServiceClient {
10 | factory AppServiceClient(Dio dio, {String baseUrl}) = _AppServiceClient;
11 |
12 | @POST("/customers/login")
13 | Future login(
14 | @Field("email") String email,
15 | @Field("password") String password,
16 | @Field("imei") String imei,
17 | @Field("deviceType") String deviceType,
18 | );
19 |
20 | @POST("/customers/forgotPassword")
21 | Future forgotPassword(@Field("email") String email);
22 |
23 | @POST("/customers/register")
24 | Future register(
25 | @Field("country_mobile_code") String countryMobileCode,
26 | @Field("user_name") String userName,
27 | @Field("email") String email,
28 | @Field("password") String password,
29 | @Field("mobile_number") String mobilNumber,
30 | @Field("profile_picture") String profilePicture,
31 | );
32 |
33 | @GET("/home")
34 | Future getHome();
35 |
36 | @GET("/storeDetails/1")
37 | Future getStoreDetails();
38 | }
39 |
--------------------------------------------------------------------------------
/lib/data/network/app_api.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'app_api.dart';
4 |
5 | // **************************************************************************
6 | // RetrofitGenerator
7 | // **************************************************************************
8 |
9 | class _AppServiceClient implements AppServiceClient {
10 | _AppServiceClient(this._dio, {this.baseUrl}) {
11 | baseUrl ??= 'http://minafarid123.mocklab.io';
12 | }
13 |
14 | final Dio _dio;
15 |
16 | String? baseUrl;
17 |
18 | @override
19 | Future login(
20 | email, password, imei, deviceType) async {
21 | const _extra = {};
22 | final queryParameters = {};
23 | final _data = {
24 | 'email': email,
25 | 'password': password,
26 | 'imei': imei,
27 | 'deviceType': deviceType
28 | };
29 | final _result = await _dio.fetch