├── .flutter-plugins ├── .gitattributes ├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── markdown-navigator.xml ├── markdown-navigator │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── runConfigurations │ └── main_dart.xml └── vcs.xml ├── .metadata ├── .packages ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── searoth │ │ │ └── flutterstarter │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ ├── app_icon.png │ │ ├── launch_background.xml │ │ ├── sample_large_icon.png │ │ └── secondary_icon.png │ │ ├── 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 │ │ ├── raw │ │ └── slow_spring_board.mp3 │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── images ├── avatar.png ├── flaps.jpg ├── ftt_debrief.png ├── ftt_echo.jpg ├── ftt_gear.jpg ├── ftt_handbook.jpg ├── ftt_prepare.jpg ├── ftt_ship.jpg ├── ftt_shuttle.jpg ├── ftt_sweat.jpg ├── google.png └── web_hi_res_512.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── 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 │ └── main.m ├── lib ├── Injector.dart ├── base │ ├── screen_presenter.dart │ └── screen_view.dart ├── data │ ├── db │ │ ├── db_helper.dart │ │ └── db_path.dart │ ├── file_helper.dart │ ├── models │ │ ├── Cart.dart │ │ ├── Comment.dart │ │ ├── Like.dart │ │ ├── Post.dart │ │ ├── Reply.dart │ │ ├── Statistic.dart │ │ └── User.dart │ └── network │ │ ├── firestore │ │ ├── firestore_helper.dart │ │ └── util │ │ │ ├── Comment.dart │ │ │ ├── Post.dart │ │ │ ├── Reply.dart │ │ │ └── User.dart │ │ ├── network_data.dart │ │ ├── network_util.dart │ │ └── user_helper.dart ├── localizations │ ├── constants.dart │ ├── keys.dart │ ├── paths.dart │ └── themes.dart ├── main.dart ├── main_presenter.dart ├── screens │ ├── about.dart │ ├── login_presenter.dart │ ├── login_screen.dart │ ├── photo_fullscreen.dart │ ├── profile_presenter.dart │ ├── profile_screen.dart │ ├── settings.dart │ └── support.dart ├── tabs │ ├── cart │ │ ├── cart_presenter.dart │ │ └── cart_screen.dart │ ├── dashboard │ │ ├── dashboard_presenter.dart │ │ └── dashboard_screen.dart │ └── home │ │ ├── home_presenter.dart │ │ └── home_screen.dart └── widgets │ ├── button_dropdown.dart │ ├── button_sign_in.dart │ ├── form_new_stat.dart │ ├── home_buttons.dart │ ├── list_settings.dart │ ├── page_user.dart │ ├── post_item.dart │ └── stat_item.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.flutter-plugins: -------------------------------------------------------------------------------- 1 | cloud_firestore=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\cloud_firestore-0.7.3\\ 2 | firebase_auth=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\firebase_auth-0.5.11\\ 3 | firebase_core=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\firebase_core-0.2.4\\ 4 | flutter_local_notifications=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\flutter_local_notifications-0.3.3\\ 5 | google_sign_in=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\google_sign_in-3.0.4\\ 6 | path_provider=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider-0.4.1\\ 7 | sqflite=C:\\Users\\cr\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\sqflite-0.9.0\\ 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # IntelliJ 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/assetWizardSettings.xml 41 | .idea/dictionaries 42 | .idea/libraries 43 | .idea/caches 44 | 45 | # Keystore files 46 | # Uncomment the following line if you do not want to check your keystore files in. 47 | #*.jks 48 | 49 | # External native build folder generated in Android Studio 2.2 and later 50 | .externalNativeBuild 51 | 52 | # Google Services (e.g. APIs or Firebase) 53 | google-services.json 54 | 55 | # Freeline 56 | freeline.py 57 | freeline/ 58 | freeline_project_description.json 59 | 60 | # fastlane 61 | fastlane/report.xml 62 | fastlane/Preview.html 63 | fastlane/screenshots 64 | fastlane/test_output 65 | fastlane/readme.md 66 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/markdown-navigator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 36 | 37 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.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: f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d 8 | channel: beta 9 | -------------------------------------------------------------------------------- /.packages: -------------------------------------------------------------------------------- 1 | # Generated by pub on 2018-07-05 07:55:49.542928. 2 | analyzer:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.31.2-alpha.2/lib/ 3 | args:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-1.4.3/lib/ 4 | async:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-2.0.7/lib/ 5 | boolean_selector:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.3/lib/ 6 | charcode:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.1/lib/ 7 | cloud_firestore:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cloud_firestore-0.7.3/lib/ 8 | collection:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.6/lib/ 9 | convert:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.0.1/lib/ 10 | crypto:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.3/lib/ 11 | csslib:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.4/lib/ 12 | firebase_auth:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/firebase_auth-0.5.11/lib/ 13 | firebase_core:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/firebase_core-0.2.4/lib/ 14 | flutter:file:///D:/FlutterBeta/flutter/packages/flutter/lib/ 15 | flutter_cupertino_settings:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flutter_cupertino_settings-0.0.8/lib/ 16 | flutter_image:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flutter_image-1.0.0/lib/ 17 | flutter_local_notifications:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flutter_local_notifications-0.3.3/lib/ 18 | flutter_test:file:///D:/FlutterBeta/flutter/packages/flutter_test/lib/ 19 | front_end:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.12/lib/ 20 | glob:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/glob-1.1.5/lib/ 21 | google_sign_in:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/google_sign_in-3.0.4/lib/ 22 | html:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.3/lib/ 23 | http:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+16/lib/ 24 | http_multi_server:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_multi_server-2.0.4/lib/ 25 | http_parser:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.2/lib/ 26 | intl:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.6/lib/ 27 | io:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/io-0.3.2+1/lib/ 28 | js:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1/lib/ 29 | kernel:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/kernel-0.3.0-alpha.12/lib/ 30 | logging:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib/ 31 | matcher:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.2+1/lib/ 32 | meta:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.5/lib/ 33 | mime:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.6/lib/ 34 | multi_server_socket:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/multi_server_socket-1.0.1/lib/ 35 | node_preamble:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.1/lib/ 36 | package_config:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.3/lib/ 37 | package_resolver:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_resolver-1.0.2/lib/ 38 | path:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.5.1/lib/ 39 | path_provider:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path_provider-0.4.1/lib/ 40 | platform:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/platform-2.1.2/lib/ 41 | plugin:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+2/lib/ 42 | pool:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.4/lib/ 43 | pub_semver:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.4.1/lib/ 44 | quiver:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/quiver-0.29.0+1/lib/ 45 | shelf:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.7.3/lib/ 46 | shelf_packages_handler:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.3/lib/ 47 | shelf_static:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.7/lib/ 48 | shelf_web_socket:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2/lib/ 49 | sky_engine:file:///D:/FlutterBeta/flutter/bin/cache/pkg/sky_engine/lib/ 50 | source_map_stack_trace:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.4/lib/ 51 | source_maps:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_maps-0.10.5/lib/ 52 | source_span:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.4.0/lib/ 53 | sqflite:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/sqflite-0.9.0/lib/ 54 | stack_trace:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.9.2/lib/ 55 | stream_channel:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.6/lib/ 56 | string_scanner:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.2/lib/ 57 | synchronized:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/synchronized-1.5.0-dev.2/lib/ 58 | term_glyph:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.0.0/lib/ 59 | test:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.37/lib/ 60 | timeago:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/timeago-1.2.7/lib/ 61 | typed_data:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.5/lib/ 62 | utf:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+4/lib/ 63 | vector_math:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/vector_math-2.0.6/lib/ 64 | watcher:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/watcher-0.9.7+7/lib/ 65 | web_socket_channel:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.7/lib/ 66 | yaml:file:///C:/Users/cr/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/yaml-2.1.13/lib/ 67 | flutterstarter:lib/ 68 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 SeaRoth 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter starter MVP architecture with Google Sign In 2 | 3 | This app is under development and approximately 82% complete. 4 | 5 | If you plan on using this starter kit then make sure you register it with Firebase/Google and download the google-services.json otherwise the app won't load. I will have to fix this part later for users who don't necessarily want the login portion. 6 | 7 | Features: 8 | - MVP architecture 9 | - Save data locally (cart & statistics) 10 | - Connects to firebase 11 | - Sign in with Google 12 | 13 | This app updates state using interfaces, overrides and setState. 14 | 15 | ### FILE STRUCTURE 16 | ![Question](https://i.imgur.com/2HiXQGt.png) 17 | 18 | ### Main Tab 19 | ![JSON](https://i.imgur.com/68lrM5Z.png) 20 | 21 | ### Second Tab 22 | ![JSON](https://i.imgur.com/bppmGNA.png) 23 | 24 | ### Third Tab 25 | ![JSON](https://i.imgur.com/utHN5Pe.png) 26 | 27 | ### Nav Drawer 28 | ![JSON](https://i.imgur.com/I5Cbjc2.png) 29 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /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 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.searoth.flutterstarter" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 17 | 21 | 28 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/searoth/flutterstarter/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.searoth.flutterstarter; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/drawable/app_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/sample_large_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/drawable/sample_large_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/secondary_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/drawable/secondary_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/raw/slow_spring_board.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/app/src/main/res/raw/slow_spring_board.mp3 -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.1.3' 9 | //classpath 'com.google.gms:google-services:3.2.1' 10 | classpath 'com.google.gms:google-services:4.0.1' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.configurations.all { 24 | resolutionStrategy.eachDependency { details -> 25 | if (details.requested.group == 'com.android.support' 26 | && !details.requested.name.contains('multidex') ) { 27 | details.useVersion "26.1.0" 28 | } 29 | } 30 | } 31 | project.buildDir = "${rootProject.buildDir}/${project.name}" 32 | } 33 | subprojects { 34 | project.evaluationDependsOn(':app') 35 | } 36 | 37 | task clean(type: Delete) { 38 | delete rootProject.buildDir 39 | } 40 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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-4.4-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/avatar.png -------------------------------------------------------------------------------- /images/flaps.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/flaps.jpg -------------------------------------------------------------------------------- /images/ftt_debrief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_debrief.png -------------------------------------------------------------------------------- /images/ftt_echo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_echo.jpg -------------------------------------------------------------------------------- /images/ftt_gear.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_gear.jpg -------------------------------------------------------------------------------- /images/ftt_handbook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_handbook.jpg -------------------------------------------------------------------------------- /images/ftt_prepare.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_prepare.jpg -------------------------------------------------------------------------------- /images/ftt_ship.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_ship.jpg -------------------------------------------------------------------------------- /images/ftt_shuttle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_shuttle.jpg -------------------------------------------------------------------------------- /images/ftt_sweat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/ftt_sweat.jpg -------------------------------------------------------------------------------- /images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/google.png -------------------------------------------------------------------------------- /images/web_hi_res_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/images/web_hi_res_512.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks/ 46 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0910; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 289 | CLANG_WARN_STRICT_PROTOTYPES = YES; 290 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = dwarf; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | ENABLE_TESTABILITY = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 97C147041CF9000F007C117D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | 97C147061CF9000F007C117D /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | CURRENT_PROJECT_VERSION = 1; 374 | ENABLE_BITCODE = NO; 375 | FRAMEWORK_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "$(PROJECT_DIR)/Flutter", 378 | ); 379 | INFOPLIST_FILE = Runner/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 381 | LIBRARY_SEARCH_PATHS = ( 382 | "$(inherited)", 383 | "$(PROJECT_DIR)/Flutter", 384 | ); 385 | PRODUCT_BUNDLE_IDENTIFIER = com.searoth.flutterstarter; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | VERSIONING_SYSTEM = "apple-generic"; 388 | }; 389 | name = Debug; 390 | }; 391 | 97C147071CF9000F007C117D /* Release */ = { 392 | isa = XCBuildConfiguration; 393 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | CURRENT_PROJECT_VERSION = 1; 397 | ENABLE_BITCODE = NO; 398 | FRAMEWORK_SEARCH_PATHS = ( 399 | "$(inherited)", 400 | "$(PROJECT_DIR)/Flutter", 401 | ); 402 | INFOPLIST_FILE = Runner/Info.plist; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 404 | LIBRARY_SEARCH_PATHS = ( 405 | "$(inherited)", 406 | "$(PROJECT_DIR)/Flutter", 407 | ); 408 | PRODUCT_BUNDLE_IDENTIFIER = com.searoth.flutterstarter; 409 | PRODUCT_NAME = "$(TARGET_NAME)"; 410 | VERSIONING_SYSTEM = "apple-generic"; 411 | }; 412 | name = Release; 413 | }; 414 | /* End XCBuildConfiguration section */ 415 | 416 | /* Begin XCConfigurationList section */ 417 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | 97C147031CF9000F007C117D /* Debug */, 421 | 97C147041CF9000F007C117D /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | 97C147061CF9000F007C117D /* Debug */, 430 | 97C147071CF9000F007C117D /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | /* End XCConfigurationList section */ 436 | }; 437 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 438 | } 439 | -------------------------------------------------------------------------------- /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 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/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 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutterstarter 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 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/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/Injector.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/data/db/db_helper.dart'; 2 | import 'package:flutterstarter/data/models/Statistic.dart'; 3 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 4 | import 'package:flutterstarter/data/network/network_data.dart'; 5 | import 'package:flutterstarter/data/network/user_helper.dart'; 6 | import 'package:path_provider/path_provider.dart'; 7 | 8 | class Injector{ 9 | static final Injector injector = new Injector._injector(); 10 | NetworkData _networkData; 11 | DbHelper _dbHelper; 12 | UserHelper _userHelper; 13 | FirestoreHelper _firestoreHelper; 14 | 15 | Injector._injector(){ 16 | _networkData = new NetworkData(); 17 | _dbHelper = new DbHelper(getApplicationDocumentsDirectory); 18 | _userHelper = new UserHelper(); 19 | _firestoreHelper = new FirestoreHelper(); 20 | } 21 | 22 | factory Injector(){ 23 | return injector; 24 | } 25 | 26 | NetworkData get networkData => _networkData; 27 | 28 | DbHelper get dbHelper => _dbHelper; 29 | 30 | UserHelper get userHelper => _userHelper; 31 | 32 | FirestoreHelper get firestoreHelper => _firestoreHelper; 33 | } -------------------------------------------------------------------------------- /lib/base/screen_presenter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/Injector.dart'; 2 | import 'package:flutterstarter/base/screen_view.dart'; 3 | import 'package:flutterstarter/data/db/db_helper.dart'; 4 | import 'package:flutterstarter/data/models/Statistic.dart'; 5 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 6 | import 'package:flutterstarter/data/network/network_data.dart'; 7 | import 'package:flutterstarter/data/network/user_helper.dart'; 8 | import 'package:google_sign_in/google_sign_in.dart'; 9 | 10 | abstract class ScreenPresenter { 11 | T _view; 12 | Injector _injector; 13 | DbHelper _dbHelper; 14 | NetworkData _networkData; 15 | UserHelper _userHelper; 16 | FirestoreHelper _firestoreHelper; 17 | List _stats = new List(); 18 | 19 | ScreenPresenter(this._view) { 20 | _injector = new Injector(); 21 | _dbHelper = _injector.dbHelper; 22 | _networkData = _injector.networkData; 23 | _userHelper = _injector.userHelper; 24 | _firestoreHelper = _injector.firestoreHelper; 25 | } 26 | 27 | NetworkData get networkData => _networkData; 28 | DbHelper get dbHelper => _dbHelper; 29 | T get view => _view; 30 | UserHelper get userHelper => _userHelper; 31 | FirestoreHelper get firestoreHelper => _firestoreHelper; 32 | 33 | void getStats(){ 34 | if(_stats != null) view.onStatsLoaded(_stats); 35 | _dbHelper.loadStats().then((list){ 36 | _stats = list; 37 | view.onStatsLoaded(list); 38 | }); 39 | } 40 | 41 | void setStats(List stats){ 42 | _stats = stats; 43 | _dbHelper.saveStats(_stats); 44 | } 45 | 46 | void loadDbNetworkData(){ 47 | view.onDbNetworkDataLoaded(_dbHelper, _networkData, _userHelper, _firestoreHelper); 48 | } 49 | 50 | bool isLoggedIn(){ 51 | return _userHelper.isLoggedIn(); 52 | } 53 | 54 | void loadUser(){ 55 | var user = _userHelper.getUser(); 56 | if(user != null) { 57 | _view.onUserLoaded(user); 58 | } 59 | } 60 | 61 | void logout(){ 62 | _firestoreHelper.removeUser(_userHelper.getUser()).whenComplete((){ 63 | _userHelper.logout().then((user){ 64 | _view.onLoggedOut(); 65 | }); 66 | }); 67 | } 68 | 69 | void loginGoogle(){ 70 | _userHelper.loginGoogle().then((user){ 71 | //create new user and add to database 72 | _firestoreHelper.createNewUser(user); 73 | 74 | _view.onUserLoaded(user); 75 | }).catchError((theError){ 76 | _view.onError(theError); 77 | }); 78 | } 79 | 80 | void signInSilently() { 81 | if(_userHelper.isLoggedIn()) 82 | return _view.onUserLoaded(_userHelper.getUser()); 83 | GoogleSignIn googleSignIn = _userHelper.retGoogleSignIn(); 84 | googleSignIn.onCurrentUserChanged.listen((user){ 85 | _userHelper.finishSilentLogin(user).then((firebaseUser){ 86 | _view.onUserLoaded(firebaseUser); 87 | }); 88 | }); 89 | _userHelper.signInSilently(); 90 | } 91 | 92 | } -------------------------------------------------------------------------------- /lib/base/screen_view.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutterstarter/data/db/db_helper.dart'; 5 | import 'package:flutterstarter/data/models/Statistic.dart'; 6 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 7 | import 'package:flutterstarter/data/network/network_data.dart'; 8 | import 'package:flutterstarter/data/network/user_helper.dart'; 9 | 10 | abstract class ScreenView{ 11 | void onUserLoaded(FirebaseUser user); 12 | void onStatsLoaded(List stats); 13 | void onError(var msg); 14 | void onLoggedOut(); 15 | void onFirebaseDocumentLoaded(Map document); 16 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, UserHelper userHelper, FirestoreHelper firestoreHelper); 17 | } -------------------------------------------------------------------------------- /lib/data/db/db_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'dart:io'; 5 | 6 | import 'package:flutterstarter/data/models/Cart.dart'; 7 | import 'package:flutterstarter/data/models/Statistic.dart'; 8 | 9 | class DbHelper { 10 | 11 | final String statsString = "stats"; 12 | final String cartString = "cart"; 13 | 14 | final Future Function() getDirectory; 15 | const DbHelper(this.getDirectory); 16 | 17 | Future _getLocalFile(String tag) async { 18 | final dir = await getDirectory(); 19 | try { 20 | var theFile = new File('${dir.path}/$tag.json'); 21 | return theFile; 22 | }catch(e){ 23 | return null; 24 | } 25 | } 26 | 27 | Future clean(String fileName) async { 28 | final file = await _getLocalFile(fileName); 29 | return file.delete(); 30 | } 31 | 32 | //CART 33 | Future saveCart(List list) async { 34 | if(list == null) 35 | return null; 36 | final file = await _getLocalFile(cartString); 37 | 38 | return file.writeAsString(new JsonEncoder().convert({ 39 | 'cart': list.map((item) => item).toList(), 40 | })); 41 | } 42 | 43 | Future> loadCart() async { 44 | final file = await _getLocalFile(cartString); 45 | if(file == null) 46 | return null; 47 | try{ 48 | final string = await file.readAsString(); 49 | final json = new JsonDecoder().convert(string); 50 | final cart = (json['cart'] as List) 51 | .map((stat) => new Cart.fromJson(stat)) 52 | .toList(); 53 | return cart; 54 | }catch(e){ 55 | return null; 56 | } 57 | } 58 | 59 | //STATS 60 | Future saveStats(List list) async { 61 | if(list == null) 62 | return null; 63 | final file = await _getLocalFile(statsString); 64 | return file.writeAsString(new JsonEncoder().convert({ 65 | 'stats': list.map((stat) => stat).toList(), 66 | })); 67 | } 68 | 69 | Future> loadStats() async { 70 | final file = await _getLocalFile(statsString); 71 | if(file == null) 72 | return null; 73 | try{ 74 | final string = await file.readAsString(); 75 | final json = new JsonDecoder().convert(string); 76 | final stats = (json['stats'] as List) 77 | .map((stat) => new Statistic.fromJson(stat)) 78 | .toList(); 79 | return stats; 80 | }catch(e){ 81 | return null; 82 | } 83 | } 84 | 85 | 86 | } -------------------------------------------------------------------------------- /lib/data/db/db_path.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/Injector.dart'; 2 | 3 | class DbPath { 4 | 5 | static final DbPath dbPath = new DbPath._init(); 6 | String _path; 7 | 8 | DbPath._init(); 9 | 10 | factory DbPath(){ 11 | return dbPath; 12 | } 13 | 14 | String get path => _path; 15 | 16 | set path(String value){ 17 | _path = value; 18 | new Injector(); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /lib/data/file_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:flutter/services.dart'; 5 | 6 | class FileHelper{ 7 | Future readJsonFile(String loc) => 8 | rootBundle.loadString(loc).then((jsonString){ 9 | return jsonString; 10 | }).catchError((e){ 11 | return null; 12 | }); 13 | 14 | static Future getLocalFile(Directory directory, String path) async { 15 | final dir = directory; 16 | try { 17 | var theFile = new File('${dir.path}/$path'); 18 | return theFile; 19 | }catch(e){ 20 | return null; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /lib/data/models/Cart.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class Cart { 4 | String id; 5 | int qty; 6 | 7 | Cart(this.id, this.qty); 8 | 9 | Cart.fromJson(Map json) 10 | : id = json['id'], 11 | qty = json['qty']; 12 | 13 | Map toJson() => { 14 | 'id': id, 15 | 'qty': qty, 16 | }; 17 | } -------------------------------------------------------------------------------- /lib/data/models/Comment.dart: -------------------------------------------------------------------------------- 1 | 2 | class Comment { 3 | final DateTime date; 4 | final bool edited; 5 | final num likes; 6 | final String message; 7 | final String userId; 8 | 9 | Comment(this.date, this.edited, this.likes, this.message, this.userId); 10 | 11 | Comment.fromJson(Map json) 12 | : date = json['date'], 13 | edited = json['edited'], 14 | likes = json['likes'], 15 | userId = json['userId'], 16 | message = json['message']; 17 | 18 | Map toJson() => { 19 | 'userId': userId, 20 | 'message': message, 21 | 'date': date}; 22 | } -------------------------------------------------------------------------------- /lib/data/models/Like.dart: -------------------------------------------------------------------------------- 1 | class Like { 2 | final id; 3 | final name; 4 | final imageUrl; 5 | final numLikes; 6 | 7 | Like(this.id, this.name, this.imageUrl, this.numLikes); 8 | 9 | Like.fromJson(Map json) 10 | : id = json['id'], 11 | name = json['name'], 12 | imageUrl = json['imgUrl'], 13 | numLikes = json['numLikes']; 14 | 15 | Map toJson() => { 16 | 'id': id, 17 | 'name': name, 18 | 'imageUrl': imageUrl, 19 | 'numLikes': numLikes, 20 | }; 21 | } -------------------------------------------------------------------------------- /lib/data/models/Post.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/data/models/Comment.dart'; 2 | 3 | 4 | class Post { 5 | 6 | final String FIELD_DATE = "date"; 7 | final String FIELD_EDITED = "edited"; 8 | final String FIELD_COMMENTS = "comments"; 9 | final String FIELD_IMGURLLIST = "imgUrlList"; 10 | final String FIELD_LIKES = "likes"; 11 | final String FIELD_MESSAGE = "message"; 12 | final String FIELD_TITLE = "title"; 13 | final String FIELD_USERID = "userId"; 14 | final String FIELD_USERIMAGEURL = "userImageUrl"; 15 | 16 | DateTime date; 17 | bool edited; 18 | List comments; 19 | List imgUrlList; 20 | List likes; 21 | String message; 22 | String title; 23 | String userId; 24 | String userImageUrl; 25 | 26 | //Post(this.date, this.edited, this.comments, this.imgUrlList, this.likes, this.message, this.title, this.userId, this.userImageUrl){} 27 | 28 | Post(this.date, this.edited, this.imgUrlList, this.likes, this.message, this.title, this.userId, this.userImageUrl){} 29 | 30 | Map toJson() => { 31 | 32 | 'userId': userId, 33 | 'title': title, 34 | 'date': date, 35 | 'desc': message, 36 | 'imgUrl': imgUrlList, 37 | }; 38 | } -------------------------------------------------------------------------------- /lib/data/models/Reply.dart: -------------------------------------------------------------------------------- 1 | class Reply { 2 | String id; 3 | String userId; 4 | String message; 5 | bool edited; 6 | String date; 7 | 8 | Reply(this.id, this.userId, this.message, this.date); 9 | 10 | Reply.fromJson(Map json) 11 | : id = json['id'], 12 | userId = json['userId'], 13 | message = json['message'], 14 | date = json['date']; 15 | 16 | Map toJson() => { 17 | 'id': id, 18 | 'userId': userId, 19 | 'message': message, 20 | 'date': date, 21 | }; 22 | } -------------------------------------------------------------------------------- /lib/data/models/Statistic.dart: -------------------------------------------------------------------------------- 1 | class Statistic { 2 | final id; 3 | final name; 4 | final desc; 5 | final value; 6 | 7 | Statistic(this.id, this.name, this.desc, this.value); 8 | 9 | Statistic.fromJson(Map json) 10 | : id = json['id'], 11 | name = json['name'], 12 | desc = json['desc'], 13 | value = json['value']; 14 | 15 | Map toJson() => { 16 | 'id': id, 17 | 'name': name, 18 | 'desc': desc, 19 | 'value': value, 20 | }; 21 | } -------------------------------------------------------------------------------- /lib/data/models/User.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/data/models/Like.dart'; 2 | 3 | class User { 4 | final String coverPhoto; 5 | final DateTime dateCreated; 6 | final List friends; 7 | final String headline; 8 | final String imageUrl; 9 | final Object likes; 10 | final String location; 11 | final name; 12 | final List photos; 13 | 14 | User(this.coverPhoto, this.dateCreated, this.friends, this.headline, this.imageUrl, this.likes, this.location, this.name, this.photos); 15 | 16 | // User.fromJson(Map json) 17 | // : id = json['id'], 18 | // userId = json['userId'], 19 | // name = json['name'], 20 | // friends = json['friends'], 21 | // likes = json['likes']; 22 | 23 | // Map toJson() => { 24 | // 'id': id, 25 | // 'userId': userId, 26 | // 'name': name, 27 | // 'friends': friends, 28 | // 'likes': likes,}; 29 | 30 | 31 | 32 | 33 | } -------------------------------------------------------------------------------- /lib/data/network/firestore/firestore_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:math'; 3 | 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:firebase_core/firebase_core.dart'; 7 | import 'package:flutterstarter/data/models/Comment.dart'; 8 | import 'package:flutterstarter/data/models/Post.dart'; 9 | import 'package:flutterstarter/data/network/firestore/util/Comment.dart'; 10 | import 'package:flutterstarter/data/network/firestore/util/Post.dart'; 11 | import 'package:flutterstarter/data/network/firestore/util/Reply.dart'; 12 | import 'package:flutterstarter/data/network/firestore/util/User.dart'; 13 | 14 | class FirestoreHelper { 15 | bool isFlightSubscriptionEnabled = false; 16 | DocumentReference docRefUsers; 17 | 18 | Map createPost(FirebaseUser _user, Post post){ 19 | Map aPost = { 20 | "date": new DateTime.now().toUtc().toIso8601String(), 21 | "edited": false, 22 | "imgUrlList": post.imgUrlList, 23 | "likes": post.likes, 24 | "message": "${post.message}", 25 | "title": "${post.title}", 26 | "userId": "${_user.uid}", 27 | "userImgUrl": "${post.imgUrlList[0]}", 28 | }; 29 | return aPost; 30 | } 31 | 32 | Future createNewUser(FirebaseUser _user)async { 33 | Map user = UserUtil.createUser( 34 | "https://i.imgur.com/c5LeAMI.jpg", 35 | DateTime.now(), 36 | "${_user.uid}", 37 | [], 38 | "Empty Headline", //headline 39 | _user.photoUrl, 40 | { 41 | "comments": [], 42 | "posts":[], 43 | }, 44 | "",//location 45 | _user.displayName, 46 | [] 47 | ); 48 | 49 | WriteBatch batch = firestore.batch(); 50 | DocumentReference _userDocRef; 51 | _userDocRef = firestore.collection("users").document(_user.uid); 52 | batch.setData(_userDocRef, user); 53 | 54 | await batch.commit().then((done){ 55 | print("new user has been created"); 56 | }).catchError((e){ 57 | print("new user error"); 58 | }); 59 | } 60 | 61 | Future removeUser(FirebaseUser _user) async{ 62 | WriteBatch batch = firestore.batch(); 63 | DocumentReference _userDocRef; 64 | _userDocRef = firestore.collection("users").document(_user.uid); 65 | batch.delete(_userDocRef); 66 | await batch.commit(); 67 | } 68 | 69 | Future populateUsers() async{ 70 | List> users = UserUtil.createUsers(); 71 | 72 | WriteBatch batch = firestore.batch(); 73 | DocumentReference _userDocRef; 74 | 75 | for(Map user in users) { 76 | _userDocRef = firestore.collection("users").document(user['firebaseId']); 77 | batch.setData(_userDocRef, user); 78 | } 79 | 80 | await batch.commit().then((done){ 81 | print("worked"); 82 | }).catchError((e){ 83 | print("error"); 84 | }); 85 | } 86 | 87 | Future populatePosts() async{ 88 | List> posts = PostUtil.createPosts(); 89 | WriteBatch batch = firestore.batch(); 90 | DocumentReference _postDocRef; 91 | DocumentReference _commentDocReference; 92 | DocumentReference _replyDocReference; 93 | 94 | for(var post in posts){ 95 | _postDocRef = firestore.collection("posts").document(post['userId']); 96 | _commentDocReference = _postDocRef.collection("comments").document(); 97 | _replyDocReference = _commentDocReference.collection("replies").document(); 98 | 99 | batch.setData(_postDocRef, post); 100 | batch.setData(_commentDocReference, CommentUtil.createComment("1334")); 101 | batch.setData(_replyDocReference, ReplyUtil.createReply(_postDocRef.documentID)); 102 | } 103 | 104 | await batch.commit().then((_){ 105 | print("done"); 106 | }); 107 | } 108 | 109 | StreamSubscription firestoreSubscription; 110 | static final FirestoreHelper firebaseHelper = new FirestoreHelper._helper(); 111 | 112 | Map mFirestoreData; 113 | 114 | factory FirestoreHelper(){ 115 | return firebaseHelper; 116 | } 117 | 118 | FirestoreHelper._helper(){ 119 | print("opening firebase helper"); 120 | _init(); 121 | } 122 | 123 | Firestore firestore; 124 | Future _init() async{ 125 | await FirebaseApp.configure( 126 | name: 'test', 127 | options: const FirebaseOptions( 128 | googleAppID: '1:375379904694:android:37a81e2c079af708', 129 | apiKey: 'AIzaSyAyllG1K6PgZoKwnFtIPMiyebCAcsBkFJs', 130 | projectID: 'flutter-starter', 131 | ), 132 | ).catchError((onError){ 133 | print("error"); 134 | print(onError.toString()); 135 | }).then((done){ 136 | firestore = new Firestore(app: done,); 137 | 138 | }); 139 | } 140 | 141 | } -------------------------------------------------------------------------------- /lib/data/network/firestore/util/Comment.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutterstarter/data/models/Comment.dart'; 5 | 6 | class CommentUtil{ 7 | 8 | static Comment getRandom(){ 9 | return new Comment(new DateTime.now(), false, 0, "message", "1336"); 10 | } 11 | 12 | 13 | var replies = ["now that's what i call a hole in one", 14 | "HOLY SCHNIKIES!", 15 | "MonkaS", 16 | "WHAT IN THE HECK!","I LOVE CHICKEN" 17 | "AYYYYY" 18 | ]; 19 | 20 | static Map createComment(String userId){ 21 | Map aComment = { 22 | "date": new DateTime.now(), 23 | "edited": false, 24 | "likes": 33, 25 | "message": "a random message", 26 | "userId": "$userId", 27 | }; 28 | return aComment; 29 | } 30 | 31 | 32 | 33 | } -------------------------------------------------------------------------------- /lib/data/network/firestore/util/Post.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutterstarter/data/network/firestore/util/User.dart'; 3 | class PostUtil{ 4 | 5 | static final dates = [ 6 | new DateTime.now().subtract(Duration(days: 1)), 7 | new DateTime.now().subtract(Duration(days: 3,hours: 5,minutes: 15)), 8 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 10)), 9 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 10)), 10 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 11)), 11 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 12)), 12 | ]; 13 | 14 | static final messages = [ 15 | "going to beach", 16 | "selling 10x tickets", 17 | "app developer", 18 | "carpenter", 19 | "musician, trumpet", 20 | "real estate", 21 | ]; 22 | 23 | static final titles = [ 24 | "10x tickets", 25 | "Book for sale", 26 | "Gardening services", 27 | "1000+ likes on any photo", 28 | "make money online", 29 | "Selling a tv", 30 | "anyone live in la", 31 | "who here is actual 10x", 32 | "buy this watch", 33 | "check out my youtube", 34 | ]; 35 | 36 | static final photos = [ 37 | "https://i.imgur.com/ewErHlS.png", 38 | "https://i.imgur.com/yYN6uLu.png", 39 | "https://i.imgur.com/txwTJU9.jpg", 40 | "https://i.imgur.com/NDLynL6.png", 41 | "https://i.imgur.com/vDyH62D.png", 42 | "https://i.imgur.com/nI3bC4B.png", 43 | "https://i.imgur.com/2nmUxF4.png", 44 | "https://i.imgur.com/ewErHlS.png", 45 | "https://i.imgur.com/ewErHlS.png", 46 | "https://i.imgur.com/FUZ8L91.png", 47 | "https://i.imgur.com/JcvZw1O.jpg", 48 | "https://i.imgur.com/vOasty8.png", 49 | "https://i.imgur.com/RYgHGfk.jpg", 50 | "https://i.imgur.com/B5DL5e6.jpg", 51 | "https://i.imgur.com/OSmzXLh.jpg", 52 | ]; 53 | 54 | static final userIds = [ 55 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs73", 56 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs74", 57 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs75", 58 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs76", 59 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs77", 60 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs78", 61 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs79", 62 | ]; 63 | 64 | static final avatars = [ 65 | "https://i.imgur.com/vjq95yT.jpg", 66 | "https://i.imgur.com/S7yORke.jpg", 67 | "https://i.imgur.com/jwASmyc.jpg", 68 | "https://i.imgur.com/OkQ8dxA.jpg", 69 | "https://i.imgur.com/JLUBEkb.jpg", 70 | "https://i.imgur.com/FM4u1MN.jpg", 71 | "https://i.imgur.com/RYgHGfk.jpg", 72 | "https://i.imgur.com/qgtOgZh.jpg" 73 | ]; 74 | 75 | static List> createPosts(){ 76 | List> posts = new List(); 77 | 78 | for(String uid in userIds){ 79 | var date = dates[Random().nextInt(dates.length-1)]; 80 | var message = messages[Random().nextInt(messages.length-1)]; 81 | var title = titles[Random().nextInt(titles.length-1)]; 82 | var likes = []; 83 | var userId = uid; 84 | var imgUrlList = [ 85 | photos[Random().nextInt(photos.length-1)], 86 | photos[Random().nextInt(photos.length-1)], 87 | photos[Random().nextInt(photos.length-1)], 88 | ]; 89 | 90 | posts.add( 91 | createPost( 92 | date, 93 | false, 94 | imgUrlList, 95 | likes, 96 | message, 97 | title, 98 | userId) 99 | ); 100 | } 101 | return posts; 102 | } 103 | 104 | static Map createPost(var date, var edited, var imgUrlList, var likes, var message, var title, var userId){ 105 | Map aUser = { 106 | "date": date, 107 | "edited": edited, 108 | "imgUrlList": imgUrlList, 109 | "likes": likes, 110 | "message": message, 111 | "title": title, 112 | "userId": userId, 113 | }; 114 | return aUser; 115 | } 116 | 117 | } -------------------------------------------------------------------------------- /lib/data/network/firestore/util/Reply.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | class ReplyUtil{ 6 | static Map createReply(String postId){ 7 | Map aComment = { 8 | "date": new DateTime.now().toUtc().toIso8601String(), 9 | "edited": false, 10 | "likes": 33, 11 | "message": "a random message", 12 | "userId": "$postId", 13 | }; 14 | return aComment; 15 | } 16 | } -------------------------------------------------------------------------------- /lib/data/network/firestore/util/User.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | import 'dart:math'; 3 | 4 | class UserUtil{ 5 | 6 | static final coverPhotos = ["https://i.imgur.com/nZG1db9.png", 7 | "https://i.imgur.com/BOfvR72.png", 8 | "https://i.imgur.com/IvE301W.jpg", 9 | "https://i.imgur.com/0q8W9k5.jpg", 10 | "https://i.imgur.com/SAfhuCa.jpg" 11 | ]; 12 | 13 | static final dates = [ 14 | new DateTime.now().subtract(Duration(days: 1,minutes: 43)), 15 | new DateTime.now().subtract(Duration(days: 1,minutes: 23)), 16 | new DateTime.now().subtract(Duration(days: 1,minutes: 13)), 17 | new DateTime.now().subtract(Duration(days: 1,minutes: 53)), 18 | new DateTime.now().subtract(Duration(days: 1,minutes: 22)), 19 | new DateTime.now().subtract(Duration(days: 1,minutes: 4)), 20 | new DateTime.now().subtract(Duration(days: 3,hours: 5,minutes: 15)), 21 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 10)), 22 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 10)), 23 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 11)), 24 | new DateTime.now().subtract(Duration(days: 4,hours: 5,minutes: 12)), 25 | ]; 26 | 27 | static final userIds = [ 28 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs73", 29 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs74", 30 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs75", 31 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs76", 32 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs77", 33 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs78", 34 | "Lvjdhs84jfjsja73ukdkf9fnhdhjs79", 35 | ]; 36 | 37 | static final headlines = [ 38 | "going to beach", 39 | "selling 10x tickets", 40 | "app developer", 41 | "carpenter", 42 | "musician, trumpet", 43 | "real estate", 44 | ]; 45 | 46 | static final avatars = [ 47 | "https://i.imgur.com/vjq95yT.jpg", 48 | "https://i.imgur.com/S7yORke.jpg", 49 | "https://i.imgur.com/jwASmyc.jpg", 50 | "https://i.imgur.com/OkQ8dxA.jpg", 51 | "https://i.imgur.com/JLUBEkb.jpg", 52 | "https://i.imgur.com/FM4u1MN.jpg", 53 | "https://i.imgur.com/RYgHGfk.jpg", 54 | "https://i.imgur.com/qgtOgZh.jpg" 55 | ]; 56 | 57 | static final posts = [ 58 | "sdfsdf34sdfs22", 59 | "sdfsdf34sdfs23", 60 | "sdfsdf34sdfs24", 61 | "sdfsdf34sdfs25", 62 | "sdfsdf34sdfs26", 63 | "sdfsdf34sdfs27", 64 | "sdfsdf34sdfs28", 65 | "sdfsdf34sdfs29", 66 | "sdfsdf34sdfs30", 67 | ]; 68 | 69 | static final replies = [ 70 | "r123", 71 | "r124", 72 | "r125", 73 | "r126", 74 | "r127", 75 | "r128", 76 | "r129", 77 | ]; 78 | 79 | static final locations = [ 80 | "Narnia, North Dakota", 81 | "Somewhere you know", 82 | "i can type anything?", 83 | "Narnia, rekt", 84 | "home plate", 85 | "anywhere you're buying 10x merch", 86 | ]; 87 | 88 | static final names = ["chuck","barry","angelo","markel","tmoney"]; 89 | 90 | static final photos = [ 91 | "https://i.imgur.com/ewErHlS.png", 92 | "https://i.imgur.com/yYN6uLu.png", 93 | "https://i.imgur.com/txwTJU9.jpg", 94 | "https://i.imgur.com/NDLynL6.png", 95 | "https://i.imgur.com/vDyH62D.png", 96 | "https://i.imgur.com/nI3bC4B.png", 97 | "https://i.imgur.com/2nmUxF4.png", 98 | "https://i.imgur.com/ewErHlS.png", 99 | "https://i.imgur.com/ewErHlS.png", 100 | "https://i.imgur.com/FUZ8L91.png", 101 | "https://i.imgur.com/JcvZw1O.jpg", 102 | "https://i.imgur.com/vOasty8.png", 103 | "https://i.imgur.com/RYgHGfk.jpg", 104 | "https://i.imgur.com/B5DL5e6.jpg", 105 | "https://i.imgur.com/OSmzXLh.jpg", 106 | ]; 107 | 108 | 109 | 110 | static List> createUsers(){ 111 | List> users = new List(); 112 | 113 | for(String uId in userIds){ 114 | var coverPhoto = coverPhotos[Random().nextInt(coverPhotos.length-1)]; 115 | var dateCreated = dates[Random().nextInt(dates.length-1)]; 116 | var firebaseId = uId; 117 | var friendsHash = HashSet(); 118 | friendsHash.add(userIds[Random().nextInt(userIds.length-1)]); 119 | friendsHash.add(userIds[Random().nextInt(userIds.length-1)]); 120 | friendsHash.add(userIds[Random().nextInt(userIds.length-1)]); 121 | var friends = friendsHash.toList(); 122 | 123 | var headline = headlines[Random().nextInt(headlines.length-1)]; 124 | var imageUrl = photos[Random().nextInt(photos.length-1)]; 125 | var likes = { 126 | "posts": [], 127 | "replies": [], 128 | }; 129 | var location = locations[Random().nextInt(locations.length-1)]; 130 | var username = names[Random().nextInt(names.length-1)]; 131 | var mPhotos = [ 132 | photos[Random().nextInt(photos.length-1)], 133 | photos[Random().nextInt(photos.length-1)], 134 | photos[Random().nextInt(photos.length-1)], 135 | photos[Random().nextInt(photos.length-1)], 136 | photos[Random().nextInt(photos.length-1)], 137 | photos[Random().nextInt(photos.length-1)], 138 | ]; 139 | 140 | users.add( 141 | createUser(coverPhoto, dateCreated, firebaseId, friends, headline, imageUrl, likes, location, username, mPhotos) 142 | ); 143 | } 144 | return users; 145 | } 146 | 147 | static Map createUser(var coverPhoto, var dateCreated, var firebaseId, var friends, var headlines, var imageUrl, var likes, var location, var username, var mPhotos){ 148 | Map aUser = { 149 | "coverPhoto": coverPhoto, 150 | "dateCreated": dateCreated, 151 | "firebaseId":firebaseId, 152 | "friends": friends, 153 | "headline": headlines, 154 | "imageUrl": imageUrl, 155 | "likes": likes, 156 | "location": location, 157 | "name": username, 158 | "photos": mPhotos 159 | }; 160 | return aUser; 161 | } 162 | 163 | } -------------------------------------------------------------------------------- /lib/data/network/network_data.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutterstarter/data/network/network_util.dart'; 4 | 5 | class NetworkData{ 6 | NetworkUtil _networkUtil; 7 | 8 | NetworkData(){ 9 | _networkUtil = new NetworkUtil(); 10 | } 11 | 12 | 13 | 14 | 15 | 16 | } -------------------------------------------------------------------------------- /lib/data/network/network_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'package:http/http.dart' as http; 4 | 5 | class NetworkUtil { 6 | final JsonDecoder _decoder = new JsonDecoder(); 7 | 8 | Future request(String url) { 9 | return http.get(url) 10 | .then((http.Response response) { 11 | final String res = response.body; 12 | final int statusCode = response.statusCode; 13 | 14 | if (statusCode < 200 || statusCode > 400 || json == null) { 15 | throw new Exception("Error while fetching data"); 16 | } 17 | return _decoder.convert(res); 18 | }); 19 | } 20 | } -------------------------------------------------------------------------------- /lib/data/network/user_helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:google_sign_in/google_sign_in.dart'; 3 | import 'dart:async'; 4 | 5 | class UserHelper{ 6 | 7 | final FirebaseAuth _auth = FirebaseAuth.instance; 8 | final GoogleSignIn _googleSignIn = new GoogleSignIn(); 9 | GoogleSignInAccount _googleSignInAccount; 10 | FirebaseUser _user; 11 | bool _isLoggedIn = false; 12 | 13 | static final UserHelper loginHelper = new UserHelper._helper(); 14 | 15 | factory UserHelper(){ 16 | return loginHelper; 17 | } 18 | 19 | UserHelper._helper(){ 20 | 21 | } 22 | 23 | GoogleSignIn retGoogleSignIn() { 24 | return _googleSignIn; 25 | } 26 | 27 | GoogleSignInAccount retSignInAccount(){ 28 | return _googleSignInAccount; 29 | } 30 | 31 | bool isLoggedIn(){ 32 | return _isLoggedIn; 33 | } 34 | 35 | Future logout() async{ 36 | _googleSignIn.signOut(); 37 | _auth.signOut(); 38 | _isLoggedIn = false; 39 | _user = null; 40 | return; 41 | } 42 | 43 | FirebaseUser getUser() { 44 | return _user; 45 | } 46 | 47 | Future signInSilently() async=> 48 | await _googleSignIn.signInSilently().then((account){ 49 | if(account != null) { 50 | _isLoggedIn = true; 51 | _googleSignInAccount = account; 52 | return account; 53 | } 54 | return false; 55 | }); 56 | 57 | 58 | Future setOnChangeListener() async{ 59 | _auth.onAuthStateChanged.listen((user){ 60 | if(user != null) { 61 | _isLoggedIn = true; 62 | print("AUTH STATE CHANGED"); 63 | _user = user; 64 | return user; 65 | }else return null; 66 | }); 67 | return null; 68 | } 69 | 70 | Future loginGoogle() async { 71 | final GoogleSignInAccount googleUser = await _googleSignIn.signIn(); 72 | _googleSignInAccount = googleUser; 73 | return await finishSilentLogin(googleUser); 74 | } 75 | 76 | Future finishSilentLogin(GoogleSignInAccount googleUser) async { 77 | final GoogleSignInAuthentication googleAuth = await googleUser.authentication; 78 | _user = await _auth.signInWithGoogle( 79 | accessToken: googleAuth.accessToken, 80 | idToken: googleAuth.idToken, 81 | ).catchError((theError){ 82 | throw new Exception(theError); 83 | }); 84 | assert(_user.email != null); 85 | assert(_user.displayName != null); 86 | assert(!_user.isAnonymous); 87 | assert(await _user.getIdToken() != null); 88 | 89 | _isLoggedIn = true; 90 | final FirebaseUser currentUser = await _auth.currentUser(); 91 | assert(_user.uid == currentUser.uid); 92 | return _user; 93 | } 94 | 95 | } -------------------------------------------------------------------------------- /lib/localizations/constants.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/lib/localizations/constants.dart -------------------------------------------------------------------------------- /lib/localizations/keys.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/lib/localizations/keys.dart -------------------------------------------------------------------------------- /lib/localizations/paths.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/lib/localizations/paths.dart -------------------------------------------------------------------------------- /lib/localizations/themes.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | class StarterTheme { 5 | static get theme { 6 | final originalTextTheme = new ThemeData.dark().textTheme; 7 | final originalBody1 = originalTextTheme.body1; 8 | 9 | return new ThemeData.dark().copyWith( 10 | primaryColor: Colors.grey[800], 11 | accentColor: Colors.cyan[300], 12 | buttonColor: Colors.grey[800], 13 | textSelectionColor: Colors.cyan[100], 14 | backgroundColor: Colors.grey[800], 15 | textTheme: originalTextTheme.copyWith( 16 | body1: 17 | originalBody1.copyWith(decorationColor: Colors.transparent))); 18 | } 19 | } 20 | // Copyright 2018 The Chromium Authors. All rights reserved. 21 | // Use of this source code is governed by a BSD-style license that can be 22 | // found in the LICENSE file. 23 | 24 | 25 | 26 | //class StarterTheme { 27 | // const StarterTheme._(this.name, this.data); 28 | // 29 | // final String name; 30 | // final ThemeData data; 31 | //} 32 | // 33 | //final StarterTheme kDarkStarterTheme = new StarterTheme._('Dark', _buildDarkTheme()); 34 | //final StarterTheme kLightStarterTheme = new StarterTheme._('Light', _buildLightTheme()); 35 | // 36 | //TextTheme _buildTextTheme(TextTheme base) { 37 | // return base.copyWith( 38 | // title: base.title.copyWith( 39 | // fontFamily: 'GoogleSans', 40 | // ), 41 | // ); 42 | //} 43 | // 44 | //ThemeData _buildDarkTheme() { 45 | // const Color primaryColor = const Color(0xFF0175c2); 46 | // final ThemeData base = new ThemeData.dark(); 47 | // return base.copyWith( 48 | // primaryColor: primaryColor, 49 | // buttonColor: primaryColor, 50 | // indicatorColor: Colors.white, 51 | // accentColor: const Color(0xFF13B9FD), 52 | // canvasColor: const Color(0xFF202124), 53 | // scaffoldBackgroundColor: const Color(0xFF202124), 54 | // backgroundColor: const Color(0xFF202124), 55 | // errorColor: const Color(0xFFB00020), 56 | // buttonTheme: const ButtonThemeData( 57 | // textTheme: ButtonTextTheme.primary, 58 | // ), 59 | // textTheme: _buildTextTheme(base.textTheme), 60 | // primaryTextTheme: _buildTextTheme(base.primaryTextTheme), 61 | // accentTextTheme: _buildTextTheme(base.accentTextTheme), 62 | // ); 63 | //} 64 | // 65 | //ThemeData _buildLightTheme() { 66 | // const Color primaryColor = const Color(0xFF0175c2); 67 | // final ThemeData base = new ThemeData.light(); 68 | // return base.copyWith( 69 | // primaryColor: primaryColor, 70 | // buttonColor: primaryColor, 71 | // indicatorColor: Colors.white, 72 | // splashColor: Colors.white24, 73 | // splashFactory: InkRipple.splashFactory, 74 | // accentColor: const Color(0xFF13B9FD), 75 | // canvasColor: Colors.white, 76 | // scaffoldBackgroundColor: Colors.white, 77 | // backgroundColor: Colors.white, 78 | // errorColor: const Color(0xFFB00020), 79 | // buttonTheme: const ButtonThemeData( 80 | // textTheme: ButtonTextTheme.primary, 81 | // ), 82 | // textTheme: _buildTextTheme(base.textTheme), 83 | // primaryTextTheme: _buildTextTheme(base.primaryTextTheme), 84 | // accentTextTheme: _buildTextTheme(base.accentTextTheme), 85 | // ); 86 | //} 87 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter_image/network.dart'; 5 | import 'package:flutterstarter/data/db/db_helper.dart'; 6 | import 'package:flutterstarter/data/models/Statistic.dart'; 7 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 8 | import 'package:flutterstarter/data/network/network_data.dart'; 9 | import 'package:flutterstarter/data/network/user_helper.dart'; 10 | import 'package:flutterstarter/localizations/themes.dart'; 11 | import 'package:flutterstarter/main_presenter.dart'; 12 | import 'package:flutterstarter/tabs/home/home_screen.dart' as _firstTab; 13 | import 'package:flutterstarter/tabs/dashboard/dashboard_screen.dart' as _secondTab; 14 | import 'package:flutterstarter/tabs/cart/cart_screen.dart' as _thirdTab; 15 | import './screens/about.dart' as _aboutPage; 16 | import './screens/support.dart' as _supportPage; 17 | import './screens/settings.dart' as _settingsPage; 18 | import './screens/login_screen.dart' as _loginPage; 19 | import './screens/profile_screen.dart' as _profilePage; 20 | 21 | void main() => runApp(new MaterialApp( 22 | title: 'Flutter MVP Starter', 23 | theme: StarterTheme.theme, 24 | debugShowCheckedModeBanner: false, 25 | color: Colors.grey, 26 | home: new Tabs(), 27 | onGenerateRoute: (RouteSettings settings) { 28 | switch (settings.name) { 29 | case '/about': return new FromRightToLeft( 30 | builder: (_) => new _aboutPage.About(), 31 | settings: settings, 32 | ); 33 | 34 | case '/login': return new FromRightToLeft( 35 | builder: (_) => new _loginPage.LoginScreen(), 36 | settings: settings, 37 | ); 38 | 39 | case '/profile': return new FromRightToLeft ( 40 | builder: (_) => new _profilePage.ProfileScreen(), 41 | settings: settings, 42 | ); 43 | 44 | case '/support': return new FromRightToLeft( 45 | builder: (_) => new _supportPage.Support(), 46 | settings: settings, 47 | ); 48 | case '/settings': return new FromRightToLeft( 49 | builder: (_) => new _settingsPage.Settings(), 50 | settings: settings, 51 | ); 52 | } 53 | }, 54 | // routes: { 55 | // '/about': (BuildContext context) => new _aboutPage.About(), 56 | // } 57 | )); 58 | 59 | class FromRightToLeft extends MaterialPageRoute { 60 | FromRightToLeft({ WidgetBuilder builder, RouteSettings settings }) 61 | : super(builder: builder, settings: settings); 62 | 63 | @override 64 | Widget buildTransitions( 65 | BuildContext context, 66 | Animation animation, 67 | Animation secondaryAnimation, 68 | Widget child) { 69 | 70 | if (settings.isInitialRoute) 71 | return child; 72 | 73 | return new SlideTransition( 74 | child: new Container( 75 | decoration: new BoxDecoration( 76 | boxShadow: [ 77 | new BoxShadow( 78 | color: Colors.black26, 79 | blurRadius: 25.0, 80 | ) 81 | ] 82 | ), 83 | child: child, 84 | ), 85 | position: new Tween( 86 | begin: const Offset(1.0, 0.0), 87 | end: Offset.zero, 88 | ) 89 | .animate( 90 | new CurvedAnimation( 91 | parent: animation, 92 | curve: Curves.fastOutSlowIn, 93 | ) 94 | ), 95 | ); 96 | } 97 | @override Duration get transitionDuration => const Duration(milliseconds: 400); 98 | } 99 | 100 | class Tabs extends StatefulWidget { 101 | @override 102 | TabsState createState() => new TabsState(); 103 | } 104 | 105 | class TabsState extends State implements MainView{ 106 | 107 | PageController _tabController; 108 | MainScreenPresenter _presenter; 109 | var _title_app = null; 110 | int _tab = 0; 111 | dynamic _selection; 112 | 113 | @override 114 | void initState() { 115 | super.initState(); 116 | _presenter = new MainScreenPresenter(this); 117 | _presenter.loadDbNetworkData(); 118 | _presenter.signInSilently(); 119 | _tabController = new PageController(); 120 | this._title_app = TabItems[0].title; 121 | } 122 | 123 | @override 124 | void dispose(){ 125 | super.dispose(); 126 | _tabController.dispose(); 127 | } 128 | 129 | void setMenuButtonItem(){ 130 | switch(_selection){ 131 | case MenuOptionsEnum.populate_users_posts: 132 | _firestoreHelper.populateUsers(); 133 | _firestoreHelper.populatePosts(); 134 | break; 135 | case MenuOptionsEnum.remove_users_posts: 136 | break; 137 | default: 138 | break; 139 | 140 | } 141 | } 142 | 143 | @override 144 | Widget build (BuildContext context) => new Scaffold( 145 | 146 | //App Bar 147 | appBar: new AppBar( 148 | actions: [ 149 | new PopupMenuButton( 150 | onSelected: (MenuOptionsEnum result) { 151 | _selection = result; 152 | setMenuButtonItem(); 153 | }, 154 | itemBuilder: (BuildContext context) => >[ 155 | const PopupMenuItem( 156 | value: MenuOptionsEnum.populate_users_posts, 157 | child: const Text('Populate users and posts'), 158 | ), 159 | const PopupMenuItem( 160 | value: MenuOptionsEnum.remove_users_posts, 161 | child: const Text('Remove stats'), 162 | ), 163 | const PopupMenuItem( 164 | value: MenuOptionsEnum.selfStarter, 165 | child: const Text('Being a self-starter'), 166 | ), 167 | const PopupMenuItem( 168 | value: MenuOptionsEnum.tradingCharter, 169 | child: const Text('Placed in charge of trading charter'), 170 | ), 171 | ], 172 | ) 173 | 174 | ], 175 | title: new Text( 176 | _title_app, 177 | style: new TextStyle( 178 | fontSize: Theme.of(context).platform == TargetPlatform.iOS ? 17.0 : 20.0, 179 | ), 180 | ), 181 | elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0, 182 | ), 183 | 184 | //Content of tabs 185 | body: 186 | 187 | new PageView( 188 | controller: _tabController, 189 | onPageChanged: onTabChanged, 190 | children: [ 191 | new _firstTab.HomeScreen(), 192 | new _secondTab.DashboardScreen(), 193 | new _thirdTab.CartScreen() 194 | ], 195 | ), 196 | 197 | //Tabs 198 | bottomNavigationBar: Theme.of(context).platform == TargetPlatform.iOS ? 199 | new CupertinoTabBar( 200 | activeColor: Colors.blueGrey, 201 | currentIndex: _tab, 202 | onTap: onTap, 203 | items: TabItems.map((TabItem) { 204 | return new BottomNavigationBarItem( 205 | title: new Text(TabItem.title), 206 | icon: new Icon(TabItem.icon), 207 | ); 208 | }).toList(), 209 | ): 210 | new Container( 211 | height: 46.0, 212 | child: new BottomNavigationBar( 213 | currentIndex: _tab, 214 | iconSize: 14.0, 215 | type: BottomNavigationBarType.fixed, 216 | onTap: onTap, 217 | items: TabItems.map((TabItem) { 218 | return new BottomNavigationBarItem( 219 | title: new Text(TabItem.title,), 220 | icon: new Icon(TabItem.icon,), 221 | ); 222 | }).toList(), 223 | ), 224 | ), 225 | 226 | //Drawer 227 | drawer: new Drawer( 228 | child: new ListView( 229 | children: [ 230 | new Container( 231 | height: 120.0, 232 | child: 233 | 234 | _user == null ? 235 | 236 | new DrawerHeader( 237 | padding: new EdgeInsets.all(0.0), 238 | decoration: new BoxDecoration( 239 | color: new Color(0xFFECEFF1), 240 | ), 241 | child: new Center( 242 | child: new FlutterLogo( 243 | colors: Colors.grey, 244 | size: 54.0, 245 | ), 246 | ), 247 | ) 248 | : 249 | new DrawerHeader( 250 | padding: new EdgeInsets.all(0.0), 251 | decoration: new BoxDecoration( 252 | color: Colors.redAccent, 253 | ), 254 | child: new Center( 255 | child: new Text("Logged in as ${_user.displayName}"), 256 | ), 257 | ), 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | ), 266 | new ListTile( 267 | leading: new Icon(Icons.chat), 268 | title: new Text('Support'), 269 | onTap: () { 270 | Navigator.pop(context); 271 | Navigator.of(context).pushNamed('/support'); 272 | } 273 | ), 274 | new ListTile( 275 | leading: 276 | 277 | _user == null ? 278 | new Icon(Icons.verified_user) 279 | : 280 | new CircleAvatar( 281 | backgroundImage: new Image( 282 | image: new NetworkImageWithRetry(_user.photoUrl), 283 | ).image, 284 | radius: 12.0, 285 | ), 286 | title: new Text(_user == null ? 'Login' : 'Logout'), 287 | onTap: () { 288 | Navigator.pop(context); 289 | Navigator.of(context).pushNamed('/login'); 290 | } 291 | ), 292 | 293 | 294 | new ListTile( 295 | leading: new Icon(Icons.info), 296 | title: new Text('About'), 297 | onTap: () { 298 | Navigator.pop(context); 299 | Navigator.of(context).pushNamed('/about'); 300 | } 301 | ), 302 | 303 | new ListTile( 304 | leading: new Icon(Icons.settings), 305 | title: new Text('Settings'), 306 | onTap: () { 307 | Navigator.pop(context); 308 | Navigator.of(context).pushNamed('/settings'); 309 | } 310 | ), 311 | new Divider(), 312 | new ListTile( 313 | leading: new Icon(Icons.exit_to_app), 314 | title: new Text('Sign Out'), 315 | onTap: () { 316 | Navigator.pop(context); 317 | } 318 | ), 319 | ], 320 | ) 321 | ) 322 | ); 323 | 324 | void onTap(int tab){ 325 | _tabController.jumpToPage(tab); 326 | } 327 | 328 | void onTabChanged(int tab) { 329 | setState((){ 330 | this._tab = tab; 331 | }); 332 | 333 | switch (tab) { 334 | case 0: 335 | this._title_app = TabItems[0].title; 336 | break; 337 | 338 | case 1: 339 | this._title_app = TabItems[1].title; 340 | break; 341 | 342 | case 2: 343 | this._title_app = TabItems[2].title; 344 | break; 345 | } 346 | } 347 | 348 | @override 349 | void onError(msg) { 350 | // TODO: implement onError 351 | } 352 | 353 | @override 354 | void onFirebaseDocumentLoaded(Map document) { 355 | // TODO: implement onFirebaseDocumentLoaded 356 | } 357 | 358 | @override 359 | void onLoggedOut() { 360 | // TODO: implement onLoggedOut 361 | _user = null; 362 | } 363 | 364 | @override 365 | void onUserLoaded(FirebaseUser user) { 366 | setState(() { 367 | _user = user; 368 | }); 369 | } 370 | 371 | FirebaseUser _user; 372 | DbHelper _dbHelper; 373 | NetworkData _networkData; 374 | UserHelper _userHelper; 375 | FirestoreHelper _firestoreHelper; 376 | @override 377 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, UserHelper userHelper, FirestoreHelper firestoreHelper) { 378 | _dbHelper = dbHelper; 379 | _networkData = networkData; 380 | _userHelper = userHelper; 381 | _firestoreHelper = firestoreHelper; 382 | 383 | if(_userHelper.isLoggedIn()){ 384 | setState(() { 385 | _user = _userHelper.getUser(); 386 | }); 387 | }else 388 | _presenter.signInSilently(); 389 | } 390 | 391 | @override 392 | void onStatsLoaded(List stats) { 393 | // TODO: implement onStatsLoaded 394 | } 395 | } 396 | 397 | class TabItem { 398 | const TabItem({ this.title, this.icon }); 399 | final String title; 400 | final IconData icon; 401 | } 402 | 403 | const List TabItems = const [ 404 | const TabItem(title: 'Home', icon: Icons.home), 405 | const TabItem(title: 'Dashboard', icon: Icons.dashboard), 406 | const TabItem(title: 'Chat', icon: Icons.people) 407 | ]; 408 | 409 | enum MenuOptionsEnum { populate_users_posts, remove_users_posts, selfStarter, tradingCharter } -------------------------------------------------------------------------------- /lib/main_presenter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutterstarter/base/screen_presenter.dart'; 4 | import 'package:flutterstarter/base/screen_view.dart'; 5 | 6 | abstract class MainView extends ScreenView{ 7 | } 8 | 9 | class MainScreenPresenter extends ScreenPresenter { 10 | MainScreenPresenter(ScreenView view) : super(view); 11 | 12 | @override 13 | void loadUser() { 14 | super.loadUser(); 15 | } 16 | 17 | @override 18 | bool isLoggedIn() { 19 | return super.isLoggedIn(); 20 | } 21 | 22 | @override 23 | void signInSilently() { 24 | super.signInSilently(); 25 | } 26 | 27 | @override 28 | void loadDbNetworkData() { 29 | // TODO: implement loadDbNetworkData 30 | super.loadDbNetworkData(); 31 | } 32 | 33 | @override 34 | void logout() { 35 | super.logout(); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /lib/screens/about.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class About extends StatelessWidget { 4 | @override 5 | Widget build (BuildContext context) => new Scaffold( 6 | 7 | //App Bar 8 | appBar: new AppBar( 9 | title: new Text( 10 | 'About', 11 | style: new TextStyle( 12 | fontSize: Theme.of(context).platform == TargetPlatform.iOS ? 17.0 : 20.0, 13 | ), 14 | ), 15 | elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0, 16 | ), 17 | 18 | //Content of tabs 19 | body: new PageView( 20 | children: [ 21 | new Column( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | children: [ 24 | new Text('About page content') 25 | ], 26 | ) 27 | ], 28 | ), 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/screens/login_presenter.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutterstarter/base/screen_presenter.dart'; 3 | import 'package:flutterstarter/base/screen_view.dart'; 4 | 5 | abstract class LoginScreenView extends ScreenView{ 6 | 7 | } 8 | 9 | class LoginScreenPresenter extends ScreenPresenter { 10 | 11 | LoginScreenPresenter(ScreenView view) : super(view); 12 | 13 | @override 14 | void loadDbNetworkData() { 15 | // TODO: implement loadDbNetworkData 16 | super.loadDbNetworkData(); 17 | } 18 | 19 | @override 20 | void loginGoogle() { 21 | super.loginGoogle(); 22 | } 23 | 24 | @override 25 | void logout() { 26 | super.logout(); 27 | } 28 | 29 | @override 30 | void loadUser() { 31 | super.loadUser(); 32 | } 33 | } -------------------------------------------------------------------------------- /lib/screens/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_image/network.dart'; 7 | import 'package:flutterstarter/data/db/db_helper.dart'; 8 | import 'package:flutterstarter/data/models/Statistic.dart'; 9 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 10 | import 'package:flutterstarter/data/network/network_data.dart'; 11 | import 'package:flutterstarter/data/network/user_helper.dart'; 12 | import 'package:flutterstarter/screens/login_presenter.dart'; 13 | import 'package:flutterstarter/widgets/button_sign_in.dart'; 14 | 15 | class LoginScreen extends StatefulWidget { 16 | @override 17 | State createState() => new LoginScreenState(); 18 | } 19 | 20 | class LoginScreenState extends State implements LoginScreenView { 21 | 22 | bool _isLoggedIn = false; 23 | bool _isLoading = false; 24 | bool _isError = false; 25 | var errorMessage; 26 | LoginScreenPresenter _presenter; 27 | FirebaseUser _user; 28 | var userAvatar; 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | _presenter = new LoginScreenPresenter(this); 34 | _presenter.loadUser(); 35 | userAvatar = _isLoggedIn ? new Image(image: new NetworkImageWithRetry(_user.photoUrl),).image : new Image.asset('images/flaps.jpg'); 36 | } 37 | 38 | void _loginFunction(){ 39 | setState((){ 40 | _isLoading = true; 41 | }); 42 | _presenter.loginGoogle(); 43 | } 44 | 45 | void _signOut() { 46 | setState((){ 47 | _presenter.logout(); 48 | _isLoggedIn = false; 49 | }); 50 | print("User Signed out"); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | Widget widget; 56 | 57 | final logo = new Hero( 58 | tag: 'hero', 59 | child: new CircleAvatar( 60 | backgroundColor: Colors.transparent, 61 | radius: 48.0, 62 | child: _isLoggedIn ? new Image(image: userAvatar,) : new Image.asset('images/flaps.jpg'), 63 | ), 64 | ); 65 | 66 | if(_isLoggedIn){ 67 | widget = new Scaffold( 68 | backgroundColor: Colors.green[200], 69 | body: new Center( 70 | child: new Column( 71 | crossAxisAlignment: CrossAxisAlignment.center, 72 | mainAxisAlignment: MainAxisAlignment.center, 73 | children: [ 74 | new CircleAvatar( 75 | backgroundImage: new Image(image: userAvatar,).image, 76 | radius: 50.0, 77 | ), 78 | new Text(_user.displayName, style: new TextStyle(fontSize: 12.0),), 79 | new SizedBox(height: 48.0), 80 | new RaisedButton( 81 | onPressed: _signOut, 82 | child: new Text("Sign out"), 83 | color: Colors.red, 84 | ), 85 | ], 86 | ), 87 | ), 88 | ); 89 | }else { 90 | if (_isLoading) { 91 | widget = new Center( 92 | child: new CircularProgressIndicator() 93 | ); 94 | } else { 95 | 96 | widget = new Container( 97 | child: new Center( 98 | child: new ListView( 99 | shrinkWrap: true, 100 | padding: new EdgeInsets.only(left: 24.0, right: 24.0), 101 | children: [ 102 | logo, 103 | _isError ? new Text(errorMessage) : new Text(""), 104 | new SizedBox(height: 48.0), 105 | //email, 106 | //new SizedBox(height: 8.0), 107 | //password, 108 | //new SizedBox(height: 24.0), 109 | //loginButton, 110 | //loginButtonGoogle, 111 | 112 | 113 | new ButtonNormal( 114 | text: "Creative Login Button", 115 | fn: _loginFunction, 116 | colorBg: Colors.green, 117 | colorText: Colors.white, 118 | ), 119 | 120 | //loginButtonFacebook, 121 | //forgotLabel 122 | ], 123 | ), 124 | ), 125 | ); 126 | } 127 | } 128 | 129 | return new Scaffold( 130 | appBar: new AppBar( 131 | title: new Text( 132 | 'Login', 133 | style: new TextStyle( 134 | fontSize: Theme.of(context).platform == TargetPlatform.iOS ? 17.0 : 20.0, 135 | ), 136 | ), 137 | elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0, 138 | ), 139 | //Content of tabs 140 | body: widget 141 | ); 142 | 143 | //return widget; 144 | } 145 | 146 | @override 147 | void onUserLoaded(FirebaseUser user) { 148 | _isError = false; 149 | setState((){ 150 | _user = user; 151 | _isLoading = false; 152 | _isLoggedIn = true; 153 | userAvatar = new Image(image: new NetworkImageWithRetry(_user.photoUrl),).image; 154 | }); 155 | } 156 | 157 | @override 158 | void onError(var msg) { 159 | print("There was a login error"); 160 | errorMessage = msg.toString(); 161 | _isError = true; 162 | setState((){ 163 | _isLoading = false; 164 | _isLoggedIn = false; 165 | }); 166 | } 167 | 168 | @override 169 | void onLoggedOut() { 170 | _isError = false; 171 | setState((){ 172 | _isLoggedIn = false; 173 | _user = null; 174 | }); 175 | } 176 | 177 | @override 178 | void onFirebaseDocumentLoaded(Map document) { 179 | // TODO: implement onFirebaseDocumentLoaded 180 | } 181 | 182 | @override 183 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, UserHelper userHelper, FirestoreHelper firestoreHelper) { 184 | // TODO: implement onDbNetworkDataLoaded 185 | } 186 | 187 | @override 188 | void onStatsLoaded(List stats) { 189 | // TODO: implement onStatsLoaded 190 | } 191 | 192 | } 193 | 194 | -------------------------------------------------------------------------------- /lib/screens/photo_fullscreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PostItem extends StatelessWidget { 4 | 5 | final mImage; 6 | const PostItem({Key key, this.mImage}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return new DecoratedBox( 11 | decoration: new BoxDecoration( 12 | image: new DecorationImage( 13 | image: new AssetImage('images/flaps.jpg'), 14 | fit: BoxFit.fill 15 | ), 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/screens/profile_presenter.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutterstarter/base/screen_presenter.dart'; 3 | import 'package:flutterstarter/base/screen_view.dart'; 4 | 5 | abstract class ProfileScreenView extends ScreenView { 6 | 7 | } 8 | 9 | 10 | 11 | class ProfileScreenPresenter extends ScreenPresenter{ 12 | ProfileScreenPresenter(ProfileScreenView view) : super(view); 13 | 14 | @override 15 | void loadDbNetworkData() { 16 | // TODO: implement loadDbNetworkData 17 | super.loadDbNetworkData(); 18 | } 19 | 20 | 21 | 22 | 23 | 24 | } 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/screens/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_image/network.dart'; 5 | import 'package:flutterstarter/data/db/db_helper.dart'; 6 | import 'package:flutterstarter/data/models/Statistic.dart'; 7 | import 'package:flutterstarter/data/models/User.dart'; 8 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 9 | import 'package:flutterstarter/data/network/network_data.dart'; 10 | import 'package:flutterstarter/data/network/user_helper.dart'; 11 | import 'package:flutterstarter/screens/profile_presenter.dart'; 12 | import 'package:flutterstarter/widgets/page_user.dart'; 13 | 14 | final ThemeData _kTheme = new ThemeData( 15 | brightness: Brightness.light, 16 | primarySwatch: Colors.teal, 17 | accentColor: Colors.redAccent, 18 | ); 19 | 20 | class ProfileScreen extends StatefulWidget { 21 | final String userId; 22 | 23 | const ProfileScreen({Key key, this.userId}) : super(key: key); 24 | @override 25 | State createState() => new ProfileScreenState(); 26 | } 27 | 28 | class SeaRothStyle extends TextStyle { 29 | const SeaRothStyle({ 30 | double fontSize: 12.0, 31 | FontWeight fontWeight, 32 | Color color: Colors.black87, 33 | double letterSpacing, 34 | double height, 35 | }) : super( 36 | inherit: false, 37 | color: color, 38 | fontFamily: 'Raleway', 39 | fontSize: fontSize, 40 | fontWeight: fontWeight, 41 | textBaseline: TextBaseline.alphabetic, 42 | letterSpacing: letterSpacing, 43 | height: height, 44 | ); 45 | } 46 | 47 | class ProfileScreenState extends State implements ProfileScreenView { 48 | 49 | DbHelper _dbHelper; 50 | NetworkData _networkData; 51 | FirestoreHelper _firestoreHelper; 52 | UserHelper _userHelper; 53 | DocumentReference userDocRef; 54 | 55 | @override 56 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, 57 | UserHelper userHelper, FirestoreHelper firestoreHelper) { 58 | _userHelper = userHelper; 59 | _dbHelper = dbHelper; 60 | _networkData = networkData; 61 | _firestoreHelper = firestoreHelper; 62 | setDocumentSnapshot(widget.userId); 63 | } 64 | 65 | DocumentSnapshot _profileUserDocument; 66 | DocumentSnapshot _profileMeDocument; 67 | void setDocumentSnapshot(String uid) async{ 68 | await _firestoreHelper.firestore.collection('users').document(uid).get().then((d){ 69 | _profileUserDocument = d; 70 | print("We are viewing: ${_profileUserDocument.data['firebaseId']}"); 71 | setState(() { 72 | }); 73 | }); 74 | 75 | await _firestoreHelper.firestore.collection('users').document(_userHelper.getUser().uid).get().then((d){ 76 | _profileMeDocument = d; 77 | print("viewing as: ${_profileUserDocument.data['firebaseId']}"); 78 | setState(() { 79 | }); 80 | }); 81 | } 82 | 83 | ProfileScreenPresenter _presenter; 84 | @override 85 | void initState() { 86 | super.initState(); 87 | _presenter = new ProfileScreenPresenter(this); 88 | _presenter.loadDbNetworkData(); 89 | } 90 | 91 | final TextStyle titleStyle = const SeaRothStyle(fontSize: 34.0); 92 | final TextStyle descriptionStyle = const SeaRothStyle(fontSize: 15.0, color: Colors.black54, height: 24.0 / 15.0); 93 | final TextStyle itemStyle = const SeaRothStyle(fontSize: 15.0, height: 24.0 / 15.0); 94 | final TextStyle itemAmountStyle = new SeaRothStyle(fontSize: 15.0, color: _kTheme.primaryColor, height: 24.0 / 15.0); 95 | final TextStyle headingStyle = const SeaRothStyle(fontSize: 16.0, fontWeight: FontWeight.bold, height: 24.0 / 15.0); 96 | final TextStyle rowActionsStyle = const SeaRothStyle(fontSize: 10.0, fontWeight: FontWeight.bold, color: Colors.grey); 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | print("we should look up ${widget.userId}"); 101 | 102 | if(_profileUserDocument == null || _profileUserDocument.data == null || _profileUserDocument.data['name'] == null 103 | || 104 | _profileMeDocument == null || _profileMeDocument.data == null || _profileMeDocument.data['name'] == null 105 | ) 106 | return new Scaffold( 107 | body: new Center(child: new Text("loading..."),), 108 | ); 109 | 110 | final double appBarHeight = _getAppBarHeight(context); 111 | final Size screenSize = MediaQuery.of(context).size; 112 | const double _kRecipePageMaxWidth = 500.0; 113 | final bool fullWidth = screenSize.width < _kRecipePageMaxWidth; 114 | const double _kFabHalfSize = 50.0; 115 | Map mUser = _profileUserDocument.data; 116 | 117 | 118 | 119 | return new Scaffold( 120 | body: new Stack( 121 | children: [ 122 | new Positioned( 123 | top: 0.0, 124 | left: 0.0, 125 | right: 0.0, 126 | height: appBarHeight + _kFabHalfSize, 127 | child: new Hero( 128 | tag: 'cover photo/', 129 | child: new Image( 130 | fit: BoxFit.fill, 131 | image: new NetworkImageWithRetry(mUser['coverPhoto']), 132 | ), 133 | ), 134 | ), 135 | new CustomScrollView( 136 | slivers: [ 137 | new SliverAppBar( 138 | expandedHeight: appBarHeight - _kFabHalfSize, 139 | backgroundColor: Colors.transparent, 140 | actions: [ 141 | new PopupMenuButton( 142 | onSelected: (String item) {}, 143 | itemBuilder: (BuildContext context) => 144 | >[ 145 | _buildMenuItem(Icons.share, 'Tweet recipe'), 146 | _buildMenuItem(Icons.email, 'Email recipe'), 147 | _buildMenuItem(Icons.message, 'Message recipe'), 148 | _buildMenuItem(Icons.people, 'Share on Facebook'), 149 | ], 150 | ), 151 | ], 152 | flexibleSpace: const FlexibleSpaceBar( 153 | background: const DecoratedBox( 154 | decoration: const BoxDecoration( 155 | gradient: const LinearGradient( 156 | begin: const Alignment(0.0, -1.0), 157 | end: const Alignment(0.0, -0.2), 158 | colors: const [ 159 | const Color(0x60000000), 160 | const Color(0x00000000) 161 | ], 162 | ), 163 | ), 164 | ), 165 | ), 166 | ), 167 | new SliverToBoxAdapter( 168 | child: new Stack( 169 | children: [ 170 | new Positioned( 171 | right: (screenSize.width / 2 - 50.0), 172 | child: new Container( 173 | decoration: new BoxDecoration( 174 | border: 175 | new Border.all(color: Colors.white, width: 2.0), 176 | ), 177 | child: new SizedBox( 178 | height: 100.0, 179 | width: 100.0, 180 | child: new Image( 181 | fit: BoxFit.fill, 182 | 183 | image: new NetworkImageWithRetry(mUser['imageUrl']), 184 | ), 185 | ), 186 | ), 187 | ), 188 | new Container( 189 | padding: const EdgeInsets.only(top: _kFabHalfSize+54.0), 190 | width: _kRecipePageMaxWidth, 191 | child: new Material( 192 | child: new SafeArea( 193 | top: false, 194 | bottom: false, 195 | child: new Column( 196 | children: [ 197 | new Text(mUser['name'], 198 | overflow: TextOverflow.ellipsis, 199 | style: titleStyle, 200 | ), 201 | 202 | 203 | new Padding( 204 | padding: const EdgeInsets.only(top: 12.0, bottom: 12.0), 205 | child: new Row( 206 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 207 | children: [ 208 | _buildRowActionItem(Icons.person_add, "Friends", Colors.blue), 209 | _buildRowActionItem(Icons.check, "Following", Colors.blue), 210 | _buildRowActionItem(Icons.highlight, "Message", Colors.grey), 211 | _buildRowActionItem(Icons.more, "More", Colors.grey), 212 | ], 213 | 214 | ), 215 | ), 216 | 217 | _buildPersonalItem(Icons.school, "Went to Lake Washington High"), 218 | _buildPersonalItem(Icons.home, "Lives near Kirkland, WA"), 219 | _buildPersonalItem(Icons.school, "In a relationship with some hot chick"), 220 | _buildPersonalItem(Icons.school, "From Narnia, World"), 221 | _buildPersonalItem(Icons.access_time, "Joined March 2018"), 222 | 223 | new Container( 224 | height: 40.0, 225 | color: Colors.grey, 226 | child: new Row( 227 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 228 | children: [ 229 | new Text("ABOUT", 230 | style: new TextStyle(color: Colors.black, fontWeight: FontWeight.bold), 231 | ), 232 | new Text("PHOTOS", 233 | style: new TextStyle(color: Colors.black, fontWeight: FontWeight.bold),), 234 | new Text("FRIENDS", 235 | style: new TextStyle(color: Colors.black, fontWeight: FontWeight.bold),), 236 | ], 237 | ), 238 | ), 239 | 240 | 241 | new Container( 242 | child: new Column( 243 | children: [ 244 | new Row( 245 | children: [ 246 | 247 | new CircleAvatar( 248 | radius: 22.0, 249 | backgroundImage: new Image( 250 | image: new NetworkImageWithRetry(_profileMeDocument['imageUrl']), 251 | ).image, 252 | ), 253 | new Expanded( 254 | child: Padding( 255 | padding: const EdgeInsets.only(left: 10.0), 256 | child: new TextFormField( 257 | decoration: new InputDecoration( 258 | hintText: "Write something to ${mUser['name']}...", 259 | ), 260 | ), 261 | ), 262 | ), 263 | ], 264 | ), 265 | 266 | 267 | 268 | Padding( 269 | padding: const EdgeInsets.all(8.0), 270 | child: new Row( 271 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 272 | children: [ 273 | new Row( 274 | children: [ 275 | new Icon(Icons.home, 276 | size: 22.0, 277 | color: Colors.grey[12], 278 | ), 279 | Padding( 280 | padding: const EdgeInsets.only(left: 4.0), 281 | child: new Text("Write Post", style: descriptionStyle,), 282 | ), 283 | ], 284 | ), 285 | new Row( 286 | children: [ 287 | new Icon(Icons.person_add, 288 | size: 22.0, 289 | color: Colors.green,), 290 | Padding( 291 | padding: const EdgeInsets.only(left: 4.0), 292 | child: new Text("Share Photo", 293 | style: descriptionStyle,), 294 | ), 295 | ], 296 | ), 297 | ], 298 | ), 299 | ), 300 | 301 | 302 | 303 | 304 | ], 305 | ), 306 | 307 | ), 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | new Text("sdfsdfsdfds"), 316 | new Text("sdfsdfsdfds"), 317 | new Text("sdfsdfsdfds"), 318 | new Text("sdfsdfsdfds"), 319 | new Text("sdfsdfsdfds"), 320 | new Text("sdfsdfsdfds"), 321 | new Text("sdfsdfsdfds"), 322 | new Text("sdfsdfsdfds"), 323 | new Text("sdfsdfsdfds"), 324 | new Text("sdfsdfsdfds"), 325 | new Text("sdfsdfsdfds"), 326 | new Text("sdfsdfsdfds"), 327 | new Text("sdfsdfsdfds"), 328 | new Text("sdfsdfsdfds"), 329 | new Text("sdfsdfsdfds"), 330 | new Text("sdfsdfsdfds"), 331 | new Text("sdfsdfsdfds"), 332 | new Text("sdfsdfsdfds"), 333 | new Text("sdfsdfsdfds"), 334 | new Text("sdfsdfsdfds"), 335 | new Text("sdfsdfsdfds"), 336 | new Text("sdfsdfsdfds"), 337 | new Text("sdfsdfsdfds"), 338 | new Text("sdfsdfsdfds"), 339 | new Text("sdfsdfsdfds"), 340 | new Text("sdfsdfsdfds"), 341 | new Text("sdfsdfsdfds"), 342 | new Text("sdfsdfsdfds"), 343 | new Text("sdfsdfsdfds"), 344 | new Text("sdfsdfsdfds"), 345 | new Text("sdfsdfsdfds"), 346 | new Text("sdfsdfsdfds"), 347 | new Text("sdfsdfsdfds"), 348 | new Text("sdfsdfsdfds"), 349 | new Text("sdfsdfsdfds"), 350 | new Text("sdfsdfsdfds"), 351 | new Text("sdfsdfsdfds"), 352 | new Text("sdfsdfsdfds"), 353 | new Text("sdfsdfsdfds"), 354 | new Text("sdfsdfsdfds"), 355 | new Text("sdfsdfsdfds"), 356 | new Text("sdfsdfsdfds"), 357 | new Text("sdfsdfsdfds"), 358 | new Text("sdfsdfsdfds"), 359 | new Text("sdfsdfsdfds"), 360 | new Text("sdfsdfsdfds"), 361 | new Text("sdfsdfsdfds"), 362 | new Text("sdfsdfsdfds"), 363 | new Text("sdfsdfsdfds"), 364 | new Text("sdfsdfsdfds"), 365 | new Text("sdfsdfsdfds"), 366 | new Text("sdfsdfsdfds"), 367 | new Text("sdfsdfsdfds"), 368 | new Text("sdfsdfsdfds"), 369 | new Text("sdfsdfsdfds"), 370 | new Text("sdfsdfsdfds"), 371 | new Text("sdfsdfsdfds"), 372 | new Text("sdfsdfsdfds"), 373 | new Text("sdfsdfsdfds"), 374 | new Text("sdfsdfsdfds"), 375 | ], 376 | ), 377 | ), 378 | ), //child: new RecipeSheet(recipe: widget.recipe), 379 | ), 380 | ], 381 | )), 382 | ], 383 | ), 384 | ], 385 | )); 386 | } 387 | 388 | @override 389 | void onError(msg) { 390 | // TODO: implement onError 391 | } 392 | 393 | @override 394 | void onFirebaseDocumentLoaded(Map document) { 395 | // TODO: implement onFirebaseDocumentLoaded 396 | } 397 | 398 | @override 399 | void onLoggedOut() { 400 | // TODO: implement onLoggedOut 401 | } 402 | 403 | @override 404 | void onStatsLoaded(List stats) { 405 | // TODO: implement onStatsLoaded 406 | } 407 | 408 | @override 409 | void onUserLoaded(FirebaseUser user) { 410 | // TODO: implement onUserLoaded 411 | } 412 | 413 | double _getAppBarHeight(BuildContext context) => 414 | MediaQuery.of(context).size.height * 0.3; 415 | double _kFabHalfSize = 416 | 28.0; // TODO(mpcomplete): needs to adapt to screen size 417 | 418 | final TextStyle menuItemStyle = const SeaRothStyle( 419 | fontSize: 15.0, color: Colors.black54, height: 24.0 / 15.0); 420 | 421 | PopupMenuItem _buildMenuItem(IconData icon, String label) { 422 | return new PopupMenuItem( 423 | child: new Row( 424 | children: [ 425 | new Padding( 426 | padding: const EdgeInsets.only(right: 24.0), 427 | child: new Icon(icon, color: Colors.black54)), 428 | new Text(label, style: menuItemStyle), 429 | ], 430 | ), 431 | ); 432 | } 433 | 434 | Column _buildRowActionItem(IconData icon, String s, Color color){ 435 | return new Column( 436 | children: [ 437 | new Icon(icon, 438 | color: color, 439 | semanticLabel: s, 440 | size: 30.0, 441 | ), 442 | new Text(s, 443 | style: new TextStyle( 444 | color: color, 445 | fontWeight: FontWeight.bold, 446 | fontSize: 10.0, 447 | ), 448 | ), 449 | ], 450 | ); 451 | } 452 | 453 | Padding _buildPersonalItem(IconData icon, String s){ 454 | return new Padding( 455 | padding: const EdgeInsets.only(bottom: 8.0, left: 8.0), 456 | child: new Row( 457 | children: [ 458 | new Icon(icon, 459 | color: Colors.grey, 460 | semanticLabel: s, 461 | size: 15.0, 462 | ), 463 | new Padding( 464 | padding: const EdgeInsets.only(left: 12.0), 465 | child: new Text(s, 466 | style: rowActionsStyle, 467 | ), 468 | ), 469 | ], 470 | ), 471 | ); 472 | } 473 | } 474 | -------------------------------------------------------------------------------- /lib/screens/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutterstarter/widgets/list_settings.dart'; 3 | 4 | class Settings extends StatelessWidget { 5 | @override 6 | Widget build (BuildContext context) => new Scaffold( 7 | 8 | //App Bar 9 | appBar: new AppBar( 10 | title: new Text( 11 | 'Settings', 12 | style: new TextStyle( 13 | fontSize: Theme.of(context).platform == TargetPlatform.iOS ? 17.0 : 20.0, 14 | ), 15 | ), 16 | elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0, 17 | ), 18 | 19 | //Content of tabs 20 | body: new PageView( 21 | children: [ 22 | new Column( 23 | children: [ 24 | 25 | buildSettings(context: context), 26 | 27 | 28 | ], 29 | ) 30 | ], 31 | ), 32 | ); 33 | } -------------------------------------------------------------------------------- /lib/screens/support.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Support extends StatelessWidget { 4 | @override 5 | Widget build (BuildContext context) => new Scaffold( 6 | 7 | //App Bar 8 | appBar: new AppBar( 9 | title: new Text( 10 | 'Support', 11 | style: new TextStyle( 12 | fontSize: Theme.of(context).platform == TargetPlatform.iOS ? 17.0 : 20.0, 13 | ), 14 | ), 15 | elevation: Theme.of(context).platform == TargetPlatform.iOS ? 0.0 : 4.0, 16 | ), 17 | 18 | //Content of tabs 19 | body: new PageView( 20 | children: [ 21 | new Column( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | children: [ 24 | new Text('Support page content'), 25 | ], 26 | ) 27 | ], 28 | ), 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/tabs/cart/cart_presenter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/base/screen_presenter.dart'; 2 | import 'package:flutterstarter/base/screen_view.dart'; 3 | 4 | abstract class CartScreenView extends ScreenView{ 5 | } 6 | 7 | class CartScreenPresenter extends ScreenPresenter{ 8 | CartScreenPresenter(ScreenView view) : super(view); 9 | 10 | @override 11 | void loadDbNetworkData() { 12 | // TODO: implement loadDbNetworkData 13 | super.loadDbNetworkData(); 14 | } 15 | } -------------------------------------------------------------------------------- /lib/tabs/dashboard/dashboard_presenter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutterstarter/base/screen_presenter.dart'; 2 | import 'package:flutterstarter/base/screen_view.dart'; 3 | import 'package:flutterstarter/data/models/Statistic.dart'; 4 | 5 | abstract class DashboardScreenView extends ScreenView {} 6 | 7 | class DashboardScreenPresenter extends ScreenPresenter { 8 | DashboardScreenPresenter(DashboardScreenView view) : super(view); 9 | 10 | @override 11 | void loadDbNetworkData() { 12 | // TODO: implement loadDbNetworkData 13 | super.loadDbNetworkData(); 14 | } 15 | 16 | @override 17 | void getStats() { 18 | // TODO: implement getStats 19 | super.getStats(); 20 | } 21 | 22 | @override 23 | bool isLoggedIn() { 24 | // TODO: implement isLoggedIn 25 | return super.isLoggedIn(); 26 | } 27 | 28 | @override 29 | void setStats(List stats) { 30 | // TODO: implement setStats 31 | super.setStats(stats); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/tabs/dashboard/dashboard_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutterstarter/data/db/db_helper.dart'; 6 | import 'package:flutterstarter/data/models/Statistic.dart'; 7 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 8 | import 'package:flutterstarter/data/network/network_data.dart'; 9 | import 'package:flutterstarter/data/network/user_helper.dart'; 10 | import 'package:flutterstarter/tabs/dashboard/dashboard_presenter.dart'; 11 | import 'package:flutterstarter/widgets/button_dropdown.dart'; 12 | import 'package:flutterstarter/widgets/form_new_stat.dart'; 13 | import 'package:flutterstarter/widgets/stat_item.dart'; 14 | 15 | class DashboardScreen extends StatefulWidget{ 16 | @override 17 | State createState() => new DashboardScreenState(); 18 | } 19 | 20 | class DashboardScreenState extends State implements DashboardScreenView{ 21 | 22 | void updateDropdown(String s){ 23 | setState(() { 24 | _selectedProject = s; 25 | }); 26 | } 27 | String _selectedProject = "stats"; 28 | final List projects = ["stats", "users", "friends", "comments", "likes"]; 29 | 30 | DbHelper _dbHelper; 31 | NetworkData _networkData; 32 | List _stats = new List(); 33 | 34 | @override 35 | Widget build(BuildContext context) => 36 | 37 | new CustomScrollView( 38 | slivers: [ 39 | 40 | new SliverToBoxAdapter(child: new Column( 41 | children: [ 42 | new Text("total users: x"), 43 | new Text("total comments: x"), 44 | new Text("total likes: x"), 45 | new Text("total friends: x"), 46 | _stats != null ? new Text("total stats: ${_stats.length}") : new Text("empty"), 47 | 48 | new ButtonDropdown( 49 | selectedProject: _selectedProject, 50 | projects: projects, 51 | callback: (String that){ 52 | updateDropdown(that); 53 | }, 54 | ), 55 | 56 | new MyForm( 57 | onSubmit:(dynamic name, dynamic desc, dynamic value){ 58 | Statistic stat = new Statistic(0, name, desc, value); 59 | _stats.add(stat); 60 | _dbHelper.saveStats(_stats); 61 | setState((){}); 62 | }, 63 | ), 64 | ], 65 | ),), 66 | 67 | _retCorrectList(_selectedProject), 68 | 69 | ], 70 | ); 71 | 72 | Widget _retCorrectList(String s){ 73 | switch(s){ 74 | case "stats": 75 | 76 | return new SliverFixedExtentList( 77 | itemExtent: 50.0, 78 | delegate: new SliverChildBuilderDelegate( 79 | (BuildContext context, int index) { 80 | return new StatItem( 81 | isEven: index%2 == 0 ? true : false, 82 | id: _stats[index].id, 83 | name: _stats[index].name, 84 | desc: _stats[index].desc, 85 | value: _stats[index].value, 86 | onShortPress: (dynamic that){ 87 | _onStatPressed(that); 88 | }, 89 | onLongPress: (dynamic that){ 90 | _onStatLongPressed(that); 91 | }, 92 | ); 93 | }, 94 | childCount: _stats != null ? _stats.length : 0, 95 | ), 96 | ); 97 | 98 | break; 99 | default: 100 | break; 101 | } 102 | return new Text("EMPTY"); 103 | } 104 | 105 | void _onStatPressed(dynamic id){ 106 | print("clicked $id"); 107 | } 108 | 109 | void _onStatLongPressed(dynamic id){ 110 | print("clicked $id"); 111 | } 112 | 113 | DashboardScreenPresenter _presenter; 114 | @override 115 | void initState() { 116 | super.initState(); 117 | _presenter = new DashboardScreenPresenter(this); 118 | _presenter.loadDbNetworkData(); 119 | } 120 | 121 | void loadStats() { 122 | _presenter.getStats(); 123 | } 124 | 125 | @override 126 | void onFirebaseDocumentLoaded(Map document) { 127 | // TODO: implement onDocumentLoaded 128 | } 129 | 130 | @override 131 | void onError(var msg) { 132 | // TODO: implement onError 133 | } 134 | 135 | @override 136 | void onLoggedOut() { 137 | // TODO: implement onLoggedOut 138 | } 139 | 140 | @override 141 | void onUserLoaded(FirebaseUser user) { 142 | // TODO: implement onUserLoaded 143 | } 144 | 145 | @override 146 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, UserHelper userHelper, FirestoreHelper firestoreHelper) { 147 | _dbHelper = dbHelper; 148 | _networkData = networkData; 149 | loadStats(); 150 | } 151 | 152 | @override 153 | void onStatsLoaded(List stats) { 154 | setState(() { 155 | _stats = stats; 156 | }); 157 | } 158 | } -------------------------------------------------------------------------------- /lib/tabs/home/home_presenter.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutterstarter/base/screen_presenter.dart'; 5 | import 'package:flutterstarter/base/screen_view.dart'; 6 | 7 | abstract class HomeScreenView extends ScreenView{ 8 | } 9 | 10 | class HomeScreenPresenter extends ScreenPresenter{ 11 | HomeScreenPresenter(ScreenView view) : super(view); 12 | 13 | @override 14 | void loadDbNetworkData() { 15 | // TODO: implement loadDbNetworkData 16 | super.loadDbNetworkData(); 17 | } 18 | 19 | @override 20 | void signInSilently() { 21 | // TODO: implement signInSilently 22 | super.signInSilently(); 23 | } 24 | } -------------------------------------------------------------------------------- /lib/tabs/home/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutterstarter/data/db/db_helper.dart'; 7 | import 'package:flutterstarter/data/models/Comment.dart'; 8 | import 'package:flutterstarter/data/models/Post.dart'; 9 | import 'package:flutterstarter/data/models/Reply.dart'; 10 | import 'package:flutterstarter/data/models/Statistic.dart'; 11 | import 'package:flutterstarter/data/network/firestore/firestore_helper.dart'; 12 | import 'package:flutterstarter/data/network/network_data.dart'; 13 | import 'package:flutterstarter/data/network/user_helper.dart'; 14 | import 'package:flutterstarter/tabs/home/home_presenter.dart'; 15 | import 'package:flutterstarter/widgets/post_item.dart'; 16 | 17 | class HomeScreen extends StatefulWidget{ 18 | @override 19 | State createState() => new HomeScreenState(); 20 | } 21 | 22 | class HomeScreenState extends State implements HomeScreenView { 23 | 24 | FirebaseUser _user; 25 | var userAvatar; 26 | var posts = new List(); 27 | CollectionReference _postsReference; 28 | CollectionReference _usersReference; 29 | DocumentReference _aPostsDocumentRef; 30 | 31 | DbHelper _dbHelper; 32 | NetworkData _networkData; 33 | UserHelper _userHelper; 34 | FirestoreHelper _firestoreHelper; 35 | @override 36 | void onDbNetworkDataLoaded(DbHelper dbHelper, NetworkData networkData, UserHelper userHelper, FirestoreHelper firestoreHelper) { 37 | _dbHelper = dbHelper; 38 | _networkData = networkData; 39 | _userHelper = userHelper; 40 | _firestoreHelper = firestoreHelper; 41 | 42 | if(_userHelper.isLoggedIn()) 43 | setState(() { 44 | _user = _userHelper.getUser(); 45 | }); 46 | else 47 | setState(() { 48 | _presenter.signInSilently(); 49 | }); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | 55 | if(_firestoreHelper.firestore == null) 56 | return Center(child: new Text("loading")); 57 | 58 | _postsReference = _firestoreHelper.firestore.collection('posts'); 59 | _usersReference = _firestoreHelper.firestore.collection('users'); 60 | 61 | return new StreamBuilder( 62 | stream: _firestoreHelper.firestore.collection('posts').snapshots(), 63 | builder: (BuildContext context, AsyncSnapshot snapshot) { 64 | if (!snapshot.hasData) 65 | return Center(child: const Text('Loading...')); 66 | final int messageCount = snapshot.data.documents.length; 67 | return new ListView.builder( 68 | itemCount: messageCount, 69 | itemBuilder: (_, int index) { 70 | final DocumentSnapshot thePost = snapshot.data.documents[index]; 71 | _aPostsDocumentRef = _postsReference.document(thePost.documentID); 72 | 73 | return new PostItem( 74 | firestore: _firestoreHelper.firestore, 75 | post: thePost, 76 | onTapLike: (){ 77 | List notes = thePost['likes'] != null ? new List.from(thePost['likes']) : new List(); 78 | if(notes.contains(_user.uid)){ 79 | print("unLiking post"); 80 | notes.remove(_user.uid); 81 | }else{ 82 | print("Liking post"); 83 | notes.add(_user.uid); 84 | } 85 | print(_user.uid + " pressed like on post " + thePost.documentID); 86 | print("${_user.displayName} pressed like on post ${thePost.data['title']} and there are ${notes.length} long"); 87 | _aPostsDocumentRef.updateData({"likes":notes}); 88 | }, 89 | onTapComment: (){ 90 | print("pressed comment"); 91 | }, 92 | onTapShare: (){ 93 | print("pressed share"); 94 | }, 95 | onTapPost: (){ 96 | print("pressed post"); 97 | }, 98 | ); 99 | 100 | 101 | // return new ListTile( 102 | // // 103 | // title: new Text(document['name'] ?? ''), 104 | // subtitle: new Text('Message ${index + 1} of $messageCount'), 105 | // ); 106 | 107 | }, 108 | ); 109 | }, 110 | ); 111 | } 112 | 113 | HomeScreenPresenter _presenter; 114 | @override 115 | void initState() { 116 | super.initState(); 117 | isDisposed = false; 118 | _presenter = new HomeScreenPresenter(this); 119 | _presenter.loadDbNetworkData(); 120 | } 121 | 122 | void logout(){ 123 | } 124 | 125 | List _stats = new List(); 126 | @override 127 | void onFirebaseDocumentLoaded(Map document) { 128 | // TODO: implement onDocumentLoaded 129 | } 130 | 131 | @override 132 | void onError(var msg) { 133 | // TODO: implement onError 134 | } 135 | 136 | @override 137 | void onLoggedOut() { 138 | // TODO: implement onLoggedOut 139 | } 140 | 141 | bool isDisposed = false; 142 | @override 143 | void dispose() { 144 | super.dispose(); 145 | isDisposed = true; 146 | } 147 | 148 | @override 149 | void onUserLoaded(FirebaseUser user) { 150 | if(!isDisposed && user != null) 151 | setState(() { 152 | _user = user; 153 | }); 154 | } 155 | 156 | @override 157 | void onStatsLoaded(List stats) { 158 | // TODO: implement onStatsLoaded 159 | } 160 | } -------------------------------------------------------------------------------- /lib/widgets/button_dropdown.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class ButtonDropdown extends StatelessWidget{ 8 | 9 | final String selectedProject; 10 | final List projects; 11 | final void Function(String) callback; 12 | 13 | const ButtonDropdown({Key key, this.selectedProject, this.projects, this.callback}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return new Padding( 18 | padding: const EdgeInsets.all(8.0), 19 | child: new Container( 20 | decoration: new BoxDecoration( 21 | border: new Border.all(color: Colors.white, width: 0.4), 22 | borderRadius: new BorderRadius.circular(4.0), 23 | ), 24 | child: new DropdownButton( 25 | value: selectedProject, 26 | iconSize: 40.0, 27 | 28 | style: new TextStyle( 29 | 30 | color: Colors.yellow, 31 | fontSize: 25.0, 32 | ), 33 | 34 | elevation: 1, 35 | isDense: true, 36 | onChanged: (String newValue) { 37 | callback(newValue); 38 | }, 39 | items: projects.map((String value) { 40 | return new DropdownMenuItem( 41 | value: value, 42 | child: new Container( 43 | width: 120.0, 44 | child: new Text(value, 45 | maxLines: 1, 46 | overflow: TextOverflow.ellipsis, 47 | ), 48 | ), 49 | ); 50 | }).toList(), 51 | ), 52 | ), 53 | ); 54 | } 55 | } -------------------------------------------------------------------------------- /lib/widgets/button_sign_in.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ButtonNormal extends StatelessWidget{ 7 | 8 | final text; 9 | final fn; 10 | final colorBg; 11 | final colorText; 12 | 13 | ButtonNormal({ 14 | @required this.text, 15 | @required this.fn, 16 | @required this.colorBg, 17 | @required this.colorText, 18 | }); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return new Padding(padding: new EdgeInsets.all(2.0), 23 | child: new Container( 24 | decoration: new BoxDecoration( 25 | border: new Border.all( 26 | width: 1.0, 27 | color: Colors.grey), 28 | borderRadius: new BorderRadius.all(new Radius.circular(5.0)), 29 | ), 30 | child: new MaterialButton( 31 | onPressed: () { 32 | fn(); 33 | }, 34 | color: colorBg, 35 | 36 | child: new Text(text, 37 | style: new TextStyle(color: colorText, fontSize: 10.0),), 38 | ) 39 | ), 40 | ); 41 | } 42 | 43 | 44 | } -------------------------------------------------------------------------------- /lib/widgets/form_new_stat.dart: -------------------------------------------------------------------------------- 1 | // Create a Form Widget 2 | import 'package:flutter/material.dart'; 3 | 4 | class MyForm extends StatefulWidget { 5 | final void Function(dynamic, dynamic, dynamic) onSubmit; 6 | const MyForm({Key key, this.onSubmit}) : super(key: key); 7 | @override 8 | MyFormState createState() { 9 | return new MyFormState(); 10 | } 11 | } 12 | 13 | // Create a corresponding State class. This class will hold the data related to 14 | // the form. 15 | class MyFormState extends State { 16 | // Create a global key that will uniquely identify the `Form` widget 17 | final GlobalKey _formKey = new GlobalKey(); 18 | dynamic id, desc, mValue; 19 | 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | // Build a Form widget using the _formKey we created above 24 | return new Form( 25 | key: _formKey, 26 | child: new Column( 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | 30 | new Padding( 31 | padding: const EdgeInsets.all(4.0), 32 | child: new Container( 33 | color: Colors.blueAccent, 34 | child: new TextFormField( 35 | initialValue: "n", 36 | decoration: new InputDecoration( 37 | border: InputBorder.none, 38 | hintText: 'Name' 39 | ), 40 | validator: (value) { 41 | if (value.isEmpty) { 42 | return 'Name'; 43 | }else id = value; 44 | }, 45 | ), 46 | ), 47 | ), 48 | 49 | new Padding( 50 | padding: const EdgeInsets.all(4.0), 51 | child: new Container( 52 | color: Colors.yellow, 53 | child: new TextFormField( 54 | initialValue: "d", 55 | decoration: new InputDecoration( 56 | border: InputBorder.none, 57 | hintText: 'Description' 58 | ), 59 | validator: (value) { 60 | if (value.isEmpty) { 61 | return 'Description'; 62 | }else desc = value; 63 | }, 64 | ), 65 | ), 66 | ), 67 | 68 | new Padding( 69 | padding: const EdgeInsets.all(4.0), 70 | child: new Container( 71 | color: Colors.green, 72 | child: new TextFormField( 73 | initialValue: "v", 74 | decoration: new InputDecoration( 75 | border: InputBorder.none, 76 | hintText: 'value' 77 | ), 78 | validator: (value) { 79 | if (value.isEmpty) { 80 | return 'value'; 81 | }else mValue = value; 82 | }, 83 | ), 84 | ), 85 | ), 86 | 87 | new Padding( 88 | padding: const EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), 89 | child: new Row( 90 | mainAxisAlignment: MainAxisAlignment.end, 91 | children: [ 92 | new RaisedButton( 93 | onPressed: () { 94 | if (_formKey.currentState.validate()) { 95 | widget.onSubmit(id, desc, mValue); 96 | Scaffold.of(context).showSnackBar( 97 | new SnackBar(content: new Text('Processing Data'))); 98 | } 99 | }, 100 | child: new Text('Submit'), 101 | ), 102 | ], 103 | ), 104 | ), 105 | ], 106 | ), 107 | ); 108 | } 109 | } -------------------------------------------------------------------------------- /lib/widgets/home_buttons.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SeaRoth/flutter-starter-mvp-/19017427116790ea47e9cdcef3c6f33000a73a03/lib/widgets/home_buttons.dart -------------------------------------------------------------------------------- /lib/widgets/list_settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:meta/meta.dart'; 3 | 4 | Widget buildSettings({@required BuildContext context,}){ 5 | 6 | return new Container( 7 | child: new Padding(padding: const EdgeInsets.all(8.0), 8 | child: new Column( 9 | children: [ 10 | new Text("sdfsdf"), 11 | new Text("sdfsdf"), 12 | 13 | _buildSwitchItem("BIG BOOBS?", true, null, true), 14 | 15 | 16 | ], 17 | ),), 18 | ); 19 | } 20 | 21 | Widget _buildSwitchItem(var name, var value, var onChanged, bool isDark) => 22 | new Row( 23 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 24 | children: [ 25 | new Text("$name", 26 | style: const TextStyle( 27 | fontSize: 11.0, 28 | color: Colors.orangeAccent, 29 | fontStyle: FontStyle.normal, 30 | )), 31 | new Switch( 32 | value: value, 33 | onChanged: onChanged, 34 | activeColor: const Color(0xFF39CEFD), 35 | activeTrackColor: isDark ? Colors.white30 : Colors.black26, 36 | ), 37 | ], 38 | ); 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/widgets/page_user.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import 'package:flutter/material.dart'; 5 | 6 | Widget buildUserPage({@required BuildContext context,}){ 7 | 8 | return new Container( 9 | child: new Padding(padding: const EdgeInsets.all(8.0), 10 | child: new Column( 11 | children: [ 12 | new Text("sdfsdf"), 13 | new Text("sdfsdf"), 14 | 15 | 16 | ], 17 | ),), 18 | ); 19 | 20 | } -------------------------------------------------------------------------------- /lib/widgets/post_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_image/network.dart'; 4 | import 'package:flutterstarter/data/models/Post.dart'; 5 | import 'package:flutterstarter/screens/profile_screen.dart'; 6 | import 'package:timeago/timeago.dart'; 7 | 8 | class PostItem extends StatelessWidget{ 9 | const PostItem({Key key,this.firestore, this.post, this.onTapLike, this.onTapComment, this.onTapShare, this.onTapPost,}); 10 | final Firestore firestore; 11 | final DocumentSnapshot post; 12 | final VoidCallback onTapPost; 13 | final VoidCallback onTapLike; 14 | final VoidCallback onTapComment; 15 | final VoidCallback onTapShare; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final ThemeData theme = Theme.of(context); 20 | final TextStyle titleStyle = theme.textTheme.headline.copyWith(color: Colors.white); 21 | final TextStyle descriptionStyle = theme.textTheme.subhead; 22 | 23 | var username = ""; 24 | 25 | 26 | TimeAgo ta = new TimeAgo(); 27 | final comments = post['comments']; 28 | 29 | if(comments != null) 30 | print("there are ${comments.length} total comments"); 31 | 32 | return new StreamBuilder( 33 | stream: firestore.collection('users').snapshots(), 34 | builder: (BuildContext context, AsyncSnapshot snapshot) { 35 | if (!snapshot.hasData) 36 | return Center(child: const Text('Loading...')); 37 | var _userWhoPostedTheShits = snapshot.data.documents.firstWhere((it) => it.documentID == post['userId']); 38 | username = _userWhoPostedTheShits['name']; 39 | 40 | return new Container( 41 | padding: const EdgeInsets.all(4.0), 42 | child: new Card( 43 | child: new Column( 44 | mainAxisSize: MainAxisSize.min, 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | children: [ 47 | new Container( 48 | margin: new EdgeInsets.all(6.0), 49 | child: new Row( 50 | children: [ 51 | new Container( 52 | child: new GestureDetector( 53 | child: new CircleAvatar( 54 | backgroundImage: 55 | new Image( 56 | image: new NetworkImageWithRetry( 57 | _userWhoPostedTheShits['imageUrl']), 58 | ).image, 59 | radius: 22.0, 60 | ), 61 | onTap: () => 62 | Navigator.push(context, 63 | new MaterialPageRoute( 64 | builder: (BuildContext context) => 65 | new ProfileScreen(userId: post['userId']))), 66 | ), 67 | 68 | margin: new EdgeInsets.only(right: 10.0), 69 | ), 70 | new Column( 71 | crossAxisAlignment: CrossAxisAlignment.start, 72 | children: [ 73 | new Text( 74 | "$username", 75 | style: new TextStyle( 76 | fontWeight: FontWeight.bold, fontSize: 18.0), 77 | ), 78 | new Text( 79 | " ${post['title']}", 80 | style: new TextStyle( 81 | fontWeight: FontWeight.bold, fontSize: 15.0), 82 | ), 83 | new Text("${ta.format(post['date'])}") 84 | ], 85 | ), 86 | ], 87 | ), 88 | ), 89 | new Container( 90 | child: new Text(post['message']), 91 | margin: new EdgeInsets.all(10.0), 92 | ), 93 | 94 | post['imgUrlList'].length > 0 ? 95 | new Container( 96 | height: 350.0, 97 | child: new ListView.builder( 98 | padding: kMaterialListPadding, 99 | itemCount: post['imgUrlList'].length, 100 | scrollDirection: Axis.horizontal, 101 | itemBuilder: (BuildContext context, int index) { 102 | var mImage = new Image( 103 | fit: BoxFit.fill, 104 | image: new NetworkImageWithRetry( 105 | post['imgUrlList'][index]), 106 | ); 107 | 108 | return new Padding( 109 | padding: const EdgeInsets.all(8.0), 110 | child: new GestureDetector( 111 | onTap: () { 112 | Navigator.push(context, 113 | new MaterialPageRoute( 114 | builder: (BuildContext context) => 115 | new FullScreenCodeDialog(mImage: mImage))); 116 | }, 117 | child: mImage, 118 | ), 119 | ); 120 | }, 121 | ), 122 | ) : new Text(""), 123 | 124 | new ButtonTheme.bar( 125 | child: new ButtonBar( 126 | alignment: MainAxisAlignment.spaceEvenly, 127 | children: [ 128 | new FlatButton( 129 | child: const Text('Like'), 130 | textColor: Colors.blue, 131 | onPressed: () { 132 | onTapLike(); 133 | }, 134 | ), 135 | new FlatButton( 136 | child: const Text('Comment'), 137 | textColor: Colors.blue, 138 | onPressed: () { 139 | onTapComment(); 140 | }, 141 | ), 142 | new FlatButton( 143 | child: const Text('Share'), 144 | textColor: Colors.blue, 145 | onPressed: () { 146 | onTapShare(); 147 | }, 148 | ), 149 | ], 150 | ), 151 | ), 152 | ], 153 | ), 154 | ), 155 | ); 156 | }); 157 | } 158 | } 159 | 160 | class FullScreenCodeDialog extends StatefulWidget { 161 | const FullScreenCodeDialog({ this.mImage }); 162 | final Image mImage; 163 | @override 164 | FullScreenCodeDialogState createState() => new FullScreenCodeDialogState(); 165 | } 166 | 167 | class FullScreenCodeDialogState extends State { 168 | Image _image; 169 | 170 | @override 171 | void didChangeDependencies() { 172 | if (mounted) { 173 | setState(() { 174 | _image = widget.mImage; 175 | }); 176 | } 177 | super.didChangeDependencies(); 178 | } 179 | 180 | @override 181 | Widget build(BuildContext context) { 182 | 183 | Widget body; 184 | if (_image == null) { 185 | body = const Center( 186 | child: const Text("Invalid image") 187 | ); 188 | } else { 189 | body = new SingleChildScrollView( 190 | child: _image 191 | ); 192 | } 193 | 194 | return new Scaffold( 195 | appBar: new AppBar( 196 | leading: new IconButton( 197 | icon: const Icon( 198 | Icons.clear, 199 | semanticLabel: 'Close', 200 | ), 201 | onPressed: () { Navigator.pop(context); } 202 | ), 203 | ), 204 | body: body 205 | ); 206 | } 207 | } -------------------------------------------------------------------------------- /lib/widgets/stat_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StatItem extends StatelessWidget{ 4 | final id; 5 | final name; 6 | final desc; 7 | final value; 8 | final void Function(dynamic) onShortPress; 9 | final void Function(dynamic) onLongPress; 10 | final isEven; 11 | 12 | const StatItem({Key key, this.id, this.name, this.desc, this.value, this.onShortPress, this.isEven, this.onLongPress}) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return new Padding( 17 | padding: const EdgeInsets.all(4.0), 18 | child: new Container( 19 | color: isEven == true ? Colors.white : Colors.blue, 20 | height: 50.0, 21 | child: new ListTile( 22 | onLongPress: () => onLongPress(id), 23 | onTap: () => onShortPress(id), 24 | title: new Text(name != null ? name : "", 25 | overflow: TextOverflow.ellipsis, 26 | style: new TextStyle(color: isEven == true ? Colors.black : Colors.white,), 27 | ), 28 | dense: false, 29 | subtitle: new Text(desc != null ? desc : "", 30 | overflow: TextOverflow.ellipsis, 31 | style: new TextStyle(color: isEven == true ? Colors.black : Colors.white,),), 32 | trailing: new Text(value != null ? value : "", 33 | overflow: TextOverflow.ellipsis, 34 | style: new TextStyle(color: isEven == true ? Colors.black : Colors.white,),), 35 | ), 36 | ), 37 | ); 38 | } 39 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.31.2-alpha.2" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.4.3" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.7" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.3" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.1" 39 | cloud_firestore: 40 | dependency: "direct main" 41 | description: 42 | name: cloud_firestore 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.7.3" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.14.6" 53 | convert: 54 | dependency: transitive 55 | description: 56 | name: convert 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.0.1" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.0.3" 67 | csslib: 68 | dependency: transitive 69 | description: 70 | name: csslib 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.14.4" 74 | firebase_auth: 75 | dependency: "direct main" 76 | description: 77 | name: firebase_auth 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.5.11" 81 | firebase_core: 82 | dependency: "direct main" 83 | description: 84 | name: firebase_core 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.2.4" 88 | flutter: 89 | dependency: "direct main" 90 | description: flutter 91 | source: sdk 92 | version: "0.0.0" 93 | flutter_cupertino_settings: 94 | dependency: "direct main" 95 | description: 96 | name: flutter_cupertino_settings 97 | url: "https://pub.dartlang.org" 98 | source: hosted 99 | version: "0.0.8" 100 | flutter_image: 101 | dependency: "direct main" 102 | description: 103 | name: flutter_image 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "1.0.0" 107 | flutter_local_notifications: 108 | dependency: "direct main" 109 | description: 110 | name: flutter_local_notifications 111 | url: "https://pub.dartlang.org" 112 | source: hosted 113 | version: "0.3.3" 114 | flutter_test: 115 | dependency: "direct dev" 116 | description: flutter 117 | source: sdk 118 | version: "0.0.0" 119 | front_end: 120 | dependency: transitive 121 | description: 122 | name: front_end 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.1.0-alpha.12" 126 | glob: 127 | dependency: transitive 128 | description: 129 | name: glob 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.1.5" 133 | google_sign_in: 134 | dependency: "direct main" 135 | description: 136 | name: google_sign_in 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "3.0.4" 140 | html: 141 | dependency: transitive 142 | description: 143 | name: html 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.13.3" 147 | http: 148 | dependency: transitive 149 | description: 150 | name: http 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "0.11.3+16" 154 | http_multi_server: 155 | dependency: transitive 156 | description: 157 | name: http_multi_server 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "2.0.4" 161 | http_parser: 162 | dependency: transitive 163 | description: 164 | name: http_parser 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "3.1.2" 168 | intl: 169 | dependency: transitive 170 | description: 171 | name: intl 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "0.15.6" 175 | io: 176 | dependency: transitive 177 | description: 178 | name: io 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.3.2+1" 182 | js: 183 | dependency: transitive 184 | description: 185 | name: js 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "0.6.1" 189 | kernel: 190 | dependency: transitive 191 | description: 192 | name: kernel 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "0.3.0-alpha.12" 196 | logging: 197 | dependency: transitive 198 | description: 199 | name: logging 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "0.11.3+1" 203 | matcher: 204 | dependency: transitive 205 | description: 206 | name: matcher 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "0.12.2+1" 210 | meta: 211 | dependency: transitive 212 | description: 213 | name: meta 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "1.1.5" 217 | mime: 218 | dependency: transitive 219 | description: 220 | name: mime 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "0.9.6" 224 | multi_server_socket: 225 | dependency: transitive 226 | description: 227 | name: multi_server_socket 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "1.0.1" 231 | node_preamble: 232 | dependency: transitive 233 | description: 234 | name: node_preamble 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "1.4.1" 238 | package_config: 239 | dependency: transitive 240 | description: 241 | name: package_config 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "1.0.3" 245 | package_resolver: 246 | dependency: transitive 247 | description: 248 | name: package_resolver 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "1.0.2" 252 | path: 253 | dependency: transitive 254 | description: 255 | name: path 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "1.5.1" 259 | path_provider: 260 | dependency: "direct main" 261 | description: 262 | name: path_provider 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.4.1" 266 | platform: 267 | dependency: transitive 268 | description: 269 | name: platform 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "2.1.2" 273 | plugin: 274 | dependency: transitive 275 | description: 276 | name: plugin 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "0.2.0+2" 280 | pool: 281 | dependency: transitive 282 | description: 283 | name: pool 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "1.3.4" 287 | pub_semver: 288 | dependency: transitive 289 | description: 290 | name: pub_semver 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "1.4.1" 294 | quiver: 295 | dependency: transitive 296 | description: 297 | name: quiver 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "0.29.0+1" 301 | shelf: 302 | dependency: transitive 303 | description: 304 | name: shelf 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "0.7.3" 308 | shelf_packages_handler: 309 | dependency: transitive 310 | description: 311 | name: shelf_packages_handler 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.0.3" 315 | shelf_static: 316 | dependency: transitive 317 | description: 318 | name: shelf_static 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "0.2.7" 322 | shelf_web_socket: 323 | dependency: transitive 324 | description: 325 | name: shelf_web_socket 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "0.2.2" 329 | sky_engine: 330 | dependency: transitive 331 | description: flutter 332 | source: sdk 333 | version: "0.0.99" 334 | source_map_stack_trace: 335 | dependency: transitive 336 | description: 337 | name: source_map_stack_trace 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "1.1.4" 341 | source_maps: 342 | dependency: transitive 343 | description: 344 | name: source_maps 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.10.5" 348 | source_span: 349 | dependency: transitive 350 | description: 351 | name: source_span 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "1.4.0" 355 | sqflite: 356 | dependency: "direct main" 357 | description: 358 | name: sqflite 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "0.9.0" 362 | stack_trace: 363 | dependency: transitive 364 | description: 365 | name: stack_trace 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "1.9.2" 369 | stream_channel: 370 | dependency: transitive 371 | description: 372 | name: stream_channel 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "1.6.6" 376 | string_scanner: 377 | dependency: transitive 378 | description: 379 | name: string_scanner 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "1.0.2" 383 | synchronized: 384 | dependency: transitive 385 | description: 386 | name: synchronized 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "1.5.0-dev.2" 390 | term_glyph: 391 | dependency: transitive 392 | description: 393 | name: term_glyph 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.0.0" 397 | test: 398 | dependency: transitive 399 | description: 400 | name: test 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "0.12.37" 404 | timeago: 405 | dependency: "direct main" 406 | description: 407 | name: timeago 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "1.2.7" 411 | typed_data: 412 | dependency: transitive 413 | description: 414 | name: typed_data 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "1.1.5" 418 | utf: 419 | dependency: transitive 420 | description: 421 | name: utf 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "0.9.0+4" 425 | vector_math: 426 | dependency: transitive 427 | description: 428 | name: vector_math 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "2.0.6" 432 | watcher: 433 | dependency: transitive 434 | description: 435 | name: watcher 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "0.9.7+7" 439 | web_socket_channel: 440 | dependency: transitive 441 | description: 442 | name: web_socket_channel 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "1.0.7" 446 | yaml: 447 | dependency: transitive 448 | description: 449 | name: yaml 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "2.1.13" 453 | sdks: 454 | dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760" 455 | flutter: ">=0.2.4 <2.0.0" 456 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutterstarter 2 | description: A new Flutter application. 3 | 4 | dependencies: 5 | google_sign_in: "^3.0.4" 6 | firebase_auth: "^0.5.11" 7 | firebase_core: "^0.2.4" 8 | path_provider: "^0.4.1" 9 | flutter_image: "^1.0.0" 10 | sqflite: "^0.9.0" 11 | cloud_firestore: "^0.7.3" 12 | timeago: "^1.2.7" 13 | flutter_cupertino_settings: "^0.0.8" 14 | flutter_local_notifications: "^0.3.3" 15 | flutter: 16 | sdk: flutter 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | 22 | 23 | 24 | flutter: 25 | 26 | 27 | uses-material-design: true 28 | assets: 29 | - images/ftt_debrief.png 30 | - images/ftt_echo.jpg 31 | - images/ftt_gear.jpg 32 | - images/ftt_handbook.jpg 33 | - images/ftt_prepare.jpg 34 | - images/ftt_ship.jpg 35 | - images/ftt_shuttle.jpg 36 | - images/ftt_sweat.jpg 37 | - images/avatar.png 38 | - images/flaps.jpg 39 | - images/google.png 40 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:flutterstarter/main.dart'; 11 | 12 | void main() { 13 | 14 | } 15 | --------------------------------------------------------------------------------