├── .flutter-plugins-dependencies ├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── br │ │ │ │ └── com │ │ │ │ └── ht7 │ │ │ │ └── flutter_architecture │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── 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 │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── logo.png ├── logo_header.png └── logo_launcher.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── flutter_export_environment.sh ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── 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 ├── app │ ├── data │ │ ├── auth.repository.dart │ │ ├── mappers │ │ │ └── user.mapper.dart │ │ └── sources │ │ │ ├── cache │ │ │ └── storage.helper.dart │ │ │ ├── local │ │ │ ├── daos │ │ │ │ └── todo.dao.dart │ │ │ ├── dbconfig.dart │ │ │ └── tables │ │ │ │ └── todo.table.dart │ │ │ └── remote │ │ │ ├── auth.service.dart │ │ │ ├── base │ │ │ ├── base_url.dart │ │ │ └── endpoints.dart │ │ │ └── user.service.dart │ ├── domain │ │ ├── http_response.dart │ │ ├── repositories │ │ │ └── auth.repository.dart │ │ └── user.dart │ └── ui │ │ ├── components │ │ └── loading.dart │ │ ├── modules │ │ ├── authenticated │ │ │ └── home │ │ │ │ ├── home.page.dart │ │ │ │ ├── home.viewmodel.dart │ │ │ │ └── home.widget.dart │ │ └── unauthenticated │ │ │ └── login │ │ │ ├── login.page.dart │ │ │ ├── login.viewmodel.dart │ │ │ └── login.widget.dart │ │ └── widgets │ │ ├── button.dart │ │ ├── card_view.dart │ │ ├── dropdown.dart │ │ ├── icon_button.dart │ │ ├── input.dart │ │ ├── logo.dart │ │ ├── modal.dart │ │ ├── nav_bottom_sheet.dart │ │ ├── snackbar.dart │ │ ├── tag.dart │ │ ├── text.dart │ │ ├── toast.dart │ │ └── toolbar.dart ├── core │ ├── app.dart │ ├── base │ │ └── view_model.base.dart │ ├── di │ │ ├── http_client.dart │ │ └── injector_provider.dart │ ├── utils │ │ └── jwt.util.dart │ └── values │ │ ├── colors.dart │ │ ├── dimens.dart │ │ └── theme.dart ├── device │ ├── camera │ │ └── camera.dart │ ├── connection │ │ └── connection.helper.dart │ └── nav │ │ ├── nav_no_animation.dart │ │ ├── nav_slide_from_bottom.dart │ │ ├── nav_slide_from_left.dart │ │ ├── nav_slide_from_right.dart │ │ └── nav_slide_from_top.dart └── main.dart ├── pubspec.lock └── pubspec.yaml /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.6+2/","dependencies":[]},{"name":"fluttertoast","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/","dependencies":[]},{"name":"image_picker","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.3+1/","dependencies":[]},{"name":"shared_preferences","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/","dependencies":[]},{"name":"sqflite","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/sqflite-1.2.0/","dependencies":[]}],"android":[{"name":"connectivity","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.6+2/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.4/","dependencies":[]},{"name":"fluttertoast","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/","dependencies":[]},{"name":"image_picker","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.3+1/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"shared_preferences","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/","dependencies":[]},{"name":"sqflite","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/sqflite-1.2.0/","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+3/","dependencies":[]},{"name":"sqflite","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/sqflite-1.2.0/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/tguizelini/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2020-06-28 19:45:05.924702","version":"1.17.4"} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /.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: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Architecture 2 | 3 | This project structure was made thinking in productivity and easy maintenance. 4 | 5 | #### What it brings ? 6 | 7 | 1. Clean Architecture and MVVM 8 | 9 | 2. Get_It for dependency injection 10 | 11 | 3. For state management, you have two options: 12 | ``` 13 | BRANCH master -> RxDart 14 | BRANCH mobx -> Mobx 15 | ``` 16 | 4. SQFlite to work with SQLite 17 | 18 | 5. HTTP requests using Dio 19 | 20 | 6. Helper for store data on device using Shared Preferences with a helper class 21 | 22 | 7. Helper for check connection status 23 | 24 | 8. Custom classes for page transitions animated (fromLeft, from Top, fromBottom and fromRight) 25 | 26 | 9. Custom Widgets like LoadingWidget, CardViewWidget, Toast, Snackbar, ModalWidget, Dropdown, CustomDrawer and more 27 | 28 | 10. The "values" folder, you will find the files: 29 | - "dimens": to set sizes defaults for margin, font, etc 30 | - "colors" set the color pallet 31 | - "theme": set the app's theme 32 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /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 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "br.com.ht7.flutter_architecture" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/br/com/ht7/flutter_architecture/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package br.com.ht7.flutter_architecture 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity 5 | import io.flutter.embedding.engine.FlutterEngine 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { 10 | GeneratedPluginRegistrant.registerWith(flutterEngine); 11 | } 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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /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:3.5.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.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /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-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/assets/logo.png -------------------------------------------------------------------------------- /assets/logo_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/assets/logo_header.png -------------------------------------------------------------------------------- /assets/logo_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/assets/logo_launcher.png -------------------------------------------------------------------------------- /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 | $(DEVELOPMENT_LANGUAGE) 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/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/tguizelini/FlutterSDK" 4 | export "FLUTTER_APPLICATION_PATH=/Users/tguizelini/Src/flutter-architecture-mobx" 5 | export "FLUTTER_TARGET=/Users/tguizelini/Src/flutter-architecture-mobx/lib/main.dart" 6 | export "FLUTTER_BUILD_DIR=build" 7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios" 8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter" 9 | export "FLUTTER_FRAMEWORK_DIR=/Users/tguizelini/FlutterSDK/bin/cache/artifacts/engine/ios" 10 | export "FLUTTER_BUILD_NAME=1.0.0" 11 | export "FLUTTER_BUILD_NUMBER=1" 12 | export "TRACK_WIDGET_CREATION=true" 13 | export "DART_DEFINES=flutter.inspector.structuredErrors=true" 14 | -------------------------------------------------------------------------------- /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 parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 82 | install! 'cocoapods', :disable_input_output_paths => true 83 | 84 | post_install do |installer| 85 | installer.pods_project.targets.each do |target| 86 | target.build_configurations.each do |config| 87 | config.build_settings['ENABLE_BITCODE'] = 'NO' 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - connectivity (0.0.1): 3 | - Flutter 4 | - Reachability 5 | - Flutter (1.0.0) 6 | - flutter_plugin_android_lifecycle (0.0.1): 7 | - Flutter 8 | - fluttertoast (0.0.2): 9 | - Flutter 10 | - FMDB (2.7.5): 11 | - FMDB/standard (= 2.7.5) 12 | - FMDB/standard (2.7.5) 13 | - image_picker (0.0.1): 14 | - Flutter 15 | - Reachability (3.2) 16 | - shared_preferences (0.0.1): 17 | - Flutter 18 | - shared_preferences_macos (0.0.1): 19 | - Flutter 20 | - shared_preferences_web (0.0.1): 21 | - Flutter 22 | - sqflite (0.0.1): 23 | - Flutter 24 | - FMDB (~> 2.7.2) 25 | 26 | DEPENDENCIES: 27 | - connectivity (from `.symlinks/plugins/connectivity/ios`) 28 | - Flutter (from `Flutter`) 29 | - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) 30 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) 31 | - image_picker (from `.symlinks/plugins/image_picker/ios`) 32 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 33 | - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) 34 | - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) 35 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 36 | 37 | SPEC REPOS: 38 | trunk: 39 | - FMDB 40 | - Reachability 41 | 42 | EXTERNAL SOURCES: 43 | connectivity: 44 | :path: ".symlinks/plugins/connectivity/ios" 45 | Flutter: 46 | :path: Flutter 47 | flutter_plugin_android_lifecycle: 48 | :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" 49 | fluttertoast: 50 | :path: ".symlinks/plugins/fluttertoast/ios" 51 | image_picker: 52 | :path: ".symlinks/plugins/image_picker/ios" 53 | shared_preferences: 54 | :path: ".symlinks/plugins/shared_preferences/ios" 55 | shared_preferences_macos: 56 | :path: ".symlinks/plugins/shared_preferences_macos/ios" 57 | shared_preferences_web: 58 | :path: ".symlinks/plugins/shared_preferences_web/ios" 59 | sqflite: 60 | :path: ".symlinks/plugins/sqflite/ios" 61 | 62 | SPEC CHECKSUMS: 63 | connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75 64 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 65 | flutter_plugin_android_lifecycle: 47de533a02850f070f5696a623995e93eddcdb9b 66 | fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b 67 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 68 | image_picker: e3eacd46b94694dde7cf2705955cece853aa1a8f 69 | Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 70 | shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01 71 | shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 72 | shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 73 | sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 74 | 75 | PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 76 | 77 | COCOAPODS: 1.8.4 78 | -------------------------------------------------------------------------------- /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 | 366D2849658E359B6417631A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F96688578509A4DB4B824A /* 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 | 08F96688578509A4DB4B824A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 114EACA0ED0469C0EF37E403 /* 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 = ""; }; 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 86A53B6F75803D770D3F01C2 /* 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 = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | F13204BC09361097FD386291 /* 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 = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 366D2849658E359B6417631A /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 842A07BC822F7FDF4BAF571C /* Pods */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 114EACA0ED0469C0EF37E403 /* Pods-Runner.debug.xcconfig */, 68 | F13204BC09361097FD386291 /* Pods-Runner.release.xcconfig */, 69 | 86A53B6F75803D770D3F01C2 /* 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 | 842A07BC822F7FDF4BAF571C /* Pods */, 93 | F1B6B11F07C2E2D8F6987AFE /* 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 | 97C146F11CF9000F007C117D /* Supporting Files */, 113 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 114 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 115 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 116 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 117 | ); 118 | path = Runner; 119 | sourceTree = ""; 120 | }; 121 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | ); 125 | name = "Supporting Files"; 126 | sourceTree = ""; 127 | }; 128 | F1B6B11F07C2E2D8F6987AFE /* Frameworks */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 08F96688578509A4DB4B824A /* Pods_Runner.framework */, 132 | ); 133 | name = Frameworks; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | 97C146ED1CF9000F007C117D /* Runner */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 142 | buildPhases = ( 143 | DED409C27C6526F822B80C9A /* [CP] Check Pods Manifest.lock */, 144 | 9740EEB61CF901F6004384FC /* Run Script */, 145 | 97C146EA1CF9000F007C117D /* Sources */, 146 | 97C146EB1CF9000F007C117D /* Frameworks */, 147 | 97C146EC1CF9000F007C117D /* Resources */, 148 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 149 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 150 | 9E98EE2A1EF82E78FFAA70EE /* [CP] Embed Pods Frameworks */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | ); 156 | name = Runner; 157 | productName = Runner; 158 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 159 | productType = "com.apple.product-type.application"; 160 | }; 161 | /* End PBXNativeTarget section */ 162 | 163 | /* Begin PBXProject section */ 164 | 97C146E61CF9000F007C117D /* Project object */ = { 165 | isa = PBXProject; 166 | attributes = { 167 | LastUpgradeCheck = 1020; 168 | ORGANIZATIONNAME = "The Chromium Authors"; 169 | TargetAttributes = { 170 | 97C146ED1CF9000F007C117D = { 171 | CreatedOnToolsVersion = 7.3.1; 172 | LastSwiftMigration = 1100; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 177 | compatibilityVersion = "Xcode 3.2"; 178 | developmentRegion = en; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = 97C146E51CF9000F007C117D; 185 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 97C146ED1CF9000F007C117D /* Runner */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 97C146EC1CF9000F007C117D /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 200 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 201 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 202 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXResourcesBuildPhase section */ 207 | 208 | /* Begin PBXShellScriptBuildPhase section */ 209 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 210 | isa = PBXShellScriptBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | inputPaths = ( 215 | ); 216 | name = "Thin Binary"; 217 | outputPaths = ( 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | shellPath = /bin/sh; 221 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 222 | }; 223 | 9740EEB61CF901F6004384FC /* Run Script */ = { 224 | isa = PBXShellScriptBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ); 228 | inputPaths = ( 229 | ); 230 | name = "Run Script"; 231 | outputPaths = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | shellPath = /bin/sh; 235 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 236 | }; 237 | 9E98EE2A1EF82E78FFAA70EE /* [CP] Embed Pods Frameworks */ = { 238 | isa = PBXShellScriptBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | ); 242 | inputPaths = ( 243 | ); 244 | name = "[CP] Embed Pods Frameworks"; 245 | outputPaths = ( 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | shellPath = /bin/sh; 249 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 250 | showEnvVarsInLog = 0; 251 | }; 252 | DED409C27C6526F822B80C9A /* [CP] Check Pods Manifest.lock */ = { 253 | isa = PBXShellScriptBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | inputFileListPaths = ( 258 | ); 259 | inputPaths = ( 260 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 261 | "${PODS_ROOT}/Manifest.lock", 262 | ); 263 | name = "[CP] Check Pods Manifest.lock"; 264 | outputFileListPaths = ( 265 | ); 266 | outputPaths = ( 267 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | shellPath = /bin/sh; 271 | 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"; 272 | showEnvVarsInLog = 0; 273 | }; 274 | /* End PBXShellScriptBuildPhase section */ 275 | 276 | /* Begin PBXSourcesBuildPhase section */ 277 | 97C146EA1CF9000F007C117D /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 282 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXSourcesBuildPhase section */ 287 | 288 | /* Begin PBXVariantGroup section */ 289 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 290 | isa = PBXVariantGroup; 291 | children = ( 292 | 97C146FB1CF9000F007C117D /* Base */, 293 | ); 294 | name = Main.storyboard; 295 | sourceTree = ""; 296 | }; 297 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | 97C147001CF9000F007C117D /* Base */, 301 | ); 302 | name = LaunchScreen.storyboard; 303 | sourceTree = ""; 304 | }; 305 | /* End PBXVariantGroup section */ 306 | 307 | /* Begin XCBuildConfiguration section */ 308 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 309 | isa = XCBuildConfiguration; 310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 311 | buildSettings = { 312 | ALWAYS_SEARCH_USER_PATHS = NO; 313 | CLANG_ANALYZER_NONNULL = YES; 314 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 315 | CLANG_CXX_LIBRARY = "libc++"; 316 | CLANG_ENABLE_MODULES = YES; 317 | CLANG_ENABLE_OBJC_ARC = YES; 318 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 319 | CLANG_WARN_BOOL_CONVERSION = YES; 320 | CLANG_WARN_COMMA = YES; 321 | CLANG_WARN_CONSTANT_CONVERSION = YES; 322 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 323 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 324 | CLANG_WARN_EMPTY_BODY = YES; 325 | CLANG_WARN_ENUM_CONVERSION = YES; 326 | CLANG_WARN_INFINITE_RECURSION = YES; 327 | CLANG_WARN_INT_CONVERSION = YES; 328 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 329 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 330 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 332 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 333 | CLANG_WARN_STRICT_PROTOTYPES = YES; 334 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 335 | CLANG_WARN_UNREACHABLE_CODE = YES; 336 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 337 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 338 | COPY_PHASE_STRIP = NO; 339 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 340 | ENABLE_NS_ASSERTIONS = NO; 341 | ENABLE_STRICT_OBJC_MSGSEND = YES; 342 | GCC_C_LANGUAGE_STANDARD = gnu99; 343 | GCC_NO_COMMON_BLOCKS = YES; 344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 346 | GCC_WARN_UNDECLARED_SELECTOR = YES; 347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 348 | GCC_WARN_UNUSED_FUNCTION = YES; 349 | GCC_WARN_UNUSED_VARIABLE = YES; 350 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 351 | MTL_ENABLE_DEBUG_INFO = NO; 352 | SDKROOT = iphoneos; 353 | SUPPORTED_PLATFORMS = iphoneos; 354 | TARGETED_DEVICE_FAMILY = "1,2"; 355 | VALIDATE_PRODUCT = YES; 356 | }; 357 | name = Profile; 358 | }; 359 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 360 | isa = XCBuildConfiguration; 361 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 362 | buildSettings = { 363 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 364 | CLANG_ENABLE_MODULES = YES; 365 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 366 | ENABLE_BITCODE = NO; 367 | FRAMEWORK_SEARCH_PATHS = ( 368 | "$(inherited)", 369 | "$(PROJECT_DIR)/Flutter", 370 | ); 371 | INFOPLIST_FILE = Runner/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 373 | LIBRARY_SEARCH_PATHS = ( 374 | "$(inherited)", 375 | "$(PROJECT_DIR)/Flutter", 376 | ); 377 | PRODUCT_BUNDLE_IDENTIFIER = br.com.ht7.flutterArchitecture; 378 | PRODUCT_NAME = "$(TARGET_NAME)"; 379 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 380 | SWIFT_VERSION = 5.0; 381 | VERSIONING_SYSTEM = "apple-generic"; 382 | }; 383 | name = Profile; 384 | }; 385 | 97C147031CF9000F007C117D /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 388 | buildSettings = { 389 | ALWAYS_SEARCH_USER_PATHS = NO; 390 | CLANG_ANALYZER_NONNULL = YES; 391 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 392 | CLANG_CXX_LIBRARY = "libc++"; 393 | CLANG_ENABLE_MODULES = YES; 394 | CLANG_ENABLE_OBJC_ARC = YES; 395 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 396 | CLANG_WARN_BOOL_CONVERSION = YES; 397 | CLANG_WARN_COMMA = YES; 398 | CLANG_WARN_CONSTANT_CONVERSION = YES; 399 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INFINITE_RECURSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 410 | CLANG_WARN_STRICT_PROTOTYPES = YES; 411 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 412 | CLANG_WARN_UNREACHABLE_CODE = YES; 413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = dwarf; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | ENABLE_TESTABILITY = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_DYNAMIC_NO_PIC = NO; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_OPTIMIZATION_LEVEL = 0; 423 | GCC_PREPROCESSOR_DEFINITIONS = ( 424 | "DEBUG=1", 425 | "$(inherited)", 426 | ); 427 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 428 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 429 | GCC_WARN_UNDECLARED_SELECTOR = YES; 430 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 431 | GCC_WARN_UNUSED_FUNCTION = YES; 432 | GCC_WARN_UNUSED_VARIABLE = YES; 433 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 434 | MTL_ENABLE_DEBUG_INFO = YES; 435 | ONLY_ACTIVE_ARCH = YES; 436 | SDKROOT = iphoneos; 437 | TARGETED_DEVICE_FAMILY = "1,2"; 438 | }; 439 | name = Debug; 440 | }; 441 | 97C147041CF9000F007C117D /* Release */ = { 442 | isa = XCBuildConfiguration; 443 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 444 | buildSettings = { 445 | ALWAYS_SEARCH_USER_PATHS = NO; 446 | CLANG_ANALYZER_NONNULL = YES; 447 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 448 | CLANG_CXX_LIBRARY = "libc++"; 449 | CLANG_ENABLE_MODULES = YES; 450 | CLANG_ENABLE_OBJC_ARC = YES; 451 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 452 | CLANG_WARN_BOOL_CONVERSION = YES; 453 | CLANG_WARN_COMMA = YES; 454 | CLANG_WARN_CONSTANT_CONVERSION = YES; 455 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 456 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 457 | CLANG_WARN_EMPTY_BODY = YES; 458 | CLANG_WARN_ENUM_CONVERSION = YES; 459 | CLANG_WARN_INFINITE_RECURSION = YES; 460 | CLANG_WARN_INT_CONVERSION = YES; 461 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 466 | CLANG_WARN_STRICT_PROTOTYPES = YES; 467 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 468 | CLANG_WARN_UNREACHABLE_CODE = YES; 469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 471 | COPY_PHASE_STRIP = NO; 472 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 473 | ENABLE_NS_ASSERTIONS = NO; 474 | ENABLE_STRICT_OBJC_MSGSEND = YES; 475 | GCC_C_LANGUAGE_STANDARD = gnu99; 476 | GCC_NO_COMMON_BLOCKS = YES; 477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 479 | GCC_WARN_UNDECLARED_SELECTOR = YES; 480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 481 | GCC_WARN_UNUSED_FUNCTION = YES; 482 | GCC_WARN_UNUSED_VARIABLE = YES; 483 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 484 | MTL_ENABLE_DEBUG_INFO = NO; 485 | SDKROOT = iphoneos; 486 | SUPPORTED_PLATFORMS = iphoneos; 487 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | VALIDATE_PRODUCT = YES; 490 | }; 491 | name = Release; 492 | }; 493 | 97C147061CF9000F007C117D /* Debug */ = { 494 | isa = XCBuildConfiguration; 495 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 496 | buildSettings = { 497 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 498 | CLANG_ENABLE_MODULES = YES; 499 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 500 | ENABLE_BITCODE = NO; 501 | FRAMEWORK_SEARCH_PATHS = ( 502 | "$(inherited)", 503 | "$(PROJECT_DIR)/Flutter", 504 | ); 505 | INFOPLIST_FILE = Runner/Info.plist; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 507 | LIBRARY_SEARCH_PATHS = ( 508 | "$(inherited)", 509 | "$(PROJECT_DIR)/Flutter", 510 | ); 511 | PRODUCT_BUNDLE_IDENTIFIER = br.com.ht7.flutterArchitecture; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 514 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 515 | SWIFT_VERSION = 5.0; 516 | VERSIONING_SYSTEM = "apple-generic"; 517 | }; 518 | name = Debug; 519 | }; 520 | 97C147071CF9000F007C117D /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 523 | buildSettings = { 524 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 525 | CLANG_ENABLE_MODULES = YES; 526 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 527 | ENABLE_BITCODE = NO; 528 | FRAMEWORK_SEARCH_PATHS = ( 529 | "$(inherited)", 530 | "$(PROJECT_DIR)/Flutter", 531 | ); 532 | INFOPLIST_FILE = Runner/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 534 | LIBRARY_SEARCH_PATHS = ( 535 | "$(inherited)", 536 | "$(PROJECT_DIR)/Flutter", 537 | ); 538 | PRODUCT_BUNDLE_IDENTIFIER = br.com.ht7.flutterArchitecture; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 541 | SWIFT_VERSION = 5.0; 542 | VERSIONING_SYSTEM = "apple-generic"; 543 | }; 544 | name = Release; 545 | }; 546 | /* End XCBuildConfiguration section */ 547 | 548 | /* Begin XCConfigurationList section */ 549 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 97C147031CF9000F007C117D /* Debug */, 553 | 97C147041CF9000F007C117D /* Release */, 554 | 249021D3217E4FDB00AE95B9 /* Profile */, 555 | ); 556 | defaultConfigurationIsVisible = 0; 557 | defaultConfigurationName = Release; 558 | }; 559 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | 97C147061CF9000F007C117D /* Debug */, 563 | 97C147071CF9000F007C117D /* Release */, 564 | 249021D4217E4FDB00AE95B9 /* Profile */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | /* End XCConfigurationList section */ 570 | }; 571 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 572 | } 573 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/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_architecture 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" -------------------------------------------------------------------------------- /lib/app/data/auth.repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/domain/http_response.dart'; 3 | import 'package:flutter_architecture/app/domain/repositories/auth.repository.dart'; 4 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 5 | import 'package:flutter_architecture/device/connection/connection.helper.dart'; 6 | 7 | import 'sources/remote/auth.service.dart'; 8 | 9 | class AuthRepository implements IAuthRepository { 10 | AuthService service = inject(); 11 | 12 | @override 13 | Future login(String login, String senha) async { 14 | HttpResponse response = HttpResponse(); 15 | 16 | final hasConnection = await ConnectionHelper.hasConnection(); 17 | 18 | if (hasConnection) { 19 | response = await this.service.login(login, senha); 20 | } else { 21 | response.message = "Device offline"; 22 | } 23 | 24 | return response; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lib/app/data/mappers/user.mapper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/app/domain/user.dart'; 2 | 3 | class UserMapper{ 4 | static List fromJsonList(List json) => json.map((i) => fromJson(i)).toList(); 5 | 6 | static User fromJson(Map json) { 7 | return User( 8 | id: json["id"] as int, 9 | name: json["name"] as String 10 | ); 11 | } 12 | } -------------------------------------------------------------------------------- /lib/app/data/sources/cache/storage.helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | 3 | class StorageKeys { 4 | static final String token = "TOKEN"; 5 | static final String cookie = "COOKIE"; 6 | static final String login = "LOGIN"; 7 | static final String senha = "SENHA"; 8 | } 9 | 10 | class StorageHelper { 11 | static SharedPreferences _prefs; 12 | 13 | static Future _getInstance() async => _prefs = await SharedPreferences.getInstance(); 14 | 15 | static Future get(String key) async { 16 | await _getInstance(); 17 | return _prefs.getString(key); 18 | } 19 | 20 | static void set(String key, dynamic value) async { 21 | await _getInstance(); 22 | _prefs.setString(key, value); 23 | } 24 | 25 | static void remove(String key) async { 26 | await _getInstance(); 27 | _prefs.remove(key); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /lib/app/data/sources/local/daos/todo.dao.dart: -------------------------------------------------------------------------------- 1 | import '../tables/todo.table.dart'; 2 | import 'package:sqflite/sqflite.dart'; 3 | import '../dbconfig.dart'; 4 | 5 | class TodoDAO{ 6 | Database _db; 7 | 8 | TodoDAO() { 9 | _getDbInstance(); 10 | } 11 | 12 | void _getDbInstance() async => _db = await DbConfig.getInstance(); 13 | 14 | Future insert(TodoTable todo) async { 15 | todo.id = await _db.insert(TodoTable.tableName, todo.toJson()); 16 | return todo; 17 | } 18 | 19 | Future> getTodos() async { 20 | List list = []; 21 | 22 | List maps = await _db.query( 23 | TodoTable.tableName, 24 | columns: [TodoTable.columnId, TodoTable.columnTitle] 25 | ); 26 | 27 | if (maps.length > 0) list = TodoTable.fromJsonList(maps); 28 | 29 | return list; 30 | } 31 | 32 | Future getTodo(int id) async { 33 | List maps = await _db.query(TodoTable.tableName, 34 | columns: [TodoTable.columnId, TodoTable.columnTitle], 35 | where: '${TodoTable.columnId} = ?', 36 | whereArgs: [id] 37 | ); 38 | 39 | if (maps.length > 0) { 40 | return TodoTable.fromJson(maps.first); 41 | } 42 | 43 | return null; 44 | } 45 | 46 | Future delete(int id) async => await _db.delete( 47 | TodoTable.tableName, 48 | where: '${TodoTable.columnId} = ?', whereArgs: [id] 49 | ); 50 | 51 | Future update(TodoTable todo) async => await _db.update( 52 | TodoTable.tableName, 53 | todo.toJson(), 54 | where: '${TodoTable.columnId} = ?', whereArgs: [todo.id] 55 | ); 56 | 57 | Future close() async => _db.close(); 58 | } -------------------------------------------------------------------------------- /lib/app/data/sources/local/dbconfig.dart: -------------------------------------------------------------------------------- 1 | import 'package:sqflite/sqflite.dart'; 2 | 3 | import 'tables/todo.table.dart'; 4 | 5 | class DbConfig { 6 | static Database _db; 7 | 8 | static Future getInstance() async { 9 | if (_db == null) { 10 | _db = await openDatabase('my_db.db', version: 1, onCreate: (Database db, int version) async { 11 | 12 | await db.execute( 13 | TodoTable.create() 14 | ); 15 | 16 | }); 17 | } 18 | 19 | return _db; 20 | } 21 | 22 | static close() async { 23 | await _db.close(); 24 | } 25 | } -------------------------------------------------------------------------------- /lib/app/data/sources/local/tables/todo.table.dart: -------------------------------------------------------------------------------- 1 | class TodoTable { 2 | static final String tableName = 'todo'; 3 | static final String columnId = '_id'; 4 | static final String columnTitle = 'title'; 5 | 6 | int id; 7 | String title; 8 | 9 | Map toJson() => { 10 | columnId: id, 11 | columnTitle: title 12 | }; 13 | 14 | static List fromJsonList(List json) => json.map((i) => TodoTable.fromJson(i)).toList(); 15 | 16 | TodoTable.fromJson(Map json) { 17 | id = json[columnId]; 18 | title = json[columnTitle]; 19 | } 20 | 21 | static String create() { 22 | return "CREATE TABLE $tableName (" + 23 | "$tableName INTEGER PRIMARY KEY " + 24 | "$columnTitle TEXT" + 25 | ")"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/app/data/sources/remote/auth.service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/app/data/mappers/user.mapper.dart'; 2 | import 'package:flutter_architecture/app/data/sources/cache/storage.helper.dart'; 3 | import 'package:flutter_architecture/app/domain/http_response.dart'; 4 | import 'package:flutter_architecture/core/di/http_client.dart'; 5 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 6 | 7 | import './base/endpoints.dart' as Endpoints; 8 | 9 | class AuthService{ 10 | HttpClient client = inject(); 11 | 12 | Future login(String login, String senha) async { 13 | HttpResponse response = HttpResponse(); 14 | 15 | final String url = Endpoints.login.auth; 16 | 17 | final payload = {login, senha}; 18 | 19 | final retAuth = client.post(url, body: payload); 20 | 21 | await retAuth.then((res) { 22 | String token = res.data["access_token"]; 23 | StorageHelper.set(StorageKeys.token, token); 24 | StorageHelper.set(StorageKeys.login, login); 25 | StorageHelper.set(StorageKeys.senha, senha); 26 | 27 | response.statusCode = res.statusCode; 28 | response.data = UserMapper.fromJson(res.data); 29 | response.message = res.statusMessage; 30 | }) 31 | .catchError((e) { 32 | StorageHelper.set(StorageKeys.token, ""); 33 | StorageHelper.set(StorageKeys.login, ""); 34 | StorageHelper.set(StorageKeys.senha, ""); 35 | 36 | response.statusCode = 500; 37 | response.data = e; 38 | response.message = "User not found"; 39 | }); 40 | 41 | return response; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/app/data/sources/remote/base/base_url.dart: -------------------------------------------------------------------------------- 1 | final auth = "https://sso.homolog.meusite.com.br"; 2 | final base = "https://meusite.com.br"; -------------------------------------------------------------------------------- /lib/app/data/sources/remote/base/endpoints.dart: -------------------------------------------------------------------------------- 1 | import 'base_url.dart' as BASE_URL; 2 | 3 | class _Login { 4 | final auth = BASE_URL.auth; 5 | } 6 | 7 | class _MyList { 8 | final list = BASE_URL.base + "/api/list"; 9 | } 10 | 11 | final login = _Login(); 12 | final myList = _MyList(); 13 | -------------------------------------------------------------------------------- /lib/app/data/sources/remote/user.service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/data/mappers/user.mapper.dart'; 3 | import 'package:flutter_architecture/app/domain/http_response.dart'; 4 | import 'package:flutter_architecture/core/di/http_client.dart'; 5 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 6 | 7 | import './base/endpoints.dart' as Endpoints; 8 | 9 | class UserService{ 10 | HttpClient client = inject(); 11 | 12 | Future list() async { 13 | HttpResponse response = HttpResponse(); 14 | 15 | final String url = Endpoints.myList.list; 16 | 17 | final ret = client.get(url); 18 | 19 | await ret.then((res) { 20 | response.statusCode = res.statusCode; 21 | response.data = UserMapper.fromJsonList(res.data); 22 | response.message = res.statusMessage; 23 | }) 24 | .catchError((e) { 25 | response.statusCode = 500; 26 | response.data = e; 27 | response.message = "Server Error"; 28 | }); 29 | 30 | return response; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/app/domain/http_response.dart: -------------------------------------------------------------------------------- 1 | class HttpResponse { 2 | int statusCode = 200; 3 | String message = ""; 4 | dynamic data; 5 | 6 | HttpResponse({ this.statusCode, this.message, this.data }); 7 | } 8 | -------------------------------------------------------------------------------- /lib/app/domain/repositories/auth.repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/app/domain/http_response.dart'; 2 | 3 | abstract class IAuthRepository { 4 | Future login(String login, String senha); 5 | } -------------------------------------------------------------------------------- /lib/app/domain/user.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | final int id; 3 | final String name; 4 | 5 | User({ this.id, this.name }); 6 | } 7 | -------------------------------------------------------------------------------- /lib/app/ui/components/loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../widgets/text.dart'; 3 | 4 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 5 | 6 | class LoadingWidget extends StatefulWidget { 7 | final bool backgroundTransparent; 8 | final String message; 9 | final bool status; 10 | final Widget child; 11 | 12 | const LoadingWidget( 13 | {Key key, 14 | this.status, 15 | this.child, 16 | this.message, 17 | this.backgroundTransparent}) 18 | : super(key: key); 19 | 20 | @override 21 | _LoadingWidgetState createState() => _LoadingWidgetState(); 22 | } 23 | 24 | class _LoadingWidgetState extends State { 25 | @override 26 | Widget build(BuildContext context) { 27 | return Stack( 28 | children: [widget.child, _loadingWidget(widget.status)] 29 | ); 30 | } 31 | 32 | Widget _loadingWidget(bool loadingWidget) { 33 | return loadingWidget == true 34 | ? Container( 35 | alignment: Alignment.center, 36 | color: widget.backgroundTransparent == true 37 | ? Colors.transparent 38 | : Colors.grey.withOpacity(0.7), 39 | child: Column( 40 | mainAxisAlignment: MainAxisAlignment.center, 41 | children: [ 42 | Padding( 43 | padding: const EdgeInsets.all(16.0), 44 | child: TextWidget(text: widget.message), 45 | ), 46 | CircularProgressIndicator( 47 | backgroundColor: Colors.transparent, 48 | valueColor: 49 | new AlwaysStoppedAnimation(colors.accentColor), 50 | ) 51 | ]), 52 | ) 53 | : Container(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/app/ui/modules/authenticated/home/home.page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/modules/authenticated/home/home.viewmodel.dart'; 3 | import 'package:flutter_architecture/app/ui/modules/unauthenticated/login/login.page.dart'; 4 | import 'package:flutter_architecture/app/ui/widgets/button.dart'; 5 | import 'package:flutter_architecture/app/ui/widgets/text.dart'; 6 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 7 | 8 | import '../../../../../device/nav/nav_slide_from_left.dart'; 9 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 10 | 11 | class HomePage extends StatefulWidget { 12 | @override 13 | _HomePageState createState() => _HomePageState(); 14 | } 15 | 16 | class _HomePageState extends State { 17 | final vm = inject(); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return SafeArea( 22 | child: Scaffold( 23 | body: Center( 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.center, 26 | children: [ 27 | TextWidget(text: "Home Page"), 28 | SizedBox(height: dimens.fieldSpace), 29 | ButtonWidget( 30 | label: "Go to Login Page ", 31 | onPress: () => Navigator.pushReplacement(context, NavSlideFromLeft( 32 | page: LoginPage() 33 | )), 34 | ) 35 | ], 36 | ), 37 | ), 38 | ), 39 | ); 40 | } 41 | } -------------------------------------------------------------------------------- /lib/app/ui/modules/authenticated/home/home.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/core/base/view_model.base.dart'; 2 | 3 | class HomeViewModel extends BaseViewModel { 4 | @override 5 | void clear() { 6 | // TODO: implement reset 7 | } 8 | } -------------------------------------------------------------------------------- /lib/app/ui/modules/authenticated/home/home.widget.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tguizelini/flutter-architecture/4c20880190e15ad7ae0e11ff67b805a3bbad3a45/lib/app/ui/modules/authenticated/home/home.widget.dart -------------------------------------------------------------------------------- /lib/app/ui/modules/unauthenticated/login/login.page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/components/loading.dart'; 3 | import 'package:flutter_architecture/app/ui/modules/unauthenticated/login/login.viewmodel.dart'; 4 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 5 | import 'login.widget.dart'; 6 | 7 | class LoginPage extends StatefulWidget { 8 | @override 9 | _LoginPageState createState() => _LoginPageState(); 10 | } 11 | 12 | class _LoginPageState extends State with LoginWidget { 13 | final vm = inject(); 14 | final _scaffoldKey = GlobalKey(); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return StreamBuilder( 19 | stream: vm.loading, 20 | builder: (context, snapshot) { 21 | return LoadingWidget( 22 | message: "Loading message", 23 | status: snapshot.data, 24 | child: SafeArea( 25 | child: Scaffold( 26 | key: _scaffoldKey, 27 | body: SingleChildScrollView( 28 | child: Container( 29 | child: form(context, _scaffoldKey) 30 | ), 31 | ) 32 | ), 33 | ) 34 | ); 35 | } 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/app/ui/modules/unauthenticated/login/login.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/app/data/auth.repository.dart'; 2 | import 'package:flutter_architecture/app/domain/http_response.dart'; 3 | import 'package:flutter_architecture/core/base/view_model.base.dart'; 4 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 5 | import 'package:rxdart/rxdart.dart'; 6 | 7 | class LoginViewModel extends BaseViewModel { 8 | AuthRepository repository = inject(); 9 | 10 | final _login = BehaviorSubject.seeded(""); 11 | final _password = BehaviorSubject.seeded(""); 12 | 13 | Stream get login => _login.stream; 14 | void setLogin(String value) => _login.add(value); 15 | 16 | Stream get password => _password.stream; 17 | void setPassword(String value) => _password.add(value); 18 | 19 | Future signIn() async { 20 | setLoading(true); 21 | 22 | await Future.delayed(Duration(seconds: 1)); 23 | 24 | HttpResponse ret = await repository.login(_login.value, _password.value); 25 | 26 | setLoading(false); 27 | 28 | if (ret.statusCode == 200) { 29 | clear(); 30 | return true; 31 | } 32 | 33 | return false; 34 | } 35 | 36 | @override 37 | void clear() { 38 | _login.add(""); 39 | _password.add(""); 40 | } 41 | } -------------------------------------------------------------------------------- /lib/app/ui/modules/unauthenticated/login/login.widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/modules/authenticated/home/home.page.dart'; 3 | import 'package:flutter_architecture/app/ui/widgets/button.dart'; 4 | import 'package:flutter_architecture/app/ui/widgets/input.dart'; 5 | import 'package:flutter_architecture/app/ui/widgets/logo.dart'; 6 | import 'package:flutter_architecture/app/ui/widgets/snackbar.dart'; 7 | import 'package:flutter_architecture/app/ui/widgets/text.dart'; 8 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 9 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 10 | import 'package:flutter_architecture/device/nav/nav_slide_from_top.dart'; 11 | 12 | import 'login.viewmodel.dart'; 13 | 14 | class LoginWidget { 15 | final vm = inject(); 16 | 17 | Widget form(BuildContext context, GlobalKey key) { 18 | return Padding( 19 | padding: EdgeInsets.all(dimens.margin), 20 | child: Padding( 21 | padding: EdgeInsets.all(8.0), 22 | child: Column( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: [ 25 | SizedBox(height: 20), 26 | 27 | LogoWidget(), 28 | 29 | SizedBox(height: 20), 30 | 31 | StreamBuilder( 32 | stream: vm.login, 33 | builder: (context, snapshot) { 34 | return InputWidget( 35 | placeholder: "LOGIN", 36 | value: snapshot.data, 37 | onChange: (value) => vm.setLogin(value), 38 | ); 39 | } 40 | ), 41 | 42 | SizedBox(height: 10), 43 | 44 | StreamBuilder( 45 | stream: vm.password, 46 | builder: (context, snapshot) { 47 | return InputWidget( 48 | placeholder: "SENHA", 49 | value: snapshot.data, 50 | onChange: (value) => vm.setPassword(value), 51 | ); 52 | } 53 | ), 54 | 55 | SizedBox(height: 20), 56 | 57 | Align( 58 | alignment: Alignment.centerRight, 59 | child: FlatButton( 60 | onPressed: () => print("forgot password click"), 61 | child: TextWidget(text: "Esqueci a senha", small: true,), 62 | ) 63 | ), 64 | 65 | SizedBox(height: 12), 66 | 67 | ButtonWidget( 68 | label: "login", 69 | onPress: () async{ 70 | final ret = await vm.signIn(); 71 | 72 | if (ret) { 73 | SnackbarWidget(key, message: "SUCCESS"); 74 | } else { 75 | SnackbarWidget( 76 | key, 77 | error: true, 78 | message: "NOT FOUND", 79 | actionMessage: "OK", 80 | action: () { 81 | print("ACTION CLICKED"); 82 | } 83 | ); 84 | } 85 | 86 | 87 | await Future.delayed(Duration(seconds: 1)); 88 | 89 | Navigator.pushReplacement(context, NavSlideFromTop( 90 | page: HomePage() 91 | )); 92 | } 93 | ), 94 | 95 | 96 | SizedBox(height: 12), 97 | 98 | ButtonWidget( 99 | label: "cadastrar", 100 | transparent: true, 101 | onPress: () async{ 102 | final ret = await vm.signIn(); 103 | 104 | if (ret) { 105 | SnackbarWidget(key, message: "SUCCESS"); 106 | } else { 107 | SnackbarWidget( 108 | key, 109 | error: true, 110 | message: "NOT FOUND", 111 | actionMessage: "OK", 112 | action: () { 113 | print("ACTION CLICKED"); 114 | } 115 | ); 116 | } 117 | 118 | Navigator.pushReplacement(context, NavSlideFromTop( 119 | page: HomePage() 120 | )); 121 | } 122 | ), 123 | 124 | SizedBox(height: 12), 125 | 126 | ButtonWidget( 127 | facebook: true, 128 | label: "entrar com facebook", 129 | onPress: () async{ 130 | final ret = await vm.signIn(); 131 | 132 | if (ret) { 133 | SnackbarWidget(key, message: "SUCCESS"); 134 | } else { 135 | SnackbarWidget( 136 | key, 137 | error: true, 138 | message: "NOT FOUND", 139 | actionMessage: "OK", 140 | action: () { 141 | print("ACTION CLICKED"); 142 | } 143 | ); 144 | } 145 | 146 | Navigator.pushReplacement(context, NavSlideFromTop( 147 | page: HomePage() 148 | )); 149 | } 150 | ) 151 | 152 | ], 153 | ), 154 | ), 155 | ); 156 | } 157 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/widgets/text.dart'; 3 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 4 | 5 | class ButtonWidget extends StatelessWidget { 6 | final String label; 7 | final Function onPress; 8 | final bool disabled; 9 | final bool transparent; 10 | final IconData icon; 11 | final bool facebook; 12 | 13 | final double _elevation = 3; 14 | 15 | const ButtonWidget({ 16 | Key key, 17 | this.label, 18 | this.onPress, 19 | this.disabled, 20 | this.transparent, 21 | this.icon, 22 | this.facebook 23 | }) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | final action = disabled == true ? null : onPress; 28 | 29 | Color backgroundColor = colors.accentColor; 30 | Color borderColor = colors.accentColor; 31 | Color textColor = Colors.white; 32 | 33 | if (transparent == true) { 34 | backgroundColor = colors.backgroundColor; 35 | borderColor = colors.accentLightColor; 36 | textColor = colors.accentLightColor; 37 | } else { 38 | backgroundColor = colors.accentLightColor; 39 | borderColor = colors.accentLightColor; 40 | textColor = Colors.white; 41 | } 42 | 43 | if (facebook == true) { 44 | backgroundColor = colors.facebookColor; 45 | borderColor = colors.facebookColor; 46 | textColor = Colors.white; 47 | } 48 | 49 | return Padding( 50 | padding: const EdgeInsets.only(top: 16.0), 51 | child: RaisedButton( 52 | padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 45.0), 53 | shape: RoundedRectangleBorder( 54 | side: BorderSide( color: borderColor ), 55 | borderRadius: BorderRadius.circular(20) 56 | ), 57 | onPressed: action, 58 | elevation: _elevation, 59 | color: backgroundColor, 60 | child: TextWidget(text: label.toUpperCase() ?? "Label", small: true, color: textColor ) 61 | ), 62 | ); 63 | } 64 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/card_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CardViewWidget extends StatelessWidget { 4 | final Alignment alignment; 5 | final double width; 6 | final double height; 7 | final EdgeInsets margin; 8 | final double elevation; 9 | final Widget child; 10 | final Color backgroundColor; 11 | final bool noCorner; 12 | final bool autoHeight; 13 | 14 | const CardViewWidget({Key key, this.alignment, this.width, this.height, this.margin, this.elevation, this.backgroundColor, this.noCorner, this.autoHeight, this.child}) : super(key: key); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Container( 19 | height: autoHeight == true ? null : height == null ? 100 : height, 20 | width: width, 21 | margin: margin, 22 | alignment: alignment, 23 | decoration: BoxDecoration( 24 | color: backgroundColor, 25 | borderRadius: noCorner == true ? BorderRadius.circular(0) : BorderRadius.circular(8), 26 | boxShadow: [ 27 | BoxShadow( 28 | color: Colors.black12, 29 | blurRadius: elevation == null ? 6.0 : elevation, 30 | ) 31 | ] 32 | ), 33 | child: child 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/app/ui/widgets/dropdown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 3 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 4 | 5 | import 'modal.dart'; 6 | import 'text.dart'; 7 | 8 | class DropdownWidget extends StatelessWidget { 9 | final BuildContext context; 10 | final String value; 11 | final Function onChoose; 12 | final String label; 13 | final List items; 14 | 15 | const DropdownWidget({Key key, @required this.context, this.value, this.onChoose, this.label, this.items}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final _controller = TextEditingController(); 20 | 21 | List options = []; 22 | 23 | if (value != null) _controller.text = value; 24 | 25 | if (items != null) 26 | items.map((i) { 27 | options.add( 28 | ListTile( 29 | onTap: () { 30 | _controller.text = i; 31 | if (onChoose != null) onChoose(i); 32 | Navigator.pop(context); 33 | }, 34 | //status: _controller.text == i ? true : false, 35 | title: TextWidget(text: i), 36 | ) 37 | ); 38 | }).toList(); 39 | 40 | return Padding( 41 | padding: EdgeInsets.only(top: 8.0), 42 | child: TextField( 43 | controller: _controller, 44 | onChanged: (value) => null, 45 | enableInteractiveSelection: false, 46 | cursorColor: Colors.white, 47 | onTap: () { 48 | ModalWidget.show( 49 | context, 50 | body: Column( 51 | crossAxisAlignment: CrossAxisAlignment.center, 52 | children: [ 53 | TextWidget(text: label == null ? "" : label.toUpperCase(), bold: true, accent: true,), 54 | SizedBox(height: 10), 55 | ...options 56 | ] 57 | ) 58 | ); 59 | }, 60 | //////////////////////////////////////////////////////////////////////////////////////////////////// 61 | textCapitalization: TextCapitalization.none, 62 | style: TextStyle(color: colors.primaryColorDark), //cor do texto ao digitar, 63 | decoration: InputDecoration( 64 | suffixIcon: Icon(Icons.arrow_drop_down), 65 | //errorText: snapshot.error, 66 | //hintText: placeholder, 67 | labelText: label ?? "", 68 | enabledBorder: UnderlineInputBorder( 69 | borderSide: BorderSide( 70 | color: colors.primaryColorDark, //cor da borda 71 | width: 0.0 72 | ), 73 | ), 74 | hintStyle: TextStyle( 75 | color:Colors.transparent, //cor do placeholder com foco 76 | fontSize: dimens.fontInputWidget 77 | ), 78 | enabled: true, 79 | labelStyle: TextStyle( 80 | fontSize: dimens.fontInputWidget, 81 | color: colors.primaryColorDark //cor da label 82 | ), 83 | border: UnderlineInputBorder( 84 | borderSide: BorderSide( 85 | color: colors.primaryColorDark, //cor da label quando esta com focus 86 | width: 0 87 | ) 88 | ), 89 | focusedBorder: UnderlineInputBorder( 90 | borderSide: BorderSide( 91 | color: colors.primaryColorDark, //cor da label quando esta com focus 92 | width: 1 93 | ) 94 | ) 95 | ) 96 | ), 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/app/ui/widgets/icon_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class IconButtonWidget extends StatefulWidget { 4 | final IconData icon; 5 | final Color color; 6 | final Function onPressed; 7 | 8 | const IconButtonWidget({Key key, this.icon, this.color, this.onPressed}) : super(key: key); 9 | 10 | @override 11 | _IconButtonWidgetState createState() => _IconButtonWidgetState(); 12 | } 13 | 14 | class _IconButtonWidgetState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return GestureDetector( 18 | onTap: () { 19 | if (widget.onPressed != null) widget.onPressed(); 20 | }, 21 | child: CircleAvatar( 22 | backgroundColor: widget.color ?? Colors.yellow, 23 | child: Icon(widget.icon ?? Icons.android, size: 30, color: Colors.white), 24 | ), 25 | ); 26 | } 27 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/input.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 4 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 5 | 6 | class InputWidget extends StatefulWidget { 7 | final bool autofocus; 8 | final String value; 9 | final Function(dynamic) onChange; 10 | final String placeholder; 11 | final TextInputType keyboardType; 12 | final bool password; 13 | final bool dark; 14 | final bool multiline; 15 | final String errorMessage; 16 | final String labelText; 17 | final String mask; 18 | 19 | const InputWidget({Key key, this.autofocus, this.value, this.errorMessage, this.onChange, this.placeholder, this.keyboardType, this.password, this.dark, this.multiline, this.labelText, this.mask}) : super(key: key); 20 | 21 | @override 22 | _InputWidgetState createState() => _InputWidgetState(); 23 | } 24 | 25 | class _InputWidgetState extends State { 26 | TextEditingController _controller; 27 | 28 | @override 29 | void didChangeDependencies() { 30 | _controller = new TextEditingController(); 31 | 32 | super.didChangeDependencies(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | _controller.text = widget.value; 38 | //fix the invertion of text editing 39 | if (widget.value != null) 40 | _controller.selection = TextSelection.collapsed(offset: widget.value.length); 41 | 42 | return Padding( 43 | padding: EdgeInsets.only(top: dimens.fieldSpace), 44 | child: TextField( 45 | controller: _controller, 46 | obscureText: widget.password == true ? true : false, 47 | onChanged: (value) { 48 | if (widget.onChange != null) widget.onChange(value); 49 | }, 50 | 51 | maxLines: widget.multiline == true ? null : 1, 52 | keyboardType: widget.multiline == true ? TextInputType.multiline : widget.keyboardType, 53 | style: TextStyle( 54 | color: widget.dark == false ? colors.primaryColor: colors.primaryColorDark //cor do texto ao digitar, 55 | ), 56 | autofocus: widget.autofocus == null ? false : true, 57 | decoration: InputDecoration( 58 | contentPadding: EdgeInsets.only(bottom: 4), 59 | hintText: widget.value == null ? "Holder" : widget.value, 60 | labelText: widget.labelText == null ? widget.placeholder: widget.labelText, 61 | //errorText: widget.errorText, 62 | enabledBorder: UnderlineInputBorder( 63 | borderSide: BorderSide( 64 | color: widget.dark == false ? Colors.white : colors.primaryColor, //cor da borda 65 | width: 0.5 66 | ), 67 | ), 68 | hintStyle: TextStyle( 69 | color: Colors.transparent, //cor do placeholder com foco 70 | fontSize: dimens.fontInputWidget 71 | ), 72 | enabled: true, 73 | labelStyle: TextStyle( 74 | fontSize: dimens.fontInputWidget, 75 | color: widget.dark == false ? colors.accentColor : colors.primaryColor//cor da label 76 | ), 77 | border: UnderlineInputBorder( 78 | borderSide: BorderSide( 79 | color: colors.accentColor, //cor da label quando esta com focus 80 | width: 0, 81 | ) 82 | ), 83 | focusedBorder: UnderlineInputBorder( 84 | borderSide: BorderSide( 85 | color: widget.dark == false ? colors.primaryColor : colors.accentColor, //cor da label quando esta com focus 86 | width: 1 87 | ) 88 | ) 89 | ) 90 | ), 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/app/ui/widgets/logo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LogoWidget extends StatelessWidget { 4 | final bool header; 5 | final bool small; 6 | final bool challenge; 7 | 8 | const LogoWidget({Key key, this.challenge, this.small, this.header}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | var _logo = new AssetImage("assets/logo.png"); 13 | var _logoHeader= new AssetImage("assets/logo_header.png"); 14 | var _logoDark = new AssetImage("assets/logo_dark.png"); 15 | 16 | final _finalLogoWidget = header == true ? 17 | challenge == true ? _logoDark : _logoHeader 18 | : 19 | challenge == true ? _logoDark : _logo; 20 | 21 | return Image( 22 | image: _finalLogoWidget, 23 | width: small == true ? 100 : header == true ? 100 : 220, 24 | //fit: BoxFit.contain, 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/app/ui/widgets/modal.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'text.dart'; 3 | 4 | class ModalWidget { 5 | static Future show( 6 | BuildContext context, 7 | { 8 | IconData icon, 9 | String title, 10 | Widget body, 11 | String confirmLabel, 12 | Function confirmOnPress, 13 | String cancelLabel, 14 | Function cancelOnPress 15 | }) => 16 | showDialog( 17 | context: context, 18 | barrierDismissible: true, 19 | builder: (context) => 20 | AlertDialog( 21 | title: icon == null ? 22 | title == null ? null : TextWidget(text: title) 23 | : 24 | Row( 25 | children: [ 26 | Icon(icon), 27 | SizedBox(width: 8.0), 28 | TextWidget(text: title ?? "") 29 | ] 30 | ), 31 | content: body != null ? SingleChildScrollView(child: body) : null, 32 | actions: [ 33 | //CANCEL BUTTON 34 | if (cancelLabel != null) 35 | FlatButton( 36 | child: TextWidget(text: cancelLabel ?? "Button Label", color: Colors.grey[400]), 37 | onPressed: () { 38 | if (cancelOnPress != null) cancelOnPress(); 39 | Navigator.pop(context); 40 | } 41 | ), 42 | 43 | //CONFIRM BUTTONS 44 | if (confirmLabel != null && cancelLabel == null) 45 | FlatButton( 46 | child: TextWidget(text: confirmLabel ?? "Button Label", accent: true), 47 | onPressed: () { 48 | if (confirmOnPress != null) confirmOnPress(); 49 | Navigator.pop(context); 50 | } 51 | ), 52 | 53 | if (cancelLabel != null) 54 | FlatButton( 55 | child: TextWidget(text: confirmLabel ?? "Button Label", accent: true), 56 | onPressed: () { 57 | if (confirmOnPress != null) confirmOnPress(); 58 | Navigator.pop(context); 59 | }, 60 | ) 61 | ], 62 | ) 63 | ); 64 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/nav_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 3 | 4 | import 'card_view.dart'; 5 | import 'text.dart'; 6 | 7 | class NavBottomSheetWidget extends StatelessWidget{ 8 | final String buttonLeft; 9 | final String buttonRight; 10 | final Function actionButtonLeft; 11 | final Widget pageToCall; 12 | 13 | const NavBottomSheetWidget({Key key, this.buttonLeft, this.buttonRight, this.actionButtonLeft, this.pageToCall}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return SafeArea( 18 | child: CardViewWidget( 19 | width: double.infinity, 20 | height: 63, 21 | child: ListTile( 22 | leading: Padding( 23 | padding: const EdgeInsets.only(top: 16), 24 | child: GestureDetector( 25 | onTap: ()=> actionButtonLeft(context), 26 | child: TextWidget( 27 | text: buttonLeft, 28 | ), 29 | ), 30 | ), 31 | trailing: Padding( 32 | padding: const EdgeInsets.only(top:16.0), 33 | child: FlatButton( 34 | onPressed: (){ 35 | Navigator.push(context, MaterialPageRoute(builder: (context)=> pageToCall));}, 36 | child: TextWidget( 37 | color: colors.accentColor, 38 | text: buttonRight 39 | ) 40 | ), 41 | ) , 42 | ) 43 | ), 44 | ); 45 | } 46 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/snackbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 3 | import './text.dart'; 4 | 5 | class SnackbarWidget { 6 | SnackbarWidget (GlobalKey scaffoldKey, { bool error, String message, Function action, String actionMessage }) { 7 | final snackbar = SnackBar( 8 | action: action == null ? null : SnackBarAction( 9 | label: actionMessage ?? "OK", 10 | onPressed: () => action == null ? () => null : action(), 11 | textColor: Colors.white54, 12 | ), 13 | backgroundColor: error == true ? Colors.redAccent : colors.snackbarBackgroundColor, 14 | content: TextWidget( 15 | white: true, 16 | bold: true, 17 | small: true, 18 | text: message, 19 | ), 20 | ); 21 | 22 | scaffoldKey.currentState.showSnackBar(snackbar); 23 | } 24 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/tag.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/widgets/text.dart'; 3 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 4 | 5 | class TagWidget extends StatefulWidget { 6 | final String label; 7 | final Function onPress; 8 | final bool arrow; 9 | final bool canCheck; 10 | final bool initialStatus; 11 | 12 | const TagWidget({Key key, this.initialStatus, this.canCheck, this.label, this.onPress, this.arrow}) : super(key: key); 13 | 14 | @override 15 | _TagWidgetState createState() => _TagWidgetState(); 16 | } 17 | 18 | class _TagWidgetState extends State { 19 | bool _isActive = false; 20 | 21 | @override 22 | void initState() { 23 | if (widget.initialStatus != null) { 24 | _isActive = widget.initialStatus; 25 | } 26 | 27 | super.initState(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | final double rightPadding = widget.arrow == true ? 12.0 : 22.0; 33 | 34 | return GestureDetector( 35 | onTap: () { 36 | final bool newIsActive = !_isActive; 37 | 38 | if (widget.onPress != null) widget.onPress(newIsActive); 39 | 40 | if (widget.canCheck == true) setState(() { 41 | _isActive = newIsActive; 42 | }); 43 | }, 44 | child: Container( 45 | padding: EdgeInsets.only( 46 | top: 6, 47 | bottom: 6, 48 | left: 22, 49 | right: rightPadding 50 | ), 51 | margin: EdgeInsets.only(left: 12), 52 | decoration: BoxDecoration( 53 | color: _isActive == true ? colors.accentColor : colors.backgroundColor, 54 | borderRadius: BorderRadius.circular(16), 55 | border: Border.all( 56 | color: colors.accentColor, 57 | width: 1 58 | ), 59 | ), 60 | child: Row( 61 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 62 | children: [ 63 | TextWidget( 64 | text: widget.label, 65 | small: true, 66 | color: _isActive == true ? colors.backgroundColor : colors.accentColor 67 | ), 68 | if (widget.arrow == true) SizedBox(width: 8), 69 | if (widget.arrow == true) Icon(Icons.arrow_drop_down, color: colors.accentColor) 70 | ], 71 | ), 72 | ), 73 | ); 74 | } 75 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 3 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 4 | 5 | class TextWidget extends StatelessWidget { 6 | final String text; 7 | final bool title; 8 | final bool bold; 9 | final bool big; 10 | final bool small; 11 | final bool smaller; 12 | final bool center; 13 | final bool white; 14 | final bool dark; 15 | final bool accent; 16 | final bool primary; 17 | final Color color; 18 | final int maxLines; 19 | final bool underline; 20 | final TextAlign align; 21 | 22 | const TextWidget({Key key, this.align, this.smaller, this.underline, this.text, this.title, this.bold, this.big, this.small, this.center, this.white, this.dark, this.accent, this.primary, this.color, this.maxLines}) : super(key: key); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final dynamic isBold = bold == true ? FontWeight.bold : FontWeight.normal; 27 | 28 | final String textValue = text ?? ""; 29 | 30 | final double fontSize = title == true ? 31 | dimens.fontTextTitle 32 | : 33 | big == true ? 34 | dimens.fontTextBig 35 | : 36 | small == true ? dimens.fontTextSmall : smaller == true ? dimens.fontTextSmaller : dimens.fontText; 37 | 38 | final Color customColor = primary == true ? 39 | colors.primaryColor 40 | : 41 | white == true ? 42 | Colors.white 43 | : 44 | accent == true ? colors.accentLightColor : colors.primaryColorDark; 45 | 46 | return Text( 47 | textValue, 48 | maxLines: maxLines, 49 | textAlign: center == true ? TextAlign.center : align == null ? null : align, 50 | style: TextStyle( 51 | decoration: underline == true ? TextDecoration.underline : TextDecoration.none, 52 | fontSize: fontSize, 53 | color: color == null ? 54 | dark == true ? colors.backgroundColor : customColor 55 | : 56 | color, 57 | fontWeight: isBold 58 | ) 59 | ); 60 | } 61 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:fluttertoast/fluttertoast.dart'; 2 | import 'package:flutter_architecture/core/values/colors.dart' as colors; 3 | import 'package:flutter_architecture/core/values/dimens.dart' as dimens; 4 | 5 | class ToastWidget { 6 | static void show(String msg) => Fluttertoast.showToast( 7 | msg: msg ?? "Toast message", 8 | toastLength: Toast.LENGTH_LONG, 9 | gravity: ToastGravity.BOTTOM, 10 | timeInSecForIos: 1, 11 | backgroundColor: colors.toastBackgroundColor, 12 | textColor: colors.toastTextColor, 13 | fontSize: dimens.fontText 14 | ); 15 | 16 | static void cancelAll() => Fluttertoast.cancel(); 17 | } -------------------------------------------------------------------------------- /lib/app/ui/widgets/toolbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './text.dart'; 3 | import 'logo.dart'; 4 | 5 | class ToolbarWidget extends StatelessWidget implements PreferredSizeWidget { 6 | @override 7 | Size get preferredSize => Size.fromHeight(kToolbarHeight); 8 | 9 | final Widget leading; 10 | final String title; 11 | final List actions; 12 | final Color color; 13 | final double elevation; 14 | final bool logoWidget; 15 | final bool hideBackArrow; 16 | 17 | const ToolbarWidget({Key key, this.hideBackArrow, this.logoWidget, this.leading, this.title, this.actions, this.color, this.elevation}) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return AppBar( 22 | automaticallyImplyLeading: hideBackArrow == true ? false : true, 23 | title: logoWidget == true ? 24 | Center(child: LogoWidget(header: true, small: true)) 25 | : 26 | TextWidget( 27 | text: title, 28 | accent: true, 29 | big: true, 30 | ), 31 | leading: leading, 32 | actions: actions, 33 | elevation: elevation != null ? elevation : 0.0 34 | ); 35 | } 36 | } -------------------------------------------------------------------------------- /lib/core/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/app/ui/modules/unauthenticated/login/login.page.dart'; 3 | import 'package:flutter_architecture/core/values/theme.dart'; 4 | 5 | class App extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) => MaterialApp( 8 | debugShowCheckedModeBanner: false, 9 | theme: appTheme, 10 | home: LoginPage() 11 | ); 12 | } -------------------------------------------------------------------------------- /lib/core/base/view_model.base.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:rxdart/subjects.dart'; 3 | 4 | abstract class BaseViewModel { 5 | final _loading = BehaviorSubject.seeded(false); 6 | 7 | Stream get loading => _loading.stream; 8 | void setLoading(bool value) => _loading.add(value); 9 | 10 | void clear(); 11 | } -------------------------------------------------------------------------------- /lib/core/di/http_client.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:flutter_architecture/app/data/sources/cache/storage.helper.dart'; 3 | 4 | class HttpClient { 5 | Dio _client; 6 | 7 | HttpClient() { 8 | _client = Dio(); 9 | _client.interceptors.add(_interceptor()); 10 | } 11 | 12 | Interceptor _interceptor() { 13 | return InterceptorsWrapper( 14 | onRequest: (RequestOptions request) async { 15 | final storageToken = await StorageHelper.get(StorageKeys.token); 16 | 17 | if (storageToken != null) request.headers.addAll({ 18 | "Authorization": 'Bearer $storageToken', 19 | }); 20 | 21 | return request; 22 | } 23 | ); 24 | } 25 | 26 | Future get(String url) => _client.get(url); 27 | Future post(String url, { dynamic body }) => _client.post(url, data: body); 28 | Future put(String url, { dynamic body }) => _client.put(url, data: body); 29 | Future delete(String url, { dynamic body }) => _client.delete(url); 30 | } -------------------------------------------------------------------------------- /lib/core/di/injector_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/app/data/auth.repository.dart'; 2 | import 'package:flutter_architecture/app/data/sources/remote/auth.service.dart'; 3 | import 'package:flutter_architecture/app/data/sources/remote/user.service.dart'; 4 | import 'package:flutter_architecture/app/ui/modules/authenticated/home/home.viewmodel.dart'; 5 | import 'package:flutter_architecture/app/ui/modules/unauthenticated/login/login.viewmodel.dart'; 6 | import 'package:get_it/get_it.dart'; 7 | 8 | import 'http_client.dart'; 9 | 10 | final GetIt inject = GetIt.I; 11 | 12 | Future setupInjection() async { 13 | //Components 14 | inject.registerSingleton(HttpClient()); 15 | 16 | //Remote Services 17 | inject.registerFactory(() => AuthService()); 18 | inject.registerFactory(() => UserService()); 19 | 20 | //Repositories 21 | inject.registerFactory(() => AuthRepository()); 22 | 23 | //ViewModels 24 | inject.registerLazySingleton(() => LoginViewModel()); 25 | inject.registerLazySingleton(() => HomeViewModel()); 26 | } -------------------------------------------------------------------------------- /lib/core/utils/jwt.util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class JwtUtil { 4 | static Map decode(String token) { 5 | final parts = token.split('.'); 6 | if (parts.length != 3) { 7 | throw Exception('token inválido'); 8 | } 9 | 10 | final payload = _decodeBase64(parts[1]); 11 | final payloadMap = json.decode(payload); 12 | 13 | if (payloadMap is! Map) { 14 | throw Exception('payload inválido'); 15 | } 16 | 17 | return payloadMap; 18 | } 19 | 20 | static String _decodeBase64(String str) { 21 | String output = str.replaceAll('-', '+').replaceAll('_', '/'); 22 | 23 | switch (output.length % 4) { 24 | case 0: 25 | break; 26 | case 2: 27 | output += '=='; 28 | break; 29 | case 3: 30 | output += '='; 31 | break; 32 | default: 33 | throw Exception('base64 incorreto'); 34 | } 35 | 36 | return utf8.decode(base64Url.decode(output)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/core/values/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | final Color accentColor = Color(0xFF53ac6d); 4 | final Color accentLightColor = Color(0xFF53ac6d); 5 | 6 | final Color primaryColor = Color(0xFFd7dae0); 7 | final Color primaryColorDark = Color(0xFFabb2bf); 8 | 9 | final Color facebookColor = Color(0xFFf4d6cac); 10 | 11 | final Color backgroundColor = Color(0xFF21252b); 12 | final Color backgroundDarkColor = Color(0xFF21252b); 13 | final Color cardColor = Color(0xFF2b2d34); 14 | 15 | final Color backgroundGradient1 = Color(0xFF202025); 16 | final Color backgroundGradient2 = Color(0xFF393838); 17 | final Color backgroundGradient3 = Color(0xFF202025); 18 | 19 | final Color disabledTextColor = Color(0xFFa1a1a1); 20 | final Color disabledColor = Colors.black38; 21 | 22 | final Color canvasColor = Colors.transparent; 23 | 24 | final Color snackbarBackgroundColor = Colors.black38; 25 | final Color toastBackgroundColor = Colors.black38; 26 | final Color toastTextColor = Colors.white; 27 | -------------------------------------------------------------------------------- /lib/core/values/dimens.dart: -------------------------------------------------------------------------------- 1 | //MARGIN 2 | 3 | final double margin = 16.0; 4 | final double fieldSpace = 8; 5 | 6 | //FONTS 7 | 8 | final double fontTextTitle = 22.0; 9 | final double fontTextBig = 18.0; 10 | final double fontText = 16.0; 11 | final double fontTextSmall = 14.0; 12 | final double fontTextSmaller = 12.0; 13 | 14 | final double fontInputWidget = 14.0; 15 | final double fontButton = 14.0; 16 | 17 | -------------------------------------------------------------------------------- /lib/core/values/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'colors.dart' as colors; 3 | 4 | final ThemeData appTheme = ThemeData( 5 | primaryColor: colors.primaryColor, 6 | accentColor: colors.accentColor, 7 | scaffoldBackgroundColor: colors.backgroundColor, 8 | 9 | appBarTheme: AppBarTheme( 10 | color: colors.backgroundColor, 11 | iconTheme: IconThemeData(color: colors.accentLightColor) 12 | ), 13 | 14 | buttonTheme: ButtonThemeData( 15 | buttonColor: colors.accentLightColor, 16 | disabledColor: colors.primaryColorDark 17 | ) 18 | ); 19 | -------------------------------------------------------------------------------- /lib/device/camera/camera.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:typed_data'; 3 | import 'package:image_picker/image_picker.dart'; 4 | 5 | class Camera { 6 | static Future openCamera() async { 7 | final image = await ImagePicker.pickImage(source: ImageSource.camera, imageQuality: 15); 8 | 9 | List base64Byte = image.readAsBytesSync(); 10 | String base64Encoded = base64Encode(base64Byte); 11 | 12 | return "data:image/png;base64," + base64Encoded; 13 | } 14 | 15 | static Future openGallery({ bool getBase64 = true }) async { 16 | final image = await ImagePicker.pickImage(source: ImageSource.gallery, imageQuality: 15); 17 | 18 | List base64Byte = image.readAsBytesSync(); 19 | String base64Encoded = base64Encode(base64Byte); 20 | 21 | return base64Encoded; 22 | } 23 | 24 | static Uint8List base64ToFile(String image) => base64.decode(image); 25 | } -------------------------------------------------------------------------------- /lib/device/connection/connection.helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectivity/connectivity.dart'; 2 | 3 | class ConnectionHelper { 4 | static ConnectivityResult _connectivityResult; 5 | 6 | static Future _connect() async { 7 | _connectivityResult = await Connectivity().checkConnectivity(); 8 | } 9 | 10 | static Future hasConnection() async { 11 | await _connect(); 12 | if (_connectivityResult == ConnectivityResult.mobile) return true; 13 | if (_connectivityResult == ConnectivityResult.wifi) return true; 14 | return false; 15 | } 16 | 17 | static Stream connectionListener() { 18 | return Connectivity().onConnectivityChanged; 19 | } 20 | } -------------------------------------------------------------------------------- /lib/device/nav/nav_no_animation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class NavNoAnimation extends PageRouteBuilder { 4 | final Widget page; 5 | 6 | NavNoAnimation({ this.page }) : 7 | super(pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { 8 | return page; 9 | }, 10 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { 11 | return new SlideTransition( 12 | position: Tween( 13 | begin: Offset(0.0, 0.0), 14 | end: Offset(0.0, 0.0), 15 | ).animate(animation), 16 | child: child, 17 | ); 18 | } 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/device/nav/nav_slide_from_bottom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavSlideFromBottom extends PageRouteBuilder { 4 | final Widget page; 5 | 6 | NavSlideFromBottom({ this.page }) : 7 | super(pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { 8 | return page; 9 | }, 10 | transitionDuration: Duration(milliseconds: 450), 11 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { 12 | return new SlideTransition( 13 | position: Tween( 14 | begin: Offset(0.0, 1.0), 15 | end: Offset(0.0, 0.0), 16 | ).animate(animation), 17 | child: child, 18 | ); 19 | } 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /lib/device/nav/nav_slide_from_left.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavSlideFromLeft extends PageRouteBuilder { 4 | final Widget page; 5 | 6 | NavSlideFromLeft({ this.page }) : 7 | super(pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { 8 | return page; 9 | }, 10 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { 11 | return new SlideTransition( 12 | position: Tween( 13 | begin: Offset(-1.0, 0.0), 14 | end: Offset(0.0, 0.0), 15 | ).animate(animation), 16 | child: child, 17 | ); 18 | } 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/device/nav/nav_slide_from_right.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavSlideFromRight extends PageRouteBuilder { 4 | final Widget page; 5 | 6 | NavSlideFromRight({ this.page }) : 7 | super(pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { 8 | return page; 9 | }, 10 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { 11 | return new SlideTransition( 12 | position: Tween( 13 | begin: Offset(1.0, 0.0), 14 | end: Offset(0.0, 0.0), 15 | ).animate(animation), 16 | child: child, 17 | ); 18 | } 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/device/nav/nav_slide_from_top.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavSlideFromTop extends PageRouteBuilder { 4 | final Widget page; 5 | 6 | NavSlideFromTop({ this.page }) : 7 | super(pageBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation) { 8 | return page; 9 | }, 10 | transitionDuration: Duration(milliseconds: 450), 11 | transitionsBuilder: (BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { 12 | return new SlideTransition( 13 | position: Tween( 14 | begin: Offset(0.0, -1.0), 15 | end: Offset(0.0, 0.0), 16 | ).animate(animation), 17 | child: child, 18 | ); 19 | } 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/core/app.dart'; 3 | import 'package:flutter_architecture/core/di/injector_provider.dart'; 4 | 5 | void main() async { 6 | setupInjection(); 7 | runApp(App()); 8 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.1" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.0" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.3" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.12" 46 | connectivity: 47 | dependency: "direct main" 48 | description: 49 | name: connectivity 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.4.6+2" 53 | convert: 54 | dependency: transitive 55 | description: 56 | name: convert 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.1" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.4" 67 | cupertino_icons: 68 | dependency: "direct main" 69 | description: 70 | name: cupertino_icons 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.1.3" 74 | dio: 75 | dependency: "direct main" 76 | description: 77 | name: dio 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "3.0.9" 81 | flutter: 82 | dependency: "direct main" 83 | description: flutter 84 | source: sdk 85 | version: "0.0.0" 86 | flutter_launcher_icons: 87 | dependency: "direct main" 88 | description: 89 | name: flutter_launcher_icons 90 | url: "https://pub.dartlang.org" 91 | source: hosted 92 | version: "0.7.4" 93 | flutter_plugin_android_lifecycle: 94 | dependency: transitive 95 | description: 96 | name: flutter_plugin_android_lifecycle 97 | url: "https://pub.dartlang.org" 98 | source: hosted 99 | version: "1.0.4" 100 | flutter_speed_dial: 101 | dependency: "direct main" 102 | description: 103 | name: flutter_speed_dial 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "1.2.5" 107 | flutter_test: 108 | dependency: "direct dev" 109 | description: flutter 110 | source: sdk 111 | version: "0.0.0" 112 | flutter_web_plugins: 113 | dependency: transitive 114 | description: flutter 115 | source: sdk 116 | version: "0.0.0" 117 | fluttertoast: 118 | dependency: "direct main" 119 | description: 120 | name: fluttertoast 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "3.1.3" 124 | get_it: 125 | dependency: "direct main" 126 | description: 127 | name: get_it 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "4.0.2" 131 | http_parser: 132 | dependency: transitive 133 | description: 134 | name: http_parser 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "3.1.3" 138 | image: 139 | dependency: transitive 140 | description: 141 | name: image 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "2.1.12" 145 | image_picker: 146 | dependency: "direct main" 147 | description: 148 | name: image_picker 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "0.6.3+1" 152 | intl: 153 | dependency: "direct main" 154 | description: 155 | name: intl 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.16.1" 159 | matcher: 160 | dependency: transitive 161 | description: 162 | name: matcher 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "0.12.6" 166 | meta: 167 | dependency: transitive 168 | description: 169 | name: meta 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.1.8" 173 | path: 174 | dependency: transitive 175 | description: 176 | name: path 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.6.4" 180 | petitparser: 181 | dependency: transitive 182 | description: 183 | name: petitparser 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.4.0" 187 | quiver: 188 | dependency: transitive 189 | description: 190 | name: quiver 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.3" 194 | rxdart: 195 | dependency: "direct main" 196 | description: 197 | name: rxdart 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.24.1" 201 | shared_preferences: 202 | dependency: "direct main" 203 | description: 204 | name: shared_preferences 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.5.6" 208 | shared_preferences_macos: 209 | dependency: transitive 210 | description: 211 | name: shared_preferences_macos 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.0.1+3" 215 | shared_preferences_platform_interface: 216 | dependency: transitive 217 | description: 218 | name: shared_preferences_platform_interface 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.0.1" 222 | shared_preferences_web: 223 | dependency: transitive 224 | description: 225 | name: shared_preferences_web 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "0.1.2+2" 229 | sky_engine: 230 | dependency: transitive 231 | description: flutter 232 | source: sdk 233 | version: "0.0.99" 234 | source_span: 235 | dependency: transitive 236 | description: 237 | name: source_span 238 | url: "https://pub.dartlang.org" 239 | source: hosted 240 | version: "1.7.0" 241 | sqflite: 242 | dependency: "direct main" 243 | description: 244 | name: sqflite 245 | url: "https://pub.dartlang.org" 246 | source: hosted 247 | version: "1.2.0" 248 | stack_trace: 249 | dependency: transitive 250 | description: 251 | name: stack_trace 252 | url: "https://pub.dartlang.org" 253 | source: hosted 254 | version: "1.9.3" 255 | stream_channel: 256 | dependency: transitive 257 | description: 258 | name: stream_channel 259 | url: "https://pub.dartlang.org" 260 | source: hosted 261 | version: "2.0.0" 262 | string_scanner: 263 | dependency: transitive 264 | description: 265 | name: string_scanner 266 | url: "https://pub.dartlang.org" 267 | source: hosted 268 | version: "1.0.5" 269 | synchronized: 270 | dependency: transitive 271 | description: 272 | name: synchronized 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "2.1.1" 276 | term_glyph: 277 | dependency: transitive 278 | description: 279 | name: term_glyph 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "1.1.0" 283 | test_api: 284 | dependency: transitive 285 | description: 286 | name: test_api 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "0.2.15" 290 | typed_data: 291 | dependency: transitive 292 | description: 293 | name: typed_data 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "1.1.6" 297 | vector_math: 298 | dependency: transitive 299 | description: 300 | name: vector_math 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "2.0.8" 304 | xml: 305 | dependency: transitive 306 | description: 307 | name: xml 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "3.6.1" 311 | yaml: 312 | dependency: transitive 313 | description: 314 | name: yaml 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "2.2.0" 318 | sdks: 319 | dart: ">=2.6.0 <3.0.0" 320 | flutter: ">=1.12.13+hotfix.5 <2.0.0" 321 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_architecture 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.3.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | flutter_launcher_icons: "^0.7.3" 27 | dio: ^3.0.9 28 | shared_preferences: ^0.5.2 29 | fluttertoast: ^3.1.0 30 | image_picker: ^0.6.1+4 31 | flutter_speed_dial: ^1.2.4 32 | intl: ^0.16.0 33 | connectivity: ^0.4.6+2 34 | sqflite: ^1.2.0 35 | get_it: ^4.0.2 36 | rxdart: ^0.24.1 37 | 38 | dev_dependencies: 39 | flutter_test: 40 | sdk: flutter 41 | 42 | flutter_icons: 43 | android: "launcher_icon" 44 | ios: true 45 | image_path: "assets/logo_launcher.png" 46 | 47 | # For information on the generic Dart part of this file, see the 48 | # following page: https://dart.dev/tools/pub/pubspec 49 | 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 | # To add assets to your application, add an assets section, like this: 59 | assets: 60 | - assets/logo.png 61 | - assets/logo_header.png 62 | 63 | 64 | # An image asset can refer to one or more resolution-specific "variants", see 65 | # https://flutter.dev/assets-and-images/#resolution-aware. 66 | 67 | # For details regarding adding assets from package dependencies, see 68 | # https://flutter.dev/assets-and-images/#from-packages 69 | 70 | # To add custom fonts to your application, add a fonts section here, 71 | # in this "flutter" section. Each entry in this list should have a 72 | # "family" key with the font family name, and a "fonts" key with a 73 | # list giving the asset and other descriptors for the font. For 74 | # example: 75 | # fonts: 76 | # - family: Schyler 77 | # fonts: 78 | # - asset: fonts/Schyler-Regular.ttf 79 | # - asset: fonts/Schyler-Italic.ttf 80 | # style: italic 81 | # - family: Trajan Pro 82 | # fonts: 83 | # - asset: fonts/TrajanPro.ttf 84 | # - asset: fonts/TrajanPro_Bold.ttf 85 | # weight: 700 86 | # 87 | # For details regarding fonts from package dependencies, 88 | # see https://flutter.dev/custom-fonts/#from-packages 89 | --------------------------------------------------------------------------------