├── ios ├── Runner │ ├── tr.lproj │ │ ├── Main.strings │ │ ├── LaunchScreen.strings │ │ └── Info.plist │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── Info.plist │ ├── en.lproj │ │ └── Info.plist │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── script ├── build.sh └── langs.sh ├── module └── uikit │ ├── lib │ ├── src │ │ ├── padding │ │ │ └── page_padding.dart │ │ └── lottie │ │ │ └── lottie_loading.dart │ └── uikit.dart │ ├── LICENSE │ ├── CHANGELOG.md │ ├── test │ └── uikit_test.dart │ ├── analysis_options.yaml │ ├── .metadata │ ├── .gitignore │ ├── README.md │ └── pubspec.yaml ├── android ├── Gemfile ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_full_learn │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── fastlane │ ├── Appfile │ └── Fastfile ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png └── manifest.json ├── assets ├── png │ ├── image_collection.png │ └── ic_apple_with_school.png ├── translations │ └── en-US.json └── apple-and-book-png-transparent-apple-and-book-images-274565.png ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ └── flutter_window.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── generated_plugin_registrant.cc ├── lib ├── 101 │ ├── app_bar_learn.dart │ ├── color_learn.dart │ ├── indicator_learn.dart │ ├── list_view_builder.dart │ ├── navigate_detail_learn.dart │ ├── stack_learn.dart │ ├── list_tile_learn.dart │ ├── padding_learn.dart │ ├── scaffold_learn.dart │ ├── stateless_learn.dart │ ├── icon_learn.dart │ ├── image_learn.dart │ ├── column_row_learn.dart │ ├── container_sized_box_learn.dart │ ├── statefull_learn.dart │ ├── statefull_life_cycle_learn.dart │ ├── card_learn.dart │ ├── page_view_learn.dart │ ├── custom_widget_learn.dart │ ├── text_learn_view.dart │ ├── navigation_learn.dart │ ├── text_field_learn.dart │ ├── button_learn.dart │ └── list_view_learn.dart ├── 202 │ ├── custom_exception.dart │ ├── cache │ │ ├── shared_not_initalze.dart │ │ ├── user_model.dart │ │ ├── user_cache │ │ │ └── user_cache_manager.dart │ │ ├── shared_manager.dart │ │ ├── secure_context │ │ │ └── secure_context_learn.dart │ │ └── shared_list_cache.dart │ ├── package │ │ ├── launch_mixin.dart │ │ └── loading_bar.dart │ ├── state_manage │ │ ├── state_learn_view_model.dart │ │ └── state_manage_learn_view.dart │ ├── service │ │ ├── post_model.dart │ │ ├── comment_model.dart │ │ └── coments_learn_view.dart │ ├── theme_learn_view.dart │ ├── oop_learn_view.dart │ ├── package_learn_view.dart │ ├── widget_size_enum_learn_view.dart │ ├── theme │ │ └── light_theme.dart │ ├── image_learn_202.dart │ ├── oop_learn.dart │ ├── model_learn_view.dart │ ├── tab_learn.dart │ ├── form_learn_view.dart │ ├── alert_learn.dart │ └── model_learn.dart ├── 303 │ ├── navigator │ │ ├── navigate_profile_view.dart │ │ ├── navigate_home_view.dart │ │ └── navigate_home_detail_view.dart │ ├── part │ │ ├── part_of_learn.dart │ │ └── part_appbar.dart │ ├── reqrest_resource │ │ ├── service │ │ │ └── reqres_service.dart │ │ ├── viewModel │ │ │ ├── req_res_view_model.dart │ │ │ └── req_res_provider.dart │ │ └── model │ │ │ ├── resoruce_model.dart │ │ │ └── resoruce_model.g.dart │ ├── testable │ │ ├── user_save_model.dart │ │ └── image_generic_picker.dart │ ├── mobx_image_picker │ │ ├── service │ │ │ └── image_upload_service.dart │ │ ├── model │ │ │ ├── image_upload_response.dart │ │ │ └── image_upload_response.g.dart │ │ ├── viewModel │ │ │ └── image_upload_view_model.dart │ │ └── view │ │ │ └── mobx_image_upload_view.dart │ ├── package │ │ └── kartal │ │ │ └── kartal_view.dart │ ├── call_back_learn.dart │ ├── generic_learn.dart │ ├── lottie_learn.dart │ ├── tabbar_advance.dart │ └── feed_view.dart ├── 404 │ ├── bloc │ │ └── feature │ │ │ └── login │ │ │ ├── model │ │ │ ├── login_model.dart │ │ │ └── login_model.g.dart │ │ │ ├── cubit │ │ │ ├── login_cubit.dart │ │ │ └── login_cubit_state.dart │ │ │ ├── service │ │ │ └── login_service.dart │ │ │ └── view │ │ │ └── login_view.dart │ ├── snippet_learn.dart │ └── compute │ │ └── compute_learn.dart ├── product │ ├── constant │ │ ├── project_items.dart │ │ ├── duration_items.dart │ │ └── lottie_items.dart │ ├── language │ │ └── language_items.dart │ ├── service │ │ ├── project_dio.dart │ │ ├── vexana_network_manager.dart │ │ └── project_network_manager.dart │ ├── extension │ │ └── string_extension.dart │ ├── inti │ │ ├── localization_init.dart │ │ └── product_init.dart │ ├── mixin │ │ └── navigator_mixin.dart │ ├── global │ │ ├── resource_context.dart │ │ └── theme_notifer.dart │ ├── init │ │ └── lang │ │ │ └── locale_keys.g.dart │ ├── widget │ │ ├── card │ │ │ ├── high_card.dart │ │ │ └── generic_user_card.dart │ │ ├── button │ │ │ ├── laoding_button.dart │ │ │ └── answer_button.dart │ │ └── callback_dropodown.dart │ ├── utility │ │ ├── image_upload.dart │ │ └── image_upload_manager.dart │ ├── model │ │ ├── token_model.dart │ │ └── token_model.g.dart │ ├── navigator │ │ ├── navigator_manager.dart │ │ ├── navigator_routes.dart │ │ └── navigator_custom.dart │ └── counter_hello_button.dart ├── core │ └── random_image.dart └── demos │ ├── color_life_cycle_view.dart │ ├── stack_demo_view.dart │ ├── password_text_field.dart │ └── color_demos_view.dart ├── .metadata ├── test ├── vexana │ ├── vexana_test.dart │ └── model_unkown.dart ├── user_manager_test.dart ├── login │ └── login_test.dart ├── widget_test.dart ├── req_res_test.dart └── list_test.dart ├── .gitignore └── analysis_options.yaml /ios/Runner/tr.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /script/build.sh: -------------------------------------------------------------------------------- 1 | dart run build_runner build -------------------------------------------------------------------------------- /ios/Runner/tr.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /module/uikit/lib/src/padding/page_padding.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /module/uikit/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /android/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /module/uikit/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /module/uikit/lib/uikit.dart: -------------------------------------------------------------------------------- 1 | library uikit; 2 | 3 | export './src/lottie/lottie_loading.dart' show LoadingLottie; 4 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/png/image_collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/assets/png/image_collection.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/png/ic_apple_with_school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/assets/png/ic_apple_with_school.png -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/product/constant/project_items.dart: -------------------------------------------------------------------------------- 1 | class ProjectItems { 2 | ProjectItems._(); 3 | static const String projectName = 'VB10'; 4 | } 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/product/constant/duration_items.dart: -------------------------------------------------------------------------------- 1 | class DurationItems extends Duration { 2 | DurationItems.durationNormal() : super(seconds: 1); 3 | } 4 | -------------------------------------------------------------------------------- /script/langs.sh: -------------------------------------------------------------------------------- 1 | flutter pub run easy_localization:generate -O lib/product/init/lang -f keys -o locale_keys.g.dart --source-dir assets/translations 2 | -------------------------------------------------------------------------------- /lib/product/language/language_items.dart: -------------------------------------------------------------------------------- 1 | class LanguageItems { 2 | static const welcomeTitle = "Merhaba"; 3 | static const mailTitle = "Mail"; 4 | } 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/translations/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "login": { 3 | "welcome": "Login welcome" 4 | }, 5 | "button": { 6 | "send": "Send" 7 | } 8 | } -------------------------------------------------------------------------------- /module/uikit/test/uikit_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | void main() { 4 | test('adds one to input values', () {}); 5 | } 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/202/custom_exception.dart: -------------------------------------------------------------------------------- 1 | class FileDownloadException implements Exception { 2 | @override 3 | String toString() { 4 | return 'File download has failed'; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/product/service/project_dio.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | class ProjectDioMixin { 4 | final service = Dio(BaseOptions(baseUrl: 'https://reqres.in/api')); 5 | } 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/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/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /assets/apple-and-book-png-transparent-apple-and-book-images-274565.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/assets/apple-and-book-png-transparent-apple-and-book-images-274565.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VB10/Flutter-Full-Learn/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one 2 | package_name("com.vb.sample") # e.g. com.krausefx.app 3 | -------------------------------------------------------------------------------- /module/uikit/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /lib/202/cache/shared_not_initalze.dart: -------------------------------------------------------------------------------- 1 | class SharedNotInitiazleException implements Exception { 2 | @override 3 | String toString() { 4 | return 'Your prefences has not initiazled right now'; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_full_learn/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_full_learn 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /lib/product/extension/string_extension.dart: -------------------------------------------------------------------------------- 1 | extension ColorStringExtension on String? { 2 | int get colorValue { 3 | var _newColor = this?.replaceFirst('#', '0xff') ?? ''; 4 | return int.parse(_newColor); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /lib/product/service/vexana_network_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:vexana/vexana.dart'; 2 | 3 | class VexanaNetworkManager extends NetworkManager { 4 | VexanaNetworkManager() : super(options: BaseOptions(baseUrl: 'https://reqres.in/')); 5 | } 6 | -------------------------------------------------------------------------------- /lib/product/inti/localization_init.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LocalizationInit { 4 | final List supportedLocales = [const Locale('en', 'US')]; 5 | final String localizationPath = 'assets/translations'; 6 | } 7 | -------------------------------------------------------------------------------- /lib/product/mixin/navigator_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import '../navigator/navigator_manager.dart'; 3 | 4 | mixin NavigatorMixin on State { 5 | NavigatorManager get router => NavigatorManager.instance; 6 | } 7 | -------------------------------------------------------------------------------- /lib/202/package/launch_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:url_launcher/url_launcher.dart'; 2 | 3 | mixin LaunchMixin { 4 | void name(args); 5 | 6 | void launchURL(String url) async { 7 | if (await canLaunch(url)) { 8 | await launch(url); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/product/global/resource_context.dart: -------------------------------------------------------------------------------- 1 | import '../../303/reqrest_resource/model/resoruce_model.dart'; 2 | 3 | class ResourceContext { 4 | ResourceModel? model; 5 | 6 | void saveModel(ResourceModel? model) { 7 | this.model = model; 8 | } 9 | 10 | void clear() { 11 | model = null; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/product/init/lang/locale_keys.g.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart 2 | 3 | abstract class LocaleKeys { 4 | static const login_welcome = 'login.welcome'; 5 | static const login = 'login'; 6 | static const button_send = 'button.send'; 7 | static const button = 'button'; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /.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: db747aa1331bd95bc9b3874c842261ca2d302cd5 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/product/constant/lottie_items.dart: -------------------------------------------------------------------------------- 1 | enum LottieItems { themeChange } 2 | 3 | extension LottieItemsExtension on LottieItems { 4 | String _path() { 5 | switch (this) { 6 | case LottieItems.themeChange: 7 | return 'lottie_theme_change'; 8 | } 9 | } 10 | 11 | String get lottiePath => 'assets/lottie/${_path()}.json'; 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /module/uikit/.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: 7e9793dee1b85a243edd0e06cb1658e98b077561 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/product/widget/card/high_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HighCard extends StatelessWidget { 4 | const HighCard({Key? key, required this.items}) : super(key: key); 5 | 6 | final List items; 7 | @override 8 | Widget build(BuildContext context) { 9 | return Text(items.join(','), style: Theme.of(context).textTheme.headline2); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /lib/product/widget/card/generic_user_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../303/generic_learn.dart'; 4 | 5 | class GenericUserCard extends StatelessWidget { 6 | const GenericUserCard({Key? key, required this.model}) : super(key: key); 7 | final GenericUser model; 8 | @override 9 | Widget build(BuildContext context) { 10 | return Text(model.name); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/product/global/theme_notifer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../202/theme/light_theme.dart'; 3 | 4 | class ThemeNotifer extends ChangeNotifier { 5 | bool isLighTheme = false; 6 | 7 | void changeTheme() { 8 | isLighTheme = !isLighTheme; 9 | notifyListeners(); 10 | } 11 | 12 | ThemeData get currentTheme => !isLighTheme ? LighTheme().theme : ThemeData.dark(); 13 | } 14 | -------------------------------------------------------------------------------- /lib/core/random_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RandomImage extends StatelessWidget { 4 | const RandomImage({Key? key, this.height = 100}) : super(key: key); 5 | final imageUrl = 'https://picsum.photos/200/300'; 6 | final double height; 7 | @override 8 | Widget build(BuildContext context) { 9 | return Image.network(imageUrl, height: height, fit: BoxFit.cover); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/202/package/loading_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 3 | 4 | class LoadingBar extends StatelessWidget { 5 | const LoadingBar({Key? key, this.size}) : super(key: key); 6 | final double? size; 7 | final _deafultSize = 40.0; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return SpinKitPianoWave( 12 | color: Colors.red, 13 | size: size ?? _deafultSize, 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/303/navigator/navigate_profile_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigateProfileView extends StatefulWidget { 4 | const NavigateProfileView({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _NavigateHomeDetailState(); 8 | } 9 | 10 | class _NavigateHomeDetailState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return const Scaffold(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/product/utility/image_upload.dart: -------------------------------------------------------------------------------- 1 | import 'package:image_picker/image_picker.dart'; 2 | 3 | class ImageUploadManager { 4 | final ImagePicker _picker = ImagePicker(); 5 | 6 | Future fetchFromLibrary() async { 7 | final XFile? image = await _picker.pickImage(source: ImageSource.gallery); 8 | return image; 9 | } 10 | 11 | Future fetchFromCamera() async { 12 | final XFile? image = await _picker.pickImage(source: ImageSource.camera); 13 | return image; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /module/uikit/lib/src/lottie/lottie_loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:lottie/lottie.dart'; 3 | 4 | class LoadingLottie extends StatelessWidget { 5 | const LoadingLottie({ 6 | Key? key, 7 | }) : super(key: key); 8 | final _loadingLottie = 'https://assets2.lottiefiles.com/datafiles/bEYvzB8QfV3EM9a/data.json'; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Center(child: Lottie.network(_loadingLottie)); 13 | } 14 | } 15 | 16 | class LottieSpecial {} 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/303/part/part_of_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | part 'part_appbar.dart'; 4 | 5 | class PartofLearn extends StatefulWidget { 6 | const PartofLearn({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _PartofLearnState(); 10 | } 11 | 12 | class _PartofLearnState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return const Scaffold( 16 | appBar: _PartofAppBar(), 17 | body: Text('data'), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/product/model/token_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:vexana/vexana.dart'; 3 | 4 | part 'token_model.g.dart'; 5 | 6 | @JsonSerializable() 7 | class TokenModel extends INetworkModel { 8 | final String? token; 9 | 10 | TokenModel({this.token}); 11 | 12 | @override 13 | TokenModel fromJson(Map json) { 14 | return _$TokenModelFromJson(json); 15 | } 16 | 17 | @override 18 | Map? toJson() { 19 | return _$TokenModelToJson(this); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/202/cache/user_model.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | String? name; 3 | String? description; 4 | String? url; 5 | 6 | User(this.name, this.description, this.url); 7 | 8 | User.fromJson(Map json) { 9 | name = json['name']; 10 | description = json['description']; 11 | url = json['url']; 12 | } 13 | 14 | Map toJson() { 15 | final Map data = {}; 16 | data['name'] = name; 17 | data['description'] = description; 18 | data['url'] = url; 19 | return data; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/vexana/vexana_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:vexana/vexana.dart'; 3 | 4 | import 'model_unkown.dart'; 5 | 6 | void main() { 7 | late final INetworkManager networkManager; 8 | setUp(() { 9 | networkManager = NetworkManager( 10 | options: BaseOptions(baseUrl: 'https://reqres.in/api'), 11 | ); 12 | }); 13 | test('Vexana test', () async { 14 | final response = await networkManager.send('/unkown', 15 | parseModel: UnkownModel(), method: RequestType.GET); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /lib/303/part/part_appbar.dart: -------------------------------------------------------------------------------- 1 | part of './part_of_learn.dart'; 2 | 3 | class _PartofAppBar extends StatelessWidget with PreferredSizeWidget { 4 | const _PartofAppBar({ 5 | Key? key, 6 | }) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return AppBar( 11 | title: const Text('a'), 12 | actions: [IconButton(onPressed: () {}, icon: const Icon(Icons.abc_rounded))], 13 | ); 14 | } 15 | 16 | @override 17 | // TODO: implement preferredSize 18 | Size get preferredSize => const Size.fromHeight(kToolbarHeight); 19 | } 20 | -------------------------------------------------------------------------------- /lib/202/state_manage/state_learn_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'state_manage_learn_view.dart'; 4 | 5 | abstract class StateLearnViewModel extends State { 6 | @override 7 | void initState() { 8 | super.initState(); 9 | } 10 | 11 | bool isVisible = false; 12 | bool isOpacity = false; 13 | 14 | void changeVisible() { 15 | setState(() { 16 | isVisible = !isVisible; 17 | }); 18 | } 19 | 20 | void changeOpacity() { 21 | setState(() { 22 | isOpacity = !isOpacity; 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/product/model/token_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'token_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | TokenModel _$TokenModelFromJson(Map json) => TokenModel( 10 | token: json['token'] as String?, 11 | ); 12 | 13 | Map _$TokenModelToJson(TokenModel instance) => 14 | { 15 | 'token': instance.token, 16 | }; 17 | -------------------------------------------------------------------------------- /lib/product/navigator/navigator_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'navigator_routes.dart'; 3 | 4 | class NavigatorManager { 5 | NavigatorManager._(); 6 | static NavigatorManager instance = NavigatorManager._(); 7 | final GlobalKey _navigatorGlobalKey = GlobalKey(); 8 | 9 | GlobalKey get navigatorGlobalKey => _navigatorGlobalKey; 10 | 11 | Future pushToPage(NavigateRoutes route, {Object? arguments}) async { 12 | await _navigatorGlobalKey.currentState?.pushNamed(route.withParaf, arguments: arguments); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/model/login_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:vexana/vexana.dart'; 3 | 4 | part 'login_model.g.dart'; 5 | 6 | @JsonSerializable() 7 | class LoginModel extends INetworkModel { 8 | final String email; 9 | final String password; 10 | 11 | LoginModel(this.email, this.password); 12 | 13 | @override 14 | LoginModel fromJson(Map json) { 15 | throw UnimplementedError(); 16 | } 17 | 18 | @override 19 | Map? toJson() { 20 | return _$LoginModelToJson(this); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_windows 7 | url_launcher_windows 8 | ) 9 | 10 | set(PLUGIN_BUNDLED_LIBRARIES) 11 | 12 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 13 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 14 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 17 | endforeach(plugin) 18 | -------------------------------------------------------------------------------- /test/user_manager_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_full_learn/303/generic_learn.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | setUp(() {}); 6 | test('User calculate ', () { 7 | final users = [ 8 | GenericUser('vb', '11', 10), 9 | GenericUser('vb', '11', 10), 10 | GenericUser('vb', '11', 20), 11 | ]; 12 | final userManagement = UserManagement(AdminUser('vadmin', '1', 15, 1)); 13 | final result = userManagement.calculateMoney(users); 14 | 15 | final respnse = userManagement.showNames(users); 16 | 17 | expect(result, 55); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /module/uikit/.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 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 25 | /pubspec.lock 26 | **/doc/api/ 27 | .dart_tool/ 28 | .packages 29 | build/ 30 | -------------------------------------------------------------------------------- /lib/product/navigator/navigator_routes.dart: -------------------------------------------------------------------------------- 1 | import '../../303/lottie_learn.dart'; 2 | import '../../303/navigator/navigate_home_detail_view.dart'; 3 | import '../../303/navigator/navigate_home_view.dart'; 4 | 5 | class NavigatorRoures { 6 | static const paragfh = "/"; 7 | final items = { 8 | paragfh: (context) => const LottieLearn(), 9 | NavigateRoutes.home.withParaf: (context) => const NavigateHomeView(), 10 | NavigateRoutes.detail.withParaf: (context) => const NavigateHomeDetail(), 11 | }; 12 | } 13 | 14 | enum NavigateRoutes { init, home, detail } 15 | 16 | extension NavigateRoutesExtension on NavigateRoutes { 17 | String get withParaf => "/$name"; 18 | } 19 | -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/model/login_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | LoginModel _$LoginModelFromJson(Map json) => LoginModel( 10 | json['email'] as String, 11 | json['password'] as String, 12 | ); 13 | 14 | Map _$LoginModelToJson(LoginModel instance) => 15 | { 16 | 'email': instance.email, 17 | 'password': instance.password, 18 | }; 19 | -------------------------------------------------------------------------------- /lib/202/service/post_model.dart: -------------------------------------------------------------------------------- 1 | class PostModel { 2 | int? userId; 3 | int? id; 4 | String? title; 5 | String? body; 6 | 7 | PostModel({this.userId, this.id, this.title, this.body}); 8 | 9 | // Kod yazilmaz! 10 | PostModel.fromJson(Map json) { 11 | userId = json['userId']; 12 | id = json['id']; 13 | title = json['title']; 14 | body = json['body']; 15 | } 16 | 17 | // Kod yazilmaz! 18 | Map toJson() { 19 | final Map data = {}; 20 | data['userId'] = userId; 21 | data['id'] = id; 22 | data['title'] = title; 23 | data['body'] = body; 24 | return data; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/login/login_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_full_learn/404/bloc/feature/login/model/login_model.dart'; 2 | import 'package:flutter_full_learn/404/bloc/feature/login/service/login_service.dart'; 3 | import 'package:flutter_full_learn/product/service/vexana_network_manager.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | void main() { 7 | late ILoginService loginService; 8 | setUp(() { 9 | loginService = LoginService(VexanaNetworkManager()); 10 | }); 11 | test('Login Test - eve.holt@reqres.in & cityslicka ', () async { 12 | final response = await loginService.login(LoginModel('eve.holt@reqres.in', 'cityslicka')); 13 | expect(response?.data, isNotNull); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/404/snippet_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SnippetLearnView extends StatefulWidget { 4 | const SnippetLearnView({Key? key}) : super(key: key); 5 | @override 6 | State createState() => _SnippetLearnViewState(); 7 | } 8 | 9 | class _SnippetLearnViewState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: AppBar(), 14 | ); 15 | } 16 | } 17 | 18 | class PRoductConstant { 19 | static PRoductConstant? _instace; 20 | static PRoductConstant get instance { 21 | _instace ??= PRoductConstant._init(); 22 | return _instace!; 23 | } 24 | 25 | PRoductConstant._init(); 26 | } 27 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 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 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /lib/202/service/comment_model.dart: -------------------------------------------------------------------------------- 1 | class CommentModel { 2 | int? postId; 3 | int? id; 4 | String? name; 5 | String? email; 6 | String? body; 7 | 8 | CommentModel({this.postId, this.id, this.name, this.email, this.body}); 9 | 10 | CommentModel.fromJson(Map json) { 11 | postId = json['postId']; 12 | id = json['id']; 13 | name = json['name']; 14 | email = json['email']; 15 | body = json['body']; 16 | } 17 | 18 | Map toJson() { 19 | final Map data = {}; 20 | data['postId'] = postId; 21 | data['id'] = id; 22 | data['name'] = name; 23 | data['email'] = email; 24 | data['body'] = body; 25 | return data; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/101/app_bar_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppBarLearnView extends StatelessWidget { 4 | const AppBarLearnView({Key? key}) : super(key: key); 5 | final String _title = 'Welcome Learn'; 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: Text(_title), 11 | leading: const Icon(Icons.chevron_left), 12 | actions: [ 13 | IconButton( 14 | onPressed: () {}, 15 | icon: const Icon(Icons.mark_email_unread_sharp), 16 | ), 17 | const Center(child: CircularProgressIndicator()), 18 | ], 19 | ), 20 | body: Column(children: const []), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/101/color_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorLearn extends StatelessWidget { 4 | const ColorLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | Container( 13 | child: Text( 14 | 'data', 15 | style: Theme.of(context).textTheme.subtitle1?.copyWith(color: Theme.of(context).errorColor), 16 | )), 17 | ], 18 | ), 19 | ); 20 | } 21 | } 22 | 23 | class ColorsItems { 24 | static const Color porchase = Color(0xffEDBF61); 25 | static const Color sulu = Color.fromRGBO(198, 237, 97, 1); 26 | } 27 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/202/theme_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../demos/password_text_field.dart'; 4 | 5 | class ThemeLarnView extends StatefulWidget { 6 | const ThemeLarnView({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _ThemeLarnViewState(); 10 | } 11 | 12 | class _ThemeLarnViewState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar(), 17 | body: Column(children: [ 18 | const PasswordTextField(), 19 | CheckboxListTile( 20 | value: true, 21 | onChanged: (val) {}, 22 | title: const Text('select'), 23 | ) 24 | ]), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/product/service/project_network_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | class ProjectNetworkManager { 4 | ProjectNetworkManager._() { 5 | _dio = Dio(BaseOptions(baseUrl: 'pub.dev')); 6 | } 7 | late final Dio _dio; 8 | 9 | static ProjectNetworkManager instance = ProjectNetworkManager._(); 10 | 11 | Dio get service => _dio; 12 | 13 | void addBaseHeaderToToken(String token) { 14 | _dio.options = _dio.options.copyWith(headers: {"Authorization": token}); 15 | } 16 | } 17 | 18 | class DurationManager { 19 | DurationManager._(); 20 | static DurationManager? _manager; 21 | 22 | static DurationManager get manager { 23 | if (_manager != null) return _manager!; 24 | _manager = DurationManager._(); 25 | return _manager!; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/cubit/login_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_bloc/flutter_bloc.dart'; 2 | import 'login_cubit_state.dart'; 3 | import '../model/login_model.dart'; 4 | import '../service/login_service.dart'; 5 | 6 | class LoginCubit extends Cubit { 7 | LoginCubit(ILoginService loginService) 8 | : _loginService = loginService, 9 | super(const LoginState()); 10 | final ILoginService _loginService; 11 | 12 | Future checkUser(String email, String password) async { 13 | emit(state.copyWith(isLoading: true, model: LoginModel(email, password))); 14 | final response = await _loginService.login(state.model!); 15 | emit(state.copyWith(isLoading: false, isCompleted: response?.data != null)); 16 | 17 | print('a'); 18 | } 19 | 20 | void veli() {} 21 | } 22 | -------------------------------------------------------------------------------- /lib/product/counter_hello_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'language/language_items.dart'; 4 | 5 | class CounterHelloButton extends StatefulWidget { 6 | const CounterHelloButton({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _CounterHelloButtonState(); 10 | } 11 | 12 | class _CounterHelloButtonState extends State { 13 | int _counterCustom = 0; 14 | final String _welcomeTitle = LanguageItems.welcomeTitle; 15 | 16 | void _updateCounter() { 17 | setState(() { 18 | ++_counterCustom; 19 | }); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return ElevatedButton(onPressed: _updateCounter, child: Text('$_welcomeTitle $_counterCustom')); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/product/inti/product_init.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:provider/single_child_widget.dart'; 5 | 6 | import '../global/resource_context.dart'; 7 | import '../global/theme_notifer.dart'; 8 | import 'localization_init.dart'; 9 | 10 | class ProductInit { 11 | final LocalizationInit localizationInit = LocalizationInit(); 12 | 13 | final List providers = [ 14 | Provider(create: (_) => ResourceContext()), 15 | ChangeNotifierProvider(create: (context) => ThemeNotifer()) 16 | ]; 17 | 18 | Future init() async { 19 | WidgetsFlutterBinding.ensureInitialized(); 20 | await EasyLocalization.ensureInitialized(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/service/login_service.dart: -------------------------------------------------------------------------------- 1 | import '../model/login_model.dart'; 2 | import '../../../../../product/model/token_model.dart'; 3 | import 'package:vexana/vexana.dart'; 4 | 5 | abstract class ILoginService { 6 | final INetworkManager networkManager; 7 | 8 | ILoginService(this.networkManager); 9 | Future?> login(LoginModel model); 10 | 11 | final String _loginPath = 'api/login'; 12 | } 13 | 14 | class LoginService extends ILoginService { 15 | LoginService(INetworkManager networkManager) : super(networkManager); 16 | 17 | @override 18 | Future?> login(LoginModel model) async { 19 | return await networkManager.send(_loginPath, 20 | data: model, parseModel: TokenModel(), method: RequestType.POST); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/202/state_manage/state_manage_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'state_learn_view_model.dart'; 3 | 4 | class StateManageLearnView extends StatefulWidget { 5 | const StateManageLearnView({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _StateManageLearnViewState(); 9 | } 10 | 11 | class _StateManageLearnViewState extends StateLearnViewModel { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | floatingActionButton: FloatingActionButton( 16 | onPressed: () { 17 | changeVisible(); 18 | }, 19 | ), 20 | appBar: AppBar( 21 | backgroundColor: isOpacity ? Colors.red : Colors.green, 22 | shadowColor: isVisible ? Colors.amber : Colors.grey, 23 | ), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/303/reqrest_resource/service/reqres_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dio/dio.dart'; 4 | import '../model/resoruce_model.dart'; 5 | 6 | abstract class IReqresService { 7 | IReqresService(this.dio); 8 | final Dio dio; 9 | 10 | Future fetchResourceItem(); 11 | } 12 | 13 | enum _ReqResPath { resource } 14 | 15 | class ReqresService extends IReqresService { 16 | ReqresService(Dio dio) : super(dio); 17 | 18 | @override 19 | Future fetchResourceItem() async { 20 | final response = await dio.get('/${_ReqResPath.resource.name}'); 21 | 22 | if (response.statusCode == HttpStatus.ok) { 23 | final jsonBody = response.data; 24 | if (jsonBody is Map) { 25 | return ResourceModel.fromJson(jsonBody); 26 | } 27 | } 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/303/testable/user_save_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | 3 | class UserSaveViewModel { 4 | bool getReadData(String key, IStore preferences) { 5 | final response = preferences.getString(key); 6 | 7 | // logic 8 | return response; 9 | } 10 | } 11 | 12 | abstract class IStore { 13 | bool getString(String key); 14 | } 15 | 16 | class SharedPrefStore extends IStore { 17 | final SharedPreferences preferences; 18 | 19 | SharedPrefStore(this.preferences); 20 | @override 21 | bool getString(String key) { 22 | final response = preferences.getString(key); 23 | if (response?.isNotEmpty ?? false) { 24 | return true; 25 | } else { 26 | return false; 27 | } 28 | } 29 | } 30 | 31 | class MockStore extends IStore { 32 | @override 33 | bool getString(String key) { 34 | return false; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/101/indicator_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class IndicatorLearn extends StatelessWidget { 4 | const IndicatorLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | actions: const [CenterCircularRedProgress()], 11 | ), 12 | body: const LinearProgressIndicator(), 13 | ); 14 | } 15 | } 16 | 17 | class CenterCircularRedProgress extends StatelessWidget { 18 | const CenterCircularRedProgress({ 19 | Key? key, 20 | }) : super(key: key); 21 | final redColor = Colors.red; 22 | @override 23 | Widget build(BuildContext context) { 24 | return Center( 25 | child: CircularProgressIndicator( 26 | color: redColor, 27 | strokeWidth: 10, 28 | value: 0.9, 29 | backgroundColor: Colors.white, 30 | )); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/303/mobx_image_picker/service/image_upload_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:typed_data'; 3 | 4 | import 'package:dio/dio.dart'; 5 | import '../model/image_upload_response.dart'; 6 | 7 | class ImageUploadService { 8 | final Dio dio; 9 | // https://firebasestorage.googleapis.com/v0/b/fluttertr-ead5c.appspot.com 10 | ImageUploadService(this.dio); 11 | // https://firebasestorage.googleapis.com/v0/b/{{image_server}}/o/full%2Fvb.png 12 | Future uploadToImageServer(Uint8List byteArray, String name, 13 | {void Function(int, int)? onSendProgress}) async { 14 | final response = await dio.post('full%2F$name.png', data: byteArray, onSendProgress: onSendProgress); 15 | 16 | if (response.statusCode == HttpStatus.ok) { 17 | // final responseData= Null check 18 | return ImageUploadResponse.fromJson(response.data); 19 | } 20 | return null; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/product/utility/image_upload_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:image_picker/image_picker.dart'; 2 | 3 | abstract class IImageUpload { 4 | final ImagePicker picker = ImagePicker(); 5 | Future fetch(); 6 | } 7 | 8 | class ImageUploadCustomManager { 9 | final IImageUpload imageUpload; 10 | 11 | ImageUploadCustomManager(this.imageUpload); 12 | 13 | Future cropWithFetch() async { 14 | return await imageUpload.fetch(); 15 | } 16 | } 17 | 18 | class LibraryImageUpload extends IImageUpload { 19 | @override 20 | Future fetch() async { 21 | final XFile? image = await picker.pickImage(source: ImageSource.gallery); 22 | return image; 23 | } 24 | } 25 | 26 | class CameraImageUpload extends IImageUpload { 27 | @override 28 | Future fetch() async { 29 | final XFile? image = await picker.pickImage(source: ImageSource.camera); 30 | return image; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/cubit/login_cubit_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | import '../model/login_model.dart'; 4 | import '../../../../../product/model/token_model.dart'; 5 | 6 | class LoginState extends Equatable { 7 | final bool isLoading; 8 | final LoginModel? model; 9 | final TokenModel? tokenModel; 10 | final bool isCompleted; 11 | 12 | const LoginState({this.isLoading = false, this.model, this.tokenModel, this.isCompleted = false}); 13 | 14 | @override 15 | List get props => [isLoading, model]; 16 | 17 | LoginState copyWith({ 18 | bool? isLoading, 19 | LoginModel? model, 20 | TokenModel? tokenModel, 21 | bool? isCompleted, 22 | }) { 23 | return LoginState( 24 | isLoading: isLoading ?? false, 25 | model: model ?? this.model, 26 | tokenModel: tokenModel ?? this.tokenModel, 27 | isCompleted: isCompleted ?? false, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/demos/color_life_cycle_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'color_demos_view.dart'; 4 | 5 | class ColorLifeCycleView extends StatefulWidget { 6 | const ColorLifeCycleView({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _ColorLifeCycleViewState(); 10 | } 11 | 12 | class _ColorLifeCycleViewState extends State { 13 | Color? _backgroundColor; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | actions: [IconButton(onPressed: _changeBackgrouind, icon: const Icon(Icons.clear))], 20 | ), 21 | body: Column( 22 | children: [const Spacer(), Expanded(child: ColorDemos(initialColor: _backgroundColor))], 23 | ), 24 | ); 25 | } 26 | 27 | void _changeBackgrouind() { 28 | setState(() { 29 | _backgroundColor = Colors.pink; 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lib/202/oop_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'oop_learn.dart'; 3 | 4 | class OOPLearnView extends StatefulWidget { 5 | const OOPLearnView({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _OOPLearnViewState(); 9 | } 10 | 11 | class _OOPLearnViewState extends State { 12 | FileDownload? download; 13 | 14 | @override 15 | void initState() { 16 | // TODO: implement initState 17 | super.initState(); 18 | download = FileDownload(); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | appBar: AppBar( 25 | actions: const [ 26 | CircularProgressIndicator( 27 | color: Colors.white, 28 | ) 29 | ], 30 | ), 31 | floatingActionButton: FloatingActionButton(onPressed: () { 32 | download?.downloadItem(null); 33 | }), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/303/reqrest_resource/viewModel/req_res_view_model.dart: -------------------------------------------------------------------------------- 1 | import '../../../202/cache/shared_learn_cache.dart'; 2 | import '../model/resoruce_model.dart'; 3 | import '../service/reqres_service.dart'; 4 | import '../../../product/service/project_network_manager.dart'; 5 | 6 | import '../../../product/service/project_dio.dart'; 7 | import '../view/req_res_view.dart'; 8 | 9 | abstract class ReqresViewModel extends LoadingStatefull with ProjectDioMixin { 10 | late final IReqresService reqresService; 11 | 12 | List resources = []; 13 | @override 14 | void initState() { 15 | super.initState(); 16 | reqresService = ReqresService(ProjectNetworkManager.instance.service); 17 | ProjectNetworkManager.instance.addBaseHeaderToToken('veli'); 18 | _fetch(); 19 | } 20 | 21 | Future _fetch() async { 22 | changeLoading(); 23 | resources = (await reqresService.fetchResourceItem())?.data ?? []; 24 | changeLoading(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/202/cache/user_cache/user_cache_manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import '../shared_manager.dart'; 4 | 5 | import '../user_model.dart'; 6 | 7 | class UserCacheManager { 8 | final SharedManager sharedManager; 9 | 10 | UserCacheManager(this.sharedManager); 11 | 12 | Future saveItems(List items) async { 13 | // Compute 14 | final _items = items.map((element) => jsonEncode(element.toJson())).toList(); 15 | await sharedManager.saveStringItems(SharedKeys.users, _items); 16 | } 17 | 18 | List? getItems() { 19 | // Compute 20 | final itemsString = sharedManager.getStrings(SharedKeys.users); 21 | if (itemsString?.isNotEmpty ?? false) { 22 | return itemsString!.map((element) { 23 | final json = jsonDecode(element); 24 | if (json is Map) { 25 | return User.fromJson(json); 26 | } 27 | return User('', '', ''); 28 | }).toList(); 29 | } 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/101/list_view_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ListViewBuilderLearn extends StatefulWidget { 4 | const ListViewBuilderLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _ListViewBuilderLearnState(); 8 | } 9 | 10 | class _ListViewBuilderLearnState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar(), 15 | body: ListView.separated( 16 | separatorBuilder: (context, index) { 17 | return const Divider(color: Colors.white); 18 | }, 19 | itemBuilder: (context, index) { 20 | return SizedBox( 21 | height: 200, 22 | child: Column( 23 | children: [Expanded(child: Image.network('https://picsum.photos/200')), Text('$index')], 24 | ), 25 | ); 26 | }, 27 | itemCount: 15, 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/202/package_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package/loading_bar.dart'; 3 | 4 | import 'package/launch_mixin.dart'; 5 | 6 | class PackagLearnView extends StatefulWidget { 7 | const PackagLearnView({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _PackagLearnViewState(); 11 | } 12 | 13 | class _PackagLearnViewState extends State with LaunchMixin { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar(), 18 | floatingActionButton: FloatingActionButton( 19 | backgroundColor: Theme.of(context).buttonTheme.colorScheme?.onPrimary, 20 | onPressed: () { 21 | launchURL('aa'); 22 | }), 23 | body: Column( 24 | children: [ 25 | Text('a', style: Theme.of(context).textTheme.subtitle1), 26 | const LoadingBar(), 27 | ], 28 | ), 29 | ); 30 | } 31 | 32 | @override 33 | void name(args) {} 34 | } 35 | -------------------------------------------------------------------------------- /lib/202/widget_size_enum_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WidgetSizeEnumLaernView extends StatefulWidget { 4 | const WidgetSizeEnumLaernView({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _WidgetSizeEnumLaernViewState(); 8 | } 9 | 10 | class _WidgetSizeEnumLaernViewState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar(), 15 | body: Card( 16 | child: Container( 17 | height: WidgetSizes.normalCardHeight.value(), 18 | color: Colors.green, 19 | ), 20 | ), 21 | ); 22 | } 23 | } 24 | 25 | enum WidgetSizes { normalCardHeight, circleProfileWidth } 26 | 27 | extension WidgetSizeExtension on WidgetSizes { 28 | double value() { 29 | switch (this) { 30 | case WidgetSizes.normalCardHeight: 31 | return 30; 32 | case WidgetSizes.circleProfileWidth: 33 | return 25; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | # This file contains the fastlane.tools configuration 2 | # You can find the documentation at https://docs.fastlane.tools 3 | # 4 | # For a list of all available actions, check out 5 | # 6 | # https://docs.fastlane.tools/actions 7 | # 8 | # For a list of all available plugins, check out 9 | # 10 | # https://docs.fastlane.tools/plugins/available-plugins 11 | # 12 | 13 | # Uncomment the line if you want fastlane to automatically update itself 14 | # update_fastlane 15 | 16 | default_platform(:android) 17 | 18 | platform :android do 19 | desc "Runs all the tests" 20 | lane :test do 21 | gradle(task: "test") 22 | end 23 | 24 | desc "Submit a new Beta Build to Crashlytics Beta" 25 | lane :beta do 26 | gradle(task: "clean assembleRelease") 27 | crashlytics 28 | 29 | # sh "your_script.sh" 30 | # You can also use other beta testing services here 31 | end 32 | 33 | desc "Deploy a new version to the Google Play" 34 | lane :deploy do 35 | gradle(task: "clean assembleRelease") 36 | upload_to_play_store 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/101/navigate_detail_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigateDetailLearnDart extends StatefulWidget { 4 | const NavigateDetailLearnDart({Key? key, this.isOkey = false}) : super(key: key); 5 | final bool isOkey; 6 | @override 7 | State createState() => _NavigateLearnDartState(); 8 | } 9 | 10 | class _NavigateLearnDartState extends State { 11 | @override 12 | void didChangeDependencies() { 13 | super.didChangeDependencies(); 14 | // ModalRoute.of(context).settings.arguments 15 | } 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | appBar: AppBar(), 21 | body: Center( 22 | child: ElevatedButton.icon( 23 | onPressed: () { 24 | Navigator.of(context).pop(!widget.isOkey); 25 | }, 26 | icon: Icon(Icons.check, color: widget.isOkey ? Colors.red : Colors.green), 27 | label: widget.isOkey ? const Text('Red') : const Text('Onayla')), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/303/reqrest_resource/viewModel/req_res_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../product/global/resource_context.dart'; 3 | 4 | import '../model/resoruce_model.dart'; 5 | import '../service/reqres_service.dart'; 6 | 7 | class ReqResProvider extends ChangeNotifier { 8 | final IReqresService reqresService; 9 | 10 | List resources = []; 11 | bool isLoading = false; 12 | 13 | void _changeLoading() { 14 | isLoading = !isLoading; 15 | notifyListeners(); 16 | } 17 | 18 | ReqResProvider(this.reqresService) { 19 | _fetch(); 20 | } 21 | 22 | Future _fetch() async { 23 | _changeLoading(); 24 | resources = await fetchItems(); 25 | _changeLoading(); 26 | } 27 | 28 | Future> fetchItems() async { 29 | return (await reqresService.fetchResourceItem())?.data ?? []; 30 | } 31 | 32 | bool? saveToLocale(ResourceContext resourceContext, List resources) { 33 | resourceContext.saveModel(ResourceModel(data: resources)); 34 | return resourceContext.model?.data?.isNotEmpty; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_full_learn", 3 | "short_name": "flutter_full_learn", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /lib/product/widget/button/laoding_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingButton extends StatefulWidget { 4 | const LoadingButton({Key? key, required this.title, required this.onPressed}) : super(key: key); 5 | final String title; 6 | final Future Function() onPressed; 7 | @override 8 | State createState() => _LoadingButtonState(); 9 | } 10 | 11 | class _LoadingButtonState extends State { 12 | bool _isLoading = false; 13 | 14 | void _changeLoading() { 15 | setState(() { 16 | _isLoading = !_isLoading; 17 | }); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return SizedBox( 23 | height: 50, 24 | child: ElevatedButton( 25 | child: Center(child: _isLoading ? const CircularProgressIndicator() : Text(widget.title)), 26 | onPressed: () async { 27 | if (_isLoading) return; 28 | _changeLoading(); 29 | await widget.onPressed.call(); 30 | _changeLoading(); 31 | }, 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/demos/stack_demo_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../core/random_image.dart'; 3 | 4 | class StackDemoView extends StatelessWidget { 5 | const StackDemoView({Key? key}) : super(key: key); 6 | final _cardHeight = 100.0; 7 | final _cardWidth = 200.0; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: AppBar(), 13 | body: Column( 14 | children: [ 15 | Expanded( 16 | flex: 4, 17 | child: Stack( 18 | alignment: Alignment.center, 19 | children: [ 20 | Positioned.fill(child: const RandomImage(), bottom: _cardHeight / 2), 21 | Positioned(height: _cardHeight, bottom: 0, width: _cardWidth, child: _cardCustom()) 22 | ], 23 | )), 24 | const Spacer(flex: 6) 25 | ], 26 | ), 27 | ); 28 | } 29 | 30 | Card _cardCustom() { 31 | return const Card( 32 | color: Colors.white, 33 | shape: RoundedRectangleBorder(), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/303/navigator/navigate_home_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../product/navigator/navigator_routes.dart'; 3 | 4 | import '../../product/mixin/navigator_mixin.dart'; 5 | 6 | class NavigateHomeView extends StatefulWidget { 7 | const NavigateHomeView({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _NavigateHomeViewState(); 11 | } 12 | 13 | class _NavigateHomeViewState extends State with NavigatorMixin { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | floatingActionButton: FloatingActionButton.large( 18 | child: const Icon(Icons.abc_rounded), 19 | onPressed: () async { 20 | router.pushToPage(NavigateRoutes.detail, arguments: "vb10"); 21 | // await NavigatorManager.instance.pushToPage(NavigateRoutes.detail, arguments: "vb10"); 22 | // Navigator.of(context).pushNamed(NavigateRoutes.detail.withParaf, arguments: "abc"); 23 | }), 24 | appBar: AppBar(title: Text(toString())), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/product/widget/button/answer_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class AnswerButton extends StatefulWidget { 6 | const AnswerButton({Key? key, this.onNumber}) : super(key: key); 7 | final bool Function(int number)? onNumber; 8 | @override 9 | State createState() => _AnswerButtonState(); 10 | } 11 | 12 | class _AnswerButtonState extends State { 13 | // bana bir sayi don random bu sayi kontrol edip sana bir cevap vericem 14 | // bu cevaba gore butonun rengini guncelle 15 | // eger dogru ise yesil yanlis ise kirmizi yap 16 | Color? _backgroundColor; 17 | @override 18 | Widget build(BuildContext context) { 19 | return ElevatedButton( 20 | style: ElevatedButton.styleFrom(primary: _backgroundColor), 21 | child: const Text('data'), 22 | onPressed: () { 23 | final result = Random().nextInt(10); 24 | final response = widget.onNumber?.call(result) ?? false; 25 | setState(() { 26 | _backgroundColor = response ? Colors.green : Colors.red; 27 | }); 28 | }, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/101/stack_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StackLearn extends StatelessWidget { 4 | const StackLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Stack( 11 | children: [ 12 | // Container( 13 | // color: Colors.red, 14 | // height: 100, 15 | // ), 16 | // Padding( 17 | // padding: const EdgeInsets.only(top: 50), 18 | // child: Container( 19 | // color: Colors.blue, 20 | // height: 100, 21 | // ), 22 | // ), 23 | 24 | // 25 | 26 | Positioned.fill( 27 | top: 20, 28 | child: Container( 29 | color: Colors.blue, 30 | )), 31 | Positioned( 32 | bottom: 0, 33 | height: 100, 34 | width: 100, 35 | child: Container( 36 | color: Colors.green, 37 | )), 38 | ], 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/101/list_tile_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../core/random_image.dart'; 3 | 4 | class ListTileLearn extends StatelessWidget { 5 | const ListTileLearn({Key? key}) : super(key: key); 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Padding( 11 | padding: const EdgeInsets.all(8.0), 12 | child: Column(children: [ 13 | Card( 14 | child: Padding( 15 | padding: const EdgeInsets.all(8.0), 16 | child: ListTile( 17 | title: const RandomImage(), 18 | onTap: () {}, 19 | subtitle: const Text('How do you use your card'), 20 | minVerticalPadding: 0, 21 | dense: true, 22 | leading: 23 | Container(height: 200, width: 30, alignment: Alignment.topCenter, child: const Icon(Icons.money)), 24 | trailing: const SizedBox(width: 20, child: Icon(Icons.chevron_right)), 25 | ), 26 | ), 27 | ) 28 | ]), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/product/widget/callback_dropodown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../303/call_back_learn.dart'; 4 | 5 | class CallBackDropdown extends StatefulWidget { 6 | const CallBackDropdown({Key? key, required this.onUserSelected}) : super(key: key); 7 | 8 | final void Function(CallbackUser user) onUserSelected; 9 | @override 10 | State createState() => _CallBackDropdownState(); 11 | } 12 | 13 | class _CallBackDropdownState extends State { 14 | CallbackUser? _user; 15 | 16 | void _updateUser(CallbackUser? item) { 17 | setState(() { 18 | _user = item; 19 | }); 20 | if (_user != null) { 21 | widget.onUserSelected.call(_user!); 22 | } 23 | } 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return DropdownButton( 28 | value: _user, 29 | items: CallbackUser.dummyUsers().map((e) { 30 | return DropdownMenuItem( 31 | child: Text(e.name, style: Theme.of(context).textTheme.headline3), 32 | value: e, 33 | ); 34 | }).toList(), 35 | onChanged: _updateUser); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_full_learn/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/202/theme/light_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LighTheme { 4 | final _lightColor = _LightColor(); 5 | 6 | late ThemeData theme; 7 | 8 | LighTheme() { 9 | theme = ThemeData( 10 | appBarTheme: const AppBarTheme( 11 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.vertical(bottom: Radius.circular(20)))), 12 | scaffoldBackgroundColor: Colors.white.withOpacity(0.9), 13 | floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: Colors.green), 14 | buttonTheme: ButtonThemeData( 15 | colorScheme: ColorScheme.light(onPrimary: Colors.purple, onSecondary: _lightColor.blueMenia)), 16 | colorScheme: const ColorScheme.light(), 17 | checkboxTheme: CheckboxThemeData( 18 | fillColor: MaterialStateProperty.all(Colors.green), side: const BorderSide(color: Colors.green)), 19 | textTheme: 20 | ThemeData.light().textTheme.copyWith(subtitle1: TextStyle(fontSize: 25, color: _lightColor._textColor))); 21 | } 22 | } 23 | 24 | class _LightColor { 25 | final Color _textColor = const Color.fromARGB(255, 37, 5, 5); 26 | final Color blueMenia = const Color.fromARGB(95, 188, 248, 1); 27 | } 28 | -------------------------------------------------------------------------------- /lib/303/navigator/navigate_home_detail_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigateHomeDetail extends StatefulWidget { 4 | const NavigateHomeDetail({Key? key, this.id}) : super(key: key); 5 | final String? id; 6 | 7 | @override 8 | State createState() => _NavigateHomeDetailState(); 9 | } 10 | 11 | class _NavigateHomeDetailState extends State { 12 | String? _id; 13 | @override 14 | void initState() { 15 | // TODO: implement initState 16 | super.initState(); 17 | _id = widget.id; 18 | 19 | if (_id == null) { 20 | Future.microtask(() { 21 | final _modelId = ModalRoute.of(context)?.settings.arguments; 22 | // if (_modelId is String) { 23 | // _id = _modelId; 24 | // } else { 25 | // _id = widget.id; 26 | // } 27 | 28 | setState(() { 29 | _id = _modelId is String ? _modelId : widget.id; 30 | }); 31 | }); 32 | } 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | backgroundColor: Theme.of(context).errorColor, 39 | appBar: AppBar( 40 | title: Text(_id ?? ''), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/101/padding_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PaddingLearn extends StatelessWidget { 4 | const PaddingLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Padding( 11 | padding: ProjectPadding.pagePaddingVertical, 12 | child: Column( 13 | children: [ 14 | Padding( 15 | padding: const EdgeInsets.symmetric(horizontal: 10), 16 | child: Container(color: Colors.white, height: 100)), 17 | Padding( 18 | padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20), 19 | child: Container(padding: EdgeInsets.zero, color: Colors.white, height: 100), 20 | ), 21 | Padding( 22 | padding: ProjectPadding.pagePaddingRightOnly + ProjectPadding.pagePaddingVertical, 23 | child: const Text('Ali'), 24 | ), 25 | ], 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | 32 | class ProjectPadding { 33 | static const pagePaddingVertical = EdgeInsets.symmetric(vertical: 10); 34 | 35 | static const pagePaddingRightOnly = EdgeInsets.only(right: 20); 36 | } 37 | -------------------------------------------------------------------------------- /lib/202/cache/shared_manager.dart: -------------------------------------------------------------------------------- 1 | import 'shared_not_initalze.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | enum SharedKeys { counter, users } 5 | 6 | class SharedManager { 7 | SharedPreferences? preferences; 8 | 9 | SharedManager(); 10 | 11 | Future init() async { 12 | preferences = await SharedPreferences.getInstance(); 13 | } 14 | 15 | void _checkPrefences() { 16 | if (preferences == null) throw SharedNotInitiazleException(); 17 | } 18 | 19 | Future saveString(SharedKeys key, String value) async { 20 | _checkPrefences(); 21 | await preferences?.setString(key.name, value); 22 | } 23 | 24 | Future saveStringItems(SharedKeys key, List value) async { 25 | _checkPrefences(); 26 | await preferences?.setStringList(key.name, value); 27 | } 28 | 29 | List? getStrings(SharedKeys key) { 30 | _checkPrefences(); 31 | return preferences?.getStringList(key.name); 32 | } 33 | 34 | String? getString(SharedKeys key) { 35 | _checkPrefences(); 36 | return preferences?.getString(key.name); 37 | } 38 | 39 | Future removeItem(SharedKeys key) async { 40 | _checkPrefences(); 41 | return (await preferences?.remove(key.name)) ?? false; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/303/mobx_image_picker/model/image_upload_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'image_upload_response.g.dart'; 4 | 5 | @JsonSerializable() 6 | class ImageUploadResponse { 7 | String? name; 8 | String? bucket; 9 | String? generation; 10 | String? metageneration; 11 | String? contentType; 12 | String? timeCreated; 13 | String? updated; 14 | String? storageClass; 15 | String? size; 16 | String? md5Hash; 17 | String? contentEncoding; 18 | String? contentDisposition; 19 | String? crc32c; 20 | String? etag; 21 | String? downloadTokens; 22 | 23 | ImageUploadResponse( 24 | {this.name, 25 | this.bucket, 26 | this.generation, 27 | this.metageneration, 28 | this.contentType, 29 | this.timeCreated, 30 | this.updated, 31 | this.storageClass, 32 | this.size, 33 | this.md5Hash, 34 | this.contentEncoding, 35 | this.contentDisposition, 36 | this.crc32c, 37 | this.etag, 38 | this.downloadTokens}); 39 | 40 | factory ImageUploadResponse.fromJson(Map json) { 41 | return _$ImageUploadResponseFromJson(json); 42 | } 43 | 44 | Map toJson() { 45 | return _$ImageUploadResponseToJson(this); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/101/scaffold_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'container_sized_box_learn.dart'; 4 | 5 | class ScaffoldLearnView extends StatelessWidget { 6 | const ScaffoldLearnView({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar(title: const Text('Scaffold samples')), 12 | body: const Text('merhaba'), 13 | backgroundColor: Colors.red, 14 | extendBody: true, 15 | floatingActionButton: FloatingActionButton( 16 | onPressed: () { 17 | showModalBottomSheet( 18 | context: context, 19 | builder: (context) => Container( 20 | height: 200, 21 | )); 22 | }, 23 | ), 24 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 25 | drawer: const Drawer(), 26 | bottomNavigationBar: Container( 27 | height: 200, 28 | decoration: ProjectContainerDecoration(), 29 | child: BottomNavigationBar(items: const [ 30 | BottomNavigationBarItem(icon: Icon(Icons.abc_outlined), label: 'a'), 31 | BottomNavigationBarItem(icon: Icon(Icons.abc_outlined), label: 'b'), 32 | ]), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/303/reqrest_resource/model/resoruce_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'resoruce_model.g.dart'; 5 | 6 | String _fetchCustom(String? data) { 7 | return 'aa'; 8 | } 9 | 10 | @JsonSerializable() 11 | class ResourceModel { 12 | List? data; 13 | 14 | ResourceModel({this.data}); 15 | 16 | factory ResourceModel.fromJson(Map json) { 17 | return _$ResourceModelFromJson(json); 18 | } 19 | 20 | Map toJson() { 21 | return _$ResourceModelToJson(this); 22 | } 23 | } 24 | 25 | @JsonSerializable() 26 | class Data extends Equatable { 27 | final int? id; 28 | final String? name; 29 | final int? year; 30 | // @JsonKey(name: 'renk') 31 | final String? color; 32 | @JsonKey(fromJson: _fetchCustom) 33 | final String? pantoneValue; 34 | final String? price; 35 | final StatusCode? status; 36 | 37 | const Data({this.id, this.status, this.name, this.year, this.color, this.pantoneValue, this.price}); 38 | 39 | factory Data.fromJson(Map json) { 40 | return _$DataFromJson(json); 41 | } 42 | 43 | @override 44 | List get props => [id, name, price]; 45 | } 46 | 47 | enum StatusCode { 48 | @JsonValue(200) 49 | success, 50 | @JsonValue(500) 51 | weird, 52 | } 53 | -------------------------------------------------------------------------------- /lib/202/image_learn_202.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | 4 | import '../product/global/resource_context.dart'; 5 | 6 | class ImageLearn202 extends StatefulWidget { 7 | const ImageLearn202({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _ImageLearn202State(); 11 | } 12 | 13 | class _ImageLearn202State extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | actions: [ 19 | IconButton( 20 | onPressed: () { 21 | context.read().clear(); 22 | }, 23 | icon: const Icon(Icons.remove)) 24 | ], 25 | title: Text(context.read().model?.data?.length.toString() ?? ''), 26 | ), 27 | body: ImagePaths.ic_apple_with_school.toWidget(height: 100), 28 | ); 29 | } 30 | } 31 | 32 | enum ImagePaths { 33 | // ignore: constant_identifier_names 34 | ic_apple_with_school, 35 | } 36 | 37 | extension ImagePathsExtension on ImagePaths { 38 | String path() { 39 | return 'assets/png/$name.png'; 40 | } 41 | 42 | Widget toWidget({double height = 24}) { 43 | return Image.asset( 44 | path(), 45 | height: height, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/202/oop_learn.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:url_launcher/url_launcher.dart'; 4 | 5 | import 'custom_exception.dart'; 6 | 7 | abstract class IFileDownload { 8 | bool? downloadItem(FileItem? fileItem); 9 | 10 | void toShare(String path) async { 11 | await launch(path); 12 | } 13 | } 14 | 15 | class FileDownload extends IFileDownload with ShareMixin { 16 | @override 17 | bool? downloadItem(FileItem? fileItem) { 18 | if (fileItem == null) throw FileDownloadException(); 19 | 20 | return true; 21 | } 22 | 23 | void smsShare() {} 24 | } 25 | 26 | class SMSDownload implements IFileDownload { 27 | @override 28 | bool? downloadItem(FileItem? fileItem) { 29 | if (fileItem == null) throw FileDownloadException(); 30 | 31 | print('a'); 32 | 33 | return true; 34 | } 35 | 36 | @override 37 | Future toShare(String path) async { 38 | await launch("sms:$path"); 39 | } 40 | } 41 | 42 | class FileItem { 43 | final String name; 44 | final File file; 45 | 46 | FileItem(this.name, this.file); 47 | } 48 | 49 | class VeliDownload extends IFileDownload with ShareMixin { 50 | @override 51 | bool? downloadItem(FileItem? fileItem) { 52 | // TODO: implement downloadItem 53 | throw UnimplementedError(); 54 | } 55 | } 56 | 57 | mixin ShareMixin on IFileDownload { 58 | void toShowFile() {} 59 | } 60 | -------------------------------------------------------------------------------- /module/uikit/README.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | TODO: Put a short description of the package here that helps potential users 15 | know whether this package might be useful for them. 16 | 17 | ## Features 18 | 19 | TODO: List what your package can do. Maybe include images, gifs, or videos. 20 | 21 | ## Getting started 22 | 23 | TODO: List prerequisites and provide or point to information on how to 24 | start using the package. 25 | 26 | ## Usage 27 | 28 | TODO: Include short and useful examples for package users. Add longer examples 29 | to `/example` folder. 30 | 31 | ```dart 32 | const like = 'sample'; 33 | ``` 34 | 35 | ## Additional information 36 | 37 | TODO: Tell users more about the package: where to find more information, how to 38 | contribute to the package, how to file issues, what response they can expect 39 | from the package authors, and more. 40 | -------------------------------------------------------------------------------- /lib/101/stateless_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StaltessLearn extends StatelessWidget { 4 | final String text2 = "veli"; 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | TitleTextWidget(text: text2), 13 | const TitleTextWidget(text: "veli2"), 14 | _emptyBox(), 15 | const TitleTextWidget(text: "veli3"), 16 | _emptyBox(), 17 | const TitleTextWidget(text: "veli4"), 18 | const _CustomContainer(), 19 | _emptyBox() 20 | ], 21 | ), 22 | ); 23 | } 24 | 25 | SizedBox _emptyBox() => const SizedBox(height: 10); 26 | } 27 | 28 | class _CustomContainer extends StatelessWidget { 29 | const _CustomContainer({ 30 | Key? key, 31 | }) : super(key: key); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Container( 36 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Colors.red), 37 | ); 38 | } 39 | } 40 | 41 | class TitleTextWidget extends StatelessWidget { 42 | const TitleTextWidget({Key? key, required this.text}) : super(key: key); 43 | final String text; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Text( 48 | text, 49 | style: Theme.of(context).textTheme.headline3, 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/404/compute/compute_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:easy_localization/easy_localization.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:uikit/uikit.dart'; 4 | 5 | import '../../product/init/lang/locale_keys.g.dart'; 6 | 7 | class ComputeLearnView extends StatefulWidget { 8 | const ComputeLearnView({Key? key}) : super(key: key); 9 | @override 10 | State createState() => _ComputeLearnViewState(); 11 | } 12 | 13 | class _ComputeLearnViewState extends State { 14 | int _result = 0; 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | title: Text(_result.toString()), 20 | ), 21 | floatingActionButton: FloatingActionButton(onPressed: () async { 22 | int result = 0; 23 | for (var i = 0; i < 1000000000; i++) { 24 | result = i * i; 25 | } 26 | // final result = await compute(Calculator.sum, 1000000000); 27 | setState(() { 28 | _result = result; 29 | }); 30 | }), 31 | body: Column( 32 | children: [const CircularProgressIndicator(), Text(LocaleKeys.login_welcome.tr()), const LoadingLottie()], 33 | ), 34 | ); 35 | } 36 | } 37 | 38 | class Calculator { 39 | static int sum(int limit) { 40 | int result = 0; 41 | for (var i = 0; i < limit; i++) { 42 | result = i * i; 43 | } 44 | return result; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"flutter_full_learn", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/101/icon_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class IconLearnView extends StatelessWidget { 4 | IconLearnView({Key? key}) : super(key: key); 5 | final IconSizes iconSize = IconSizes(); 6 | final IconColors iconColors = IconColors(); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar(title: const Text('Hello')), 12 | body: Column( 13 | children: [ 14 | IconButton( 15 | onPressed: () {}, 16 | icon: Icon( 17 | Icons.message_outlined, 18 | color: Theme.of(context).backgroundColor, 19 | size: IconSizes.iconSmall2x, 20 | )), 21 | const SizedBox(height: 50), 22 | IconButton( 23 | onPressed: () {}, 24 | icon: Icon( 25 | Icons.message_outlined, 26 | color: iconColors.froly, 27 | size: iconSize.iconSmall, 28 | )), 29 | IconButton( 30 | onPressed: () {}, 31 | icon: Icon( 32 | Icons.message_outlined, 33 | color: iconColors.froly, 34 | size: iconSize.iconSmall, 35 | )), 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | 42 | class IconSizes { 43 | final double iconSmall = 40; 44 | static const double iconSmall2x = 80; 45 | } 46 | 47 | class IconColors { 48 | final Color froly = const Color(0xffED617A); 49 | } 50 | -------------------------------------------------------------------------------- /lib/303/testable/image_generic_picker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../product/utility/image_upload_manager.dart'; 3 | 4 | import '../../product/utility/image_upload.dart'; 5 | 6 | class ImagePickerGenericView extends StatefulWidget { 7 | const ImagePickerGenericView({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _ImagePickerGenericViewState(); 11 | } 12 | 13 | class _ImagePickerGenericViewState extends State { 14 | final _imageUploadManger = ImageUploadManager(); 15 | late final ImageUploadCustomManager _imaegUploadCustomManager; 16 | 17 | @override 18 | void initState() { 19 | // TODO: implement initState 20 | super.initState(); 21 | _imaegUploadCustomManager = ImageUploadCustomManager(LibraryImageUpload()); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar(), 28 | body: Column(children: [ 29 | ElevatedButton( 30 | onPressed: () { 31 | _imaegUploadCustomManager.cropWithFetch(); 32 | }, 33 | child: const Text('Fetch from gallery')), 34 | ElevatedButton( 35 | onPressed: () { 36 | _imageUploadManger.fetchFromLibrary(); 37 | }, 38 | child: const Text('Fetch from normal')), 39 | ElevatedButton(onPressed: () {}, child: const Text('Fetch from multiple')), 40 | ]), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/101/image_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ImageLaern extends StatelessWidget { 4 | const ImageLaern({Key? key}) : super(key: key); 5 | final String _imagePath = 6 | 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Apple-book.svg/800px-Apple-book.svg.png'; 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | appBar: AppBar(), 11 | body: Column(children: [ 12 | SizedBox( 13 | height: 100, 14 | width: 300, 15 | child: PngImage(name: ImageItems().appleBookWithoutPath), 16 | ), 17 | Image.network( 18 | 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Apple-book.svg/800px-Apple-book.svg.png', 19 | errorBuilder: (context, error, stackTrace) => const Icon(Icons.abc_outlined), 20 | ) 21 | ]), 22 | ); 23 | } 24 | } 25 | 26 | class ImageItems { 27 | final String appleWithBook = "assets/apple-and-book-png-transparent-apple-and-book-images-274565.png"; 28 | final String appleBook = "assets/png/ic_apple_with_school.png"; 29 | final String appleBookWithoutPath = "ic_apple_with_school"; 30 | } 31 | 32 | class PngImage extends StatelessWidget { 33 | const PngImage({Key? key, required this.name}) : super(key: key); 34 | final String name; 35 | @override 36 | Widget build(BuildContext context) { 37 | return Image.asset(_nameWithPath, fit: BoxFit.cover); 38 | } 39 | 40 | String get _nameWithPath => 'assets/png/$name.png'; 41 | } 42 | -------------------------------------------------------------------------------- /lib/202/service/coments_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'comment_model.dart'; 3 | import 'post_service.dart'; 4 | 5 | class CommentsLearnView extends StatefulWidget { 6 | const CommentsLearnView({Key? key, this.postId}) : super(key: key); 7 | final int? postId; 8 | 9 | @override 10 | State createState() => _CommentsLearnViewState(); 11 | } 12 | 13 | class _CommentsLearnViewState extends State { 14 | late final IPostService postService; 15 | bool _isLoading = false; 16 | List? _commentsItem; 17 | @override 18 | void initState() { 19 | // TODO: implement initState 20 | super.initState(); 21 | postService = PostService(); 22 | fetchItemsWithId(widget.postId ?? 0); 23 | } 24 | 25 | void _changeLoading() { 26 | setState(() { 27 | _isLoading = !_isLoading; 28 | }); 29 | } 30 | 31 | Future fetchItemsWithId(int postId) async { 32 | _changeLoading(); 33 | _commentsItem = await postService.fetchRelatedCommentsWithPostId(postId); 34 | _changeLoading(); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | appBar: AppBar(), 41 | body: ListView.builder( 42 | itemCount: _commentsItem?.length ?? 0, 43 | itemBuilder: (BuildContext context, int index) { 44 | return Card( 45 | child: Text(_commentsItem?[index].email ?? ''), 46 | ); 47 | }, 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/product/navigator/navigator_custom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../303/navigator/navigate_home_detail_view.dart'; 3 | import '../../303/navigator/navigate_home_view.dart'; 4 | import '../../main.dart'; 5 | import 'navigator_routes.dart'; 6 | 7 | import '../../303/lottie_learn.dart'; 8 | import '../../303/mobx_image_picker/view/mobx_image_upload_view.dart'; 9 | 10 | mixin NavigatorCustom on Widget { 11 | Route? onGenerateRoute(RouteSettings routeSettings) { 12 | if (routeSettings.name?.isEmpty ?? true) { 13 | return _navigateToNormal(const MobxImageUpload()); 14 | } 15 | 16 | final _routes = routeSettings.name == NavigatorRoures.paragfh 17 | ? NavigateRoutes.init 18 | : NavigateRoutes.values.byName(routeSettings.name!.substring(1)); 19 | 20 | switch (_routes) { 21 | case NavigateRoutes.init: 22 | return _navigateToNormal(const LottieLearn()); 23 | case NavigateRoutes.home: 24 | return _navigateToNormal(const NavigateHomeView()); 25 | case NavigateRoutes.detail: 26 | final _id = routeSettings.arguments; 27 | return _navigateToNormal( 28 | NavigateHomeDetail( 29 | id: _id is String ? _id : null, 30 | ), 31 | isFullScreenDialog: true); 32 | } 33 | } 34 | 35 | Route? _navigateToNormal(Widget child, {bool? isFullScreenDialog}) { 36 | return MaterialPageRoute( 37 | fullscreenDialog: isFullScreenDialog ?? false, 38 | builder: (context) { 39 | return child; 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/303/reqrest_resource/model/resoruce_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'resoruce_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ResourceModel _$ResourceModelFromJson(Map json) => 10 | ResourceModel( 11 | data: (json['data'] as List?) 12 | ?.map((e) => Data.fromJson(e as Map)) 13 | .toList(), 14 | ); 15 | 16 | Map _$ResourceModelToJson(ResourceModel instance) => 17 | { 18 | 'data': instance.data, 19 | }; 20 | 21 | Data _$DataFromJson(Map json) => Data( 22 | id: json['id'] as int?, 23 | status: $enumDecodeNullable(_$StatusCodeEnumMap, json['status']), 24 | name: json['name'] as String?, 25 | year: json['year'] as int?, 26 | color: json['color'] as String?, 27 | pantoneValue: _fetchCustom(json['pantoneValue'] as String), 28 | price: json['price'] as String?, 29 | ); 30 | 31 | Map _$DataToJson(Data instance) => { 32 | 'id': instance.id, 33 | 'name': instance.name, 34 | 'year': instance.year, 35 | 'color': instance.color, 36 | 'pantoneValue': instance.pantoneValue, 37 | 'price': instance.price, 38 | 'status': _$StatusCodeEnumMap[instance.status], 39 | }; 40 | 41 | const _$StatusCodeEnumMap = { 42 | StatusCode.success: 200, 43 | StatusCode.weird: 500, 44 | }; 45 | -------------------------------------------------------------------------------- /lib/303/package/kartal/kartal_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../202/image_learn_202.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | 5 | typedef ImageLoader = void Function(String url); 6 | 7 | class KartalView extends StatefulWidget { 8 | const KartalView({Key? key, this.onImage}) : super(key: key); 9 | 10 | final ImageLoader? onImage; 11 | @override 12 | State createState() => _KartalViewState(); 13 | } 14 | 15 | class _KartalViewState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar(), 20 | body: Column( 21 | children: [ 22 | InkWell( 23 | onTap: () { 24 | context.navigateToPage(const ImageLearn202(), type: SlideType.BOTTOM); 25 | }, 26 | child: Text('Kartal', style: context.textTheme.headline1)), 27 | Icon(context.isIOSDevice ? Icons.ios_share : Icons.android_rounded), 28 | AnimatedContainer( 29 | duration: context.durationLow, 30 | height: context.isKeyBoardOpen ? 0 : context.dynamicHeight(0.15), 31 | color: Colors.red), 32 | const TextField(), 33 | Image.network(''.randomImage), 34 | InkWell( 35 | onTap: () { 36 | 'vbacik.10@gmail.com'.launchEmail; 37 | 'https://github.com/VB10/Flutter-Full-Learn/issues/3'.launchWebsite; 38 | }, 39 | child: Text('vb', style: context.textTheme.headline1)) 40 | ], 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/202/model_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'model_learn.dart'; 3 | 4 | class ModelLearnView extends StatefulWidget { 5 | const ModelLearnView({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _ModelLearnViewState(); 9 | } 10 | 11 | class _ModelLearnViewState extends State { 12 | var user9 = PostModel8(body: 'a'); 13 | @override 14 | void initState() { 15 | super.initState(); 16 | 17 | final user1 = PostModel1() 18 | ..userId = 1 19 | ..body = 'vb'; 20 | user1.body = 'hello'; 21 | 22 | final user2 = PostModel2(1, 2, 'b', 'a'); 23 | user2.body = 'a'; 24 | 25 | final user3 = PostModel3(1, 2, 'a', 'b'); 26 | // user3.body = 'a'; 27 | 28 | final user4 = PostModel4(userId: 1, id: 2, title: 'a', body: 'b'); 29 | // user4.body = 'a'; 30 | 31 | final user5 = PostModel5(userId: 1, id: 2, title: 'title', body: 'body'); 32 | user5.userId; 33 | 34 | final user6 = PostModel6(userId: 1, id: 2, title: 'a', body: 'b'); 35 | final user7 = PostModel7(); 36 | 37 | // Service 38 | final user8 = PostModel8(body: 'a'); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return Scaffold( 44 | floatingActionButton: FloatingActionButton( 45 | onPressed: () { 46 | setState(() { 47 | user9 = user9.copyWith(title: 'vb'); 48 | user9.updateBody(null); 49 | }); 50 | }, 51 | ), 52 | appBar: AppBar( 53 | title: Text(user9.body ?? 'Not has any data'), 54 | ), 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/demos/password_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PasswordTextField extends StatefulWidget { 4 | const PasswordTextField({Key? key, this.controller}) : super(key: key); 5 | final TextEditingController? controller; 6 | @override 7 | State createState() => _PasswordTextFieldState(); 8 | } 9 | 10 | class _PasswordTextFieldState extends State { 11 | final _obsureText = '#'; 12 | 13 | bool _isSecure = true; 14 | 15 | void _changeLoading() { 16 | setState(() { 17 | _isSecure = !_isSecure; 18 | }); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return TextField( 24 | controller: widget.controller, 25 | autofillHints: const [AutofillHints.password], 26 | keyboardType: TextInputType.visiblePassword, 27 | obscureText: _isSecure, 28 | obscuringCharacter: _obsureText, 29 | decoration: InputDecoration( 30 | border: const UnderlineInputBorder(), 31 | hintText: 'Password', 32 | suffix: _onVisiblityIcon(), 33 | ), 34 | ); 35 | } 36 | 37 | IconButton _onVisiblityIcon() { 38 | return IconButton( 39 | onPressed: _changeLoading, 40 | icon: AnimatedCrossFade( 41 | firstChild: const Icon(Icons.visibility_outlined), 42 | secondChild: const Icon(Icons.visibility_off_outlined), 43 | crossFadeState: _isSecure ? CrossFadeState.showFirst : CrossFadeState.showSecond, 44 | duration: const Duration(seconds: 2)), 45 | ); 46 | // icon: Icon(_isSecure ? Icons.visibility : Icons.visibility_off)); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/202/cache/secure_context/secure_context_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 3 | 4 | class ShareContextLearn extends StatefulWidget { 5 | const ShareContextLearn({Key? key}) : super(key: key); 6 | 7 | @override 8 | State createState() => _ShareContextLearnState(); 9 | } 10 | 11 | enum _SecureKeys { token } 12 | 13 | class _ShareContextLearnState extends State { 14 | final _storage = const FlutterSecureStorage(); 15 | String _title = ''; 16 | final TextEditingController _controller = TextEditingController(); 17 | void saveItems(String data) { 18 | setState(() { 19 | _title = data; 20 | }); 21 | } 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | getSecureItems(); 27 | } 28 | 29 | Future getSecureItems() async { 30 | _title = await _storage.read(key: _SecureKeys.token.name) ?? ''; 31 | 32 | if (_title.isNotEmpty) { 33 | print('bu adam onceden kullanmis appi ve tokeni bu'); 34 | _controller.text = _title; 35 | } 36 | setState(() {}); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | return Scaffold( 42 | appBar: AppBar( 43 | title: Text(_title), 44 | ), 45 | floatingActionButton: FloatingActionButton.extended( 46 | onPressed: () async { 47 | await _storage.write(key: _SecureKeys.token.name, value: _title); 48 | }, 49 | label: const Text('Save')), 50 | body: TextField( 51 | controller: _controller, 52 | onChanged: saveItems, 53 | minLines: 3, 54 | maxLines: 4, 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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 | include: package:flutter_lints/flutter.yaml 11 | 12 | analyzer: 13 | exclude: 14 | - "**/*.g.dart" 15 | - "test/.test_coverage.dart" 16 | - "bin/cache/**" 17 | - "lib/generated_plugin_registrant.dart" 18 | linter: 19 | # The lint rules applied to this project can be customized in the 20 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 21 | # included above or to enable additional rules. A list of all available lints 22 | # and their documentation is published at 23 | # https://dart-lang.github.io/linter/lints/index.html. 24 | # 25 | # Instead of disabling a lint rule for the entire project in the 26 | # section below, it can also be suppressed for a single line of code 27 | # or a specific dart file by using the `// ignore: name_of_lint` and 28 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 29 | # producing the lint. 30 | rules: 31 | avoid_print: true # Uncomment to disable the `avoid_print` rule 32 | always_declare_return_types: true 33 | 34 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 35 | # Additional information about this file can be found at 36 | # https://dart.dev/guides/language/analysis-options 37 | -------------------------------------------------------------------------------- /lib/303/call_back_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../product/widget/button/answer_button.dart'; 3 | import '../product/widget/button/laoding_button.dart'; 4 | import '../product/widget/callback_dropodown.dart'; 5 | 6 | class CallBackLearn extends StatefulWidget { 7 | const CallBackLearn({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _CallBackLearnState(); 11 | } 12 | 13 | class _CallBackLearnState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar(), 18 | body: Column( 19 | children: [ 20 | CallBackDropdown(onUserSelected: (CallbackUser user) { 21 | print(user); 22 | }), 23 | AnswerButton( 24 | onNumber: (number) { 25 | return number % 3 == 1; 26 | }, 27 | ), 28 | LoadingButton( 29 | title: 'Save', 30 | onPressed: () async { 31 | await Future.delayed(const Duration(seconds: 1)); 32 | }) 33 | ], 34 | ), 35 | ); 36 | } 37 | } 38 | 39 | class CallbackUser { 40 | final String name; 41 | final int id; 42 | 43 | CallbackUser(this.name, this.id); 44 | 45 | // TODO: Dummy Remove it 46 | static List dummyUsers() { 47 | return [ 48 | CallbackUser('vb', 123), 49 | CallbackUser('vb2', 124), 50 | ]; 51 | } 52 | 53 | @override 54 | bool operator ==(Object other) { 55 | if (identical(this, other)) return true; 56 | 57 | return other is CallbackUser && other.name == name && other.id == id; 58 | } 59 | 60 | @override 61 | int get hashCode => name.hashCode ^ id.hashCode; 62 | } 63 | -------------------------------------------------------------------------------- /lib/303/generic_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | class UserManagement { 4 | final T admin; 5 | 6 | UserManagement(this.admin); 7 | void sayName(GenericUser user) { 8 | print(user.name); 9 | } 10 | 11 | int calculateMoney(List users) { 12 | int sum = 0; 13 | for (var item in users) { 14 | sum += item.money; 15 | } 16 | int initialValue = admin.role == 1 ? admin.money : 0; 17 | 18 | final sumMoney = 19 | users.map((e) => e.money).fold(initialValue, (previousValue, element) => previousValue + element); 20 | 21 | final _monney = users.fold(initialValue, (previousValue, element) => previousValue + element.money); 22 | return _monney; 23 | } 24 | 25 | Iterable>? showNames(List users) { 26 | if (R == String) { 27 | final names = users.map((e) => VBModel(e.name.split('').toList().cast())); 28 | return names; 29 | } 30 | return null; 31 | } 32 | } 33 | 34 | class VBModel { 35 | final String name = 'vb'; 36 | final List items; 37 | 38 | VBModel(this.items); 39 | } 40 | 41 | class GenericUser extends Equatable { 42 | final String name; 43 | final String id; 44 | final int money; 45 | 46 | const GenericUser(this.name, this.id, this.money); 47 | 48 | bool findUserName(String name) { 49 | return this.name == name; 50 | } 51 | 52 | @override 53 | String toString() => 'GenericUser(name: $name, id: $id, money: $money)'; 54 | 55 | @override 56 | // TODO: implement props 57 | List get props => [id]; 58 | } 59 | 60 | class AdminUser extends GenericUser { 61 | final int role; 62 | const AdminUser(String name, String id, int money, this.role) : super(name, id, money); 63 | } 64 | -------------------------------------------------------------------------------- /module/uikit/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: uikit 2 | description: A new Flutter package project. 3 | version: 0.0.1 4 | homepage: 5 | 6 | environment: 7 | sdk: ">=2.16.1 <3.0.0" 8 | flutter: ">=1.17.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | lottie: ^1.2.2 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | flutter_lints: ^1.0.0 20 | 21 | # For information on the generic Dart part of this file, see the 22 | # following page: https://dart.dev/tools/pub/pubspec 23 | 24 | # The following section is specific to Flutter. 25 | flutter: 26 | 27 | # To add assets to your package, add an assets section, like this: 28 | # assets: 29 | # - images/a_dot_burr.jpeg 30 | # - images/a_dot_ham.jpeg 31 | # 32 | # For details regarding assets in packages, see 33 | # https://flutter.dev/assets-and-images/#from-packages 34 | # 35 | # An image asset can refer to one or more resolution-specific "variants", see 36 | # https://flutter.dev/assets-and-images/#resolution-aware. 37 | 38 | # To add custom fonts to your package, add a fonts section here, 39 | # in this "flutter" section. Each entry in this list should have a 40 | # "family" key with the font family name, and a "fonts" key with a 41 | # list giving the asset and other descriptors for the font. For 42 | # example: 43 | # fonts: 44 | # - family: Schyler 45 | # fonts: 46 | # - asset: fonts/Schyler-Regular.ttf 47 | # - asset: fonts/Schyler-Italic.ttf 48 | # style: italic 49 | # - family: Trajan Pro 50 | # fonts: 51 | # - asset: fonts/TrajanPro.ttf 52 | # - asset: fonts/TrajanPro_Bold.ttf 53 | # weight: 700 54 | # 55 | # For details regarding fonts in packages, see 56 | # https://flutter.dev/custom-fonts/#from-packages 57 | -------------------------------------------------------------------------------- /test/req_res_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:flutter_full_learn/303/reqrest_resource/model/resoruce_model.dart'; 3 | import 'package:flutter_full_learn/303/reqrest_resource/service/reqres_service.dart'; 4 | import 'package:flutter_full_learn/303/reqrest_resource/viewModel/req_res_provider.dart'; 5 | import 'package:flutter_full_learn/303/testable/user_save_model.dart'; 6 | import 'package:flutter_full_learn/product/global/resource_context.dart'; 7 | import 'package:flutter_test/flutter_test.dart'; 8 | import 'package:mockito/annotations.dart'; 9 | import 'package:shared_preferences/shared_preferences.dart'; 10 | 11 | @GenerateMocks([ReqResProvider]) 12 | void main() { 13 | setUp(() { 14 | Map values = {'vb': "veli"}; 15 | SharedPreferences.setMockInitialValues(values); 16 | }); 17 | test('saveToLocale - Test', () { 18 | var mockProvider = ReqResProvider(ReqresService(Dio())); 19 | final resourceContext = ResourceContext(); 20 | final result = mockProvider.saveToLocale(resourceContext, []); 21 | 22 | expect(result, []); 23 | }); 24 | 25 | test('userTest - Test', () async { 26 | var userViewModel = UserSaveViewModel(); 27 | final result = userViewModel.getReadData("vb", MockStore()); 28 | 29 | expect(result, false); 30 | }); 31 | 32 | test('fetchItems - Test', () async { 33 | var mockProvider = ReqResProvider(MockReqResService()); 34 | final result = await mockProvider.fetchItems(); 35 | 36 | expect(result, isNotEmpty); 37 | }); 38 | } 39 | 40 | class MockReqResService extends IReqresService { 41 | MockReqResService() : super(Dio()); 42 | 43 | @override 44 | Future fetchResourceItem() async { 45 | return ResourceModel(data: [const Data(color: 'a', id: 1)]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/101/column_row_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColumnRowLearn extends StatelessWidget { 4 | const ColumnRowLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | // 4+2+2+2 13 | Expanded( 14 | flex: 4, //%40 15 | child: Row( 16 | children: [ 17 | Expanded(child: Container(color: Colors.red)), 18 | Expanded(child: Container(color: Colors.green)), 19 | Expanded(child: Container(color: Colors.blue)), 20 | Expanded(child: Container(color: Colors.pink)), 21 | ], 22 | )), 23 | const Spacer(flex: 2), 24 | Expanded( 25 | flex: 2, 26 | child: Row( 27 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 28 | crossAxisAlignment: CrossAxisAlignment.center, 29 | mainAxisSize: MainAxisSize.min, 30 | children: const [ 31 | Text('a'), 32 | Text('a2'), 33 | Text('a3'), 34 | ], 35 | )), 36 | SizedBox( 37 | height: ProjectContainerSizes.cardHeight, 38 | child: Column( 39 | children: const [ 40 | Expanded(child: Text('data')), 41 | Expanded(child: Text('data')), 42 | Expanded(child: Text('data')), 43 | Spacer(), 44 | Expanded(child: Text('data')), 45 | ], 46 | ), 47 | ) 48 | ], 49 | ), 50 | ); 51 | } 52 | } 53 | 54 | class ProjectContainerSizes { 55 | static const double cardHeight = 200; 56 | } 57 | -------------------------------------------------------------------------------- /lib/101/container_sized_box_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ConatinerSizedBoxLearn extends StatelessWidget { 4 | const ConatinerSizedBoxLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | SizedBox( 13 | width: 300, 14 | height: 200, 15 | child: Text('a' * 500), 16 | ), 17 | const SizedBox.shrink(), 18 | SizedBox.square( 19 | dimension: 50, 20 | child: Text('b' * 50), 21 | ), 22 | Container( 23 | constraints: const BoxConstraints(maxWidth: 200, minWidth: 100, minHeight: 10, maxHeight: 120), 24 | child: Text('aa' * 100, maxLines: 2), 25 | padding: const EdgeInsets.all(10), 26 | margin: const EdgeInsets.all(10), 27 | decoration: ProjectUtility.boxDecoraiton, 28 | ) 29 | ], 30 | ), 31 | ); 32 | } 33 | } 34 | 35 | class ProjectUtility { 36 | static BoxDecoration boxDecoraiton = BoxDecoration( 37 | borderRadius: BorderRadius.circular(10), 38 | gradient: const LinearGradient(colors: [Colors.red, Colors.black]), 39 | boxShadow: const [BoxShadow(color: Colors.green, offset: Offset(0.1, 1), blurRadius: 12)], 40 | border: Border.all(width: 10, color: Colors.white12)); 41 | } 42 | 43 | class ProjectContainerDecoration extends BoxDecoration { 44 | ProjectContainerDecoration() 45 | : super( 46 | borderRadius: BorderRadius.circular(10), 47 | gradient: const LinearGradient(colors: [Colors.red, Colors.black]), 48 | boxShadow: const [BoxShadow(color: Colors.green, offset: Offset(0.1, 1), blurRadius: 12)], 49 | border: Border.all(width: 10, color: Colors.white12)); 50 | } 51 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /lib/202/tab_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../101/icon_learn.dart'; 3 | import '../101/image_learn.dart'; 4 | 5 | class TabLearn extends StatefulWidget { 6 | const TabLearn({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _TabLearnState(); 10 | } 11 | 12 | class _TabLearnState extends State with TickerProviderStateMixin { 13 | late final TabController _tabController; 14 | final double _notchedValue = 10; 15 | @override 16 | void initState() { 17 | super.initState(); 18 | _tabController = TabController(length: _MyTabViews.values.length, vsync: this); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return DefaultTabController( 24 | length: _MyTabViews.values.length, 25 | child: Scaffold( 26 | extendBody: true, 27 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 28 | floatingActionButton: FloatingActionButton(onPressed: () { 29 | _tabController.animateTo(_MyTabViews.home.index); 30 | }), 31 | bottomNavigationBar: BottomAppBar(notchMargin: _notchedValue, child: _myTabView()), 32 | appBar: AppBar(), 33 | body: _tabbarView(), 34 | ), 35 | ); 36 | } 37 | 38 | TabBar _myTabView() { 39 | return TabBar( 40 | padding: EdgeInsets.zero, 41 | onTap: (int index) {}, 42 | controller: _tabController, 43 | tabs: _MyTabViews.values.map((e) => Tab(text: e.name)).toList()); 44 | } 45 | 46 | TabBarView _tabbarView() { 47 | return TabBarView( 48 | physics: const NeverScrollableScrollPhysics(), 49 | controller: _tabController, 50 | children: [const ImageLaern(), IconLearnView(), IconLearnView(), IconLearnView()]); 51 | } 52 | } 53 | 54 | enum _MyTabViews { home, settings, favorite, profile } 55 | 56 | extension _MyTabViewExtension on _MyTabViews {} 57 | -------------------------------------------------------------------------------- /lib/202/form_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FormLearnView extends StatefulWidget { 4 | const FormLearnView({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _FormLearnViewState(); 8 | } 9 | 10 | class _FormLearnViewState extends State { 11 | final GlobalKey _key = GlobalKey(); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar(), 17 | body: Form( 18 | key: _key, 19 | autovalidateMode: AutovalidateMode.always, 20 | onChanged: () {}, 21 | child: Column( 22 | children: [ 23 | TextFormField(validator: FormFieldValidator().isNotEmpty), 24 | TextFormField(validator: FormFieldValidator().isNotEmpty), 25 | DropdownButtonFormField( 26 | validator: FormFieldValidator().isNotEmpty, 27 | items: const [ 28 | DropdownMenuItem(child: Text('a'), value: 'v'), 29 | DropdownMenuItem(child: Text('a'), value: 'v2'), 30 | DropdownMenuItem(child: Text('a'), value: 'v3'), 31 | ], 32 | onChanged: (value) {}), 33 | CheckboxListTile(value: true, onChanged: (value) {}), 34 | ElevatedButton( 35 | onPressed: () { 36 | if (_key.currentState?.validate() ?? false) { 37 | print('okey'); 38 | } 39 | }, 40 | child: const Text('Save')) 41 | ], 42 | ), 43 | ), 44 | ); 45 | } 46 | } 47 | 48 | class FormFieldValidator { 49 | String? isNotEmpty(String? data) { 50 | return (data?.isNotEmpty ?? false) ? null : ValidatorMessage._notEmpty; 51 | } 52 | } 53 | 54 | class ValidatorMessage { 55 | static const String _notEmpty = 'Bos gecielemz'; 56 | } 57 | -------------------------------------------------------------------------------- /lib/303/lottie_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../product/constant/duration_items.dart'; 3 | import '../product/constant/lottie_items.dart'; 4 | import '../product/navigator/navigator_routes.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | import 'package:provider/provider.dart'; 7 | import 'package:uikit/uikit.dart'; 8 | 9 | import '../product/global/theme_notifer.dart'; 10 | 11 | class LottieLearn extends StatefulWidget { 12 | const LottieLearn({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _LottieLearnState(); 16 | } 17 | 18 | // https://assets3.lottiefiles.com/packages/lf20_ydo1amjm.json 19 | class _LottieLearnState extends State with TickerProviderStateMixin { 20 | late AnimationController controller; 21 | bool isLight = false; 22 | @override 23 | void initState() { 24 | super.initState(); 25 | controller = AnimationController(vsync: this, duration: DurationItems.durationNormal()); 26 | navigateToHome(); 27 | } 28 | 29 | Future navigateToHome() async { 30 | await Future.delayed(const Duration(seconds: 1)); 31 | Navigator.of(context).pushReplacementNamed(NavigateRoutes.home.withParaf); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | appBar: AppBar( 38 | actions: [ 39 | InkWell( 40 | onTap: () async { 41 | await controller.animateTo(isLight ? 0.5 : 1); 42 | // controller.animateTo(0.5); 43 | isLight = !isLight; 44 | Future.microtask(() { 45 | context.read().changeTheme(); 46 | }); 47 | }, 48 | child: Lottie.asset(LottieItems.themeChange.lottiePath, repeat: false, controller: controller)) 49 | ], 50 | ), 51 | body: const LoadingLottie(), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/101/statefull_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../product/counter_hello_button.dart'; 3 | import '../product/language/language_items.dart'; 4 | 5 | class StatefullLearn extends StatefulWidget { 6 | const StatefullLearn({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _StatefullLearnState(); 10 | } 11 | 12 | class _StatefullLearnState extends State { 13 | int _countValue = 0; 14 | 15 | final int _counterCustom = 0; 16 | 17 | void _updateCounter(bool isIncrement) { 18 | if (isIncrement) { 19 | _countValue = _countValue + 1; 20 | } else { 21 | _countValue = _countValue - 1; 22 | } 23 | 24 | setState(() {}); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | appBar: AppBar(title: const Text(LanguageItems.welcomeTitle)), 31 | floatingActionButton: Row( 32 | mainAxisSize: MainAxisSize.min, 33 | children: [ 34 | _incrementButton(), 35 | _deincrementButton(), 36 | ], 37 | ), 38 | body: Column( 39 | children: [ 40 | Center(child: Text(_countValue.toString(), style: Theme.of(context).textTheme.headline2)), 41 | const Placeholder(), 42 | const CounterHelloButton(), 43 | ], 44 | ), 45 | ); 46 | } 47 | 48 | FloatingActionButton _incrementButton() { 49 | print('burda'); 50 | return FloatingActionButton( 51 | onPressed: () { 52 | _updateCounter(true); 53 | }, 54 | child: const Icon(Icons.add), 55 | ); 56 | } 57 | 58 | Padding _deincrementButton() { 59 | return Padding( 60 | padding: const EdgeInsets.only(left: 10), 61 | child: FloatingActionButton( 62 | onPressed: () { 63 | _updateCounter(false); 64 | }, 65 | child: const Icon(Icons.remove), 66 | ), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/303/tabbar_advance.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../101/icon_learn.dart'; 3 | 4 | import 'feed_view.dart'; 5 | 6 | class TabAdvanceLearn extends StatefulWidget { 7 | const TabAdvanceLearn({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _TabLearnState(); 11 | } 12 | 13 | class _TabLearnState extends State with TickerProviderStateMixin { 14 | late final TabController _tabController; 15 | final double _notchedValue = 10; 16 | @override 17 | void initState() { 18 | super.initState(); 19 | _tabController = TabController(length: _MyTabViews.values.length, vsync: this); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return DefaultTabController( 25 | length: _MyTabViews.values.length, 26 | child: Scaffold( 27 | extendBody: true, 28 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 29 | floatingActionButton: FloatingActionButton(onPressed: () { 30 | _tabController.animateTo(_MyTabViews.home.index); 31 | }), 32 | bottomNavigationBar: BottomAppBar(notchMargin: _notchedValue, child: _myTabView()), 33 | appBar: AppBar(), 34 | body: _tabbarView(), 35 | ), 36 | ); 37 | } 38 | 39 | TabBar _myTabView() { 40 | return TabBar( 41 | padding: EdgeInsets.zero, 42 | onTap: (int index) {}, 43 | controller: _tabController, 44 | tabs: _MyTabViews.values.map((e) => Tab(text: e.name)).toList()); 45 | } 46 | 47 | TabBarView _tabbarView() { 48 | return TabBarView( 49 | physics: const NeverScrollableScrollPhysics(), 50 | controller: _tabController, 51 | children: [const FeedView(), IconLearnView(), IconLearnView(), IconLearnView()]); 52 | } 53 | } 54 | 55 | enum _MyTabViews { home, settings, favorite, profile } 56 | 57 | extension _MyTabViewExtension on _MyTabViews {} 58 | -------------------------------------------------------------------------------- /lib/101/statefull_life_cycle_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StatefullLifeCycleLearn extends StatefulWidget { 4 | const StatefullLifeCycleLearn({Key? key, required this.message}) : super(key: key); 5 | final String message; 6 | 7 | @override 8 | State createState() => _StatefullLifeCycleLearnState(); 9 | } 10 | 11 | class _StatefullLifeCycleLearnState extends State { 12 | String _message = ''; 13 | late final bool _isOdd; 14 | 15 | @override 16 | void didChangeDependencies() { 17 | super.didChangeDependencies(); 18 | print('c'); 19 | } 20 | 21 | @override 22 | void didUpdateWidget(covariant StatefullLifeCycleLearn oldWidget) { 23 | super.didUpdateWidget(oldWidget); 24 | if (oldWidget.message != widget.message) { 25 | _message = widget.message; 26 | _computeName(); 27 | setState(() {}); 28 | } 29 | } 30 | 31 | @override 32 | void dispose() { 33 | super.dispose(); 34 | _message = ""; 35 | } 36 | 37 | // Mesaj tekse yanina tek yoksa cift yaz 38 | 39 | @override 40 | void initState() { 41 | super.initState(); 42 | _message = widget.message; 43 | _isOdd = widget.message.length.isOdd; 44 | _computeName(); 45 | print('a'); 46 | } 47 | 48 | void _computeName() { 49 | if (_isOdd) { 50 | _message += " Cift"; 51 | } else { 52 | _message += " Tek"; 53 | } 54 | } 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | return Scaffold( 59 | appBar: AppBar( 60 | title: Text(_message), 61 | ), 62 | body: _isOdd 63 | ? TextButton(onPressed: () {}, child: Text(_message)) 64 | : ElevatedButton( 65 | onPressed: () { 66 | setState(() { 67 | _message = "a"; 68 | }); 69 | }, 70 | child: Text(_message)), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /ios/Runner/en.lproj/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Full Learn 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_full_learn 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSApplicationQueriesSchemes 26 | 27 | https 28 | http 29 | 30 | LSRequiresIPhoneOS 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | NSAppleMusicUsageDescription 37 | media 38 | NSPhotoLibraryUsageDescription 39 | photo 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UIViewControllerBasedStatusBarAppearance 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/303/mobx_image_picker/viewModel/image_upload_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dio/dio.dart'; 4 | import '../model/image_upload_response.dart'; 5 | import '../service/image_upload_service.dart'; 6 | import 'package:image_picker/image_picker.dart'; 7 | import 'package:mobx/mobx.dart'; 8 | part 'image_upload_view_model.g.dart'; 9 | 10 | class ImageUploadViewModel = _ImageUploadViewModelBase with _$ImageUploadViewModel; 11 | 12 | abstract class _ImageUploadViewModelBase with Store { 13 | static const _baseUrl = 'https://firebasestorage.googleapis.com/v0/b/fluttertr-ead5c.appspot.com/o/'; 14 | @observable 15 | String imageUrl = ''; 16 | 17 | @observable 18 | File? file; 19 | @observable 20 | bool isLoading = false; 21 | 22 | @observable 23 | String downloadText = ''; 24 | 25 | ImageUploadService imageUploadService = ImageUploadService(Dio(BaseOptions(baseUrl: _baseUrl))); 26 | 27 | @action 28 | void changeLoading() { 29 | isLoading = !isLoading; 30 | } 31 | 32 | @action 33 | void updateDownloadText(int send, int total) { 34 | downloadText = '$send / $total'; 35 | } 36 | 37 | @action 38 | void uploadImageUrl(ImageUploadResponse? response) { 39 | if (response == null) return; 40 | imageUrl = 'https://firebasestorage.googleapis.com/v0/b/fluttertr-ead5c.appspot.com/o/' + 41 | (response.name?.replaceFirst('/', '%2F') ?? ''); 42 | } 43 | 44 | void init() {} 45 | 46 | @action 47 | void saveLocalFile(XFile? file) { 48 | if (file == null) return; 49 | this.file = File(file.path); 50 | } 51 | 52 | Future saveDataToService() async { 53 | if (file == null) return; 54 | changeLoading(); 55 | final response = await imageUploadService.uploadToImageServer( 56 | await file!.readAsBytes(), 57 | 'vb', 58 | onSendProgress: (sent, total) { 59 | updateDownloadText(sent, total); 60 | }, 61 | ); 62 | uploadImageUrl(response); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /lib/101/card_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardLearn extends StatelessWidget { 4 | const CardLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | Card( 13 | margin: ProjectMargins.cardMargin, 14 | child: const SizedBox( 15 | height: 100, 16 | width: 300, 17 | child: Center(child: Text('Ali')), 18 | ), 19 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), 20 | ), 21 | Card( 22 | margin: ProjectMargins.cardMargin, 23 | child: const SizedBox( 24 | height: 100, 25 | width: 300, 26 | child: Center(child: Text('Ali')), 27 | ), 28 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), 29 | ), 30 | _CustomCard( 31 | child: const SizedBox( 32 | height: 100, 33 | width: 300, 34 | child: Center(child: Text('Ali')), 35 | )) 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | 42 | class ProjectMargins { 43 | static const cardMargin = EdgeInsets.all(10); 44 | static final roundedRectangleBorder = RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)); 45 | } 46 | 47 | // Borders 48 | // StadiumBorder(),CircleBorder(),RoundedRectangeBorder() 49 | 50 | class _CustomCard extends StatelessWidget { 51 | _CustomCard({Key? key, required this.child}) : super(key: key); 52 | final Widget child; 53 | final roundedRectangleBorder = RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)); 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return Card( 58 | margin: ProjectMargins.cardMargin, 59 | child: child, 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Full Learn 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_full_learn 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSApplicationQueriesSchemes 26 | 27 | https 28 | http 29 | 30 | LSRequiresIPhoneOS 31 | 32 | NSCameraUsageDescription 33 | I want use your camere for image uplad 34 | NSPhotoLibraryUsageDescription 35 | hllo 36 | UILaunchStoryboardName 37 | LaunchScreen 38 | UIMainStoryboardFile 39 | Main 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UIViewControllerBasedStatusBarAppearance 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/Runner/tr.lproj/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Full Learn 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_full_learn 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | NSPhotoLibraryUsageDescription 26 | photo 27 | LSApplicationQueriesSchemes 28 | 29 | https 30 | http 31 | 32 | LSRequiresIPhoneOS 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | NSCameraUsageDescription 39 | Kamerayi kullanmaya .. 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UIViewControllerBasedStatusBarAppearance 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/101/page_view_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'icon_learn.dart'; 3 | import 'image_learn.dart'; 4 | import 'stack_learn.dart'; 5 | 6 | class PageViewLearn extends StatefulWidget { 7 | const PageViewLearn({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _PageViewLearnState(); 11 | } 12 | 13 | class _PageViewLearnState extends State { 14 | final _pageController = PageController(viewportFraction: 0.7); 15 | 16 | int _currentPageIndex = 0; 17 | void _updatePageIndex(int index) { 18 | setState(() { 19 | _currentPageIndex = index; 20 | }); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | floatingActionButton: Row( 27 | children: [ 28 | Padding( 29 | padding: const EdgeInsets.only(left: 20), 30 | child: Text(_currentPageIndex.toString()), 31 | ), 32 | const Spacer(), 33 | FloatingActionButton( 34 | onPressed: () { 35 | _pageController.previousPage(duration: _DurationUtility._durationLow, curve: Curves.slowMiddle); 36 | }, 37 | child: const Icon(Icons.chevron_left), 38 | ), 39 | FloatingActionButton( 40 | onPressed: () { 41 | _pageController.nextPage(duration: _DurationUtility._durationLow, curve: Curves.slowMiddle); 42 | }, 43 | child: const Icon(Icons.chevron_right), 44 | ), 45 | ], 46 | ), 47 | appBar: AppBar(), 48 | body: PageView( 49 | padEnds: false, 50 | controller: _pageController, 51 | onPageChanged: _updatePageIndex, 52 | children: [ 53 | const ImageLaern(), 54 | IconLearnView(), 55 | const StackLearn(), 56 | ], 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class _DurationUtility { 63 | static const _durationLow = Duration(seconds: 1); 64 | } 65 | -------------------------------------------------------------------------------- /lib/101/custom_widget_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomWidgetLearn extends StatelessWidget { 4 | const CustomWidgetLearn({Key? key}) : super(key: key); 5 | final String title = 'Food'; 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | crossAxisAlignment: CrossAxisAlignment.start, 12 | children: [ 13 | Center( 14 | child: Padding( 15 | padding: const EdgeInsets.symmetric(horizontal: 10), 16 | child: SizedBox( 17 | width: MediaQuery.of(context).size.width, 18 | child: CustomFootButton( 19 | title: title, 20 | onPressed: () {}, 21 | )), 22 | )), 23 | const SizedBox(height: 100), 24 | CustomFootButton(title: title, onPressed: () {}), 25 | ], 26 | ), 27 | ); 28 | } 29 | } 30 | 31 | class _ColorsUtility { 32 | final Color redColor = Colors.red; 33 | final Color white = Colors.white; 34 | } 35 | 36 | class _PaddingUtility { 37 | final EdgeInsets normalPadding = const EdgeInsets.all(8.0); 38 | final EdgeInsets normal2xPadding = const EdgeInsets.all(16.0); 39 | } 40 | 41 | class CustomFootButton extends StatelessWidget with _ColorsUtility, _PaddingUtility { 42 | CustomFootButton({Key? key, required this.title, required this.onPressed}) : super(key: key); 43 | final String title; 44 | final void Function() onPressed; 45 | @override 46 | Widget build(BuildContext context) { 47 | return ElevatedButton( 48 | style: ElevatedButton.styleFrom(primary: redColor, shape: const StadiumBorder()), 49 | onPressed: onPressed, 50 | child: Padding( 51 | padding: normal2xPadding, 52 | child: Text( 53 | title, 54 | style: Theme.of(context).textTheme.subtitle2?.copyWith(color: white, fontWeight: FontWeight.bold), 55 | ), 56 | )); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /lib/303/mobx_image_picker/model/image_upload_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'image_upload_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ImageUploadResponse _$ImageUploadResponseFromJson(Map json) => 10 | ImageUploadResponse( 11 | name: json['name'] as String?, 12 | bucket: json['bucket'] as String?, 13 | generation: json['generation'] as String?, 14 | metageneration: json['metageneration'] as String?, 15 | contentType: json['contentType'] as String?, 16 | timeCreated: json['timeCreated'] as String?, 17 | updated: json['updated'] as String?, 18 | storageClass: json['storageClass'] as String?, 19 | size: json['size'] as String?, 20 | md5Hash: json['md5Hash'] as String?, 21 | contentEncoding: json['contentEncoding'] as String?, 22 | contentDisposition: json['contentDisposition'] as String?, 23 | crc32c: json['crc32c'] as String?, 24 | etag: json['etag'] as String?, 25 | downloadTokens: json['downloadTokens'] as String?, 26 | ); 27 | 28 | Map _$ImageUploadResponseToJson( 29 | ImageUploadResponse instance) => 30 | { 31 | 'name': instance.name, 32 | 'bucket': instance.bucket, 33 | 'generation': instance.generation, 34 | 'metageneration': instance.metageneration, 35 | 'contentType': instance.contentType, 36 | 'timeCreated': instance.timeCreated, 37 | 'updated': instance.updated, 38 | 'storageClass': instance.storageClass, 39 | 'size': instance.size, 40 | 'md5Hash': instance.md5Hash, 41 | 'contentEncoding': instance.contentEncoding, 42 | 'contentDisposition': instance.contentDisposition, 43 | 'crc32c': instance.crc32c, 44 | 'etag': instance.etag, 45 | 'downloadTokens': instance.downloadTokens, 46 | }; 47 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Full Learn 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_full_learn 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSApplicationQueriesSchemes 26 | 27 | https 28 | http 29 | 30 | LSRequiresIPhoneOS 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | NSCameraUsageDescription 35 | I want use your camere for image uplad 36 | UIMainStoryboardFile 37 | Main 38 | NSAppleMusicUsageDescription 39 | We need to 40 | NSPhotoLibraryUsageDescription 41 | asdasd 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | 46 | UISupportedInterfaceOrientations~ipad 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | UIViewControllerBasedStatusBarAppearance 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /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 flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.flutter_full_learn" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /lib/101/text_learn_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TextLearnView extends StatelessWidget { 4 | TextLearnView({Key? key, this.userName}) : super(key: key); 5 | final String name = 'veli'; 6 | 7 | final String? userName; 8 | 9 | final ProjectKeys keys = ProjectKeys(); 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | body: Center( 14 | child: Column( 15 | mainAxisAlignment: MainAxisAlignment.center, 16 | children: [ 17 | Text( 18 | 'Welcome $name ${name.length}', 19 | maxLines: 2, 20 | overflow: TextOverflow.ellipsis, 21 | textAlign: TextAlign.right, 22 | style: const TextStyle( 23 | wordSpacing: 2, 24 | decoration: TextDecoration.underline, 25 | fontStyle: FontStyle.italic, 26 | letterSpacing: 2, 27 | color: Colors.lime, 28 | fontSize: 16, 29 | fontWeight: FontWeight.w600), 30 | ), 31 | Text( 32 | 'Hello $name ${name.length}', 33 | maxLines: 2, 34 | overflow: TextOverflow.ellipsis, 35 | textAlign: TextAlign.right, 36 | style: ProjectStyles.welcomeStyle, 37 | ), 38 | Text( 39 | 'Hello $name ${name.length}', 40 | maxLines: 2, 41 | overflow: TextOverflow.ellipsis, 42 | textAlign: TextAlign.right, 43 | style: Theme.of(context).textTheme.headline5?.copyWith(color: ProjectColors.welcomeColor), 44 | ), 45 | Text(userName ?? ''), 46 | Text(keys.welcome), 47 | ], 48 | )), 49 | ); 50 | } 51 | } 52 | 53 | class ProjectStyles { 54 | static TextStyle welcomeStyle = const TextStyle( 55 | wordSpacing: 2, 56 | decoration: TextDecoration.underline, 57 | fontStyle: FontStyle.italic, 58 | letterSpacing: 2, 59 | color: Colors.lime, 60 | fontSize: 16, 61 | fontWeight: FontWeight.w600); 62 | } 63 | 64 | class ProjectColors { 65 | static Color welcomeColor = Colors.red; 66 | } 67 | 68 | class ProjectKeys { 69 | final String welcome = "Merhaba"; 70 | } 71 | -------------------------------------------------------------------------------- /lib/101/navigation_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'navigate_detail_learn.dart'; 4 | 5 | class NavigationLearn extends StatefulWidget { 6 | const NavigationLearn({Key? key}) : super(key: key); 7 | 8 | @override 9 | State createState() => _NavigationLearnState(); 10 | } 11 | 12 | class _NavigationLearnState extends State with NavigatorManager { 13 | List selectedItems = []; 14 | 15 | void addSelected(int index, bool isAdd) { 16 | setState(() { 17 | isAdd ? selectedItems.add(index) : selectedItems.remove(index); 18 | }); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | body: ListView.builder( 25 | itemBuilder: (context, index) { 26 | return TextButton( 27 | onPressed: () async { 28 | final response = await navigateToWidgetNormal( 29 | context, NavigateDetailLearnDart(isOkey: selectedItems.contains(index))); 30 | 31 | if (response is bool) { 32 | addSelected(index, response); 33 | } 34 | }, 35 | child: Padding( 36 | padding: const EdgeInsets.all(8.0), 37 | child: Placeholder(color: selectedItems.contains(index) ? Colors.green : Colors.red), 38 | ), 39 | ); 40 | }, 41 | ), 42 | floatingActionButton: FloatingActionButton( 43 | child: const Icon(Icons.navigation_rounded), 44 | onPressed: () async {}, 45 | ), 46 | ); 47 | } 48 | } 49 | 50 | mixin NavigatorManager { 51 | void navigateToWidget(BuildContext context, Widget widget) { 52 | Navigator.of(context).push( 53 | MaterialPageRoute( 54 | builder: (context) { 55 | return widget; 56 | }, 57 | fullscreenDialog: true, 58 | settings: const RouteSettings()), 59 | ); 60 | } 61 | 62 | Future navigateToWidgetNormal(BuildContext context, Widget widget) { 63 | return Navigator.of(context).push( 64 | MaterialPageRoute( 65 | builder: (context) { 66 | return widget; 67 | }, 68 | settings: const RouteSettings()), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/demos/color_demos_view.dart: -------------------------------------------------------------------------------- 1 | // Bir ekran olacak 2 | // Bu ekranda 3 button ve bunlara basinca renk degisimi olacak 3 | // Secili olan button selected icon olsun 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class ColorDemos extends StatefulWidget { 8 | const ColorDemos({Key? key, required this.initialColor}) : super(key: key); 9 | final Color? initialColor; 10 | @override 11 | State createState() => _ColorDemosState(); 12 | } 13 | 14 | class _ColorDemosState extends State { 15 | Color? _backgroundColor; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | _backgroundColor = widget.initialColor ?? Colors.transparent; 21 | } 22 | 23 | @override 24 | void didUpdateWidget(covariant ColorDemos oldWidget) { 25 | super.didUpdateWidget(oldWidget); 26 | if (widget.initialColor != _backgroundColor && widget.initialColor != null) { 27 | changeBackgroundColor(widget.initialColor!); 28 | } 29 | } 30 | 31 | void changeBackgroundColor(Color color) { 32 | setState(() { 33 | _backgroundColor = color; 34 | }); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | backgroundColor: _backgroundColor, 41 | bottomNavigationBar: BottomNavigationBar(onTap: _colorOnTap, items: const [ 42 | BottomNavigationBarItem(icon: _ColorContainer(color: Colors.red), label: 'Red'), 43 | BottomNavigationBarItem(icon: _ColorContainer(color: Colors.yellow), label: 'Yellow'), 44 | BottomNavigationBarItem(icon: _ColorContainer(color: Colors.blue), label: 'Blue'), 45 | ]), 46 | ); 47 | } 48 | 49 | void _colorOnTap(int value) { 50 | if (value == _MyColors.red.index) { 51 | changeBackgroundColor(Colors.red); 52 | } else if (value == _MyColors.yellow.index) { 53 | changeBackgroundColor(Colors.yellow); 54 | } else if (value == _MyColors.blue.index) { 55 | changeBackgroundColor(Colors.blue); 56 | } 57 | } 58 | } 59 | 60 | enum _MyColors { red, yellow, blue } 61 | 62 | class _ColorContainer extends StatelessWidget { 63 | const _ColorContainer({ 64 | Key? key, 65 | required this.color, 66 | }) : super(key: key); 67 | final Color color; 68 | @override 69 | Widget build(BuildContext context) { 70 | return Container(color: color, width: 10, height: 10); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/101/text_field_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | import '../product/language/language_items.dart'; 5 | 6 | class TextFieldLearn extends StatefulWidget { 7 | const TextFieldLearn({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _TextFieldLearnState(); 11 | } 12 | 13 | class _TextFieldLearnState extends State { 14 | final key = GlobalKey(); 15 | 16 | FocusNode focusNodeTextFieldOne = FocusNode(); 17 | FocusNode focusNodeTextFieldTwo = FocusNode(); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: AppBar(), 23 | body: Form( 24 | child: Column( 25 | children: [ 26 | TextField( 27 | maxLength: 20, 28 | buildCounter: (BuildContext context, {int? currentLength, bool? isFocused, int? maxLength}) { 29 | return _animatedContainer(currentLength); 30 | }, 31 | keyboardType: TextInputType.emailAddress, 32 | autofocus: true, 33 | autofillHints: const [AutofillHints.email], 34 | focusNode: focusNodeTextFieldOne, 35 | inputFormatters: [TextProjectInputFormmater()._formmatter], 36 | textInputAction: TextInputAction.next, 37 | decoration: _InputDecarotor().emailInput, 38 | ), 39 | TextFormField( 40 | focusNode: focusNodeTextFieldTwo, 41 | minLines: 2, 42 | maxLines: 4, 43 | ), 44 | ], 45 | ), 46 | ), 47 | ); 48 | } 49 | 50 | AnimatedContainer _animatedContainer(int? currentLength) { 51 | return AnimatedContainer( 52 | key: key, 53 | duration: const Duration(seconds: 1), 54 | height: 10, 55 | width: 10.0 * (currentLength ?? 0), 56 | color: Colors.green, 57 | ); 58 | } 59 | } 60 | 61 | class TextProjectInputFormmater { 62 | final _formmatter = TextInputFormatter.withFunction((oldValue, newValue) { 63 | if (newValue.text == "a") { 64 | return oldValue; 65 | } 66 | return oldValue; 67 | }); 68 | } 69 | 70 | class _InputDecarotor { 71 | final emailInput = const InputDecoration( 72 | prefixIcon: Icon(Icons.mail), 73 | border: OutlineInputBorder(), 74 | labelText: LanguageItems.mailTitle, 75 | ); 76 | } 77 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - device_info (0.0.1): 3 | - Flutter 4 | - Flutter (1.0.0) 5 | - flutter_secure_storage (3.3.1): 6 | - Flutter 7 | - image_picker_ios (0.0.1): 8 | - Flutter 9 | - package_info_plus (0.4.5): 10 | - Flutter 11 | - path_provider_ios (0.0.1): 12 | - Flutter 13 | - share (0.0.1): 14 | - Flutter 15 | - shared_preferences_ios (0.0.1): 16 | - Flutter 17 | - url_launcher_ios (0.0.1): 18 | - Flutter 19 | 20 | DEPENDENCIES: 21 | - device_info (from `.symlinks/plugins/device_info/ios`) 22 | - Flutter (from `Flutter`) 23 | - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) 24 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) 25 | - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) 26 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 27 | - share (from `.symlinks/plugins/share/ios`) 28 | - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) 29 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) 30 | 31 | EXTERNAL SOURCES: 32 | device_info: 33 | :path: ".symlinks/plugins/device_info/ios" 34 | Flutter: 35 | :path: Flutter 36 | flutter_secure_storage: 37 | :path: ".symlinks/plugins/flutter_secure_storage/ios" 38 | image_picker_ios: 39 | :path: ".symlinks/plugins/image_picker_ios/ios" 40 | package_info_plus: 41 | :path: ".symlinks/plugins/package_info_plus/ios" 42 | path_provider_ios: 43 | :path: ".symlinks/plugins/path_provider_ios/ios" 44 | share: 45 | :path: ".symlinks/plugins/share/ios" 46 | shared_preferences_ios: 47 | :path: ".symlinks/plugins/shared_preferences_ios/ios" 48 | url_launcher_ios: 49 | :path: ".symlinks/plugins/url_launcher_ios/ios" 50 | 51 | SPEC CHECKSUMS: 52 | device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 53 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 54 | flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec 55 | image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb 56 | package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e 57 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 58 | share: 0b2c3e82132f5888bccca3351c504d0003b3b410 59 | shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad 60 | url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de 61 | 62 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 63 | 64 | COCOAPODS: 1.11.3 65 | -------------------------------------------------------------------------------- /test/list_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:collection/collection.dart'; 2 | import 'package:flutter_full_learn/303/generic_learn.dart'; 3 | import 'package:flutter_full_learn/product/widget/card/high_card.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | void main() { 7 | setUp(() {}); 8 | test('List best of', () { 9 | List users = [ 10 | const GenericUser('vb1', '11', 5), 11 | const GenericUser('vb2', '11', 10), 12 | const GenericUser('vb3', '11', 20) 13 | ]; 14 | 15 | List highCards = users.map((e) { 16 | return HighCard(items: e.name.split('').toList()); 17 | }).toList(); 18 | 19 | try { 20 | final response = users.singleWhere( 21 | (element) => element.findUserName('x'), 22 | orElse: () { 23 | return const GenericUser('name', 'id', 15); 24 | }, 25 | ); 26 | 27 | print(response.name); 28 | } catch (e) { 29 | print(e); 30 | } 31 | 32 | print('${users.where((element) => element.money > 500)}'); 33 | 34 | users.addAll([const GenericUser('name', 'id', 5)]); 35 | users.lastWhere((element) => element.id == '5'); 36 | 37 | users.take(5); 38 | users.remove(const GenericUser('vb1', '11', 5)); 39 | users.removeAt(2); 40 | users.removeWhere((element) => element.id == 11); 41 | 42 | users.indexOf(const GenericUser('vb1', '11', 5)); 43 | final result = users.indexWhere((element) => element.id == '11'); 44 | if (result >= 0) { 45 | users[result] = const GenericUser('a', 'b', 15); 46 | } 47 | 48 | users.expand((element) => [const GenericUser('a', '1 ', 15)]); 49 | // users.map((e) => e.money).where((element) => element > 5); 50 | }); 51 | 52 | test('List best of with collection', () { 53 | List users = [ 54 | const GenericUser('vb1', '11', 5), 55 | const GenericUser('vb2', '11', 10), 56 | const GenericUser('vb3', '11', 20) 57 | ]; 58 | 59 | final response = users.singleWhereOrNull( 60 | (element) => element.findUserName('x'), 61 | ); 62 | 63 | users.lastWhereOrNull((element) => element.id == '5'); 64 | 65 | users.lastOrNull; 66 | users.forEachIndexed((index, element) {}); 67 | users.sample(3); 68 | print(users.first == const GenericUser('vb1', '11', 5)); 69 | print(users.contains(const GenericUser('vb1', '11', 5))); 70 | 71 | users.any((element) => element.money > 5); 72 | 73 | print(response); 74 | }); 75 | } 76 | -------------------------------------------------------------------------------- /lib/101/button_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ButtonLearn extends StatelessWidget { 4 | const ButtonLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar(), 10 | body: Column( 11 | children: [ 12 | TextButton( 13 | child: Text('Save', style: Theme.of(context).textTheme.subtitle1), 14 | style: ButtonStyle(backgroundColor: MaterialStateProperty.resolveWith((states) { 15 | if (states.contains(MaterialState.pressed)) { 16 | return Colors.green; 17 | } 18 | return Colors.white; 19 | })), 20 | onPressed: () {}, 21 | ), 22 | const ElevatedButton(onPressed: null, child: Text('data')), 23 | IconButton(onPressed: () {}, icon: const Icon(Icons.abc_rounded)), 24 | FloatingActionButton( 25 | onPressed: () { 26 | // servise istek at 27 | // sayfanin rengini duzenle 28 | }, 29 | child: const Icon(Icons.add), 30 | ), 31 | OutlinedButton( 32 | style: OutlinedButton.styleFrom(backgroundColor: Colors.red, padding: const EdgeInsets.all(10)), 33 | onPressed: () {}, 34 | child: const SizedBox(width: 200, child: Text('data'))), 35 | OutlinedButton.icon(onPressed: () {}, icon: const Icon(Icons.abc), label: const Text('data')), 36 | InkWell( 37 | onTap: () {}, 38 | child: const Text('custom'), 39 | ), 40 | Container( 41 | height: 200, 42 | color: Colors.white, 43 | ), 44 | const SizedBox(height: 10), 45 | ElevatedButton( 46 | style: ElevatedButton.styleFrom( 47 | primary: Colors.black, 48 | shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20)))), 49 | onPressed: () {}, 50 | child: Padding( 51 | padding: const EdgeInsets.only(top: 20, bottom: 20, right: 40, left: 40), 52 | child: Text( 53 | 'Place Bid', 54 | style: Theme.of(context).textTheme.headline5, 55 | ), 56 | )) 57 | ], 58 | ), 59 | ); 60 | } 61 | } 62 | 63 | // Borders: 64 | // CircleBorder(), RoundedRectangleBorder() -------------------------------------------------------------------------------- /lib/404/bloc/feature/login/view/login_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import '../../../../../202/image_learn_202.dart'; 4 | import '../cubit/login_cubit_state.dart'; 5 | import '../service/login_service.dart'; 6 | import '../../../../../product/service/vexana_network_manager.dart'; 7 | import 'package:kartal/kartal.dart'; 8 | 9 | import '../cubit/login_cubit.dart'; 10 | part './login_view.g.dart'; 11 | 12 | class LoginView extends StatefulWidget { 13 | const LoginView({Key? key}) : super(key: key); 14 | 15 | @override 16 | State createState() => _LoginViewState(); 17 | } 18 | 19 | class _LoginViewState extends State { 20 | final _loginText = 'Login'; 21 | final GlobalKey _formLoginKey = GlobalKey(); 22 | 23 | final TextEditingController _emailController = TextEditingController(); 24 | final TextEditingController _passwordController = TextEditingController(); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return BlocProvider( 29 | create: (context) => LoginCubit(LoginService(VexanaNetworkManager())), 30 | child: Scaffold( 31 | appBar: AppBar( 32 | title: BlocBuilder( 33 | builder: (context, state) { 34 | return state.isLoading 35 | ? CircularProgressIndicator(color: context.colorScheme.secondary) 36 | : const SizedBox(); 37 | }, 38 | ), 39 | ), 40 | body: Form( 41 | key: _formLoginKey, 42 | autovalidateMode: AutovalidateMode.always, 43 | child: Padding( 44 | padding: const PagePadding.all(), 45 | child: Column( 46 | children: [ 47 | _LoginEmailFields( 48 | controller: _emailController, 49 | passowrdController: _passwordController, 50 | ), 51 | _LoginButton( 52 | formLoginKey: _formLoginKey, 53 | emailController: _emailController, 54 | passwordController: _passwordController, 55 | loginText: _loginText) 56 | ], 57 | ), 58 | ), 59 | ), 60 | ), 61 | ); 62 | } 63 | } 64 | 65 | class PagePadding extends EdgeInsets { 66 | const PagePadding.all() : super.all(20); 67 | const PagePadding.bottom() : super.only(bottom: 10); 68 | } 69 | -------------------------------------------------------------------------------- /test/vexana/model_unkown.dart: -------------------------------------------------------------------------------- 1 | import 'package:vexana/vexana.dart'; 2 | 3 | class UnkownModel extends INetworkModel { 4 | int? page; 5 | int? perPage; 6 | int? total; 7 | int? totalPages; 8 | List? data; 9 | Support? support; 10 | 11 | UnkownModel({this.page, this.perPage, this.total, this.totalPages, this.data, this.support}); 12 | 13 | UnkownModel.fromJson(Map json) { 14 | page = json['page']; 15 | perPage = json['per_page']; 16 | total = json['total']; 17 | totalPages = json['total_pages']; 18 | if (json['data'] != null) { 19 | data = []; 20 | json['data'].forEach((v) { 21 | data!.add(Data.fromJson(v)); 22 | }); 23 | } 24 | support = json['support'] != null ? Support.fromJson(json['support']) : null; 25 | } 26 | 27 | @override 28 | Map toJson() { 29 | final Map data = {}; 30 | data['page'] = page; 31 | data['per_page'] = perPage; 32 | data['total'] = total; 33 | data['total_pages'] = totalPages; 34 | if (this.data != null) { 35 | data['data'] = this.data!.map((v) => v.toJson()).toList(); 36 | } 37 | if (support != null) { 38 | data['support'] = support!.toJson(); 39 | } 40 | return data; 41 | } 42 | 43 | @override 44 | UnkownModel fromJson(Map json) { 45 | return UnkownModel.fromJson(json); 46 | } 47 | } 48 | 49 | class Data { 50 | int? id; 51 | String? name; 52 | int? year; 53 | String? color; 54 | String? pantoneValue; 55 | 56 | Data({this.id, this.name, this.year, this.color, this.pantoneValue}); 57 | 58 | Data.fromJson(Map json) { 59 | id = json['id']; 60 | name = json['name']; 61 | year = json['year']; 62 | color = json['color']; 63 | pantoneValue = json['pantone_value']; 64 | } 65 | 66 | Map toJson() { 67 | final Map data = {}; 68 | data['id'] = id; 69 | data['name'] = name; 70 | data['year'] = year; 71 | data['color'] = color; 72 | data['pantone_value'] = pantoneValue; 73 | return data; 74 | } 75 | } 76 | 77 | class Support { 78 | String? url; 79 | String? text; 80 | 81 | Support({this.url, this.text}); 82 | 83 | Support.fromJson(Map json) { 84 | url = json['url']; 85 | text = json['text']; 86 | } 87 | 88 | Map toJson() { 89 | final Map data = {}; 90 | data['url'] = url; 91 | data['text'] = text; 92 | return data; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/202/cache/shared_list_cache.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'shared_learn_cache.dart'; 3 | import 'shared_manager.dart'; 4 | import 'user_cache/user_cache_manager.dart'; 5 | import 'user_model.dart'; 6 | 7 | class SharedListCache extends StatefulWidget { 8 | const SharedListCache({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _SharedListCacheState(); 12 | } 13 | 14 | class _SharedListCacheState extends LoadingStatefull { 15 | late final UserCacheManager userCacheManager; 16 | List _users = []; 17 | @override 18 | void initState() { 19 | super.initState(); 20 | initalazeAndSave(); 21 | } 22 | 23 | Future initalazeAndSave() async { 24 | changeLoading(); 25 | final SharedManager manager = SharedManager(); 26 | 27 | await manager.init(); 28 | userCacheManager = UserCacheManager(manager); 29 | _users = userCacheManager.getItems() ?? []; 30 | changeLoading(); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Scaffold( 36 | appBar: AppBar( 37 | centerTitle: true, 38 | title: isLoading ? CircularProgressIndicator(color: Theme.of(context).scaffoldBackgroundColor) : null, 39 | actions: isLoading 40 | ? null 41 | : [ 42 | IconButton( 43 | onPressed: () async { 44 | changeLoading(); 45 | await userCacheManager.saveItems(_users); 46 | changeLoading(); 47 | }, 48 | icon: const Icon(Icons.download_for_offline_outlined)), 49 | IconButton(onPressed: () {}, icon: const Icon(Icons.remove_circle_outline)), 50 | ], 51 | ), 52 | body: _UserListView(users: _users), 53 | ); 54 | } 55 | } 56 | 57 | class _UserListView extends StatelessWidget { 58 | const _UserListView({ 59 | Key? key, 60 | required this.users, 61 | }) : super(key: key); 62 | 63 | final List users; 64 | @override 65 | Widget build(BuildContext context) { 66 | return ListView.builder( 67 | itemCount: users.length, 68 | itemBuilder: (BuildContext context, int index) { 69 | return Card( 70 | child: ListTile( 71 | title: Text(users[index].name ?? ''), 72 | subtitle: Text(users[index].description ?? ''), 73 | trailing: Text(users[index].url ?? '', 74 | style: Theme.of(context).textTheme.subtitle1?.copyWith(decoration: TextDecoration.underline)), 75 | ), 76 | ); 77 | }, 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/202/alert_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AlertLearn extends StatefulWidget { 4 | const AlertLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _AlertLearnState(); 8 | } 9 | 10 | class _AlertLearnState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | floatingActionButton: FloatingActionButton(onPressed: () async { 15 | final respnse = await showDialog( 16 | context: context, 17 | builder: (context) { 18 | return const _ImageZoomDialog(); 19 | }); 20 | }), 21 | appBar: AppBar(), 22 | ); 23 | } 24 | } 25 | 26 | class _UpdateDialog extends StatelessWidget { 27 | const _UpdateDialog({ 28 | Key? key, 29 | }) : super(key: key); 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return AlertDialog( 34 | title: const Text('Version update!'), 35 | actions: [ 36 | ElevatedButton( 37 | onPressed: () { 38 | Navigator.pop(context, true); 39 | }, 40 | child: const Text('Update2'), 41 | ), 42 | TextButton( 43 | onPressed: () { 44 | Navigator.pop(context); 45 | }, 46 | child: const Text('Close')) 47 | ], 48 | ); 49 | } 50 | } 51 | 52 | class Keys { 53 | static const versionUpdate = 'Version update'; 54 | } 55 | 56 | class UpdateDialog extends AlertDialog { 57 | UpdateDialog({Key? key, required BuildContext context}) 58 | : super( 59 | key: key, 60 | title: const Text(Keys.versionUpdate), 61 | actions: [ 62 | ElevatedButton( 63 | onPressed: () { 64 | Navigator.pop(context, true); 65 | }, 66 | child: const Text('Update2'), 67 | ), 68 | TextButton( 69 | onPressed: () { 70 | Navigator.pop(context); 71 | }, 72 | child: const Text('Close')) 73 | ], 74 | ); 75 | } 76 | 77 | class _ImageZoomDialog extends StatelessWidget { 78 | const _ImageZoomDialog({ 79 | Key? key, 80 | }) : super(key: key); 81 | final String _url = 'https://picsum.photos/200'; 82 | @override 83 | Widget build(BuildContext context) { 84 | return Dialog( 85 | insetPadding: EdgeInsets.zero, 86 | child: InteractiveViewer( 87 | child: Image.network( 88 | _url, 89 | fit: BoxFit.cover, 90 | height: MediaQuery.of(context).size.height * 0.6, 91 | ), 92 | ), 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/202/model_learn.dart: -------------------------------------------------------------------------------- 1 | class PostModel1 { 2 | int? userId; 3 | int? id; 4 | String? title; 5 | String? body; 6 | } 7 | 8 | class PostModel2 { 9 | int userId; 10 | int id; 11 | String title; 12 | String body; 13 | 14 | PostModel2(this.userId, this.id, this.title, this.body); 15 | } 16 | 17 | class PostModel3 { 18 | final int userId; 19 | final int id; 20 | final String title; 21 | final String body; 22 | 23 | PostModel3(this.userId, this.id, this.title, this.body); 24 | } 25 | 26 | class PostModel4 { 27 | final int userId; 28 | final int id; 29 | final String title; 30 | final String body; 31 | 32 | PostModel4({required this.userId, required this.id, required this.title, required this.body}); 33 | } 34 | 35 | class PostModel5 { 36 | final int _userId; 37 | final int _id; 38 | final String _title; 39 | final String _body; 40 | 41 | int get userId => _userId; 42 | PostModel5({ 43 | required int userId, 44 | required int id, 45 | required String title, 46 | required String body, 47 | }) : _userId = userId, 48 | _id = id, 49 | _title = title, 50 | _body = body; 51 | } 52 | 53 | class PostModel6 { 54 | late final int _userId; 55 | late final int _id; 56 | late final String _title; 57 | late final String _body; 58 | 59 | PostModel6({ 60 | required int userId, 61 | required int id, 62 | required String title, 63 | required String body, 64 | }) { 65 | _userId = userId; 66 | _id = id; 67 | _title = title; 68 | _body = body; 69 | } 70 | } 71 | 72 | class PostModel7 { 73 | late final int _userId; 74 | late final int _id; 75 | late final String _title; 76 | late final String _body; 77 | 78 | PostModel7({ 79 | int userId = 0, 80 | int id = 0, 81 | String title = '', 82 | String body = '', 83 | }) { 84 | _userId = userId; 85 | _id = id; 86 | _title = title; 87 | _body = body; 88 | } 89 | } 90 | 91 | class PostModel8 { 92 | final int? userId; 93 | final int? id; 94 | final String? title; 95 | String? body; 96 | 97 | PostModel8({this.userId, this.id, this.title, this.body}); 98 | 99 | void updateBody(String? data) { 100 | if (data != null && data.isNotEmpty) { 101 | body = data; 102 | } 103 | } 104 | 105 | PostModel8 copyWith({ 106 | int? userId, 107 | int? id, 108 | String? title, 109 | String? body, 110 | }) { 111 | return PostModel8( 112 | userId: userId ?? this.userId, 113 | id: id ?? this.id, 114 | title: title ?? this.title, 115 | body: body ?? this.body, 116 | ); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /lib/303/feed_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../202/service/post_service.dart'; 3 | 4 | import '../202/service/post_model.dart'; 5 | 6 | class FeedView extends StatefulWidget { 7 | const FeedView({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _FeedViewState(); 11 | } 12 | 13 | class _FeedViewState extends State with AutomaticKeepAliveClientMixin { 14 | final IPostService _postService = PostService(); 15 | late final Future?> _itemsFuture; 16 | @override 17 | void initState() { 18 | // TODO: implement initState 19 | super.initState(); 20 | _itemsFuture = _postService.fetchPostItemsAdvance(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | super.build(context); 26 | return Scaffold( 27 | floatingActionButtonLocation: FloatingActionButtonLocation.startTop, 28 | floatingActionButton: FloatingActionButton( 29 | onPressed: () { 30 | setState(() {}); 31 | }, 32 | ), 33 | appBar: AppBar( 34 | actions: [ElevatedButton(onPressed: () {}, child: const Icon(Icons.ac_unit))], 35 | ), 36 | body: _FeedFutureBuilder(itemsFuture: _itemsFuture), 37 | ); 38 | } 39 | 40 | @override 41 | bool get wantKeepAlive => true; 42 | } 43 | 44 | class _FeedFutureBuilder extends StatelessWidget { 45 | const _FeedFutureBuilder({ 46 | Key? key, 47 | required Future?> itemsFuture, 48 | }) : _itemsFuture = itemsFuture, 49 | super(key: key); 50 | 51 | final Future?> _itemsFuture; 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return FutureBuilder?>( 56 | future: _itemsFuture, 57 | builder: (BuildContext context, AsyncSnapshot?> snapshot) { 58 | switch (snapshot.connectionState) { 59 | case ConnectionState.none: 60 | return const Placeholder(); 61 | case ConnectionState.waiting: 62 | case ConnectionState.active: 63 | return const Center(child: CircularProgressIndicator()); 64 | case ConnectionState.done: 65 | if (snapshot.hasData) { 66 | return ListView.builder( 67 | itemCount: snapshot.data?.length ?? 0, 68 | itemBuilder: (BuildContext context, int index) { 69 | return Card( 70 | child: ListTile( 71 | title: Text(snapshot.data?[index].body ?? ''), 72 | ), 73 | ); 74 | }, 75 | ); 76 | } else { 77 | return const Placeholder(); 78 | } 79 | } 80 | }, 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/303/mobx_image_picker/view/mobx_image_upload_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../viewModel/image_upload_view_model.dart'; 3 | import '../../../product/utility/image_upload.dart'; 4 | import 'package:flutter_mobx/flutter_mobx.dart'; 5 | import 'package:lottie/lottie.dart'; 6 | 7 | class MobxImageUpload extends StatefulWidget { 8 | const MobxImageUpload({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _MobxImageUploadState(); 12 | } 13 | 14 | class _MobxImageUploadState extends State { 15 | final String _imageUplaodLottiePath = 'https://assets3.lottiefiles.com/packages/lf20_urbk83vw.json'; 16 | 17 | final _imageUploadViewModel = ImageUploadViewModel(); 18 | final _imageUploadManger = ImageUploadManager(); 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | floatingActionButton: FloatingActionButton( 23 | child: const Icon(Icons.save), 24 | onPressed: () { 25 | _imageUploadViewModel.saveDataToService(); 26 | }), 27 | appBar: AppBar( 28 | title: const Text('Image Upload'), 29 | actions: [ 30 | Observer(builder: (_) { 31 | return _imageUploadViewModel.isLoading ? const CircularProgressIndicator() : const SizedBox(); 32 | }), 33 | Observer(builder: (_) { 34 | return Text(_imageUploadViewModel.downloadText); 35 | }) 36 | ], 37 | ), 38 | body: Column(children: [ 39 | Expanded( 40 | flex: 2, 41 | child: Card( 42 | elevation: 10, 43 | child: Row( 44 | children: [ 45 | Expanded(child: _localImage()), 46 | Expanded(child: _imageUploadButton()), 47 | ], 48 | ), 49 | ), 50 | ), 51 | const Divider(), 52 | Expanded( 53 | flex: 4, 54 | child: _imageNetwork(), 55 | ) 56 | ]), 57 | ); 58 | } 59 | 60 | Observer _localImage() { 61 | return Observer( 62 | builder: (context) { 63 | return _imageUploadViewModel.file != null ? Image.file(_imageUploadViewModel.file!) : const SizedBox(); 64 | }, 65 | ); 66 | } 67 | 68 | FittedBox _imageUploadButton() { 69 | return FittedBox( 70 | child: IconButton( 71 | onPressed: () async { 72 | _imageUploadViewModel.saveLocalFile(await _imageUploadManger.fetchFromLibrary()); 73 | }, 74 | icon: Lottie.network(_imageUplaodLottiePath)), 75 | ); 76 | } 77 | 78 | Observer _imageNetwork() { 79 | return Observer(builder: (_) { 80 | return _imageUploadViewModel.imageUrl.isNotEmpty 81 | ? Image.network(_imageUploadViewModel.imageUrl) 82 | : const SizedBox(); 83 | }); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/101/list_view_learn.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ListViewLearn extends StatefulWidget { 4 | const ListViewLearn({Key? key}) : super(key: key); 5 | 6 | @override 7 | State createState() => _ListViewLearnState(); 8 | } 9 | 10 | class _ListViewLearnState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar(), 15 | body: ListView( 16 | padding: EdgeInsets.zero, 17 | children: [ 18 | FittedBox( 19 | child: Text( 20 | 'Merhaba', 21 | style: Theme.of(context).textTheme.headline1, 22 | maxLines: 1, 23 | ), 24 | ), 25 | Container(color: Colors.red, height: 300), 26 | const Divider(), 27 | SizedBox( 28 | height: 300, 29 | child: ListView(shrinkWrap: true, scrollDirection: Axis.horizontal, children: [ 30 | Container(color: Colors.green, child: const Card()), 31 | Container(color: Colors.white, width: 100), 32 | Container(color: Colors.green, width: 100), 33 | Container(color: Colors.white, width: 100), 34 | Container(color: Colors.green, width: 100), 35 | ]), 36 | ), 37 | IconButton(onPressed: () {}, icon: const Icon(Icons.close)), 38 | //xx 39 | FittedBox( 40 | child: Text( 41 | 'Merhaba', 42 | style: Theme.of(context).textTheme.headline1, 43 | maxLines: 1, 44 | ), 45 | ), 46 | Container(color: Colors.red, height: 300), 47 | const Divider(), 48 | SizedBox( 49 | height: 300, 50 | child: ListView(scrollDirection: Axis.horizontal, children: [ 51 | Container(color: Colors.green, width: 100), 52 | Container(color: Colors.white, width: 100), 53 | Container(color: Colors.green, width: 100), 54 | Container(color: Colors.white, width: 100), 55 | Container(color: Colors.green, width: 100), 56 | ]), 57 | ), 58 | IconButton(onPressed: () {}, icon: const Icon(Icons.close)), 59 | const _ListDemo() 60 | ], 61 | ), 62 | ); 63 | } 64 | } 65 | 66 | class _ListDemo extends StatefulWidget { 67 | const _ListDemo({Key? key}) : super(key: key); 68 | 69 | @override 70 | State<_ListDemo> createState() => __ListDemoState(); 71 | } 72 | 73 | class __ListDemoState extends State<_ListDemo> { 74 | @override 75 | void initState() { 76 | super.initState(); 77 | print('hello'); 78 | } 79 | 80 | @override 81 | void dispose() { 82 | super.dispose(); 83 | print('exit'); 84 | } 85 | 86 | @override 87 | Widget build(BuildContext context) { 88 | return const Placeholder(); 89 | } 90 | } 91 | --------------------------------------------------------------------------------