├── .env
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_learn
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── image
│ ├── broccoli.png
│ ├── kale.png
│ ├── pepper.png
│ └── strawberry.png
└── lang
│ ├── en-US.json
│ └── tr-TR.json
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── main.dart
├── week1
│ └── welcome
│ │ └── welcome_view.dart
├── week2
│ ├── core
│ │ ├── component
│ │ │ ├── card
│ │ │ │ ├── post_card.dart
│ │ │ │ └── user_card.dart
│ │ │ ├── opacity
│ │ │ │ └── image_opacity.dart
│ │ │ └── scroll
│ │ │ │ └── scroll_bar_single.dart
│ │ ├── enum
│ │ │ ├── duration_enum.dart
│ │ │ └── service_path_enum.dart
│ │ ├── exception
│ │ │ └── duration_exception.dart
│ │ └── image_manager.dart
│ ├── post_json_place_holder
│ │ ├── model
│ │ │ └── post_model.dart
│ │ ├── post_json_place_holder.dart
│ │ ├── post_json_place_holder_view.dart
│ │ ├── post_json_place_holder_view_model.dart
│ │ └── service
│ │ │ └── place_holder_service.dart
│ ├── statefull
│ │ ├── home_statefull_view.dart
│ │ └── model
│ │ │ └── user.dart
│ └── stateless
│ │ ├── home_detail_stateless.dart
│ │ └── home_stateless_view.dart
├── week3
│ ├── core
│ │ ├── base
│ │ │ ├── base_statefull.dart
│ │ │ └── base_stateles.dart
│ │ ├── color
│ │ │ └── color_theme.dart
│ │ ├── images
│ │ │ └── image_constants.dart
│ │ ├── localizate
│ │ │ └── application_strings.dart
│ │ ├── theme
│ │ │ ├── ITheme.dart
│ │ │ └── light_theme.dart
│ │ └── widgets
│ │ │ ├── card
│ │ │ └── food_card.dart
│ │ │ └── wrap
│ │ │ └── icon_text.dart
│ ├── food_card
│ │ ├── food_card.dart
│ │ ├── food_card_view.dart
│ │ ├── food_card_view_model.dart
│ │ └── model
│ │ │ └── food_model.dart
│ └── food_dashboard
│ │ └── food_dashboard_view.dart
├── week4
│ ├── core
│ │ ├── exception
│ │ │ └── env_not_found.dart
│ │ ├── network
│ │ │ └── network_manager.dart
│ │ └── widgets
│ │ │ └── task_card.dart
│ └── feature
│ │ └── task
│ │ ├── model
│ │ └── task_model.dart
│ │ ├── service
│ │ ├── ITaskService.dart
│ │ ├── task_service.dart
│ │ └── task_service_endpoint.dart
│ │ ├── view
│ │ └── task_view.dart
│ │ └── viewmodel
│ │ └── task_view_model.dart
└── week5
│ ├── core
│ └── network
│ │ └── application_constatn.dart
│ ├── feature
│ ├── basket
│ │ └── basket_view.dart
│ ├── photos
│ │ ├── model
│ │ │ └── photos_model.dart
│ │ ├── service
│ │ │ ├── IPhotosService.dart
│ │ │ ├── photo_service.dart
│ │ │ └── photo_service_path.dart
│ │ ├── view
│ │ │ └── photos_view.dart
│ │ └── viewmodel
│ │ │ └── photos_view_model.dart
│ └── tabbar
│ │ ├── app_tabbar.dart
│ │ └── model
│ │ └── tab_model.dart
│ └── product
│ ├── manager
│ └── shop
│ │ └── shop_manager.dart
│ └── widgets
│ └── card
│ └── photo_card.dart
├── pubspec.lock
├── pubspec.yaml
├── scripts
├── lang.sh
└── mobx.sh
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-512.png
├── index.html
└── manifest.json
/.env:
--------------------------------------------------------------------------------
1 |
2 |
3 | DEV_URL = https://hwasampleapi.firebaseio.com/
4 |
5 | BASE_URL = $DEV_URL
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 |
13 | *.g.dart
14 | # IntelliJ related
15 | *.iml
16 | *.ipr
17 | *.iws
18 | .idea/
19 |
20 | # The .vscode folder contains launch configuration and tasks you configure in
21 | # VS Code which you may wish to be included in version control, so this line
22 | # is commented out by default.
23 | #.vscode/
24 |
25 | # Flutter/Dart/Pub related
26 | **/doc/api/
27 | **/ios/Flutter/.last_build_id
28 | .dart_tool/
29 | .flutter-plugins
30 | .flutter-plugins-dependencies
31 | .packages
32 | .pub-cache/
33 | .pub/
34 | /build/
35 |
36 | # Web related
37 | lib/generated_plugin_registrant.dart
38 |
39 | # Symbolication related
40 | app.*.symbols
41 |
42 | # Obfuscation related
43 | app.*.map.json
44 |
45 | # Android Studio will place build artifacts here
46 | /android/app/debug
47 | /android/app/profile
48 | /android/app/release
49 |
--------------------------------------------------------------------------------
/.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: 8962f6dc68ec8e2206ac2fa874da4a453856c7d3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_learn
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:pedantic/analysis_options.1.11.0.yaml
2 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.flutter_learn"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_learn/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_learn
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/image/broccoli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/assets/image/broccoli.png
--------------------------------------------------------------------------------
/assets/image/kale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/assets/image/kale.png
--------------------------------------------------------------------------------
/assets/image/pepper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/assets/image/pepper.png
--------------------------------------------------------------------------------
/assets/image/strawberry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/assets/image/strawberry.png
--------------------------------------------------------------------------------
/assets/lang/en-US.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "tabBar":{
4 | "home":"Photos",
5 | "basket":"Basket"
6 | }
7 | }
--------------------------------------------------------------------------------
/assets/lang/tr-TR.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "tabBar":{
4 | "home":"Fotoğraflar",
5 | "basket":"Sepet"
6 | }
7 | }
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - shared_preferences (0.0.1):
4 | - Flutter
5 |
6 | DEPENDENCIES:
7 | - Flutter (from `Flutter`)
8 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
9 |
10 | EXTERNAL SOURCES:
11 | Flutter:
12 | :path: Flutter
13 | shared_preferences:
14 | :path: ".symlinks/plugins/shared_preferences/ios"
15 |
16 | SPEC CHECKSUMS:
17 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
18 | shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
19 |
20 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
21 |
22 | COCOAPODS: 1.10.0
23 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 20965DCB7B47379D9043403E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A20C873A7D487A2185CE89B0 /* Pods_Runner.framework */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | );
27 | name = "Embed Frameworks";
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXCopyFilesBuildPhase section */
31 |
32 | /* Begin PBXFileReference section */
33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
36 | 45BC8EF634B9E904B39510CD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
40 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
41 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
42 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
44 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
45 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
46 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | A20C873A7D487A2185CE89B0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48 | A7C828202F9DDA1E37DF5835 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
49 | E9EB804A48E3F5169B813F6C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 20965DCB7B47379D9043403E /* Pods_Runner.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 71ADCB05AE7551111C504CF7 /* Pods */ = {
65 | isa = PBXGroup;
66 | children = (
67 | E9EB804A48E3F5169B813F6C /* Pods-Runner.debug.xcconfig */,
68 | A7C828202F9DDA1E37DF5835 /* Pods-Runner.release.xcconfig */,
69 | 45BC8EF634B9E904B39510CD /* Pods-Runner.profile.xcconfig */,
70 | );
71 | name = Pods;
72 | path = Pods;
73 | sourceTree = "";
74 | };
75 | 9740EEB11CF90186004384FC /* Flutter */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
79 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
81 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
82 | );
83 | name = Flutter;
84 | sourceTree = "";
85 | };
86 | 97C146E51CF9000F007C117D = {
87 | isa = PBXGroup;
88 | children = (
89 | 9740EEB11CF90186004384FC /* Flutter */,
90 | 97C146F01CF9000F007C117D /* Runner */,
91 | 97C146EF1CF9000F007C117D /* Products */,
92 | 71ADCB05AE7551111C504CF7 /* Pods */,
93 | B5DE1380E4A7E345487D1371 /* Frameworks */,
94 | );
95 | sourceTree = "";
96 | };
97 | 97C146EF1CF9000F007C117D /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 97C146EE1CF9000F007C117D /* Runner.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 97C146F01CF9000F007C117D /* Runner */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
111 | 97C147021CF9000F007C117D /* Info.plist */,
112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
114 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
115 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
116 | );
117 | path = Runner;
118 | sourceTree = "";
119 | };
120 | B5DE1380E4A7E345487D1371 /* Frameworks */ = {
121 | isa = PBXGroup;
122 | children = (
123 | A20C873A7D487A2185CE89B0 /* Pods_Runner.framework */,
124 | );
125 | name = Frameworks;
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 97C146ED1CF9000F007C117D /* Runner */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134 | buildPhases = (
135 | 9BEE93BDCE9116A88F687C0C /* [CP] Check Pods Manifest.lock */,
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | 303E823235F8EFD6D4D71D65 /* [CP] Embed Pods Frameworks */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = Runner;
149 | productName = Runner;
150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | 97C146E61CF9000F007C117D /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastUpgradeCheck = 1020;
160 | ORGANIZATIONNAME = "";
161 | TargetAttributes = {
162 | 97C146ED1CF9000F007C117D = {
163 | CreatedOnToolsVersion = 7.3.1;
164 | LastSwiftMigration = 1100;
165 | };
166 | };
167 | };
168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
169 | compatibilityVersion = "Xcode 9.3";
170 | developmentRegion = en;
171 | hasScannedForEncodings = 0;
172 | knownRegions = (
173 | en,
174 | Base,
175 | );
176 | mainGroup = 97C146E51CF9000F007C117D;
177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
178 | projectDirPath = "";
179 | projectRoot = "";
180 | targets = (
181 | 97C146ED1CF9000F007C117D /* Runner */,
182 | );
183 | };
184 | /* End PBXProject section */
185 |
186 | /* Begin PBXResourcesBuildPhase section */
187 | 97C146EC1CF9000F007C117D /* Resources */ = {
188 | isa = PBXResourcesBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 303E823235F8EFD6D4D71D65 /* [CP] Embed Pods Frameworks */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputFileListPaths = (
207 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
208 | );
209 | name = "[CP] Embed Pods Frameworks";
210 | outputFileListPaths = (
211 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | shellPath = /bin/sh;
215 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
216 | showEnvVarsInLog = 0;
217 | };
218 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
219 | isa = PBXShellScriptBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | inputPaths = (
224 | );
225 | name = "Thin Binary";
226 | outputPaths = (
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | shellPath = /bin/sh;
230 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
231 | };
232 | 9740EEB61CF901F6004384FC /* Run Script */ = {
233 | isa = PBXShellScriptBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | );
237 | inputPaths = (
238 | );
239 | name = "Run Script";
240 | outputPaths = (
241 | );
242 | runOnlyForDeploymentPostprocessing = 0;
243 | shellPath = /bin/sh;
244 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
245 | };
246 | 9BEE93BDCE9116A88F687C0C /* [CP] Check Pods Manifest.lock */ = {
247 | isa = PBXShellScriptBuildPhase;
248 | buildActionMask = 2147483647;
249 | files = (
250 | );
251 | inputFileListPaths = (
252 | );
253 | inputPaths = (
254 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
255 | "${PODS_ROOT}/Manifest.lock",
256 | );
257 | name = "[CP] Check Pods Manifest.lock";
258 | outputFileListPaths = (
259 | );
260 | outputPaths = (
261 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
262 | );
263 | runOnlyForDeploymentPostprocessing = 0;
264 | shellPath = /bin/sh;
265 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
266 | showEnvVarsInLog = 0;
267 | };
268 | /* End PBXShellScriptBuildPhase section */
269 |
270 | /* Begin PBXSourcesBuildPhase section */
271 | 97C146EA1CF9000F007C117D /* Sources */ = {
272 | isa = PBXSourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXSourcesBuildPhase section */
281 |
282 | /* Begin PBXVariantGroup section */
283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
284 | isa = PBXVariantGroup;
285 | children = (
286 | 97C146FB1CF9000F007C117D /* Base */,
287 | );
288 | name = Main.storyboard;
289 | sourceTree = "";
290 | };
291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
292 | isa = PBXVariantGroup;
293 | children = (
294 | 97C147001CF9000F007C117D /* Base */,
295 | );
296 | name = LaunchScreen.storyboard;
297 | sourceTree = "";
298 | };
299 | /* End PBXVariantGroup section */
300 |
301 | /* Begin XCBuildConfiguration section */
302 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | ALWAYS_SEARCH_USER_PATHS = NO;
306 | CLANG_ANALYZER_NONNULL = YES;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
326 | CLANG_WARN_STRICT_PROTOTYPES = YES;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SUPPORTED_PLATFORMS = iphoneos;
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Profile;
351 | };
352 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
353 | isa = XCBuildConfiguration;
354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
355 | buildSettings = {
356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357 | CLANG_ENABLE_MODULES = YES;
358 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359 | ENABLE_BITCODE = NO;
360 | INFOPLIST_FILE = Runner/Info.plist;
361 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
362 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLearn;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
365 | SWIFT_VERSION = 5.0;
366 | VERSIONING_SYSTEM = "apple-generic";
367 | };
368 | name = Profile;
369 | };
370 | 97C147031CF9000F007C117D /* Debug */ = {
371 | isa = XCBuildConfiguration;
372 | buildSettings = {
373 | ALWAYS_SEARCH_USER_PATHS = NO;
374 | CLANG_ANALYZER_NONNULL = YES;
375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
376 | CLANG_CXX_LIBRARY = "libc++";
377 | CLANG_ENABLE_MODULES = YES;
378 | CLANG_ENABLE_OBJC_ARC = YES;
379 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
380 | CLANG_WARN_BOOL_CONVERSION = YES;
381 | CLANG_WARN_COMMA = YES;
382 | CLANG_WARN_CONSTANT_CONVERSION = YES;
383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
385 | CLANG_WARN_EMPTY_BODY = YES;
386 | CLANG_WARN_ENUM_CONVERSION = YES;
387 | CLANG_WARN_INFINITE_RECURSION = YES;
388 | CLANG_WARN_INT_CONVERSION = YES;
389 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
390 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
391 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
394 | CLANG_WARN_STRICT_PROTOTYPES = YES;
395 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
396 | CLANG_WARN_UNREACHABLE_CODE = YES;
397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
399 | COPY_PHASE_STRIP = NO;
400 | DEBUG_INFORMATION_FORMAT = dwarf;
401 | ENABLE_STRICT_OBJC_MSGSEND = YES;
402 | ENABLE_TESTABILITY = YES;
403 | GCC_C_LANGUAGE_STANDARD = gnu99;
404 | GCC_DYNAMIC_NO_PIC = NO;
405 | GCC_NO_COMMON_BLOCKS = YES;
406 | GCC_OPTIMIZATION_LEVEL = 0;
407 | GCC_PREPROCESSOR_DEFINITIONS = (
408 | "DEBUG=1",
409 | "$(inherited)",
410 | );
411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
413 | GCC_WARN_UNDECLARED_SELECTOR = YES;
414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415 | GCC_WARN_UNUSED_FUNCTION = YES;
416 | GCC_WARN_UNUSED_VARIABLE = YES;
417 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
418 | MTL_ENABLE_DEBUG_INFO = YES;
419 | ONLY_ACTIVE_ARCH = YES;
420 | SDKROOT = iphoneos;
421 | TARGETED_DEVICE_FAMILY = "1,2";
422 | };
423 | name = Debug;
424 | };
425 | 97C147041CF9000F007C117D /* Release */ = {
426 | isa = XCBuildConfiguration;
427 | buildSettings = {
428 | ALWAYS_SEARCH_USER_PATHS = NO;
429 | CLANG_ANALYZER_NONNULL = YES;
430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
431 | CLANG_CXX_LIBRARY = "libc++";
432 | CLANG_ENABLE_MODULES = YES;
433 | CLANG_ENABLE_OBJC_ARC = YES;
434 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
435 | CLANG_WARN_BOOL_CONVERSION = YES;
436 | CLANG_WARN_COMMA = YES;
437 | CLANG_WARN_CONSTANT_CONVERSION = YES;
438 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
439 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
440 | CLANG_WARN_EMPTY_BODY = YES;
441 | CLANG_WARN_ENUM_CONVERSION = YES;
442 | CLANG_WARN_INFINITE_RECURSION = YES;
443 | CLANG_WARN_INT_CONVERSION = YES;
444 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
445 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
446 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
447 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
448 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
449 | CLANG_WARN_STRICT_PROTOTYPES = YES;
450 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
451 | CLANG_WARN_UNREACHABLE_CODE = YES;
452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
454 | COPY_PHASE_STRIP = NO;
455 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
456 | ENABLE_NS_ASSERTIONS = NO;
457 | ENABLE_STRICT_OBJC_MSGSEND = YES;
458 | GCC_C_LANGUAGE_STANDARD = gnu99;
459 | GCC_NO_COMMON_BLOCKS = YES;
460 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
461 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
462 | GCC_WARN_UNDECLARED_SELECTOR = YES;
463 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464 | GCC_WARN_UNUSED_FUNCTION = YES;
465 | GCC_WARN_UNUSED_VARIABLE = YES;
466 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
467 | MTL_ENABLE_DEBUG_INFO = NO;
468 | SDKROOT = iphoneos;
469 | SUPPORTED_PLATFORMS = iphoneos;
470 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
471 | TARGETED_DEVICE_FAMILY = "1,2";
472 | VALIDATE_PRODUCT = YES;
473 | };
474 | name = Release;
475 | };
476 | 97C147061CF9000F007C117D /* Debug */ = {
477 | isa = XCBuildConfiguration;
478 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
479 | buildSettings = {
480 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
481 | CLANG_ENABLE_MODULES = YES;
482 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
483 | ENABLE_BITCODE = NO;
484 | INFOPLIST_FILE = Runner/Info.plist;
485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
486 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLearn;
487 | PRODUCT_NAME = "$(TARGET_NAME)";
488 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
489 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
490 | SWIFT_VERSION = 5.0;
491 | VERSIONING_SYSTEM = "apple-generic";
492 | };
493 | name = Debug;
494 | };
495 | 97C147071CF9000F007C117D /* Release */ = {
496 | isa = XCBuildConfiguration;
497 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
498 | buildSettings = {
499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500 | CLANG_ENABLE_MODULES = YES;
501 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
502 | ENABLE_BITCODE = NO;
503 | INFOPLIST_FILE = Runner/Info.plist;
504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
505 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLearn;
506 | PRODUCT_NAME = "$(TARGET_NAME)";
507 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
508 | SWIFT_VERSION = 5.0;
509 | VERSIONING_SYSTEM = "apple-generic";
510 | };
511 | name = Release;
512 | };
513 | /* End XCBuildConfiguration section */
514 |
515 | /* Begin XCConfigurationList section */
516 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
517 | isa = XCConfigurationList;
518 | buildConfigurations = (
519 | 97C147031CF9000F007C117D /* Debug */,
520 | 97C147041CF9000F007C117D /* Release */,
521 | 249021D3217E4FDB00AE95B9 /* Profile */,
522 | );
523 | defaultConfigurationIsVisible = 0;
524 | defaultConfigurationName = Release;
525 | };
526 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
527 | isa = XCConfigurationList;
528 | buildConfigurations = (
529 | 97C147061CF9000F007C117D /* Debug */,
530 | 97C147071CF9000F007C117D /* Release */,
531 | 249021D4217E4FDB00AE95B9 /* Profile */,
532 | );
533 | defaultConfigurationIsVisible = 0;
534 | defaultConfigurationName = Release;
535 | };
536 | /* End XCConfigurationList section */
537 | };
538 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
539 | }
540 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/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_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_learn
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:easy_localization/easy_localization.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_dotenv/flutter_dotenv.dart' as dotenv;
4 | import 'package:provider/provider.dart';
5 |
6 | import 'week3/core/theme/light_theme.dart';
7 | import 'week5/feature/tabbar/app_tabbar.dart';
8 | import 'week5/product/manager/shop/shop_manager.dart';
9 |
10 | Future main() async {
11 | await _init();
12 | final langPath = 'assets/lang';
13 |
14 | return runApp(MultiProvider(
15 | providers: [
16 | ChangeNotifierProvider(create: (context) => ShopManager()),
17 | ],
18 | child: EasyLocalization(
19 | supportedLocales: [Locale('en', 'US'), Locale('de', 'DE')],
20 | path: langPath, // <-- change the path of the translation files
21 | fallbackLocale: Locale('en', 'US'),
22 | child: MyApp(),
23 | ),
24 | ));
25 | }
26 |
27 | Future _init() async {
28 | WidgetsFlutterBinding.ensureInitialized();
29 | await dotenv.load(fileName: '.env'); //
30 | await EasyLocalization.ensureInitialized();
31 | }
32 |
33 | class MyApp extends StatelessWidget {
34 | @override
35 | Widget build(BuildContext context) {
36 | return MaterialApp(
37 | title: 'Material App',
38 | localizationsDelegates: context.localizationDelegates,
39 | supportedLocales: context.supportedLocales,
40 | locale: context.locale,
41 | debugShowCheckedModeBanner: false,
42 | theme: LightTheme.instance.data,
43 | home: AppTabBar(),
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/week1/welcome/welcome_view.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/widgets.dart';
5 |
6 | class WelcomeView extends StatelessWidget {
7 | final _appBarTitle = 'Instagram';
8 | final _randomImageUrl = 'https://picsum.photos/200/300';
9 |
10 | MaterialColor get randomColor => Colors.primaries[Random().nextInt(17)];
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: buildAppBar(context),
15 | body: Column(
16 | children: [
17 | Expanded(flex: 5, child: buildListViewTop(context)),
18 | Expanded(flex: 1, child: buildListView()),
19 | Expanded(flex: 1, child: buildDismissibleBottomCard()),
20 | ],
21 | ),
22 | );
23 | }
24 |
25 | AppBar buildAppBar(BuildContext context) {
26 | return AppBar(
27 | centerTitle: false,
28 | actions: [buildIconButtonFavorite(context)],
29 | title: buildRowAppBarTitle(context),
30 | );
31 | }
32 |
33 | IconButton buildIconButtonFavorite(BuildContext context) {
34 | return IconButton(
35 | icon: Icon(Icons.favorite),
36 | onPressed: () {
37 | showModalBottomSheet(
38 | context: context,
39 | builder: (context) => Column(),
40 | );
41 | });
42 | }
43 |
44 | Row buildRowAppBarTitle(BuildContext context) {
45 | return Row(
46 | mainAxisSize: MainAxisSize.min,
47 | mainAxisAlignment: MainAxisAlignment.start,
48 | children: [
49 | Icon(Icons.wallpaper),
50 | buildTextAppBar(context),
51 | ],
52 | );
53 | }
54 |
55 | Text buildTextAppBar(BuildContext context) {
56 | return Text(
57 | _appBarTitle,
58 | style: Theme.of(context).primaryTextTheme.headline6!.copyWith(color: Theme.of(context).colorScheme.onPrimary),
59 | );
60 | }
61 |
62 | ListView buildListViewTop(BuildContext context) {
63 | return ListView(
64 | children: [
65 | Container(width: 500, height: MediaQuery.of(context).size.height * 0.1, color: randomColor),
66 | Container(width: 500, height: MediaQuery.of(context).size.height * 0.1, color: randomColor),
67 | Container(width: 500, height: MediaQuery.of(context).size.height * 0.1, color: randomColor),
68 | Container(width: 500, height: MediaQuery.of(context).size.height * 0.1, color: randomColor),
69 | ],
70 | );
71 | }
72 |
73 | ListView buildListView() {
74 | return ListView.builder(
75 | itemCount: 100,
76 | scrollDirection: Axis.horizontal,
77 | itemBuilder: (context, index) {
78 | return buildListViewCard(context, index);
79 | },
80 | );
81 | }
82 |
83 | SizedBox buildListViewCard(BuildContext context, int index) {
84 | return SizedBox(
85 | width: MediaQuery.of(context).size.width * 0.8,
86 | child: Card(
87 | child: ListTile(
88 | onTap: () {},
89 | leading: CircleAvatar(backgroundImage: NetworkImage(_randomImageUrl)),
90 | title: Text('$_appBarTitle $index'),
91 | trailing: Icon(Icons.arrow_right_alt),
92 | ),
93 | ),
94 | );
95 | }
96 |
97 | Dismissible buildDismissibleBottomCard() {
98 | return Dismissible(
99 | key: UniqueKey(),
100 | background: Container(color: Colors.black),
101 | secondaryBackground: Container(color: Colors.red),
102 | child: buildContainerBottom(),
103 | );
104 | }
105 |
106 | Container buildContainerBottom() => Container(color: Colors.pink);
107 | }
108 |
--------------------------------------------------------------------------------
/lib/week2/core/component/card/post_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../post_json_place_holder/model/post_model.dart';
4 |
5 | class PostCard extends StatefulWidget {
6 | final PostModel? model;
7 |
8 | const PostCard({Key? key, required this.model}) : super(key: key);
9 |
10 | @override
11 | _PostCardState createState() => _PostCardState();
12 | }
13 |
14 | class _PostCardState extends State {
15 | bool isTouch = false;
16 | @override
17 | Widget build(BuildContext context) {
18 | return Card(
19 | color: isTouch ? Colors.red : Colors.white,
20 | child: buildListTile(),
21 | );
22 | }
23 |
24 | ListTile buildListTile() {
25 | return ListTile(
26 | onTap: () {
27 | setState(() {
28 | isTouch = !isTouch;
29 | });
30 | },
31 | leading: CircleAvatar(
32 | child: buildText(),
33 | ),
34 | title: Text(widget.model?.title ?? ""),
35 | );
36 | }
37 |
38 | Widget buildText() {
39 | if (widget.model?.id != null) {
40 | return Text(widget.model?.id.toString() ?? "");
41 | }
42 |
43 | return FlutterLogo();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/week2/core/component/card/user_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../statefull/model/user.dart';
4 |
5 | class UserCard extends StatelessWidget {
6 | final User user;
7 |
8 | final VoidCallback? onPressed;
9 |
10 | const UserCard({Key? key, required this.user, this.onPressed}) : super(key: key);
11 | @override
12 | Widget build(BuildContext context) {
13 | return Card(
14 | child: ListTile(
15 | leading: CircleAvatar(backgroundImage: NetworkImage(user.imageUrl)),
16 | title: Text(user.title),
17 | subtitle: Text(user.description),
18 | trailing: Icon(Icons.arrow_right_rounded),
19 | onTap: onPressed,
20 | ),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/week2/core/component/opacity/image_opacity.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../enum/duration_enum.dart';
4 |
5 | class ImageOpacity extends StatefulWidget {
6 | /// The ImageOpacity base [Image.newtwrok].
7 | /// Create opacity image
8 | ///
9 | /// See also:
10 | ///
11 | /// * [Image.network()], get image from service
12 | /// * [AnimatedOpacity], for animation
13 | ///
14 |
15 | final String url;
16 |
17 | const ImageOpacity({Key? key, required this.url}) : super(key: key);
18 | @override
19 | _ImageOpacityState createState() => _ImageOpacityState();
20 | }
21 |
22 | class _ImageOpacityState extends State {
23 | bool _isOpacity = true;
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | waitForTime();
29 | }
30 |
31 | Future waitForTime() async {
32 | await Future.delayed(DurationEnums.NORMAL.time);
33 | setState(() {
34 | _isOpacity = false;
35 | });
36 | }
37 |
38 | double get opacityValee => _isOpacity ? 0 : 1;
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return AnimatedOpacity(
43 | opacity: opacityValee,
44 | duration: DurationEnums.HIGH.time,
45 | child: Image.network(widget.url),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/week2/core/component/scroll/scroll_bar_single.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ScrollBarSingle extends StatelessWidget {
4 | final Widget child;
5 |
6 | const ScrollBarSingle({Key? key, required this.child}) : super(key: key);
7 | @override
8 | Widget build(BuildContext context) {
9 | return Scrollbar(child: SingleChildScrollView(child: child));
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/week2/core/enum/duration_enum.dart:
--------------------------------------------------------------------------------
1 | import '../exception/duration_exception.dart';
2 |
3 | enum DurationEnums { LOW, HIGH, NORMAL }
4 |
5 | extension DurationEnumsExtension on DurationEnums {
6 | /// Your duration enums covert to [Duration] item.
7 | Duration get time {
8 | switch (this) {
9 | case DurationEnums.HIGH:
10 | return Duration(seconds: 10);
11 |
12 | case DurationEnums.NORMAL:
13 | return Duration(seconds: 5);
14 |
15 | case DurationEnums.LOW:
16 | return Duration(seconds: 2);
17 |
18 | default:
19 | throw DurationException(this);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/week2/core/enum/service_path_enum.dart:
--------------------------------------------------------------------------------
1 | enum ServicePathEnum { BASE_URL, POST }
2 |
3 | extension ServicePathEnumExtension on ServicePathEnum {
4 | String get rawValue {
5 | switch (this) {
6 | case ServicePathEnum.BASE_URL:
7 | return 'https://jsonplaceholder.typicode.com';
8 |
9 | case ServicePathEnum.POST:
10 | return '/posts';
11 |
12 | default:
13 | throw Exception('Not found path');
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/week2/core/exception/duration_exception.dart:
--------------------------------------------------------------------------------
1 | import '../enum/duration_enum.dart';
2 |
3 | class DurationException implements Exception {
4 | final DurationEnums data;
5 |
6 | DurationException(this.data);
7 | @override
8 | String toString() {
9 | return 'Duration not found $data';
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/week2/core/image_manager.dart:
--------------------------------------------------------------------------------
1 | class ImageManager {
2 | final String randomImage = 'https://picsum.photos/200/300';
3 | }
4 |
--------------------------------------------------------------------------------
/lib/week2/post_json_place_holder/model/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 | PostModel.fromJson(Map json) {
10 | userId = json['userId'];
11 | id = json['id'];
12 | title = json['title'];
13 | body = json['body'];
14 | }
15 |
16 | Map toJson() {
17 | final Map data = new Map();
18 | data['userId'] = this.userId;
19 | data['id'] = this.id;
20 | data['title'] = this.title;
21 | data['body'] = this.body;
22 | return data;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/week2/post_json_place_holder/post_json_place_holder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'post_json_place_holder_view.dart';
4 |
5 | class PostJsonPlaceHolder extends StatefulWidget {
6 | @override
7 | PostJsonPlaceHolderView createState() => new PostJsonPlaceHolderView();
8 | }
9 |
--------------------------------------------------------------------------------
/lib/week2/post_json_place_holder/post_json_place_holder_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../core/component/card/post_card.dart';
4 | import 'post_json_place_holder_view_model.dart';
5 |
6 | class PostJsonPlaceHolderView extends PostJsonPlaceHolderViewModel {
7 | final String title = 'Json PLace Holder';
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: buildAppBar(context),
13 | body: isLoading ? Center(child: LinearProgressIndicator()) : buildListView(),
14 | );
15 | }
16 |
17 | ListView buildListView() {
18 | return ListView.builder(
19 | itemCount: postItems?.length ?? 0,
20 | itemBuilder: (context, index) => PostCard(model: postItems?[index]),
21 | );
22 | }
23 |
24 | AppBar buildAppBar(BuildContext context) {
25 | return AppBar(
26 | title: Text(
27 | title,
28 | style: Theme.of(context).textTheme.headline4?.copyWith(color: Theme.of(context).colorScheme.surface),
29 | ),
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/week2/post_json_place_holder/post_json_place_holder_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'model/post_model.dart';
4 | import 'post_json_place_holder.dart';
5 | import 'service/place_holder_service.dart';
6 |
7 | abstract class PostJsonPlaceHolderViewModel extends State {
8 | bool isLoading = true;
9 | final PlaceHolderService placeHolderService = PlaceHolderService();
10 | List? postItems;
11 |
12 | @override
13 | void initState() {
14 | super.initState();
15 | fetchAllDatas();
16 | }
17 |
18 | Future fetchAllDatas() async {
19 | try {
20 | final response = await placeHolderService.fetchPostItems();
21 | postItems = response;
22 | } catch (e) {}
23 | _changeLoading();
24 | }
25 |
26 | void _changeLoading() {
27 | setState(() {
28 | isLoading = !isLoading;
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/week2/post_json_place_holder/service/place_holder_service.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:io';
3 |
4 | import 'package:http/http.dart' as http;
5 |
6 | import '../../core/enum/service_path_enum.dart';
7 | import '../model/post_model.dart';
8 |
9 | class PlaceHolderService {
10 | Future?> fetchPostItems() async {
11 | final url = Uri.parse('${ServicePathEnum.BASE_URL.rawValue}${ServicePathEnum.POST.rawValue}');
12 | final response = await http.get(url);
13 | // TODO: Hello
14 | switch (response.statusCode) {
15 | case HttpStatus.ok:
16 | final reponseBody = jsonDecode(response.body);
17 | if (reponseBody is List) {
18 | return reponseBody.map((e) => PostModel.fromJson(e)).toList();
19 | }
20 | return [];
21 | default:
22 | return null;
23 | // throw Exception('Service error $response');
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/week2/statefull/home_statefull_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../core/component/card/user_card.dart';
4 | import '../core/component/opacity/image_opacity.dart';
5 | import '../core/enum/duration_enum.dart';
6 | import '../core/image_manager.dart';
7 | import '../stateless/home_detail_stateless.dart';
8 | import 'model/user.dart';
9 |
10 | class HomeViewStatefull extends StatefulWidget {
11 | @override
12 | _HomeViewStatefullState createState() => _HomeViewStatefullState();
13 | }
14 |
15 | class _HomeViewStatefullState extends State {
16 | bool _isLoading = true;
17 | late final ImageManager imageManager;
18 | late final User user;
19 |
20 | @override
21 | void initState() {
22 | super.initState();
23 | _waitForLoaoding();
24 | imageManager = ImageManager();
25 | user = User.fakeItem();
26 | }
27 |
28 | Future _waitForLoaoding() async {
29 | await Future.delayed(DurationEnums.NORMAL.time);
30 | setState(() {
31 | _isLoading = false;
32 | });
33 | }
34 |
35 | @override
36 | void dispose() {
37 | super.dispose();
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return Scaffold(
43 | appBar: AppBar(),
44 | body: Column(
45 | children: [
46 | _isLoading ? CircularProgressIndicator() : FlutterLogo(),
47 | ImageOpacity(url: imageManager.randomImage),
48 | UserCard(
49 | user: user,
50 | onPressed: () {
51 | _naviateDetail();
52 | })
53 | ],
54 | ),
55 | );
56 | }
57 |
58 | void _naviateDetail() {
59 | Navigator.of(context).push(MaterialPageRoute(
60 | builder: (context) => HomeDetailStateless(model: user),
61 | ));
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/week2/statefull/model/user.dart:
--------------------------------------------------------------------------------
1 | class User {
2 | final String imageUrl;
3 | final String title;
4 | final String description;
5 | final String storyText;
6 |
7 | User({
8 | required this.imageUrl,
9 | required this.title,
10 | required this.description,
11 | required this.storyText,
12 | });
13 |
14 | factory User.fakeItem() {
15 | return User(
16 | imageUrl: 'https://avatars.githubusercontent.com/u/17102578?v=4',
17 | title: 'VB10',
18 | description: 'Mobil Developer | Cross and Native https://vb10.github.io/#/',
19 | storyText: ''' Contrary to popular belief, Lorem Ipsum is not simply random text.
20 | It has roots in a piece of classical Latin literature from 45 BC,
21 | making it over 2000 years old. Richard McClintock, a Latin professor at
22 | Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,
23 | consectetur, from a Lorem Ipsum passage, and going through the cites of the word in
24 | classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections
25 | 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
26 |
27 | The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for
28 | those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"
29 | by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.''' *
30 | 5,
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/week2/stateless/home_detail_stateless.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../core/component/scroll/scroll_bar_single.dart';
4 | import '../statefull/model/user.dart';
5 |
6 | class HomeDetailStateless extends StatelessWidget {
7 | final User model;
8 |
9 | const HomeDetailStateless({Key? key, required this.model}) : super(key: key);
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | appBar: AppBar(title: Text(model.title)),
14 | body: ScrollBarSingle(child: Text(model.storyText)),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/week2/stateless/home_stateless_view.dart:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/lib/week2/stateless/home_stateless_view.dart
--------------------------------------------------------------------------------
/lib/week3/core/base/base_statefull.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../images/image_constants.dart';
4 | import '../localizate/application_strings.dart';
5 |
6 | abstract class BaseStatefull extends State {
7 | ApplicationStrings applicationStrings = ApplicationStrings.instance;
8 |
9 | TextTheme get textTheme => Theme.of(context).textTheme;
10 | ThemeData get theme => Theme.of(context);
11 | ColorScheme get colorSchema => Theme.of(context).colorScheme;
12 |
13 | ImageConstants imageConstants = ImageConstants.instance;
14 |
15 | EdgeInsets insetsAll = EdgeInsets.all(30);
16 |
17 | double dynamichHeight(double val) => MediaQuery.of(context).size.height * val;
18 | }
19 |
--------------------------------------------------------------------------------
/lib/week3/core/base/base_stateles.dart:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/week3/core/color/color_theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ColorTheme {
4 | final Color lynch = Color(0xff748A9D);
5 | final Color catSkillWhite = Color(0xffF0F4F8);
6 | final Color bitterSweet = Color(0xffFF6969);
7 | }
8 |
--------------------------------------------------------------------------------
/lib/week3/core/images/image_constants.dart:
--------------------------------------------------------------------------------
1 | class ImageConstants {
2 | static ImageConstants? _instace;
3 | static ImageConstants get instance {
4 | if (_instace != null) return _instace!;
5 | _instace = ImageConstants._init();
6 | return _instace!;
7 | }
8 |
9 | ImageConstants._init();
10 |
11 | final bracoli = 'broccoli'.toPng;
12 | final kale = 'kale'.toPng;
13 | final pepper = 'pepper'.toPng;
14 | final strawBerry = 'strawberry'.toPng;
15 | }
16 |
17 | extension _ImageExtension on String {
18 | // Add to png path on image string
19 | String get toPng => 'assets/image/$this.png';
20 | }
21 |
--------------------------------------------------------------------------------
/lib/week3/core/localizate/application_strings.dart:
--------------------------------------------------------------------------------
1 | class ApplicationStrings {
2 | static ApplicationStrings? _instace;
3 | static ApplicationStrings get instance {
4 | if (_instace != null) return _instace!;
5 | _instace = ApplicationStrings._init();
6 | return _instace!;
7 | }
8 |
9 | ApplicationStrings._init();
10 |
11 | final String cartTitle = 'Cart';
12 | final String checkOut = 'Checkout';
13 |
14 | final String subTotal = 'Sub-total';
15 | final String delivery = 'Delivery';
16 | final String total = 'Total';
17 | }
18 |
--------------------------------------------------------------------------------
/lib/week3/core/theme/ITheme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../color/color_theme.dart';
4 |
5 | abstract class ITheme {
6 | ThemeData get data;
7 | final colors = ColorTheme();
8 | }
9 |
--------------------------------------------------------------------------------
/lib/week3/core/theme/light_theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/src/material/theme_data.dart';
3 |
4 | import 'ITheme.dart';
5 |
6 | class LightTheme extends ITheme {
7 | static LightTheme? _instace;
8 | static LightTheme get instance {
9 | if (_instace != null) return _instace!;
10 | _instace = LightTheme._init();
11 | return _instace!;
12 | }
13 |
14 | LightTheme._init();
15 |
16 | final ThemeData _lightTheme = ThemeData.light();
17 |
18 | @override
19 | ThemeData get data => ThemeData(
20 | appBarTheme: _lightTheme.appBarTheme.copyWith(backgroundColor: Colors.white, textTheme: _lightTheme.textTheme.apply(bodyColor: colors.lynch)),
21 | accentColor: Colors.green,
22 | textTheme: _lightTheme.textTheme.apply(bodyColor: colors.lynch),
23 | colorScheme: _lightTheme.colorScheme.copyWith(
24 | primary: Colors.white,
25 | onPrimary: colors.lynch,
26 | onSecondary: colors.catSkillWhite,
27 | ),
28 | tabBarTheme: TabBarTheme(labelColor: Colors.black, unselectedLabelColor: colors.bitterSweet),
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/lib/week3/core/widgets/card/food_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../food_card/model/food_model.dart';
4 |
5 | class FoodCardWidget extends StatelessWidget {
6 | final FoodModel model;
7 |
8 | const FoodCardWidget({Key? key, required this.model}) : super(key: key);
9 | @override
10 | Widget build(BuildContext context) {
11 | return Dismissible(
12 | key: UniqueKey(),
13 | child: Card(
14 | color: Theme.of(context).colorScheme.onSecondary,
15 | child: ListTile(
16 | leading: Image.asset(model.image),
17 | title: Text(model.title),
18 | trailing: Text(
19 | '£${model.money}',
20 | style: Theme.of(context).textTheme.bodyText1!.copyWith(fontWeight: FontWeight.w500),
21 | ),
22 | ),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/week3/core/widgets/wrap/icon_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class IconTextWidget extends StatelessWidget {
4 | final String title;
5 | final IconData icon;
6 |
7 | const IconTextWidget({Key? key, required this.title, required this.icon}) : super(key: key);
8 | @override
9 | Widget build(BuildContext context) {
10 | return Wrap(spacing: 10, children: [buildIcon(context), buildText(context)]);
11 | }
12 |
13 | Icon buildIcon(BuildContext context) {
14 | return Icon(
15 | icon,
16 | color: Theme.of(context).colorScheme.primary,
17 | );
18 | }
19 |
20 | Text buildText(BuildContext context) {
21 | return Text(
22 | title,
23 | style: Theme.of(context).textTheme.headline6!.copyWith(color: Theme.of(context).colorScheme.primary, fontWeight: FontWeight.bold),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/week3/food_card/food_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'food_card_view.dart';
4 |
5 | class FoodCard extends StatefulWidget {
6 | @override
7 | FoodCardView createState() => FoodCardView();
8 | }
9 |
--------------------------------------------------------------------------------
/lib/week3/food_card/food_card_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../core/localizate/application_strings.dart';
4 | import '../core/widgets/card/food_card.dart';
5 | import '../core/widgets/wrap/icon_text.dart';
6 | import 'food_card_view_model.dart';
7 |
8 | class FoodCardView extends FoodCardViewModel {
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: buildAppBar(context),
13 | body: buildPadding(context),
14 | );
15 | }
16 |
17 | Padding buildPadding(BuildContext context) => Padding(padding: insetsAll, child: buildColumnBody(context));
18 |
19 | Column buildColumnBody(BuildContext context) {
20 | return Column(
21 | children: [
22 | Expanded(flex: 4, child: buildListViewFoodList()),
23 | Spacer(),
24 | Expanded(
25 | flex: 2,
26 | child: Column(
27 | children: [
28 | Spacer(),
29 | Expanded(child: buildRowSubTotal()),
30 | Expanded(child: buildRowDelivery()),
31 | Expanded(flex: 2, child: buildRowTotal()),
32 | Spacer()
33 | ],
34 | )),
35 | Expanded(child: buildElevatedButtonCheckout(context)),
36 | ],
37 | );
38 | }
39 |
40 | ListView buildListViewFoodList() {
41 | return ListView.builder(
42 | itemCount: foodItemList.length,
43 | itemBuilder: (context, index) => FoodCardWidget(model: foodItemList[index]),
44 | );
45 | }
46 |
47 | Row buildRowSubTotal() {
48 | return Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
49 | buildTextSubTitle(applicationStrings.subTotal),
50 | Text('£9.30'),
51 | ]);
52 | }
53 |
54 | Row buildRowDelivery() {
55 | return Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
56 | buildTextSubTitle(applicationStrings.delivery),
57 | Text('data'),
58 | ]);
59 | }
60 |
61 | Row buildRowTotal() {
62 | return Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
63 | Text(
64 | applicationStrings.total,
65 | style: textTheme.headline5!.copyWith(fontWeight: FontWeight.bold),
66 | ),
67 | Text('£9.30', style: textTheme.headline5),
68 | ]);
69 | }
70 |
71 | Text buildTextSubTitle(String title) => Text(title, style: textTheme.bodyText1!.copyWith(color: colorSchema.onPrimary));
72 |
73 | ElevatedButton buildElevatedButtonCheckout(BuildContext context) {
74 | return ElevatedButton(
75 | onPressed: () {},
76 | style:
77 | ButtonStyle(backgroundColor: MaterialStateProperty.all(Theme.of(context).accentColor), shape: MaterialStateProperty.all(StadiumBorder())),
78 | child: Center(
79 | child: buildWrapIconText(),
80 | ),
81 | );
82 | }
83 |
84 | Widget buildWrapIconText() {
85 | return IconTextWidget(icon: Icons.arrow_right_alt_outlined, title: applicationStrings.checkOut);
86 | }
87 |
88 | AppBar buildAppBar(BuildContext context) {
89 | return AppBar(
90 | title: Text(ApplicationStrings.instance.cartTitle,
91 | style: Theme.of(context).textTheme.headline6!.copyWith(
92 | color: Theme.of(context).colorScheme.onPrimary,
93 | )),
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/lib/week3/food_card/food_card_view_model.dart:
--------------------------------------------------------------------------------
1 | import '../core/base/base_statefull.dart';
2 | import 'food_card.dart';
3 | import 'model/food_model.dart';
4 |
5 | abstract class FoodCardViewModel extends BaseStatefull {
6 | late final List foodItemList;
7 |
8 | @override
9 | void initState() {
10 | super.initState();
11 | foodItemList = [
12 | FoodModel('Broccoli', imageConstants.bracoli, '10'),
13 | FoodModel('Kale', imageConstants.kale, '10'),
14 | FoodModel('Red Peppers', imageConstants.pepper, '10'),
15 | FoodModel('Strow Berries', imageConstants.strawBerry, '10'),
16 | ];
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/week3/food_card/model/food_model.dart:
--------------------------------------------------------------------------------
1 | class FoodModel {
2 | final String title;
3 | final String image;
4 | final String money;
5 |
6 | FoodModel(this.title, this.image, this.money);
7 | }
8 |
--------------------------------------------------------------------------------
/lib/week3/food_dashboard/food_dashboard_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../core/base/base_statefull.dart';
4 |
5 | class FoodDashboardView extends StatefulWidget {
6 | @override
7 | _FoodDashboardViewState createState() => _FoodDashboardViewState();
8 | }
9 |
10 | class _FoodDashboardViewState extends BaseStatefull {
11 | final _randomImage = 'https://picsum.photos/200/300';
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(title: Text('Food Dashboard')),
16 | body: ListView(
17 | children: [
18 | SizedBox(height: dynamichHeight(0.3), child: buildPageView()),
19 | Padding(padding: EdgeInsets.all(8.0), child: Placeholder()),
20 | FlutterLogo(),
21 | buildListView(),
22 | Padding(padding: EdgeInsets.all(8.0), child: Placeholder()),
23 | ],
24 | ),
25 | );
26 | }
27 |
28 | PageView buildPageView() {
29 | return PageView.builder(
30 | itemBuilder: (context, index) => Image.network(
31 | _randomImage,
32 | fit: BoxFit.cover,
33 | ),
34 | );
35 | }
36 |
37 | Widget buildListView() {
38 | return ListView.builder(
39 | itemCount: 15,
40 | shrinkWrap: true,
41 | physics: NeverScrollableScrollPhysics(),
42 | itemBuilder: (context, index) => buildCard(index),
43 | );
44 | }
45 |
46 | Card buildCard(int index) {
47 | return Card(
48 | child: ListTile(
49 | title: Text(index.toString()),
50 | ),
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/week4/core/exception/env_not_found.dart:
--------------------------------------------------------------------------------
1 | class EnvNotFound implements Exception {
2 | final String? value;
3 |
4 | EnvNotFound(this.value);
5 |
6 | @override
7 | String toString() {
8 | return 'This $value doesnt found in env file';
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/lib/week4/core/network/network_manager.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:flutter_dotenv/flutter_dotenv.dart';
4 | import 'package:pretty_dio_logger/pretty_dio_logger.dart';
5 |
6 | import '../exception/env_not_found.dart';
7 |
8 | class NetworkManager {
9 | static NetworkManager? _instance;
10 |
11 | static NetworkManager get instance {
12 | if (_instance != null) return _instance!;
13 |
14 | _instance = NetworkManager._init();
15 | return _instance!;
16 | }
17 |
18 | final String _baseUrl = 'BASE_URL';
19 | late final Dio dio;
20 |
21 | NetworkManager._init() {
22 | final url = env[_baseUrl];
23 |
24 | if (url != null) {
25 | dio = Dio(BaseOptions(baseUrl: url));
26 | if (kDebugMode) dio.interceptors.add(PrettyDioLogger());
27 |
28 | dio.interceptors.add(InterceptorsWrapper(
29 | onRequest: (options, handler) {
30 | options.path += '.json';
31 | handler.next(options);
32 | },
33 | ));
34 | } else {
35 | throw EnvNotFound(_baseUrl);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/week4/core/widgets/task_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../feature/task/model/task_model.dart';
4 |
5 | class TaskCards extends StatelessWidget {
6 | final TaskModel taskModel;
7 |
8 | const TaskCards({Key? key, required this.taskModel}) : super(key: key);
9 | @override
10 | Widget build(BuildContext context) {
11 | return Card(
12 | child: ListTile(
13 | onTap: () {
14 | Navigator.of(context).push(MaterialPageRoute(
15 | builder: (context) => Scaffold(
16 | appBar: AppBar(),
17 | body: Image.network(taskModel.imageUrl ?? 'https://picsum.photos/200/300'),
18 | ),
19 | ));
20 | },
21 | leading: CircleAvatar(backgroundImage: NetworkImage(taskModel.imageUrl!)),
22 | title: Text(taskModel.description ?? 'https://picsum.photos/200/300'),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/model/task_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'task_model.g.dart';
4 |
5 | @JsonSerializable()
6 | class TaskModel {
7 | int? code;
8 | String? description;
9 | String? imageUrl;
10 | TaskModel();
11 |
12 | factory TaskModel.fromJson(Map json) {
13 | return _$TaskModelFromJson(json);
14 | }
15 |
16 | Map toJson() {
17 | return _$TaskModelToJson(this);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/service/ITaskService.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | import '../model/task_model.dart';
4 |
5 | abstract class ITaskService {
6 | final Dio dio;
7 | ITaskService(this.dio);
8 |
9 | Future> fetchAllTask();
10 | }
11 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/service/task_service.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:dio/src/dio.dart';
4 |
5 | import '../model/task_model.dart';
6 | import 'ITaskService.dart';
7 |
8 | part 'task_service_endpoint.dart';
9 |
10 | class TaskService extends ITaskService {
11 | TaskService(Dio dio) : super(dio);
12 |
13 | @override
14 | Future> fetchAllTask() async {
15 | final response = await dio.get(_TaskServiceEndPoints.DOGS.rawValue);
16 | if (response.statusCode == HttpStatus.ok) {
17 | final data = response.data;
18 | if (data is List) return data.map((e) => TaskModel.fromJson(e)).toList();
19 | }
20 |
21 | return [];
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/service/task_service_endpoint.dart:
--------------------------------------------------------------------------------
1 | part of 'task_service.dart';
2 |
3 | enum _TaskServiceEndPoints { DOGS }
4 |
5 | extension TaskServiceEndPintsExtension on _TaskServiceEndPoints {
6 | String get rawValue {
7 | switch (this) {
8 | case _TaskServiceEndPoints.DOGS:
9 | return '/dogs';
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/view/task_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 |
4 | import '../../../core/widgets/task_card.dart';
5 | import '../viewmodel/task_view_model.dart';
6 |
7 | final TaskViewModel _viewModel = TaskViewModel();
8 |
9 | class TaskView extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | if (_viewModel.context == null) {
13 | _viewModel.setContext(context);
14 | }
15 | return Scaffold(
16 | appBar: AppBar(title: buildObserverTitle()),
17 | body: buildObserverBody(),
18 | );
19 | }
20 |
21 | Observer buildObserverTitle() {
22 | return Observer(builder: (_) {
23 | return Visibility(
24 | visible: _viewModel.pageLifes == LifeState.LOADING,
25 | child: CircularProgressIndicator(),
26 | );
27 | });
28 | }
29 |
30 | Observer buildObserverBody() {
31 | return Observer(builder: (_) {
32 | return ListView.builder(
33 | itemCount: _viewModel.items.length,
34 | itemBuilder: (context, index) => TaskCards(taskModel: _viewModel.items[index]),
35 | ).onLazyLoads(() async {
36 | // NEW REQUEST
37 | });
38 | });
39 | }
40 | }
41 |
42 | extension ListViewExtension on ListView {
43 | Widget onLazyLoads(Future Function() onPagingLoad, {Widget? itemLoadWidget}) {
44 | final delegate = childrenDelegate as SliverChildBuilderDelegate;
45 | final itemCount = delegate.childCount ?? 0;
46 | return NotificationListener(
47 | onNotification: (ScrollNotification notification) {
48 | if (notification.metrics.pixels == notification.metrics.maxScrollExtent) {
49 | onPagingLoad();
50 | }
51 | return true;
52 | },
53 | child: ListView.builder(
54 | itemCount: itemCount,
55 | itemBuilder: (context, index) {
56 | if (index == (itemCount - 1)) itemLoadWidget ?? Center(child: CircularProgressIndicator());
57 | return delegate.builder(context, index)!;
58 | },
59 | ),
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/week4/feature/task/viewmodel/task_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:mobx/mobx.dart';
3 |
4 | import '../../../core/network/network_manager.dart';
5 | import '../model/task_model.dart';
6 | import '../service/ITaskService.dart';
7 | import '../service/task_service.dart';
8 |
9 | part 'task_view_model.g.dart';
10 |
11 | class TaskViewModel = _TaskViewModelBase with _$TaskViewModel;
12 |
13 | abstract class _TaskViewModelBase with Store {
14 | BuildContext? context;
15 | late ITaskService taskService;
16 |
17 | @observable
18 | List items = [];
19 |
20 | @observable
21 | LifeState pageLifes = LifeState.IDDLE;
22 |
23 | _TaskViewModelBase({this.context}) {
24 | taskService = TaskService(NetworkManager.instance.dio);
25 | }
26 |
27 | void setContext(BuildContext? context) {
28 | this.context = context;
29 | fetchItems();
30 | }
31 |
32 | @action
33 | Future fetchItems() async {
34 | pageLifes = LifeState.LOADING;
35 | items = await taskService.fetchAllTask();
36 | pageLifes = LifeState.DONE;
37 | }
38 | }
39 |
40 | enum LifeState {
41 | IDDLE,
42 | LOADING,
43 | DONE,
44 | }
45 |
--------------------------------------------------------------------------------
/lib/week5/core/network/application_constatn.dart:
--------------------------------------------------------------------------------
1 | class ApplicationConstant {
2 | static ApplicationConstant? _instace;
3 | static ApplicationConstant get instance {
4 | if (_instace != null) return _instace!;
5 | _instace = ApplicationConstant._init();
6 | return _instace!;
7 | }
8 |
9 | ApplicationConstant._init();
10 |
11 | final String baseUrl = 'https://jsonplaceholder.typicode.com/';
12 | final String assetLAngPath = 'https://jsonplaceholder.typicode.com/';
13 | }
14 |
--------------------------------------------------------------------------------
/lib/week5/feature/basket/basket_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 |
4 | import '../../product/manager/shop/shop_manager.dart';
5 | import '../../product/widgets/card/photo_card.dart';
6 |
7 | class BasketView extends StatelessWidget {
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | body: context.watch().shopPhotoItems.isEmpty ? Center(child: Text('Basket is empty')) : buildListView(context),
12 | );
13 | }
14 |
15 | ListView buildListView(BuildContext context) {
16 | return ListView.builder(
17 | itemCount: context.watch().shopPhotoItems.length,
18 | itemBuilder: (context, index) {
19 | return PhotoCard(model: context.watch().shopPhotoItems[index]);
20 | },
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/model/photos_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'photos_model.g.dart';
4 |
5 | @JsonSerializable()
6 | class PhotoModel {
7 | int? albumId;
8 | int? id;
9 | String? title;
10 | String? url;
11 | String? thumbnailUrl;
12 |
13 | @JsonKey(ignore: true)
14 | int count = 0;
15 | @JsonKey(ignore: true)
16 | double price = 25;
17 |
18 | PhotoModel();
19 |
20 | factory PhotoModel.fromJson(Map json) {
21 | return _$PhotoModelFromJson(json);
22 | }
23 |
24 | Map toJson() {
25 | return _$PhotoModelToJson(this);
26 | }
27 |
28 | @override
29 | bool operator ==(Object other) {
30 | if (identical(this, other)) return true;
31 |
32 | return other is PhotoModel &&
33 | other.albumId == albumId &&
34 | other.id == id &&
35 | other.title == title &&
36 | other.url == url &&
37 | other.thumbnailUrl == thumbnailUrl &&
38 | other.price == price;
39 | }
40 |
41 | @override
42 | int get hashCode {
43 | return albumId.hashCode ^ id.hashCode ^ title.hashCode ^ url.hashCode ^ thumbnailUrl.hashCode ^ count.hashCode ^ price.hashCode;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/service/IPhotosService.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | import '../model/photos_model.dart';
4 |
5 | abstract class IPhotosService {
6 | final Dio dio;
7 |
8 | IPhotosService(this.dio);
9 |
10 | Future> fetchAllPhotos();
11 | }
12 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/service/photo_service.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:dio/src/dio.dart';
4 |
5 | import '../model/photos_model.dart';
6 | import 'IPhotosService.dart';
7 |
8 | part './photo_service_path.dart';
9 |
10 | class PhotoService extends IPhotosService {
11 | PhotoService(Dio dio) : super(dio);
12 |
13 | @override
14 | Future> fetchAllPhotos() async {
15 | final response = await dio.get(_PhotoServicePath.PHOTOS.rawValue);
16 |
17 | if (response.statusCode == HttpStatus.ok) {
18 | final data = response.data;
19 | if (data is List) {
20 | return data.map((e) => PhotoModel.fromJson(e)).toList();
21 | }
22 | }
23 |
24 | return [];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/service/photo_service_path.dart:
--------------------------------------------------------------------------------
1 | part of './photo_service.dart';
2 |
3 | enum _PhotoServicePath { PHOTOS }
4 |
5 | extension _PhotoServicePathExtension on _PhotoServicePath {
6 | String get rawValue {
7 | switch (this) {
8 | case _PhotoServicePath.PHOTOS:
9 | return 'photos';
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/view/photos_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:provider/provider.dart';
4 |
5 | import '../../../product/manager/shop/shop_manager.dart';
6 | import '../../../product/widgets/card/photo_card.dart';
7 | import '../viewmodel/photos_view_model.dart';
8 |
9 | final _viewModel = PhotosViewModel();
10 |
11 | class PhotosView extends StatelessWidget {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | leading: buildObserverISLoading(),
17 | actions: [buildActionChip(context)],
18 | ),
19 | body: buildGridView(),
20 | );
21 | }
22 |
23 | Observer buildObserverISLoading() {
24 | return Observer(builder: (_) {
25 | return Visibility(
26 | visible: _viewModel.isLoading,
27 | child: Padding(padding: EdgeInsets.all(8.0), child: CircularProgressIndicator()),
28 | );
29 | });
30 | }
31 |
32 | ActionChip buildActionChip(BuildContext context) {
33 | return ActionChip(
34 | label: Text('\$ ${context.watch().totalMoney}'),
35 | avatar: Icon(Icons.shopping_bag),
36 | onPressed: () {},
37 | );
38 | }
39 |
40 | Widget buildGridView() {
41 | return Observer(builder: (_) {
42 | return GridView.builder(
43 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 0.8),
44 | itemCount: _viewModel.photos.length,
45 | itemBuilder: (context, index) {
46 | return PhotoCard(model: _viewModel.photos[index]);
47 | },
48 | );
49 | });
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/week5/feature/photos/viewmodel/photos_view_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:mobx/mobx.dart';
3 |
4 | import '../../../core/network/application_constatn.dart';
5 | import '../model/photos_model.dart';
6 | import '../service/IPhotosService.dart';
7 | import '../service/photo_service.dart';
8 |
9 | part 'photos_view_model.g.dart';
10 |
11 | class PhotosViewModel = _PhotosViewModelBase with _$PhotosViewModel;
12 |
13 | abstract class _PhotosViewModelBase with Store {
14 | final Dio _dio = Dio(BaseOptions(baseUrl: ApplicationConstant.instance.baseUrl));
15 | late final IPhotosService photosService;
16 |
17 | @observable
18 | List photos = [];
19 |
20 | @observable
21 | bool isLoading = false;
22 |
23 | _PhotosViewModelBase() {
24 | photosService = PhotoService(_dio);
25 | fetchAllPhotos();
26 | }
27 |
28 | @action
29 | Future fetchAllPhotos() async {
30 | changeLoading();
31 | final response = await photosService.fetchAllPhotos();
32 | changeLoading();
33 | photos = response;
34 | }
35 |
36 | @action
37 | void changeLoading() {
38 | isLoading = !isLoading;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/week5/feature/tabbar/app_tabbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:easy_localization/easy_localization.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import '../../../core/init/lang/locale_keys.g.dart';
5 | import '../basket/basket_view.dart';
6 | import '../photos/view/photos_view.dart';
7 | import 'model/tab_model.dart';
8 |
9 | class AppTabBar extends StatelessWidget {
10 | final List tabsItem = [
11 | TabModel(icon: Icons.ac_unit, page: PhotosView(), title: LocaleKeys.tabBar_home),
12 | TabModel(icon: Icons.accessibility_outlined, page: BasketView(), title: LocaleKeys.tabBar_basket),
13 | ];
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return DefaultTabController(
18 | length: 2,
19 | child: Scaffold(
20 | bottomNavigationBar: BottomAppBar(child: buildTabBar()),
21 | body: buildTabBarView(),
22 | ),
23 | );
24 | }
25 |
26 | TabBar buildTabBar() {
27 | // EasyLocalization.logger
28 | return TabBar(
29 | tabs: List.generate(
30 | tabsItem.length,
31 | (index) => Tab(text: tabsItem[index].title.tr(), icon: Icon(tabsItem[index].icon)),
32 | ));
33 | }
34 |
35 | TabBarView buildTabBarView() => TabBarView(children: tabsItem.map((e) => e.page).toList());
36 | }
37 |
--------------------------------------------------------------------------------
/lib/week5/feature/tabbar/model/tab_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TabModel {
4 | final String title;
5 | final IconData icon;
6 | final Widget page;
7 |
8 | TabModel({required this.title, required this.icon, required this.page});
9 | }
10 |
--------------------------------------------------------------------------------
/lib/week5/product/manager/shop/shop_manager.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:logger/logger.dart';
3 |
4 | import '../../../feature/photos/model/photos_model.dart';
5 |
6 | class ShopManager extends ChangeNotifier {
7 | List shopPhotoItems = [];
8 |
9 | double totalMoney = 0;
10 |
11 | void sumtotalMoney() {
12 | totalMoney = shopPhotoItems.fold(0, (previousValue, element) => previousValue + element.price * element.count);
13 | notifyListeners();
14 | }
15 |
16 | void addShopItem(PhotoModel model) {
17 | model.count++;
18 | shopPhotoItems.add(model);
19 | sumtotalMoney();
20 | notifyListeners();
21 | }
22 |
23 | void removeShopItem(PhotoModel model) {
24 | model.count = 0;
25 | shopPhotoItems.remove(model);
26 | sumtotalMoney();
27 | notifyListeners();
28 | }
29 |
30 | void incrementItem(PhotoModel model) {
31 | if (!shopPhotoItems.contains(model)) {
32 | Logger().wtf('Item has not found');
33 | } else {
34 | shopPhotoItems.singleWhere((element) => element.id == model.id).count++;
35 | sumtotalMoney();
36 | }
37 | notifyListeners();
38 | }
39 |
40 | void deIncrementItem(PhotoModel model) {
41 | if (!shopPhotoItems.contains(model)) {
42 | Logger().wtf('Item has not found');
43 | } else {
44 | shopPhotoItems.singleWhere((element) => element.id == model.id).count--;
45 | sumtotalMoney();
46 | }
47 | notifyListeners();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/week5/product/widgets/card/photo_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:kartal/kartal.dart';
3 | import 'package:provider/provider.dart';
4 |
5 | import '../../../feature/photos/model/photos_model.dart';
6 | import '../../manager/shop/shop_manager.dart';
7 |
8 | class PhotoCard extends StatefulWidget {
9 | final PhotoModel model;
10 |
11 | const PhotoCard({Key? key, required this.model}) : super(key: key);
12 |
13 | @override
14 | _PhotoCardState createState() => _PhotoCardState();
15 | }
16 |
17 | class _PhotoCardState extends State with AutomaticKeepAliveClientMixin {
18 | bool isIncrementOpen = false;
19 | late PhotoModel model;
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 | model = widget.model;
25 | }
26 |
27 | void isIncrementChange() {
28 | if (!isIncrementOpen) {
29 | context.read().addShopItem(model);
30 | } else {
31 | context.read().removeShopItem(model);
32 | }
33 | setState(() {
34 | isIncrementOpen = !isIncrementOpen;
35 | });
36 | }
37 |
38 | @override
39 | Widget build(BuildContext context) {
40 | super.build(context);
41 | return Card(
42 | child: Stack(
43 | children: [buildListTileCard(), Positioned(right: 0, child: buildCardShopIncrement())],
44 | ),
45 | );
46 | }
47 |
48 | ListTile buildListTileCard() {
49 | return ListTile(
50 | title: Image.network(model.url ?? ''),
51 | subtitle: Column(
52 | children: [
53 | Text(model.title ?? ' ', maxLines: 1),
54 | IconButton(
55 | icon: Icon(Icons.shopping_basket),
56 | onPressed: isIncrementChange,
57 | )
58 | ],
59 | ),
60 | );
61 | }
62 |
63 | Widget buildCardShopIncrement() {
64 | return AnimatedContainer(
65 | duration: context.durationLow,
66 | height: isIncrementOpen ? context.dynamicHeight(0.15) : 0,
67 | width: isIncrementOpen ? context.dynamicWidth(0.1) : 0,
68 | child: Card(
69 | elevation: 10,
70 | color: Colors.white,
71 | child: Column(
72 | children: [
73 | Expanded(flex: 4, child: buildIconButtonIncrement()),
74 | Expanded(
75 | flex: 1,
76 | child: Text(
77 | model.count.toString(),
78 | style: context.textTheme.button,
79 | ),
80 | ),
81 | Expanded(flex: 4, child: buildIconButtonRemove()),
82 | ],
83 | )),
84 | );
85 | }
86 |
87 | IconButton buildIconButtonRemove() {
88 | return IconButton(
89 | padding: EdgeInsets.zero,
90 | icon: Icon(Icons.remove),
91 | onPressed: () {
92 | context.read().deIncrementItem(model);
93 | model.count--;
94 | },
95 | );
96 | }
97 |
98 | IconButton buildIconButtonIncrement() {
99 | return IconButton(
100 | padding: EdgeInsets.zero,
101 | icon: Icon(Icons.add),
102 | onPressed: () {
103 | context.read().incrementItem(model);
104 | model.count++;
105 | },
106 | );
107 | }
108 |
109 | @override
110 | bool get wantKeepAlive => true;
111 | }
112 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | _fe_analyzer_shared:
5 | dependency: transitive
6 | description:
7 | name: _fe_analyzer_shared
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "20.0.0"
11 | analyzer:
12 | dependency: transitive
13 | description:
14 | name: analyzer
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.4.0"
18 | args:
19 | dependency: transitive
20 | description:
21 | name: args
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.0.0"
25 | async:
26 | dependency: transitive
27 | description:
28 | name: async
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "2.5.0"
32 | boolean_selector:
33 | dependency: transitive
34 | description:
35 | name: boolean_selector
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "2.1.0"
39 | build:
40 | dependency: transitive
41 | description:
42 | name: build
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "2.0.0"
46 | build_config:
47 | dependency: transitive
48 | description:
49 | name: build_config
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.4.7"
53 | build_daemon:
54 | dependency: transitive
55 | description:
56 | name: build_daemon
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.1.10"
60 | build_resolvers:
61 | dependency: transitive
62 | description:
63 | name: build_resolvers
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.0.0"
67 | build_runner:
68 | dependency: "direct main"
69 | description:
70 | name: build_runner
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.12.2"
74 | build_runner_core:
75 | dependency: transitive
76 | description:
77 | name: build_runner_core
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "6.1.12"
81 | built_collection:
82 | dependency: transitive
83 | description:
84 | name: built_collection
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "5.0.0"
88 | built_value:
89 | dependency: transitive
90 | description:
91 | name: built_value
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "8.0.4"
95 | characters:
96 | dependency: transitive
97 | description:
98 | name: characters
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "1.1.0"
102 | charcode:
103 | dependency: transitive
104 | description:
105 | name: charcode
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.2.0"
109 | checked_yaml:
110 | dependency: transitive
111 | description:
112 | name: checked_yaml
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "2.0.1"
116 | cli_util:
117 | dependency: transitive
118 | description:
119 | name: cli_util
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "0.3.0"
123 | clock:
124 | dependency: transitive
125 | description:
126 | name: clock
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "1.1.0"
130 | code_builder:
131 | dependency: transitive
132 | description:
133 | name: code_builder
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "3.7.0"
137 | collection:
138 | dependency: transitive
139 | description:
140 | name: collection
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "1.15.0"
144 | convert:
145 | dependency: transitive
146 | description:
147 | name: convert
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "3.0.0"
151 | crypto:
152 | dependency: transitive
153 | description:
154 | name: crypto
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "3.0.1"
158 | cupertino_icons:
159 | dependency: "direct main"
160 | description:
161 | name: cupertino_icons
162 | url: "https://pub.dartlang.org"
163 | source: hosted
164 | version: "1.0.2"
165 | dart_style:
166 | dependency: transitive
167 | description:
168 | name: dart_style
169 | url: "https://pub.dartlang.org"
170 | source: hosted
171 | version: "2.0.0"
172 | device_info:
173 | dependency: transitive
174 | description:
175 | name: device_info
176 | url: "https://pub.dartlang.org"
177 | source: hosted
178 | version: "2.0.0"
179 | device_info_platform_interface:
180 | dependency: transitive
181 | description:
182 | name: device_info_platform_interface
183 | url: "https://pub.dartlang.org"
184 | source: hosted
185 | version: "2.0.1"
186 | dio:
187 | dependency: "direct main"
188 | description:
189 | name: dio
190 | url: "https://pub.dartlang.org"
191 | source: hosted
192 | version: "4.0.0"
193 | easy_localization:
194 | dependency: "direct main"
195 | description:
196 | name: easy_localization
197 | url: "https://pub.dartlang.org"
198 | source: hosted
199 | version: "3.0.0"
200 | easy_logger:
201 | dependency: transitive
202 | description:
203 | name: easy_logger
204 | url: "https://pub.dartlang.org"
205 | source: hosted
206 | version: "0.0.2"
207 | fake_async:
208 | dependency: transitive
209 | description:
210 | name: fake_async
211 | url: "https://pub.dartlang.org"
212 | source: hosted
213 | version: "1.2.0"
214 | ffi:
215 | dependency: transitive
216 | description:
217 | name: ffi
218 | url: "https://pub.dartlang.org"
219 | source: hosted
220 | version: "1.0.0"
221 | file:
222 | dependency: transitive
223 | description:
224 | name: file
225 | url: "https://pub.dartlang.org"
226 | source: hosted
227 | version: "6.1.0"
228 | fixnum:
229 | dependency: transitive
230 | description:
231 | name: fixnum
232 | url: "https://pub.dartlang.org"
233 | source: hosted
234 | version: "1.0.0"
235 | flutter:
236 | dependency: "direct main"
237 | description: flutter
238 | source: sdk
239 | version: "0.0.0"
240 | flutter_dotenv:
241 | dependency: "direct main"
242 | description:
243 | name: flutter_dotenv
244 | url: "https://pub.dartlang.org"
245 | source: hosted
246 | version: "4.0.0-nullsafety.0"
247 | flutter_localizations:
248 | dependency: transitive
249 | description: flutter
250 | source: sdk
251 | version: "0.0.0"
252 | flutter_mobx:
253 | dependency: "direct main"
254 | description:
255 | name: flutter_mobx
256 | url: "https://pub.dartlang.org"
257 | source: hosted
258 | version: "2.0.0"
259 | flutter_test:
260 | dependency: "direct dev"
261 | description: flutter
262 | source: sdk
263 | version: "0.0.0"
264 | flutter_web_plugins:
265 | dependency: transitive
266 | description: flutter
267 | source: sdk
268 | version: "0.0.0"
269 | glob:
270 | dependency: transitive
271 | description:
272 | name: glob
273 | url: "https://pub.dartlang.org"
274 | source: hosted
275 | version: "2.0.1"
276 | graphs:
277 | dependency: transitive
278 | description:
279 | name: graphs
280 | url: "https://pub.dartlang.org"
281 | source: hosted
282 | version: "1.0.0"
283 | http:
284 | dependency: "direct main"
285 | description:
286 | name: http
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "0.13.1"
290 | http_multi_server:
291 | dependency: transitive
292 | description:
293 | name: http_multi_server
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "3.0.0"
297 | http_parser:
298 | dependency: transitive
299 | description:
300 | name: http_parser
301 | url: "https://pub.dartlang.org"
302 | source: hosted
303 | version: "4.0.0"
304 | intl:
305 | dependency: transitive
306 | description:
307 | name: intl
308 | url: "https://pub.dartlang.org"
309 | source: hosted
310 | version: "0.17.0"
311 | io:
312 | dependency: transitive
313 | description:
314 | name: io
315 | url: "https://pub.dartlang.org"
316 | source: hosted
317 | version: "1.0.0"
318 | js:
319 | dependency: transitive
320 | description:
321 | name: js
322 | url: "https://pub.dartlang.org"
323 | source: hosted
324 | version: "0.6.3"
325 | json_annotation:
326 | dependency: "direct main"
327 | description:
328 | name: json_annotation
329 | url: "https://pub.dartlang.org"
330 | source: hosted
331 | version: "4.0.1"
332 | json_serializable:
333 | dependency: "direct main"
334 | description:
335 | name: json_serializable
336 | url: "https://pub.dartlang.org"
337 | source: hosted
338 | version: "4.1.0"
339 | kartal:
340 | dependency: "direct main"
341 | description:
342 | name: kartal
343 | url: "https://pub.dartlang.org"
344 | source: hosted
345 | version: "2.0.0"
346 | logger:
347 | dependency: "direct main"
348 | description:
349 | name: logger
350 | url: "https://pub.dartlang.org"
351 | source: hosted
352 | version: "1.0.0"
353 | logging:
354 | dependency: transitive
355 | description:
356 | name: logging
357 | url: "https://pub.dartlang.org"
358 | source: hosted
359 | version: "1.0.1"
360 | mask_text_input_formatter:
361 | dependency: transitive
362 | description:
363 | name: mask_text_input_formatter
364 | url: "https://pub.dartlang.org"
365 | source: hosted
366 | version: "2.0.0-nullsafety.2"
367 | matcher:
368 | dependency: transitive
369 | description:
370 | name: matcher
371 | url: "https://pub.dartlang.org"
372 | source: hosted
373 | version: "0.12.10"
374 | meta:
375 | dependency: transitive
376 | description:
377 | name: meta
378 | url: "https://pub.dartlang.org"
379 | source: hosted
380 | version: "1.3.0"
381 | mime:
382 | dependency: transitive
383 | description:
384 | name: mime
385 | url: "https://pub.dartlang.org"
386 | source: hosted
387 | version: "1.0.0"
388 | mobx:
389 | dependency: "direct main"
390 | description:
391 | name: mobx
392 | url: "https://pub.dartlang.org"
393 | source: hosted
394 | version: "2.0.1"
395 | mobx_codegen:
396 | dependency: "direct main"
397 | description:
398 | name: mobx_codegen
399 | url: "https://pub.dartlang.org"
400 | source: hosted
401 | version: "2.0.1+2"
402 | nested:
403 | dependency: transitive
404 | description:
405 | name: nested
406 | url: "https://pub.dartlang.org"
407 | source: hosted
408 | version: "1.0.0"
409 | package_config:
410 | dependency: transitive
411 | description:
412 | name: package_config
413 | url: "https://pub.dartlang.org"
414 | source: hosted
415 | version: "2.0.0"
416 | package_info:
417 | dependency: transitive
418 | description:
419 | name: package_info
420 | url: "https://pub.dartlang.org"
421 | source: hosted
422 | version: "2.0.0"
423 | path:
424 | dependency: transitive
425 | description:
426 | name: path
427 | url: "https://pub.dartlang.org"
428 | source: hosted
429 | version: "1.8.0"
430 | path_provider_linux:
431 | dependency: transitive
432 | description:
433 | name: path_provider_linux
434 | url: "https://pub.dartlang.org"
435 | source: hosted
436 | version: "2.0.0"
437 | path_provider_platform_interface:
438 | dependency: transitive
439 | description:
440 | name: path_provider_platform_interface
441 | url: "https://pub.dartlang.org"
442 | source: hosted
443 | version: "2.0.1"
444 | path_provider_windows:
445 | dependency: transitive
446 | description:
447 | name: path_provider_windows
448 | url: "https://pub.dartlang.org"
449 | source: hosted
450 | version: "2.0.0"
451 | pedantic:
452 | dependency: "direct main"
453 | description:
454 | name: pedantic
455 | url: "https://pub.dartlang.org"
456 | source: hosted
457 | version: "1.11.0"
458 | platform:
459 | dependency: transitive
460 | description:
461 | name: platform
462 | url: "https://pub.dartlang.org"
463 | source: hosted
464 | version: "3.0.0"
465 | plugin_platform_interface:
466 | dependency: transitive
467 | description:
468 | name: plugin_platform_interface
469 | url: "https://pub.dartlang.org"
470 | source: hosted
471 | version: "2.0.0"
472 | pool:
473 | dependency: transitive
474 | description:
475 | name: pool
476 | url: "https://pub.dartlang.org"
477 | source: hosted
478 | version: "1.5.0"
479 | pretty_dio_logger:
480 | dependency: "direct main"
481 | description:
482 | name: pretty_dio_logger
483 | url: "https://pub.dartlang.org"
484 | source: hosted
485 | version: "1.2.0-beta-1"
486 | process:
487 | dependency: transitive
488 | description:
489 | name: process
490 | url: "https://pub.dartlang.org"
491 | source: hosted
492 | version: "4.2.1"
493 | provider:
494 | dependency: "direct main"
495 | description:
496 | name: provider
497 | url: "https://pub.dartlang.org"
498 | source: hosted
499 | version: "5.0.0"
500 | pub_semver:
501 | dependency: transitive
502 | description:
503 | name: pub_semver
504 | url: "https://pub.dartlang.org"
505 | source: hosted
506 | version: "2.0.0"
507 | pubspec_parse:
508 | dependency: transitive
509 | description:
510 | name: pubspec_parse
511 | url: "https://pub.dartlang.org"
512 | source: hosted
513 | version: "1.0.0"
514 | share:
515 | dependency: transitive
516 | description:
517 | name: share
518 | url: "https://pub.dartlang.org"
519 | source: hosted
520 | version: "2.0.1"
521 | shared_preferences:
522 | dependency: transitive
523 | description:
524 | name: shared_preferences
525 | url: "https://pub.dartlang.org"
526 | source: hosted
527 | version: "2.0.5"
528 | shared_preferences_linux:
529 | dependency: transitive
530 | description:
531 | name: shared_preferences_linux
532 | url: "https://pub.dartlang.org"
533 | source: hosted
534 | version: "2.0.0"
535 | shared_preferences_macos:
536 | dependency: transitive
537 | description:
538 | name: shared_preferences_macos
539 | url: "https://pub.dartlang.org"
540 | source: hosted
541 | version: "2.0.0"
542 | shared_preferences_platform_interface:
543 | dependency: transitive
544 | description:
545 | name: shared_preferences_platform_interface
546 | url: "https://pub.dartlang.org"
547 | source: hosted
548 | version: "2.0.0"
549 | shared_preferences_web:
550 | dependency: transitive
551 | description:
552 | name: shared_preferences_web
553 | url: "https://pub.dartlang.org"
554 | source: hosted
555 | version: "2.0.0"
556 | shared_preferences_windows:
557 | dependency: transitive
558 | description:
559 | name: shared_preferences_windows
560 | url: "https://pub.dartlang.org"
561 | source: hosted
562 | version: "2.0.0"
563 | shelf:
564 | dependency: transitive
565 | description:
566 | name: shelf
567 | url: "https://pub.dartlang.org"
568 | source: hosted
569 | version: "1.1.0"
570 | shelf_web_socket:
571 | dependency: transitive
572 | description:
573 | name: shelf_web_socket
574 | url: "https://pub.dartlang.org"
575 | source: hosted
576 | version: "1.0.1"
577 | sky_engine:
578 | dependency: transitive
579 | description: flutter
580 | source: sdk
581 | version: "0.0.99"
582 | source_gen:
583 | dependency: transitive
584 | description:
585 | name: source_gen
586 | url: "https://pub.dartlang.org"
587 | source: hosted
588 | version: "1.0.0"
589 | source_span:
590 | dependency: transitive
591 | description:
592 | name: source_span
593 | url: "https://pub.dartlang.org"
594 | source: hosted
595 | version: "1.8.0"
596 | stack_trace:
597 | dependency: transitive
598 | description:
599 | name: stack_trace
600 | url: "https://pub.dartlang.org"
601 | source: hosted
602 | version: "1.10.0"
603 | stream_channel:
604 | dependency: transitive
605 | description:
606 | name: stream_channel
607 | url: "https://pub.dartlang.org"
608 | source: hosted
609 | version: "2.1.0"
610 | stream_transform:
611 | dependency: transitive
612 | description:
613 | name: stream_transform
614 | url: "https://pub.dartlang.org"
615 | source: hosted
616 | version: "2.0.0"
617 | string_scanner:
618 | dependency: transitive
619 | description:
620 | name: string_scanner
621 | url: "https://pub.dartlang.org"
622 | source: hosted
623 | version: "1.1.0"
624 | term_glyph:
625 | dependency: transitive
626 | description:
627 | name: term_glyph
628 | url: "https://pub.dartlang.org"
629 | source: hosted
630 | version: "1.2.0"
631 | test_api:
632 | dependency: transitive
633 | description:
634 | name: test_api
635 | url: "https://pub.dartlang.org"
636 | source: hosted
637 | version: "0.2.19"
638 | timing:
639 | dependency: transitive
640 | description:
641 | name: timing
642 | url: "https://pub.dartlang.org"
643 | source: hosted
644 | version: "1.0.0"
645 | typed_data:
646 | dependency: transitive
647 | description:
648 | name: typed_data
649 | url: "https://pub.dartlang.org"
650 | source: hosted
651 | version: "1.3.0"
652 | url_launcher:
653 | dependency: transitive
654 | description:
655 | name: url_launcher
656 | url: "https://pub.dartlang.org"
657 | source: hosted
658 | version: "6.0.3"
659 | url_launcher_linux:
660 | dependency: transitive
661 | description:
662 | name: url_launcher_linux
663 | url: "https://pub.dartlang.org"
664 | source: hosted
665 | version: "2.0.0"
666 | url_launcher_macos:
667 | dependency: transitive
668 | description:
669 | name: url_launcher_macos
670 | url: "https://pub.dartlang.org"
671 | source: hosted
672 | version: "2.0.0"
673 | url_launcher_platform_interface:
674 | dependency: transitive
675 | description:
676 | name: url_launcher_platform_interface
677 | url: "https://pub.dartlang.org"
678 | source: hosted
679 | version: "2.0.2"
680 | url_launcher_web:
681 | dependency: transitive
682 | description:
683 | name: url_launcher_web
684 | url: "https://pub.dartlang.org"
685 | source: hosted
686 | version: "2.0.0"
687 | url_launcher_windows:
688 | dependency: transitive
689 | description:
690 | name: url_launcher_windows
691 | url: "https://pub.dartlang.org"
692 | source: hosted
693 | version: "2.0.0"
694 | vector_math:
695 | dependency: transitive
696 | description:
697 | name: vector_math
698 | url: "https://pub.dartlang.org"
699 | source: hosted
700 | version: "2.1.0"
701 | watcher:
702 | dependency: transitive
703 | description:
704 | name: watcher
705 | url: "https://pub.dartlang.org"
706 | source: hosted
707 | version: "1.0.0"
708 | web_socket_channel:
709 | dependency: transitive
710 | description:
711 | name: web_socket_channel
712 | url: "https://pub.dartlang.org"
713 | source: hosted
714 | version: "2.0.0"
715 | win32:
716 | dependency: transitive
717 | description:
718 | name: win32
719 | url: "https://pub.dartlang.org"
720 | source: hosted
721 | version: "2.0.5"
722 | xdg_directories:
723 | dependency: transitive
724 | description:
725 | name: xdg_directories
726 | url: "https://pub.dartlang.org"
727 | source: hosted
728 | version: "0.2.0"
729 | yaml:
730 | dependency: transitive
731 | description:
732 | name: yaml
733 | url: "https://pub.dartlang.org"
734 | source: hosted
735 | version: "3.1.0"
736 | sdks:
737 | dart: ">=2.12.0 <3.0.0"
738 | flutter: ">=1.22.0"
739 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_learn
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: '>=2.12.0 <3.0.0'
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 | build_runner: ^1.12.2
27 | cupertino_icons: ^1.0.2
28 | dio: ^4.0.0
29 | easy_localization: ^3.0.0
30 | flutter_dotenv: ^4.0.0-nullsafety.0
31 | flutter_mobx: ^2.0.0
32 | http: ^0.13.1
33 | json_annotation: ^4.0.1
34 | json_serializable: ^4.1.0
35 | logger: ^1.0.0
36 | mobx: ^2.0.1
37 | mobx_codegen: ^2.0.1+2
38 | pedantic: ^1.11.0
39 | pretty_dio_logger: ^1.2.0-beta-1
40 | provider: ^5.0.0
41 | kartal: ^2.0.0
42 |
43 |
44 | dev_dependencies:
45 | flutter_test:
46 | sdk: flutter
47 |
48 | # For information on the generic Dart part of this file, see the
49 | # following page: https://dart.dev/tools/pub/pubspec
50 | # The following section is specific to Flutter.
51 | flutter:
52 |
53 | # The following line ensures that the Material Icons font is
54 | # included with your application, so that you can use the icons in
55 | # the material Icons class.
56 | uses-material-design: true
57 |
58 | assets:
59 | - assets/image/
60 | - .env
61 | - assets/lang/
62 | # An image asset can refer to one or more resolution-specific "variants", see
63 | # https://flutter.dev/assets-and-images/#resolution-aware.
64 | # For details regarding adding assets from package dependencies, see
65 | # https://flutter.dev/assets-and-images/#from-packages
66 | # To add custom fonts to your application, add a fonts section here,
67 | # in this "flutter" section. Each entry in this list should have a
68 | # "family" key with the font family name, and a "fonts" key with a
69 | # list giving the asset and other descriptors for the font. For
70 | # example:
71 | # fonts:
72 | # - family: Schyler
73 | # fonts:
74 | # - asset: fonts/Schyler-Regular.ttf
75 | # - asset: fonts/Schyler-Italic.ttf
76 | # style: italic
77 | # - family: Trajan Pro
78 | # fonts:
79 | # - asset: fonts/TrajanPro.ttf
80 | # - asset: fonts/TrajanPro_Bold.ttf
81 | # weight: 700
82 | #
83 | # For details regarding fonts from package dependencies,
84 | # see https://flutter.dev/custom-fonts/#from-packages
85 |
--------------------------------------------------------------------------------
/scripts/lang.sh:
--------------------------------------------------------------------------------
1 | flutter pub run easy_localization:generate -O lib/core/init/lang -f keys -o locale_keys.g.dart --source-dir assets/lang
--------------------------------------------------------------------------------
/scripts/mobx.sh:
--------------------------------------------------------------------------------
1 |
2 | if [ "$1" = "force" ]
3 | then
4 | flutter packages pub run build_runner build --delete-conflicting-outputs
5 | else
6 | flutter packages pub run build_runner build
7 | fi
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/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_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(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 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VB10/flutter_learn/b86eff5f1b4fe64bc2e208dc8c3e49871c5a93e5/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | flutter_learn
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_learn",
3 | "short_name": "flutter_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 | }
24 |
--------------------------------------------------------------------------------