├── .DS_Store
├── .crashlytics
└── dump_syms.bin
├── .gitattributes
├── .gitignore
├── .idea
├── libraries
│ ├── Dart_SDK.xml
│ └── KotlinJavaRuntime.xml
├── modules.xml
├── runConfigurations
│ └── main_dart.xml
└── workspace.xml
├── .metadata
├── .vscode
└── settings.json
├── README.md
├── analysis_options.yaml
├── android
├── .DS_Store
├── .gitignore
├── app
│ ├── .DS_Store
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── efestech
│ │ │ │ └── tutorial_app
│ │ │ │ └── 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-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── tutorial_app_android.iml
├── assets
├── test.json
├── test
│ └── test.json
└── translations
│ └── en-US.json
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.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
│ │ └── 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
└── RunnerTests
│ └── RunnerTests.swift
├── lib
├── feature
│ ├── auth
│ │ ├── auth_splash
│ │ │ └── view
│ │ │ │ └── auth_splash_view.dart
│ │ ├── login
│ │ │ ├── model
│ │ │ │ ├── login_request_model.dart
│ │ │ │ └── login_response_model.dart
│ │ │ ├── view
│ │ │ │ ├── login_view.dart
│ │ │ │ └── src
│ │ │ │ │ ├── _email_field.dart
│ │ │ │ │ ├── _error_field.dart
│ │ │ │ │ ├── _login_button.dart
│ │ │ │ │ ├── _password_field.dart
│ │ │ │ │ └── login_view_mixin.dart
│ │ │ └── view_model
│ │ │ │ └── login_view_model.dart
│ │ └── register
│ │ │ ├── model
│ │ │ ├── register_reponse_model.dart
│ │ │ └── register_request_model.dart
│ │ │ ├── view
│ │ │ ├── register_view.dart
│ │ │ └── src
│ │ │ │ ├── _button_field.dart
│ │ │ │ ├── _confirm_password_field.dart
│ │ │ │ ├── _email_field.dart
│ │ │ │ ├── _error_field.dart
│ │ │ │ ├── _full_name_field.dart
│ │ │ │ ├── _password_field.dart
│ │ │ │ ├── _phone_field.dart
│ │ │ │ └── register_view_mixin.dart
│ │ │ └── view_model
│ │ │ └── register_view_model.dart
│ ├── home
│ │ ├── model
│ │ │ ├── address.dart
│ │ │ ├── address.g.dart
│ │ │ ├── company.dart
│ │ │ ├── company.g.dart
│ │ │ ├── geo.dart
│ │ │ ├── geo.g.dart
│ │ │ ├── user_model.dart
│ │ │ ├── user_model.g.dart
│ │ │ ├── user_response.dart
│ │ │ └── user_response_model.dart
│ │ ├── service
│ │ │ └── home_service.dart
│ │ ├── view
│ │ │ ├── home_view.dart
│ │ │ ├── src
│ │ │ │ └── _list_view_builder.dart
│ │ │ └── user_detail_view.dart
│ │ └── view_model
│ │ │ └── home_view_model.dart
│ ├── photos
│ │ ├── model
│ │ │ ├── photo_response.dart
│ │ │ ├── photo_response.g.dart
│ │ │ ├── photos.dart
│ │ │ ├── photos.g.dart
│ │ │ └── photos_response_model.dart
│ │ ├── service
│ │ │ └── photos_service.dart
│ │ ├── view
│ │ │ ├── photos_view.dart
│ │ │ └── src
│ │ │ │ └── _photos_gridview_builder.dart
│ │ └── view_model
│ │ │ └── ptohos_view_model.dart
│ ├── profile
│ │ ├── model
│ │ │ ├── profile_model.dart
│ │ │ └── profile_model.g.dart
│ │ ├── view
│ │ │ ├── profile_view.dart
│ │ │ └── profile_view_mixin.dart
│ │ └── view_model
│ │ │ └── profile_view_model.dart
│ ├── splash
│ │ └── view
│ │ │ └── splash_view.dart
│ └── test_page
│ │ ├── model
│ │ └── comments_model.dart
│ │ ├── view
│ │ └── test_view.dart
│ │ └── view_model
│ │ └── test_view_model.dart
├── info.md
├── main.dart
└── product
│ ├── .DS_Store
│ ├── core
│ ├── constants
│ │ └── remote_config_keys.dart
│ ├── enums
│ │ ├── firebase_status.dart
│ │ └── shared_manager_enums.dart
│ ├── model
│ │ ├── base_model.dart
│ │ ├── base_response_model.dart
│ │ ├── firestore_model.dart
│ │ └── response_model.dart
│ ├── service
│ │ ├── dio_service_manager.dart
│ │ ├── firebase_service.dart
│ │ ├── iservice_manager.dart
│ │ └── service_manager.dart
│ └── starter
│ │ └── starter.dart
│ ├── utils
│ ├── .DS_Store
│ ├── cache
│ │ ├── cache_manager.dart
│ │ ├── mixin
│ │ │ ├── cache_auth_mixin.dart
│ │ │ ├── cache_models_mixin.dart
│ │ │ └── cache_repository_mixin.dart
│ │ └── preference_key.dart
│ ├── getit
│ │ ├── product_state_container.dart
│ │ └── product_state_items.dart
│ ├── localization
│ │ ├── locale_keys.g.dart
│ │ └── localization_manager.dart
│ ├── remote_config
│ │ └── remote_config_manager.dart
│ ├── router
│ │ ├── adaptive_page_builder.dart
│ │ ├── route_params.dart
│ │ ├── route_paths.dart
│ │ └── router_manager.dart
│ ├── shared
│ │ └── shared_manager.dart
│ ├── snackbar
│ │ └── custom_snackbar.dart
│ └── theme
│ │ ├── color_schemes.g.dart
│ │ └── theme.dart
│ └── widgets
│ ├── maps
│ ├── _apple_maps_widget.dart
│ ├── _google_maps_widget.dart
│ └── maps_view.dart
│ ├── shimmer
│ ├── custom_image_shimmer.dart
│ └── custom_list_shimmer.dart
│ ├── text
│ └── custom_text.dart
│ └── text_field
│ └── custom_text_field.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ ├── Base.lproj
│ │ └── MainMenu.xib
│ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
└── RunnerTests
│ └── RunnerTests.swift
├── pubspec.yaml
├── test
├── service
│ └── service_test.dart
├── utils
│ └── snackbar_test.dart
├── widget_test.dart
└── widgets
│ ├── custom_text_field_test.dart
│ ├── custom_text_test.dart
│ ├── profile_view_test.dart
│ └── splash_view_test.dart
├── tutorial_app.iml
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── index.html
└── manifest.json
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/.DS_Store
--------------------------------------------------------------------------------
/.crashlytics/dump_syms.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/.crashlytics/dump_syms.bin
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://www.dartlang.org/guides/libraries/private-files
2 |
3 | # Files and directories created by pub
4 | .dart_tool/
5 | .packages
6 | build/
7 | # If you're building an application, you may want to check-in your pubspec.lock
8 | pubspec.lock
9 |
10 | # Directory created by dartdoc
11 | # If you don't generate documentation locally you can remove this line.
12 | doc/api/
13 |
14 | # dotenv environment variables file
15 | .env*
16 |
17 | # Avoid committing generated Javascript files:
18 | *.dart.js
19 | *.info.json # Produced by the --dump-info flag.
20 | *.js # When generated by dart2js. Don't specify *.js if your
21 | # project includes source files written in JavaScript.
22 | *.js_
23 | *.js.deps
24 | *.js.map
25 |
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | GoogleService-Info.plist
29 | google-services.json
30 | firebase_options.dart
31 | firebase_app_id_file.json
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/KotlinJavaRuntime.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/.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: "44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2"
8 | channel: "master"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
17 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
18 | - platform: android
19 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
20 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
21 | - platform: ios
22 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
23 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
24 | - platform: linux
25 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
26 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
27 | - platform: macos
28 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
29 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
30 | - platform: web
31 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
32 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
33 | - platform: windows
34 | create_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
35 | base_revision: 44e440ae9ddeb4714bbe73d4326b3ae0ddb1dce2
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cmake.configureOnOpen": false
3 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Bu repo Flutter'a yeni başlayanlar için bir örnek oluşturması için yapılmış bir uygulamadır.
2 | Sorularınızı ve yetersiz açıklama olduğunu düşündüğünüz ve daha fazla detay istediğiniz yerleri Issue oluşturarak belirtebilirsiniz.
3 |
4 | Bu repo sürekli güncellenerek güncel tutulacaktır. Gerçek bir projede kullanım senaryoları eklenecektir.
5 |
6 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | analyzer:
11 | enable-experiment:
12 | - macros
13 | include: package:flutter_lints/flutter.yaml
14 |
15 |
16 | linter:
17 | rules:
18 | constant_identifier_names: false
--------------------------------------------------------------------------------
/android/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/.DS_Store
--------------------------------------------------------------------------------
/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 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/.DS_Store
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | def localProperties = new Properties()
9 | def localPropertiesFile = rootProject.file("local.properties")
10 | if (localPropertiesFile.exists()) {
11 | localPropertiesFile.withReader("UTF-8") { reader ->
12 | localProperties.load(reader)
13 | }
14 | }
15 |
16 | def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17 | if (flutterVersionCode == null) {
18 | flutterVersionCode = "1"
19 | }
20 |
21 | def flutterVersionName = localProperties.getProperty("flutter.versionName")
22 | if (flutterVersionName == null) {
23 | flutterVersionName = "1.0"
24 | }
25 |
26 | android {
27 |
28 | compileSdk = 34
29 | ndkVersion = flutter.ndkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility = JavaVersion.VERSION_1_8
33 | targetCompatibility = JavaVersion.VERSION_1_8
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId = "com.efestech.tutorial_app"
39 | // You can update the following values to match your application needs.
40 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41 | minSdk = 23
42 | targetSdk = flutter.targetSdkVersion
43 | versionCode = flutterVersionCode.toInteger()
44 | versionName = flutterVersionName
45 | }
46 |
47 | buildTypes {
48 | release {
49 | // TODO: Add your own signing config for the release build.
50 | // Signing with the debug keys for now, so `flutter run --release` works.
51 | signingConfig = signingConfigs.debug
52 | }
53 | }
54 | namespace = "com.efestech.tutorial_app"
55 | }
56 |
57 | flutter {
58 | source = "../.."
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/efestech/tutorial_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.efestech.tutorial_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.9.20" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/android/tutorial_app_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/assets/test/test.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/assets/test/test.json
--------------------------------------------------------------------------------
/assets/translations/en-US.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": {
3 | "title": "Tutorial App",
4 | "saved": "Saved",
5 | "notSaved": "Not saved",
6 | "updated": "Updated",
7 | "deleted": "Deleted",
8 | "loading": "Loading",
9 | "error": "Error",
10 | "noData": "No data",
11 | "noDataFound": "No data found"
12 | },
13 | "userTexts": {
14 | "name": "Name",
15 | "username": "Username",
16 | "email": "Email",
17 | "password": "Password",
18 | "phone": "Phone",
19 | "address": "Address",
20 | "website": "Website",
21 | "company": "Company",
22 | "city": "City",
23 | "zipcode": "Zipcode",
24 | "geo": "Geo"
25 | },
26 | "photos": {
27 | "title": "Photos"
28 | },
29 | "buttons": {
30 | "submit": "Submit",
31 | "cancel": "Cancel",
32 | "edit": "Edit",
33 | "delete": "Delete",
34 | "add": "Add",
35 | "save": "Save",
36 | "close": "Close",
37 | "back": "Back",
38 | "next": "Next",
39 | "finish": "Finish"
40 | },
41 | "args": {
42 | "name": "Name: {} {id}"
43 | },
44 | "erroStatus": {
45 | "success": "Success {}",
46 | "userNotFound": "User not found",
47 | "weakPassword": "Weak password",
48 | "tooManyRequests": "Too many requests",
49 | "undefined": "Undefined",
50 | "wrongPassword": "Wrong password",
51 | "emailAlreadyInUse": "E-mail already in use",
52 | "invalidEmail": "Invalid e-mail",
53 | "userDisabled": "User disabled",
54 | "operationNotAllowed": "Operation not allowed",
55 | "invalidPassword": "Invalid password",
56 | "invalidArgument": "Invalid argument",
57 | "notFound": "Not found",
58 | "alreadyExists": "Already exists",
59 | "permissionDenied": "Permission denied",
60 | "unauthenticated": "Unauthenticated",
61 | "resourceExhausted": "Resource exhausted",
62 | "aborted": "Aborted",
63 | "outOfRange": "Out of range",
64 | "unimplemented": "Unimplemented",
65 | "internal": "Internal",
66 | "unavailable": "Unavailable",
67 | "dataLoss": "Data loss",
68 | "unknown": "Unknown",
69 | "verifyEmail": "Verify your e-mail",
70 | "invalidCredential": "Invalid User Credential"
71 | }
72 | }
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/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 | 12.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? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
3 | #include "Generated.xcconfig"
4 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '14.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 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/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.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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 Flutter
2 | import UIKit
3 | import GoogleMaps
4 |
5 | @main
6 | @objc class AppDelegate: FlutterAppDelegate {
7 | override func application(
8 | _ application: UIApplication,
9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
10 | ) -> Bool {
11 | /// Güvenlik nedeniyle IP adresi kısıtlaması yapıldı.
12 | /// Bu nedenle Google Maps API Key'i kısıtlıdır.
13 | /// Eğer uygulamayı çalıştırmak isterseniz, kendi API Key'inizi kullanmalısınız.
14 | /// API Key almak için: https://developers.google.com/maps/documentation/ios-sdk/get-api-key
15 | GMSServices.provideAPIKey("AIzaSyBDfOvDcHODZDGwkQqooDGNs1tjCHrtJYk")
16 | GeneratedPluginRegistrant.register(with: self)
17 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@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/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrjake34/tutorial_app/ff8f3438f7525fa7e56a3a41603c2955bc41638f/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 |
--------------------------------------------------------------------------------
/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 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Tutorial App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | tutorial_app
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/feature/auth/auth_splash/view/auth_splash_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:tutorial_app/feature/auth/login/view/login_view.dart';
4 | import 'package:tutorial_app/feature/profile/view/profile_view.dart';
5 | import 'package:tutorial_app/product/utils/getit/product_state_items.dart';
6 |
7 | class AuthSplashView extends StatelessWidget {
8 | const AuthSplashView({super.key});
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | final cacheManager = ProductStateItems.cacheManager;
13 | final token = cacheManager.getToken();
14 | return StreamBuilder(
15 | stream: FirebaseAuth.instance.authStateChanges(),
16 | builder: (context, snapshot) {
17 | if (snapshot.data != null) {
18 | return const ProfileView();
19 | } else if (snapshot.connectionState == ConnectionState.waiting) {
20 | return const Center(
21 | child: CircularProgressIndicator.adaptive(),
22 | );
23 | }
24 | return const LoginView();
25 | },
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/model/login_request_model.dart:
--------------------------------------------------------------------------------
1 | final class LoginRequestModel {
2 | final String? email;
3 | final String? password;
4 |
5 | LoginRequestModel({
6 | this.email,
7 | this.password,
8 | });
9 |
10 | factory LoginRequestModel.fromJson(Map json) {
11 | return LoginRequestModel(
12 | email: json['email'],
13 | password: json['password'],
14 | );
15 | }
16 |
17 | Map toJson() {
18 | return {
19 | 'email': email,
20 | 'password': password,
21 | };
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/model/login_response_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | final class LoginResponseModel {
4 | final UserCredential? user;
5 | final String? error;
6 |
7 | LoginResponseModel({
8 | this.user,
9 | this.error,
10 | });
11 |
12 | factory LoginResponseModel.fromJson(Map json) {
13 | return LoginResponseModel(
14 | user: json['user'],
15 | );
16 | }
17 |
18 | Map toJson() {
19 | return {
20 | 'user': user,
21 | };
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view/src/_email_field.dart:
--------------------------------------------------------------------------------
1 | part of '../login_view.dart';
2 |
3 | final class _EmailField extends StatelessWidget {
4 | const _EmailField({
5 | required this.emailController,
6 | });
7 |
8 | final TextEditingController emailController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'email',
14 | controller: emailController,
15 | label: 'Email',
16 | validators: [
17 | FormBuilderValidators.required(errorText: 'Email is required'),
18 | FormBuilderValidators.email(errorText: 'Please enter a valid email'),
19 | ],
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view/src/_error_field.dart:
--------------------------------------------------------------------------------
1 | part of '../login_view.dart';
2 |
3 | final class _ErrorField extends StatelessWidget {
4 | const _ErrorField();
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Selector(
9 | selector: (context, model) => model.error ?? '',
10 | builder: (context, error, child) {
11 | return Text(
12 | error,
13 | ).tr();
14 | },
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view/src/_login_button.dart:
--------------------------------------------------------------------------------
1 | part of '../login_view.dart';
2 |
3 | final class _LoginButton extends StatelessWidget {
4 | const _LoginButton({
5 | required this.formKey,
6 | required this.emailController,
7 | required this.passwordController,
8 | });
9 |
10 | final GlobalKey formKey;
11 | final TextEditingController emailController;
12 | final TextEditingController passwordController;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return ElevatedButton(
17 | onPressed: () {
18 | formKey.currentState?.save();
19 | if (formKey.currentState?.validate() ?? false) {
20 | context.read().signInWithEmail(
21 | LoginRequestModel(
22 | email: emailController.text.trim(),
23 | password: passwordController.text.trim(),
24 | ),
25 | );
26 | }
27 | },
28 | child: CustomText(LocaleKeys.buttons_submit.tr()),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view/src/_password_field.dart:
--------------------------------------------------------------------------------
1 | part of '../login_view.dart';
2 |
3 | final class _PasswordField extends StatelessWidget {
4 | const _PasswordField({
5 | required this.passwordController,
6 | });
7 |
8 | final TextEditingController passwordController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'password',
14 | controller: passwordController,
15 | label: 'Password',
16 | obscureText: true,
17 | validators: [
18 | FormBuilderValidators.required(errorText: 'Password is required'),
19 | FormBuilderValidators.minLength(6,
20 | errorText: 'Password must be at least 6 characters'),
21 | ],
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view/src/login_view_mixin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:firebase_remote_config/firebase_remote_config.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_form_builder/flutter_form_builder.dart';
6 | import 'package:tutorial_app/feature/auth/login/view/login_view.dart';
7 | import 'package:tutorial_app/feature/auth/login/view_model/login_view_model.dart';
8 |
9 | import '../../../../../product/utils/remote_config/remote_config_manager.dart';
10 |
11 | /// [LoginViewMixin] sınıfı [LoginView] sınıfı içerisinde kullanılan değişkenlerin
12 | /// ve fonksiyonların tekrar tekrar tanımlanmasını engellemek için oluşturulmuştur.
13 | /// Bu sayede kod tekrarı engellenmiş olur.
14 | /// Ayrıca [LoginView] sınıfının içerisindeki kodun okunabilirliği arttırılmış olur.
15 | /// [State] sınıfının tipi olarak [LoginView] sınıfı verilmiştir.
16 | /// Bu sayede bu mixin sınıfı sadece [LoginView] sınıfı ile kullanılabilir.
17 | mixin LoginViewMixin on State {
18 | late final GlobalKey formKey;
19 | late final TextEditingController emailController;
20 | late final TextEditingController passwordController;
21 | late final Stream streamSubscription;
22 | late final LoginViewModel loginViewModel;
23 |
24 | /// [initState] fonksiyonu [State] sınıfının bir metodu olup, bu sınıfın
25 | /// bir parçasıdır. Bu fonksiyon [State] sınıfı oluşturulduğunda çalıştırılır.
26 | /// Bu fonksiyon içerisinde [formKey], [emailController] ve [passwordController]
27 | /// değişkenlerine değer ataması yapılır.
28 | /// Bu sayede değişkenlerin değerleri bu sayfada oluşturulduğunda atanmış olur.
29 | /// Bunu yapmamızda ki amaç bu değişkenlerin değerlerinin sadece bu sayfa oluştuğunda
30 | /// atanmasını sağlamaktır. Bu sayede bu değişkenlerin kullanılmaması durumunda
31 | /// gereksiz bellek kullanımı engellenmiş olur.
32 | /// Bu fonksiyon içerisinde [super.initState()] fonksiyonu çağrılarak [State] sınıfının
33 | /// [initState] fonksiyonu çalıştırılır.
34 | /// Bu sayede [State] sınıfının [initState] fonksiyonu içerisindeki işlemler yapılır.
35 | /// Ve [State] sınıfının oluşturulması sağlanır.
36 | @override
37 | void initState() {
38 | formKey = GlobalKey();
39 | emailController = TextEditingController();
40 | passwordController = TextEditingController();
41 | streamSubscription = RemoteConfigManager.onConfigChanged;
42 | loginViewModel = LoginViewModel();
43 | super.initState();
44 | }
45 |
46 | /// [dispose] fonksiyonu [State] sınıfının bir metodu olup, bu sınıfın
47 | /// bir parçasıdır. Bu fonksiyon [State] sınıfı silindiğinde çalıştırılır.
48 | /// Bu fonksiyon içerisinde [emailController], [passwordController] ve [formKey]
49 | /// değişkenlerinin bellekten temizlenmesi sağlanır.
50 | /// Bu sayede bu değişkenlerin gereksiz bellek kullanımı engellenmiş olur.
51 | /// Bu fonksiyon içerisinde [super.dispose()] fonksiyonu çağrılarak [State] sınıfının
52 | /// [dispose] fonksiyonu çalıştırılır.
53 | /// Bu sayede [State] sınıfının [dispose] fonksiyonu içerisindeki işlemler yapılır.
54 | /// Bu sayede [State] sınıfının bellekten temizlenmesi sağlanır.
55 | @override
56 | void dispose() {
57 | emailController.dispose();
58 | passwordController.dispose();
59 | formKey.currentState?.dispose();
60 | super.dispose();
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/feature/auth/login/view_model/login_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:tutorial_app/feature/auth/login/model/login_request_model.dart';
4 | import 'package:tutorial_app/product/core/constants/remote_config_keys.dart';
5 | import 'package:tutorial_app/product/utils/remote_config/remote_config_manager.dart';
6 | import '../../../../product/core/service/firebase_service.dart';
7 | import '../model/login_response_model.dart';
8 |
9 | final class LoginViewModel extends ChangeNotifier {
10 | final FirebaseService _firebaseService = FirebaseService();
11 |
12 | UserCredential? _userCredential;
13 | String _error = '';
14 | String _remoteConfigValue = '';
15 |
16 | UserCredential? get userCredential => _userCredential;
17 | String? get error => _error;
18 | String? get remoteConfigValue => _remoteConfigValue;
19 |
20 | Future signInWithEmail(LoginRequestModel model) async {
21 | if (model.email == null || model.password == null) {
22 | return;
23 | }
24 | final LoginResponseModel response = await _firebaseService.signInWithEmail(
25 | model,
26 | );
27 |
28 | _userCredential = response.user;
29 | _error = response.error ?? '';
30 | if (hasListeners) {
31 | notifyListeners();
32 | }
33 | }
34 |
35 | /// [getRemoteConfig] metodu ile remote config'ten veri çekilir.
36 | /// Burada veri keyi sabit olarak verilmiştir çünkü metodun yapacağı işlem önceden bellidir.
37 | Future getRemoteConfig() async {
38 | RemoteConfigManager.fetchAndActivate();
39 | final response = RemoteConfigManager.getString(
40 | RemoteConfigKeys.loginBackgroundImage,
41 | );
42 | _remoteConfigValue = response;
43 | if (hasListeners) {
44 | notifyListeners();
45 | }
46 | }
47 |
48 | void logout() {
49 | _userCredential = null;
50 | _error = '';
51 | _remoteConfigValue = '';
52 | if (!hasListeners) return;
53 | notifyListeners();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/model/register_reponse_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | final class RegisterResponseModel {
4 | final String? error;
5 | final UserCredential? user;
6 |
7 | RegisterResponseModel({
8 | this.error,
9 | this.user,
10 | });
11 |
12 | factory RegisterResponseModel.fromJson(Map json) {
13 | return RegisterResponseModel(
14 | user: json['user'],
15 | );
16 | }
17 |
18 | Map toJson() {
19 | return {
20 | 'user': user,
21 | };
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/model/register_request_model.dart:
--------------------------------------------------------------------------------
1 | final class RegisterRequestModel {
2 | final String? fullName;
3 | final String? email;
4 | final String? password;
5 | final String? phoneNumber;
6 |
7 | RegisterRequestModel({
8 | this.email,
9 | this.password,
10 | this.fullName,
11 | this.phoneNumber,
12 | });
13 |
14 | Map toJson() {
15 | return {
16 | 'email': email,
17 | 'password': password,
18 | 'fullName': fullName,
19 | 'phoneNumber': phoneNumber,
20 | };
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/register_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_form_builder/flutter_form_builder.dart';
3 | import 'package:form_builder_validators/form_builder_validators.dart';
4 | import 'package:provider/provider.dart';
5 | import 'package:tutorial_app/feature/auth/register/model/register_request_model.dart';
6 | import 'package:tutorial_app/feature/auth/register/view_model/register_view_model.dart';
7 | import 'package:tutorial_app/product/core/service/firebase_service.dart';
8 | import 'package:tutorial_app/product/widgets/text_field/custom_text_field.dart';
9 |
10 | part 'src/register_view_mixin.dart';
11 | part 'src/_button_field.dart';
12 | part 'src/_confirm_password_field.dart';
13 | part 'src/_email_field.dart';
14 | part 'src/_error_field.dart';
15 | part 'src/_password_field.dart';
16 | part 'src/_full_name_field.dart';
17 | part 'src/_phone_field.dart';
18 |
19 | class RegisterView extends StatefulWidget {
20 | const RegisterView({super.key});
21 |
22 | @override
23 | State createState() => _RegisterViewState();
24 | }
25 |
26 | class _RegisterViewState extends State with RegisterViewMixin {
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: AppBar(
31 | title: const Text('Register'),
32 | ),
33 | body: ChangeNotifierProvider(
34 | create: (context) => registerViewModel,
35 | child: Center(
36 | child: SingleChildScrollView(
37 | padding: const EdgeInsets.all(8.0),
38 | child: FormBuilder(
39 | key: formKey,
40 | child: Column(
41 | children: [
42 | const FlutterLogo(size: 150, style: FlutterLogoStyle.stacked),
43 | const SizedBox(height: 16.0),
44 | _FullNameField(emailController: fullNameController),
45 | const SizedBox(height: 16.0),
46 | _PhoneField(emailController: phoneController),
47 | const SizedBox(height: 16.0),
48 | _EmailField(emailController: emailController),
49 | const SizedBox(height: 16.0),
50 | _PasswordField(passwordController: passwordController),
51 | const SizedBox(height: 16.0),
52 | _ConfirmPasswordField(
53 | confirmPasswordController: confirmPasswordController,
54 | passwordController: passwordController,
55 | ),
56 | const _ErrorField(),
57 | const SizedBox(height: 16.0),
58 | _ButtonField(
59 | formKey: formKey,
60 | registerRequestModel: RegisterRequestModel(
61 | email: emailController.text.trim(),
62 | fullName: fullNameController.text.trim(),
63 | phoneNumber: phoneController.text.trim(),
64 | password: passwordController.text.trim(),
65 | ),
66 | ),
67 | const SizedBox(height: 16.0),
68 | ],
69 | ),
70 | ),
71 | ),
72 | ),
73 | ),
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_button_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _ButtonField extends StatelessWidget {
4 | const _ButtonField({
5 | required this.formKey,
6 | required this.registerRequestModel,
7 | });
8 |
9 | final GlobalKey formKey;
10 | final RegisterRequestModel registerRequestModel;
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return ElevatedButton(
15 | onPressed: () {
16 | formKey.currentState?.save();
17 | if (formKey.currentState?.validate() ?? false) {
18 | context.read().register(registerRequestModel);
19 | }
20 | },
21 | child: const Text('Register'),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_confirm_password_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _ConfirmPasswordField extends StatelessWidget {
4 | const _ConfirmPasswordField({
5 | required this.confirmPasswordController,
6 | required this.passwordController,
7 | });
8 |
9 | final TextEditingController confirmPasswordController;
10 | final TextEditingController passwordController;
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return CustomTextField(
15 | name: 'Confirm Password',
16 | controller: confirmPasswordController,
17 | label: 'Confirm Password',
18 | validators: [
19 | FormBuilderValidators.required(
20 | errorText: 'Confirm Password is required'),
21 | FormBuilderValidators.minLength(6,
22 | errorText: 'Password must be at least 6 characters'),
23 | FormBuilderValidators.equal(
24 | passwordController.text,
25 | errorText: 'Password does not match',
26 | ),
27 | ],
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_email_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _EmailField extends StatelessWidget {
4 | const _EmailField({
5 | required this.emailController,
6 | });
7 |
8 | final TextEditingController emailController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'Email',
14 | controller: emailController,
15 | label: 'Email',
16 | validators: [
17 | FormBuilderValidators.required(errorText: 'Email is required'),
18 | FormBuilderValidators.email(errorText: 'Invalid email'),
19 | ],
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_error_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _ErrorField extends StatelessWidget {
4 | const _ErrorField();
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Selector(
9 | builder: (context, error, child) {
10 | return Text(error);
11 | },
12 | selector: (context, viewModel) => viewModel.registerError ?? '',
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_full_name_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _FullNameField extends StatelessWidget {
4 | const _FullNameField({
5 | required this.emailController,
6 | });
7 |
8 | final TextEditingController emailController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'FullName',
14 | controller: emailController,
15 | label: 'FullName',
16 | validators: [
17 | FormBuilderValidators.required(errorText: 'FullName is required'),
18 | ],
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_password_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _PasswordField extends StatelessWidget {
4 | const _PasswordField({
5 | required this.passwordController,
6 | });
7 |
8 | final TextEditingController passwordController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'Password',
14 | controller: passwordController,
15 | label: 'Password',
16 | validators: [
17 | FormBuilderValidators.required(errorText: 'Password is required'),
18 | FormBuilderValidators.minLength(6,
19 | errorText: 'Password must be at least 6 characters'),
20 | ],
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/_phone_field.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | final class _PhoneField extends StatelessWidget {
4 | const _PhoneField({
5 | required this.emailController,
6 | });
7 |
8 | final TextEditingController emailController;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomTextField(
13 | name: 'Phone',
14 | controller: emailController,
15 | label: 'Phone',
16 | validators: [
17 | FormBuilderValidators.required(errorText: 'Phone is required'),
18 | FormBuilderValidators.integer(errorText: 'Required as number')
19 | ],
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view/src/register_view_mixin.dart:
--------------------------------------------------------------------------------
1 | part of '../register_view.dart';
2 |
3 | mixin RegisterViewMixin on State {
4 | late final TextEditingController fullNameController;
5 | late final TextEditingController phoneController;
6 | late final TextEditingController emailController;
7 | late final TextEditingController passwordController;
8 | late final TextEditingController confirmPasswordController;
9 | late final GlobalKey formKey;
10 | late final RegisterViewModel registerViewModel;
11 |
12 | @override
13 | void initState() {
14 | registerViewModel = RegisterViewModel(FirebaseService());
15 | fullNameController = TextEditingController();
16 | phoneController = TextEditingController();
17 | emailController = TextEditingController();
18 | passwordController = TextEditingController();
19 | confirmPasswordController = TextEditingController();
20 | formKey = GlobalKey();
21 | super.initState();
22 | }
23 |
24 | @override
25 | void dispose() {
26 | fullNameController.dispose();
27 | phoneController.dispose();
28 | emailController.dispose();
29 | passwordController.dispose();
30 | confirmPasswordController.dispose();
31 | formKey.currentState?.dispose();
32 | super.dispose();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/feature/auth/register/view_model/register_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:tutorial_app/product/core/service/firebase_service.dart';
3 |
4 | import '../model/register_request_model.dart';
5 |
6 | final class RegisterViewModel extends ChangeNotifier {
7 | final FirebaseService _firebaseService;
8 | bool _registerSuccess = false;
9 | String? _registerError;
10 |
11 | RegisterViewModel(this._firebaseService);
12 |
13 | bool get registerSuccess => _registerSuccess;
14 | String? get registerError => _registerError;
15 |
16 | Future register(RegisterRequestModel registerRequestModel) async {
17 | final response = await _firebaseService
18 | .createUserWithEmailAndPassword(registerRequestModel);
19 | if (response.error != null) {
20 | _registerSuccess = false;
21 | _registerError = response.error;
22 | } else {
23 | _registerSuccess = true;
24 | _registerError = null;
25 | }
26 | if (hasListeners) {
27 | notifyListeners();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/feature/home/model/address.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | import '../../../product/core/model/base_model.dart';
4 | import 'geo.dart';
5 |
6 | part 'address.g.dart';
7 |
8 | @JsonSerializable(
9 | checked: true,
10 | explicitToJson: true,
11 | )
12 | final class Address extends BaseModel {
13 | final String? street;
14 | final String? suite;
15 | final String? city;
16 | final String? zipcode;
17 | final Geo? geo;
18 |
19 | const Address({
20 | this.street,
21 | this.suite,
22 | this.city,
23 | this.zipcode,
24 | this.geo,
25 | });
26 |
27 | Address copyWith({
28 | String? street,
29 | String? suite,
30 | String? city,
31 | String? zipcode,
32 | Geo? geo,
33 | }) {
34 | return Address(
35 | street: street ?? this.street,
36 | suite: suite ?? this.suite,
37 | city: city ?? this.city,
38 | zipcode: zipcode ?? this.zipcode,
39 | geo: geo ?? this.geo,
40 | );
41 | }
42 |
43 | @override
44 | Map toJson() => _$AddressToJson(this);
45 |
46 | factory Address.fromJson(Map json) =>
47 | _$AddressFromJson(json);
48 |
49 | @override
50 | int get hashCode => Object.hash(street, suite, city, zipcode, geo);
51 |
52 | @override
53 | bool operator ==(Object other) =>
54 | identical(this, other) ||
55 | other is Address &&
56 | runtimeType == other.runtimeType &&
57 | street == other.street &&
58 | suite == other.suite &&
59 | city == other.city &&
60 | zipcode == other.zipcode &&
61 | geo == other.geo;
62 |
63 | @override
64 | Address fromJson(json) => Address.fromJson(json);
65 |
66 | @override
67 | List