├── .flutter-plugins-dependencies ├── .gitignore ├── .idea └── libraries │ └── Dart_SDK.xml ├── README.md ├── android ├── android.iml ├── app │ ├── app.iml │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── io │ │ │ │ └── flutter │ │ │ │ └── plugins │ │ │ │ └── GeneratedPluginRegistrant.java │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── bawp │ │ │ │ └── app │ │ │ │ └── first_flutter_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── first_flutter_app_android.iml ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties ├── settings.gradle └── settings_aar.gradle ├── first_flutter_app.iml ├── fonts └── Lobster-Regular.ttf ├── images └── flag.png ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Flutter.podspec │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── board_firestore │ ├── board_app.dart │ └── ui │ │ └── custom_card.dart ├── flutter_maps │ ├── quakes_map_app │ │ ├── model │ │ │ └── quake.dart │ │ ├── network │ │ │ └── network.dart │ │ ├── quakes_app.dart │ │ └── util │ │ │ └── types_helper.dart │ └── simple_google_map │ │ └── show_map.dart ├── main.dart ├── model │ ├── Post.dart │ ├── movie.dart │ └── question.dart ├── parsing_json │ ├── json_parsing.dart │ └── json_parsing_map.dart ├── ui │ ├── home.dart │ └── movie_ui │ │ └── movie_ui.dart ├── util │ └── hexcolor.dart └── weather_forecast │ ├── model │ └── weather_forecast_model.dart │ ├── network │ └── network.dart │ ├── ui │ ├── bottom_view.dart │ ├── forecast_card.dart │ └── mid_view.dart │ ├── util │ ├── convert_icon.dart │ └── forecast_util.dart │ └── weather_forecast.dart ├── pubspec.lock └── pubspec.yaml /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"cloud_firestore","dependencies":["firebase_core"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"google_maps_flutter","dependencies":[]}]} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | **/android/app/src/main/AndroidManifest.xml 41 | **/android/app/google-services.json 42 | 43 | # iOS/XCode related 44 | **/ios/**/*.mode1v3 45 | **/ios/**/*.mode2v3 46 | **/ios/**/*.moved-aside 47 | **/ios/**/*.pbxuser 48 | **/ios/**/*.perspectivev3 49 | **/ios/**/*sync/ 50 | **/ios/**/.sconsign.dblite 51 | **/ios/**/.tags* 52 | **/ios/**/.vagrant/ 53 | **/ios/**/DerivedData/ 54 | **/ios/**/Icon? 55 | **/ios/**/Pods/ 56 | **/ios/**/.symlinks/ 57 | **/ios/**/profile 58 | **/ios/**/xcuserdata 59 | **/ios/.generated/ 60 | **/ios/Flutter/App.framework 61 | **/ios/Flutter/Flutter.framework 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | **/ios/Runner/AppDelegate.swift 70 | **/ios/Runner/GoogleService-Info.plist 71 | 72 | # Exceptions to above rules. 73 | !**/ios/**/default.mode1v3 74 | !**/ios/**/default.mode2v3 75 | !**/ios/**/default.pbxuser 76 | !**/ios/**/default.perspectivev3 77 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 78 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # First Flutter App 2 | 3 | Source code for the Dart & Flutter Course. 4 | 5 | ## Getting Started 6 | 7 | Download the entire project and look at the ``main.dart`` file for instructions on how the project hosts many different projects/apps. 8 | 9 | -------------------------------------------------------------------------------- /android/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 41 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion 28 31 | 32 | sourceSets { 33 | main.java.srcDirs += 'src/main/kotlin' 34 | } 35 | 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | 40 | defaultConfig { 41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 42 | applicationId "com.bawp.app.first_flutter_app" 43 | minSdkVersion 21 44 | targetSdkVersion 28 45 | versionCode flutterVersionCode.toInteger() 46 | versionName flutterVersionName 47 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 48 | } 49 | 50 | buildTypes { 51 | release { 52 | // TODO: Add your own signing config for the release build. 53 | // Signing with the debug keys for now, so `flutter run --release` works. 54 | signingConfig signingConfigs.debug 55 | } 56 | } 57 | } 58 | 59 | flutter { 60 | source '../..' 61 | } 62 | 63 | dependencies { 64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 65 | testImplementation 'junit:junit:4.12' 66 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 67 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' 68 | } 69 | 70 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 15 | 22 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | import io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin; 5 | import io.flutter.plugins.firebase.core.FirebaseCorePlugin; 6 | import io.flutter.plugins.googlemaps.GoogleMapsPlugin; 7 | 8 | /** 9 | * Generated file. Do not edit. 10 | */ 11 | public final class GeneratedPluginRegistrant { 12 | public static void registerWith(PluginRegistry registry) { 13 | if (alreadyRegisteredWith(registry)) { 14 | return; 15 | } 16 | CloudFirestorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin")); 17 | FirebaseCorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.core.FirebaseCorePlugin")); 18 | GoogleMapsPlugin.registerWith(registry.registrarFor("io.flutter.plugins.googlemaps.GoogleMapsPlugin")); 19 | } 20 | 21 | private static boolean alreadyRegisteredWith(PluginRegistry registry) { 22 | final String key = GeneratedPluginRegistrant.class.getCanonicalName(); 23 | if (registry.hasPlugin(key)) { 24 | return true; 25 | } 26 | registry.registrarFor(key); 27 | return false; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/bawp/app/first_flutter_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.bawp.app.first_flutter_app 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.10' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.3' 10 | classpath 'com.google.gms:google-services:4.3.3' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | subprojects { 30 | project.configurations.all { 31 | resolutionStrategy.eachDependency { details -> 32 | if (details.requested.group == 'com.android.support' 33 | && !details.requested.name.contains('multidex') ) { 34 | details.useVersion "27.1.1" 35 | } 36 | if (details.requested.group == 'androidx.core' 37 | && !details.requested.name.contains('androidx') ) { 38 | details.useVersion "1.0.1" 39 | } 40 | } 41 | } 42 | } 43 | 44 | 45 | task clean(type: Delete) { 46 | delete rootProject.buildDir 47 | } 48 | -------------------------------------------------------------------------------- /android/first_flutter_app_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | android.enableR8=true 4 | android.useAndroidX=true 5 | android.enableJetifier=true 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Dec 17 14:53:29 PST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-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/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=/Users/paulodichone/Library/Android/sdk 2 | flutter.sdk=/Users/paulodichone/flutter 3 | flutter.buildMode=debug 4 | flutter.versionName=1.0.0 5 | flutter.versionCode=1 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /first_flutter_app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /fonts/Lobster-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/fonts/Lobster-Regular.ttf -------------------------------------------------------------------------------- /images/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/images/flag.png -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: This podspec is NOT to be published. It is only used as a local source! 3 | # 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'Flutter' 7 | s.version = '1.0.0' 8 | s.summary = 'High-performance, high-fidelity mobile apps.' 9 | s.description = <<-DESC 10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. 11 | DESC 12 | s.homepage = 'https://flutter.io' 13 | s.license = { :type => 'MIT' } 14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } 15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } 16 | s.ios.deployment_target = '8.0' 17 | s.vendored_frameworks = 'Flutter.framework' 18 | end 19 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | generated_key_values = {} 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) do |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | generated_key_values[podname] = podpath 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | end 32 | generated_key_values 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | use_modular_headers! 38 | 39 | # Flutter Pod 40 | 41 | copied_flutter_dir = File.join(__dir__, 'Flutter') 42 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') 43 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') 44 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) 45 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. 46 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. 47 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. 48 | 49 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') 50 | unless File.exist?(generated_xcode_build_settings_path) 51 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" 52 | end 53 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) 54 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; 55 | 56 | unless File.exist?(copied_framework_path) 57 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) 58 | end 59 | unless File.exist?(copied_podspec_path) 60 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) 61 | end 62 | end 63 | 64 | # Keep pod path relative so it can be checked into Podfile.lock. 65 | pod 'Flutter', :path => 'Flutter' 66 | 67 | # Plugin Pods 68 | 69 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 70 | # referring to absolute paths on developers' machines. 71 | system('rm -rf .symlinks') 72 | system('mkdir -p .symlinks/plugins') 73 | plugin_pods = parse_KV_file('../.flutter-plugins') 74 | plugin_pods.each do |name, path| 75 | symlink = File.join('.symlinks', 'plugins', name) 76 | File.symlink(path, symlink) 77 | pod name, :path => File.join(symlink, 'ios') 78 | end 79 | end 80 | 81 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 82 | install! 'cocoapods', :disable_input_output_paths => true 83 | 84 | post_install do |installer| 85 | installer.pods_project.targets.each do |target| 86 | target.build_configurations.each do |config| 87 | config.build_settings['ENABLE_BITCODE'] = 'NO' 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - abseil/algorithm (0.20190808): 3 | - abseil/algorithm/algorithm (= 0.20190808) 4 | - abseil/algorithm/container (= 0.20190808) 5 | - abseil/algorithm/algorithm (0.20190808) 6 | - abseil/algorithm/container (0.20190808): 7 | - abseil/algorithm/algorithm 8 | - abseil/base/core_headers 9 | - abseil/meta/type_traits 10 | - abseil/base (0.20190808): 11 | - abseil/base/atomic_hook (= 0.20190808) 12 | - abseil/base/base (= 0.20190808) 13 | - abseil/base/base_internal (= 0.20190808) 14 | - abseil/base/bits (= 0.20190808) 15 | - abseil/base/config (= 0.20190808) 16 | - abseil/base/core_headers (= 0.20190808) 17 | - abseil/base/dynamic_annotations (= 0.20190808) 18 | - abseil/base/endian (= 0.20190808) 19 | - abseil/base/log_severity (= 0.20190808) 20 | - abseil/base/malloc_internal (= 0.20190808) 21 | - abseil/base/pretty_function (= 0.20190808) 22 | - abseil/base/spinlock_wait (= 0.20190808) 23 | - abseil/base/throw_delegate (= 0.20190808) 24 | - abseil/base/atomic_hook (0.20190808) 25 | - abseil/base/base (0.20190808): 26 | - abseil/base/atomic_hook 27 | - abseil/base/base_internal 28 | - abseil/base/config 29 | - abseil/base/core_headers 30 | - abseil/base/dynamic_annotations 31 | - abseil/base/log_severity 32 | - abseil/base/spinlock_wait 33 | - abseil/meta/type_traits 34 | - abseil/base/base_internal (0.20190808): 35 | - abseil/meta/type_traits 36 | - abseil/base/bits (0.20190808): 37 | - abseil/base/core_headers 38 | - abseil/base/config (0.20190808) 39 | - abseil/base/core_headers (0.20190808): 40 | - abseil/base/config 41 | - abseil/base/dynamic_annotations (0.20190808) 42 | - abseil/base/endian (0.20190808): 43 | - abseil/base/config 44 | - abseil/base/core_headers 45 | - abseil/base/log_severity (0.20190808): 46 | - abseil/base/core_headers 47 | - abseil/base/malloc_internal (0.20190808): 48 | - abseil/base/base 49 | - abseil/base/config 50 | - abseil/base/core_headers 51 | - abseil/base/dynamic_annotations 52 | - abseil/base/spinlock_wait 53 | - abseil/base/pretty_function (0.20190808) 54 | - abseil/base/spinlock_wait (0.20190808): 55 | - abseil/base/core_headers 56 | - abseil/base/throw_delegate (0.20190808): 57 | - abseil/base/base 58 | - abseil/base/config 59 | - abseil/memory (0.20190808): 60 | - abseil/memory/memory (= 0.20190808) 61 | - abseil/memory/memory (0.20190808): 62 | - abseil/base/core_headers 63 | - abseil/meta/type_traits 64 | - abseil/meta (0.20190808): 65 | - abseil/meta/type_traits (= 0.20190808) 66 | - abseil/meta/type_traits (0.20190808): 67 | - abseil/base/config 68 | - abseil/numeric/int128 (0.20190808): 69 | - abseil/base/config 70 | - abseil/base/core_headers 71 | - abseil/strings/internal (0.20190808): 72 | - abseil/base/core_headers 73 | - abseil/base/endian 74 | - abseil/meta/type_traits 75 | - abseil/strings/strings (0.20190808): 76 | - abseil/base/base 77 | - abseil/base/bits 78 | - abseil/base/config 79 | - abseil/base/core_headers 80 | - abseil/base/endian 81 | - abseil/base/throw_delegate 82 | - abseil/memory/memory 83 | - abseil/meta/type_traits 84 | - abseil/numeric/int128 85 | - abseil/strings/internal 86 | - abseil/time (0.20190808): 87 | - abseil/time/internal (= 0.20190808) 88 | - abseil/time/time (= 0.20190808) 89 | - abseil/time/internal (0.20190808): 90 | - abseil/time/internal/cctz (= 0.20190808) 91 | - abseil/time/internal/cctz (0.20190808): 92 | - abseil/time/internal/cctz/civil_time (= 0.20190808) 93 | - abseil/time/internal/cctz/includes (= 0.20190808) 94 | - abseil/time/internal/cctz/time_zone (= 0.20190808) 95 | - abseil/time/internal/cctz/civil_time (0.20190808) 96 | - abseil/time/internal/cctz/includes (0.20190808) 97 | - abseil/time/internal/cctz/time_zone (0.20190808): 98 | - abseil/time/internal/cctz/civil_time 99 | - abseil/time/time (0.20190808): 100 | - abseil/base/base 101 | - abseil/base/core_headers 102 | - abseil/numeric/int128 103 | - abseil/strings/strings 104 | - abseil/time/internal/cctz/civil_time 105 | - abseil/time/internal/cctz/time_zone 106 | - abseil/types (0.20190808): 107 | - abseil/types/any (= 0.20190808) 108 | - abseil/types/bad_any_cast (= 0.20190808) 109 | - abseil/types/bad_any_cast_impl (= 0.20190808) 110 | - abseil/types/bad_optional_access (= 0.20190808) 111 | - abseil/types/bad_variant_access (= 0.20190808) 112 | - abseil/types/compare (= 0.20190808) 113 | - abseil/types/optional (= 0.20190808) 114 | - abseil/types/span (= 0.20190808) 115 | - abseil/types/variant (= 0.20190808) 116 | - abseil/types/any (0.20190808): 117 | - abseil/base/config 118 | - abseil/base/core_headers 119 | - abseil/meta/type_traits 120 | - abseil/types/bad_any_cast 121 | - abseil/utility/utility 122 | - abseil/types/bad_any_cast (0.20190808): 123 | - abseil/base/config 124 | - abseil/types/bad_any_cast_impl 125 | - abseil/types/bad_any_cast_impl (0.20190808): 126 | - abseil/base/base 127 | - abseil/base/config 128 | - abseil/types/bad_optional_access (0.20190808): 129 | - abseil/base/base 130 | - abseil/base/config 131 | - abseil/types/bad_variant_access (0.20190808): 132 | - abseil/base/base 133 | - abseil/base/config 134 | - abseil/types/compare (0.20190808): 135 | - abseil/base/core_headers 136 | - abseil/meta/type_traits 137 | - abseil/types/optional (0.20190808): 138 | - abseil/base/base_internal 139 | - abseil/base/config 140 | - abseil/base/core_headers 141 | - abseil/memory/memory 142 | - abseil/meta/type_traits 143 | - abseil/types/bad_optional_access 144 | - abseil/utility/utility 145 | - abseil/types/span (0.20190808): 146 | - abseil/algorithm/algorithm 147 | - abseil/base/core_headers 148 | - abseil/base/throw_delegate 149 | - abseil/meta/type_traits 150 | - abseil/types/variant (0.20190808): 151 | - abseil/base/base_internal 152 | - abseil/base/config 153 | - abseil/base/core_headers 154 | - abseil/meta/type_traits 155 | - abseil/types/bad_variant_access 156 | - abseil/utility/utility 157 | - abseil/utility/utility (0.20190808): 158 | - abseil/base/base_internal 159 | - abseil/base/config 160 | - abseil/meta/type_traits 161 | - BoringSSL-GRPC (0.0.3): 162 | - BoringSSL-GRPC/Implementation (= 0.0.3) 163 | - BoringSSL-GRPC/Interface (= 0.0.3) 164 | - BoringSSL-GRPC/Implementation (0.0.3): 165 | - BoringSSL-GRPC/Interface (= 0.0.3) 166 | - BoringSSL-GRPC/Interface (0.0.3) 167 | - cloud_firestore (0.0.1): 168 | - Firebase/Core 169 | - Firebase/Firestore (~> 6.0) 170 | - Flutter 171 | - Firebase/Core (6.14.0): 172 | - Firebase/CoreOnly 173 | - FirebaseAnalytics (= 6.1.7) 174 | - Firebase/CoreOnly (6.14.0): 175 | - FirebaseCore (= 6.5.0) 176 | - Firebase/Firestore (6.14.0): 177 | - Firebase/CoreOnly 178 | - FirebaseFirestore (~> 1.8.2) 179 | - firebase_core (0.0.1): 180 | - Firebase/Core 181 | - Flutter 182 | - firebase_core_web (0.1.0): 183 | - Flutter 184 | - FirebaseAnalytics (6.1.7): 185 | - FirebaseCore (~> 6.5) 186 | - FirebaseInstanceID (~> 4.2) 187 | - GoogleAppMeasurement (= 6.1.7) 188 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 189 | - GoogleUtilities/MethodSwizzler (~> 6.0) 190 | - GoogleUtilities/Network (~> 6.0) 191 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 192 | - nanopb (= 0.3.9011) 193 | - FirebaseAuthInterop (1.0.0) 194 | - FirebaseCore (6.5.0): 195 | - FirebaseCoreDiagnostics (~> 1.0) 196 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 197 | - GoogleUtilities/Environment (~> 6.4) 198 | - GoogleUtilities/Logger (~> 6.4) 199 | - FirebaseCoreDiagnostics (1.1.2): 200 | - FirebaseCoreDiagnosticsInterop (~> 1.0) 201 | - GoogleDataTransportCCTSupport (~> 1.0) 202 | - GoogleUtilities/Environment (~> 6.2) 203 | - GoogleUtilities/Logger (~> 6.2) 204 | - nanopb (~> 0.3.901) 205 | - FirebaseCoreDiagnosticsInterop (1.1.0) 206 | - FirebaseFirestore (1.8.3): 207 | - abseil/algorithm (= 0.20190808) 208 | - abseil/base (= 0.20190808) 209 | - abseil/memory (= 0.20190808) 210 | - abseil/meta (= 0.20190808) 211 | - abseil/strings/strings (= 0.20190808) 212 | - abseil/time (= 0.20190808) 213 | - abseil/types (= 0.20190808) 214 | - FirebaseAuthInterop (~> 1.0) 215 | - FirebaseCore (~> 6.2) 216 | - "gRPC-C++ (= 0.0.9)" 217 | - leveldb-library (~> 1.22) 218 | - nanopb (~> 0.3.901) 219 | - FirebaseInstanceID (4.2.8): 220 | - FirebaseCore (~> 6.5) 221 | - GoogleUtilities/Environment (~> 6.4) 222 | - GoogleUtilities/UserDefaults (~> 6.4) 223 | - Flutter (1.0.0) 224 | - google_maps_flutter (0.0.1): 225 | - Flutter 226 | - GoogleMaps 227 | - GoogleAppMeasurement (6.1.7): 228 | - GoogleUtilities/AppDelegateSwizzler (~> 6.0) 229 | - GoogleUtilities/MethodSwizzler (~> 6.0) 230 | - GoogleUtilities/Network (~> 6.0) 231 | - "GoogleUtilities/NSData+zlib (~> 6.0)" 232 | - nanopb (= 0.3.9011) 233 | - GoogleDataTransport (3.2.0) 234 | - GoogleDataTransportCCTSupport (1.2.3): 235 | - GoogleDataTransport (~> 3.2) 236 | - nanopb (~> 0.3.901) 237 | - GoogleMaps (2.7.0): 238 | - GoogleMaps/Maps (= 2.7.0) 239 | - GoogleMaps/Base (2.7.0) 240 | - GoogleMaps/Maps (2.7.0): 241 | - GoogleMaps/Base 242 | - GoogleUtilities/AppDelegateSwizzler (6.4.0): 243 | - GoogleUtilities/Environment 244 | - GoogleUtilities/Logger 245 | - GoogleUtilities/Network 246 | - GoogleUtilities/Environment (6.4.0) 247 | - GoogleUtilities/Logger (6.4.0): 248 | - GoogleUtilities/Environment 249 | - GoogleUtilities/MethodSwizzler (6.4.0): 250 | - GoogleUtilities/Logger 251 | - GoogleUtilities/Network (6.4.0): 252 | - GoogleUtilities/Logger 253 | - "GoogleUtilities/NSData+zlib" 254 | - GoogleUtilities/Reachability 255 | - "GoogleUtilities/NSData+zlib (6.4.0)" 256 | - GoogleUtilities/Reachability (6.4.0): 257 | - GoogleUtilities/Logger 258 | - GoogleUtilities/UserDefaults (6.4.0): 259 | - GoogleUtilities/Logger 260 | - "gRPC-C++ (0.0.9)": 261 | - "gRPC-C++/Implementation (= 0.0.9)" 262 | - "gRPC-C++/Interface (= 0.0.9)" 263 | - "gRPC-C++/Implementation (0.0.9)": 264 | - "gRPC-C++/Interface (= 0.0.9)" 265 | - gRPC-Core (= 1.21.0) 266 | - nanopb (~> 0.3) 267 | - "gRPC-C++/Interface (0.0.9)" 268 | - gRPC-Core (1.21.0): 269 | - gRPC-Core/Implementation (= 1.21.0) 270 | - gRPC-Core/Interface (= 1.21.0) 271 | - gRPC-Core/Implementation (1.21.0): 272 | - BoringSSL-GRPC (= 0.0.3) 273 | - gRPC-Core/Interface (= 1.21.0) 274 | - nanopb (~> 0.3) 275 | - gRPC-Core/Interface (1.21.0) 276 | - leveldb-library (1.22) 277 | - nanopb (0.3.9011): 278 | - nanopb/decode (= 0.3.9011) 279 | - nanopb/encode (= 0.3.9011) 280 | - nanopb/decode (0.3.9011) 281 | - nanopb/encode (0.3.9011) 282 | 283 | DEPENDENCIES: 284 | - cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) 285 | - firebase_core (from `.symlinks/plugins/firebase_core/ios`) 286 | - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) 287 | - Flutter (from `Flutter`) 288 | - google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`) 289 | 290 | SPEC REPOS: 291 | trunk: 292 | - abseil 293 | - BoringSSL-GRPC 294 | - Firebase 295 | - FirebaseAnalytics 296 | - FirebaseAuthInterop 297 | - FirebaseCore 298 | - FirebaseCoreDiagnostics 299 | - FirebaseCoreDiagnosticsInterop 300 | - FirebaseFirestore 301 | - FirebaseInstanceID 302 | - GoogleAppMeasurement 303 | - GoogleDataTransport 304 | - GoogleDataTransportCCTSupport 305 | - GoogleMaps 306 | - GoogleUtilities 307 | - "gRPC-C++" 308 | - gRPC-Core 309 | - leveldb-library 310 | - nanopb 311 | 312 | EXTERNAL SOURCES: 313 | cloud_firestore: 314 | :path: ".symlinks/plugins/cloud_firestore/ios" 315 | firebase_core: 316 | :path: ".symlinks/plugins/firebase_core/ios" 317 | firebase_core_web: 318 | :path: ".symlinks/plugins/firebase_core_web/ios" 319 | Flutter: 320 | :path: Flutter 321 | google_maps_flutter: 322 | :path: ".symlinks/plugins/google_maps_flutter/ios" 323 | 324 | SPEC CHECKSUMS: 325 | abseil: 18063d773f5366ff8736a050fe035a28f635fd27 326 | BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318 327 | cloud_firestore: c5d1e4d114eecb1dfb535f008435685bcf6063f1 328 | Firebase: 0219bb4782eb1406f1b9b0628a2e625484ce910d 329 | firebase_core: 87e4c7cef68de46c0326ce2ee907fc7e365ead7e 330 | firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 331 | FirebaseAnalytics: f68b9f3f1241385129ae0a83b63627fc420c05e5 332 | FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc 333 | FirebaseCore: 632e05cc5e1199d9147122c16d92305eb04c34bd 334 | FirebaseCoreDiagnostics: 511f4f3ed7d440bb69127e8b97c2bc8befae639e 335 | FirebaseCoreDiagnosticsInterop: e9b1b023157e3a2fc6418b5cb601e79b9af7b3a0 336 | FirebaseFirestore: 52120e2833f804a874ba1a9f59aab864a8ae2286 337 | FirebaseInstanceID: ce993a3c3670a8f5d47ce371ac5d143c560608c5 338 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 339 | google_maps_flutter: d0dd62f5a7d39bae61057eb9f52dd778d99c7c6c 340 | GoogleAppMeasurement: db118eb61a97dd8c4f7014e368d3c335cbbcf80a 341 | GoogleDataTransport: 8e9b210c97d55fbff306cc5468ff91b9cb32dcf5 342 | GoogleDataTransportCCTSupport: 202d7cdf9c4a7d81a2bb7f7e7e1ba6faa421b1f2 343 | GoogleMaps: f79af95cb24d869457b1f961c93d3ce8b2f3b848 344 | GoogleUtilities: 29bd0d8f850efbd28cff6d99e8b7da1f8d236bcf 345 | "gRPC-C++": 9dfe7b44821e7b3e44aacad2af29d2c21f7cde83 346 | gRPC-Core: c9aef9a261a1247e881b18059b84d597293c9947 347 | leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7 348 | nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd 349 | 350 | PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 351 | 352 | COCOAPODS: 1.8.4 353 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import GoogleMaps 4 | 5 | @UIApplicationMain 6 | @objc class AppDelegate: FlutterAppDelegate { 7 | override func application( 8 | _ application: UIApplication, 9 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 10 | ) -> Bool { 11 | GMSServices.provideAPIKey("ADD YOUR OWN APPKEY") 12 | GeneratedPluginRegistrant.register(with: self) 13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 14 | } 15 | } -------------------------------------------------------------------------------- /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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pdichone/flutter-course-updated/5e4e2d75c0aafc7fe02354eb618b0a3df063c393/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 | io.flutter.embedded_views_preview 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | first_flutter_app 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/board_firestore/board_app.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/board_firestore/ui/custom_card.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | 6 | class BoardApp extends StatefulWidget { 7 | @override 8 | _BoardAppState createState() => _BoardAppState(); 9 | } 10 | 11 | class _BoardAppState extends State { 12 | var firestoreDb = Firestore.instance.collection("board").snapshots(); 13 | TextEditingController nameInputController; 14 | TextEditingController titleInputController; 15 | TextEditingController descriptionInputController; 16 | 17 | @override 18 | void initState() { 19 | // TODO: implement initState 20 | super.initState(); 21 | nameInputController = TextEditingController(); 22 | descriptionInputController = TextEditingController(); 23 | titleInputController = TextEditingController(); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | appBar: AppBar( 30 | title: Text("Community Board"), 31 | 32 | ), 33 | floatingActionButton: FloatingActionButton(onPressed: () { 34 | _showDialog(context); 35 | 36 | }, child: Icon(FontAwesomeIcons.pen),), 37 | 38 | body: StreamBuilder( 39 | stream: firestoreDb, 40 | builder: (context, snapshot) { 41 | if (!snapshot.hasData) return CircularProgressIndicator(); 42 | return ListView.builder( 43 | itemCount: snapshot.data.documents.length, 44 | itemBuilder: (context, int index) { 45 | return CustomCard(snapshot: snapshot.data, index: index); 46 | 47 | //return Text(snapshot.data.documents[index]['description']); 48 | 49 | }); 50 | 51 | }), 52 | ); 53 | } 54 | 55 | _showDialog(BuildContext context) async { 56 | await showDialog(context: context, 57 | child: AlertDialog( 58 | contentPadding: EdgeInsets.all(10), 59 | content: Column( 60 | children: [ 61 | Text("Please fill out the form."), 62 | Expanded( 63 | child: TextField( 64 | autofocus: true, 65 | autocorrect: true, 66 | decoration: InputDecoration( 67 | labelText: "Your Name*" 68 | ), 69 | controller: nameInputController, 70 | 71 | )), 72 | 73 | Expanded( 74 | child: TextField( 75 | autofocus: true, 76 | autocorrect: true, 77 | decoration: InputDecoration( 78 | labelText: "Title*" 79 | ), 80 | controller: titleInputController, 81 | 82 | )), 83 | 84 | Expanded( 85 | child: TextField( 86 | autofocus: true, 87 | autocorrect: true, 88 | decoration: InputDecoration( 89 | labelText: "Description*" 90 | ), 91 | controller: descriptionInputController, 92 | 93 | )), 94 | ], 95 | 96 | 97 | ), 98 | actions: [ 99 | FlatButton(onPressed: () { 100 | nameInputController.clear(); 101 | titleInputController.clear(); 102 | descriptionInputController.clear(); 103 | 104 | Navigator.pop(context); 105 | } , 106 | child: Text("Cancel")), 107 | 108 | FlatButton(onPressed: () { 109 | if( titleInputController.text.isNotEmpty && 110 | nameInputController.text.isNotEmpty && 111 | descriptionInputController.text.isNotEmpty) { 112 | Firestore.instance.collection("board") 113 | .add({ 114 | "name" : nameInputController.text, 115 | "title" : titleInputController.text, 116 | "description" : descriptionInputController.text, 117 | "timestamp" : new DateTime.now() 118 | }).then((response) { 119 | print(response.documentID); 120 | Navigator.pop(context); 121 | nameInputController.clear(); 122 | titleInputController.clear(); 123 | descriptionInputController.clear(); 124 | 125 | }).catchError((error) => print(error)); 126 | } 127 | }, 128 | child: Text("Save")) 129 | ], 130 | 131 | ) ); 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /lib/board_firestore/ui/custom_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:intl/intl.dart'; 5 | 6 | class CustomCard extends StatelessWidget { 7 | final QuerySnapshot snapshot; 8 | final int index; 9 | 10 | const CustomCard({Key key, this.snapshot, this.index}) : super(key: key); 11 | 12 | 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | 17 | 18 | 19 | var snapshotData = snapshot.documents[index].data; 20 | var docId = snapshot.documents[index].documentID; 21 | 22 | TextEditingController nameInputController = TextEditingController(text: snapshotData["name"]); 23 | TextEditingController titleInputController = TextEditingController(text: snapshotData["title"]); 24 | TextEditingController descriptionInputController = TextEditingController(text: snapshotData["description"]); 25 | 26 | var timeToDate = new DateTime.fromMillisecondsSinceEpoch(snapshotData["timestamp"].seconds * 1000); 27 | var dateFormatted = new DateFormat("EEEE, MMM d").format(timeToDate); 28 | 29 | return Column( 30 | children: [ 31 | Container( 32 | height: 190, 33 | child: Card( 34 | elevation: 9, 35 | child: Column( 36 | children: [ 37 | ListTile( 38 | title: Text(snapshotData["title"]), 39 | subtitle: Text(snapshotData["description"]), 40 | leading: CircleAvatar( 41 | radius: 34, 42 | child: Text(snapshotData["title"].toString()[0]), 43 | 44 | ), 45 | ), 46 | 47 | 48 | Padding( 49 | padding: const EdgeInsets.all(8.0), 50 | child: Row( 51 | mainAxisAlignment: MainAxisAlignment.end, 52 | children: [ 53 | Text(" By: ${snapshotData["name"]} "), 54 | Text(dateFormatted), 55 | ], 56 | ), 57 | ), 58 | 59 | //Add Row with Edit and Update Icons 60 | Row( 61 | mainAxisAlignment: MainAxisAlignment.start, 62 | children: [ 63 | IconButton(icon: Icon(FontAwesomeIcons.edit, size: 15,), 64 | onPressed: () async { 65 | await showDialog(context: context, 66 | child: AlertDialog( 67 | contentPadding: EdgeInsets.all(10), 68 | content: Column( 69 | children: [ 70 | Text("Please fill out the form to Update."), 71 | Expanded( 72 | child: TextField( 73 | autofocus: true, 74 | autocorrect: true, 75 | decoration: InputDecoration( 76 | labelText: "Your Name*" 77 | ), 78 | controller: nameInputController, 79 | 80 | )), 81 | 82 | Expanded( 83 | child: TextField( 84 | autofocus: true, 85 | autocorrect: true, 86 | decoration: InputDecoration( 87 | labelText: "Title*" 88 | ), 89 | controller: titleInputController, 90 | 91 | )), 92 | 93 | Expanded( 94 | child: TextField( 95 | autofocus: true, 96 | autocorrect: true, 97 | decoration: InputDecoration( 98 | labelText: "Description*", 99 | 100 | ), 101 | controller: descriptionInputController, 102 | 103 | )), 104 | 105 | 106 | ], 107 | ), 108 | actions: [ 109 | FlatButton(onPressed: () { 110 | nameInputController.clear(); 111 | titleInputController.clear(); 112 | descriptionInputController.clear(); 113 | 114 | Navigator.pop(context); 115 | } , 116 | child: Text("Cancel")), 117 | 118 | FlatButton(onPressed: () { 119 | if( titleInputController.text.isNotEmpty && 120 | nameInputController.text.isNotEmpty && 121 | descriptionInputController.text.isNotEmpty) { 122 | 123 | Firestore.instance.collection("board") 124 | .document(docId) 125 | .updateData({ 126 | "name" : nameInputController.text, 127 | "title" : titleInputController.text, 128 | "description" : descriptionInputController.text, 129 | "timestamp" : new DateTime.now() 130 | }).then((response) { 131 | Navigator.pop(context); 132 | }); 133 | 134 | // Firestore.instance.collection("board") 135 | // .add({ 136 | // "name" : nameInputController.text, 137 | // "title" : titleInputController.text, 138 | // "description" : descriptionInputController.text, 139 | // "timestamp" : new DateTime.now() 140 | // }).then((response) { 141 | // print(response.documentID); 142 | // Navigator.pop(context); 143 | // nameInputController.clear(); 144 | // titleInputController.clear(); 145 | // descriptionInputController.clear(); 146 | // 147 | // }).catchError((error) => print(error)); 148 | } 149 | }, 150 | child: Text("Update")) 151 | ], 152 | 153 | )); 154 | 155 | }), 156 | 157 | SizedBox(height: 19,), 158 | 159 | IconButton(icon: Icon(FontAwesomeIcons.trashAlt, size: 15,), 160 | onPressed: () async { 161 | var collectionReference = Firestore.instance.collection("board"); 162 | await collectionReference 163 | .document(docId) 164 | .delete(); 165 | 166 | 167 | 168 | }) 169 | ], 170 | ) 171 | 172 | //Text(snapshot.documents[index].data["title"]) 173 | ], 174 | ), 175 | ), 176 | ), 177 | 178 | 179 | ], 180 | 181 | 182 | ); 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /lib/flutter_maps/quakes_map_app/model/quake.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/flutter_maps/quakes_map_app/util/types_helper.dart'; 2 | 3 | class Quake { 4 | String type; 5 | Metadata metadata; 6 | List features; 7 | List bbox; 8 | 9 | Quake({this.type, this.metadata, this.features, this.bbox}); 10 | 11 | Quake.fromJson(Map json) { 12 | type = json['type']; 13 | metadata = json['metadata'] != null 14 | ? new Metadata.fromJson(json['metadata']) 15 | : null; 16 | if (json['features'] != null) { 17 | features = new List(); 18 | json['features'].forEach((v) { 19 | features.add(new Features.fromJson(v)); 20 | }); 21 | } 22 | bbox = json['bbox'].cast(); 23 | } 24 | 25 | Map toJson() { 26 | final Map data = new Map(); 27 | data['type'] = this.type; 28 | if (this.metadata != null) { 29 | data['metadata'] = this.metadata.toJson(); 30 | } 31 | if (this.features != null) { 32 | data['features'] = this.features.map((v) => v.toJson()).toList(); 33 | } 34 | data['bbox'] = this.bbox; 35 | return data; 36 | } 37 | } 38 | 39 | class Metadata { 40 | int generated; 41 | String url; 42 | String title; 43 | int status; 44 | String api; 45 | int count; 46 | 47 | Metadata( 48 | {this.generated, 49 | this.url, 50 | this.title, 51 | this.status, 52 | this.api, 53 | this.count}); 54 | 55 | Metadata.fromJson(Map json) { 56 | generated = json['generated']; 57 | url = json['url']; 58 | title = json['title']; 59 | status = json['status']; 60 | api = json['api']; 61 | count = json['count']; 62 | } 63 | 64 | Map toJson() { 65 | final Map data = new Map(); 66 | data['generated'] = this.generated; 67 | data['url'] = this.url; 68 | data['title'] = this.title; 69 | data['status'] = this.status; 70 | data['api'] = this.api; 71 | data['count'] = this.count; 72 | return data; 73 | } 74 | } 75 | 76 | class Features { 77 | String type; 78 | Properties properties; 79 | Geometry geometry; 80 | String id; 81 | 82 | Features({this.type, this.properties, this.geometry, this.id}); 83 | 84 | Features.fromJson(Map json) { 85 | type = json['type']; 86 | properties = json['properties'] != null 87 | ? new Properties.fromJson(json['properties']) 88 | : null; 89 | geometry = json['geometry'] != null 90 | ? new Geometry.fromJson(json['geometry']) 91 | : null; 92 | id = json['id']; 93 | } 94 | 95 | Map toJson() { 96 | final Map data = new Map(); 97 | data['type'] = this.type; 98 | if (this.properties != null) { 99 | data['properties'] = this.properties.toJson(); 100 | } 101 | if (this.geometry != null) { 102 | data['geometry'] = this.geometry.toJson(); 103 | } 104 | data['id'] = this.id; 105 | return data; 106 | } 107 | } 108 | 109 | class Properties { 110 | double mag; 111 | String place; 112 | int time; 113 | int updated; 114 | int tz; 115 | String url; 116 | String detail; 117 | int felt; 118 | double cdi; 119 | double mmi; 120 | String alert; 121 | String status; 122 | int tsunami; 123 | int sig; 124 | String net; 125 | String code; 126 | String ids; 127 | String sources; 128 | String types; 129 | int nst; 130 | double dmin; 131 | double rms; 132 | double gap; 133 | String magType; 134 | String type; 135 | String title; 136 | 137 | Properties( 138 | {this.mag, 139 | this.place, 140 | this.time, 141 | this.updated, 142 | this.tz, 143 | this.url, 144 | this.detail, 145 | this.felt, 146 | this.cdi, 147 | this.mmi, 148 | this.alert, 149 | this.status, 150 | this.tsunami, 151 | this.sig, 152 | this.net, 153 | this.code, 154 | this.ids, 155 | this.sources, 156 | this.types, 157 | this.nst, 158 | this.dmin, 159 | this.rms, 160 | this.gap, 161 | this.magType, 162 | this.type, 163 | this.title}); 164 | 165 | Properties.fromJson(Map json) { 166 | mag = TypesHelper.toDouble(json['mag']); //forcing the conversion to double 167 | place = json['place']; 168 | time = TypesHelper.toInt(json['time']); 169 | updated = TypesHelper.toInt(json['updated']); 170 | tz = TypesHelper.toInt(json['tz']); 171 | url = json['url']; 172 | detail = json['detail']; 173 | felt = TypesHelper.toInt(json['felt']); 174 | cdi = TypesHelper.toDouble(json['cdi']); 175 | mmi = TypesHelper.toDouble(json['mmi']); 176 | alert = json['alert']; 177 | status = json['status']; 178 | tsunami = TypesHelper.toInt(json['tsunami']); 179 | sig = TypesHelper.toInt(json['sig']); 180 | net = json['net']; 181 | code = json['code']; 182 | ids = json['ids']; 183 | sources = json['sources']; 184 | types = json['types']; 185 | nst = TypesHelper.toInt( json['nst']); 186 | dmin =TypesHelper.toDouble(json['dmin']); 187 | rms = TypesHelper.toDouble(json['rms']); 188 | gap = TypesHelper.toDouble( json['gap']); 189 | magType = json['magType']; 190 | type = json['type']; 191 | title = json['title']; 192 | } 193 | 194 | Map toJson() { 195 | final Map data = new Map(); 196 | data['mag'] = this.mag; 197 | data['place'] = this.place; 198 | data['time'] = this.time; 199 | data['updated'] = this.updated; 200 | data['tz'] = this.tz; 201 | data['url'] = this.url; 202 | data['detail'] = this.detail; 203 | data['felt'] = this.felt; 204 | data['cdi'] = this.cdi; 205 | data['mmi'] = this.mmi; 206 | data['alert'] = this.alert; 207 | data['status'] = this.status; 208 | data['tsunami'] = this.tsunami; 209 | data['sig'] = this.sig; 210 | data['net'] = this.net; 211 | data['code'] = this.code; 212 | data['ids'] = this.ids; 213 | data['sources'] = this.sources; 214 | data['types'] = this.types; 215 | data['nst'] = this.nst; 216 | data['dmin'] = this.dmin; 217 | data['rms'] = this.rms; 218 | data['gap'] = this.gap; 219 | data['magType'] = this.magType; 220 | data['type'] = this.type; 221 | data['title'] = this.title; 222 | return data; 223 | } 224 | } 225 | 226 | class Geometry { 227 | String type; 228 | List coordinates; 229 | 230 | Geometry({this.type, this.coordinates}); 231 | 232 | Geometry.fromJson(Map json) { 233 | type = json['type']; 234 | coordinates = json['coordinates'].cast(); 235 | } 236 | 237 | Map toJson() { 238 | final Map data = new Map(); 239 | data['type'] = this.type; 240 | data['coordinates'] = this.coordinates; 241 | return data; 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /lib/flutter_maps/quakes_map_app/network/network.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:first_flutter_app/flutter_maps/quakes_map_app/model/quake.dart'; 4 | import 'package:http/http.dart'; 5 | 6 | class Network { 7 | 8 | Future getAllQuakes() async { 9 | var apiUrl = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson"; 10 | 11 | final response = await get(Uri.encodeFull(apiUrl)); 12 | 13 | if (response.statusCode == 200) { 14 | print("Quake data: ${response.body}"); 15 | return Quake.fromJson(json.decode(response.body)); 16 | }else { 17 | throw Exception("Error getting quakes"); 18 | } 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /lib/flutter_maps/quakes_map_app/quakes_app.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 6 | 7 | import 'model/quake.dart'; 8 | import 'network/network.dart'; 9 | 10 | class QuakesApp extends StatefulWidget { 11 | @override 12 | _QuakesAppState createState() => _QuakesAppState(); 13 | } 14 | 15 | class _QuakesAppState extends State { 16 | Future _quakesData; 17 | Completer _controller = Completer(); 18 | List _markerList = []; 19 | double _zoomVal = 5.0; 20 | 21 | 22 | @override 23 | void initState() { 24 | // TODO: implement initState 25 | super.initState(); 26 | _quakesData = Network().getAllQuakes(); 27 | // _quakesData.then((values) => { 28 | // print("Place: ${values.features[0].properties.place}") 29 | // }); 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | body: Stack( 36 | children: [ 37 | _buildGoogleMap(context), 38 | _zoomMinus(), 39 | _zoomPlus() 40 | ], 41 | ), 42 | floatingActionButton: FloatingActionButton.extended( 43 | onPressed: () { 44 | findQuakes(); 45 | }, 46 | label: Text("Find Quakes")), 47 | ); 48 | } 49 | 50 | Widget _zoomPlus() { 51 | return Padding( 52 | padding: EdgeInsets.only(top: 38), 53 | child: Align( 54 | alignment: Alignment.topRight, 55 | child: IconButton(icon: Icon(FontAwesomeIcons.searchPlus, color: Colors.black87,), 56 | onPressed: () { 57 | _zoomVal++; 58 | _plus(_zoomVal); 59 | }), 60 | ), 61 | ); 62 | } 63 | Widget _zoomMinus() { 64 | return Padding( 65 | padding: const EdgeInsets.only(top: 38.0), 66 | child: Align( 67 | alignment: Alignment.topLeft, 68 | child: IconButton( 69 | onPressed: () { 70 | _zoomVal--; 71 | print(_zoomVal); 72 | _minus(_zoomVal); 73 | }, 74 | icon: Icon(FontAwesomeIcons.searchMinus, color: Colors.black87,), 75 | ), 76 | ), 77 | ); 78 | } 79 | Widget _buildGoogleMap(BuildContext context) { 80 | return Container( 81 | width: MediaQuery.of(context).size.width, 82 | height: MediaQuery.of(context).size.height, 83 | child: GoogleMap( 84 | mapType: MapType.normal, 85 | onMapCreated: (GoogleMapController controller) { 86 | _controller.complete(controller); 87 | }, 88 | initialCameraPosition: CameraPosition(target: LatLng(36.1083333, -117.8608333), zoom: 3), 89 | markers: Set.of(_markerList), 90 | 91 | ), 92 | ); 93 | 94 | 95 | } 96 | 97 | void findQuakes() { 98 | setState(() { 99 | _markerList.clear(); //clear the map in the beginning 100 | _handleResponse(); 101 | }); 102 | 103 | } 104 | 105 | void _handleResponse() { 106 | setState(() { 107 | _quakesData.then((quakes) => { 108 | 109 | quakes.features.forEach((quake) => { 110 | 111 | _markerList.add(Marker(markerId: MarkerId(quake.id), 112 | infoWindow: InfoWindow(title: quake.properties.mag.toString(), 113 | snippet: quake.properties.title), 114 | icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueMagenta), 115 | position: LatLng(quake.geometry.coordinates[1], quake.geometry.coordinates[0]), 116 | onTap: () {} 117 | )) 118 | 119 | }) 120 | }); 121 | }); 122 | } 123 | 124 | Future _minus(double zoomVal) async { 125 | final GoogleMapController controller = await _controller.future; 126 | controller.animateCamera(CameraUpdate.newCameraPosition( 127 | CameraPosition(target: LatLng(40.712776, -74.005974), zoom: zoomVal) 128 | )); 129 | } 130 | 131 | Future _plus(double zoomVal) async { 132 | final GoogleMapController controller = await _controller.future; 133 | controller.animateCamera(CameraUpdate.newCameraPosition( 134 | CameraPosition(target: LatLng(40.712776, -74.005974), zoom: zoomVal) 135 | )); 136 | } 137 | } 138 | 139 | -------------------------------------------------------------------------------- /lib/flutter_maps/quakes_map_app/util/types_helper.dart: -------------------------------------------------------------------------------- 1 | class TypesHelper { 2 | static int toInt(num val) { 3 | try { 4 | if (val == null) { 5 | return 0; 6 | } 7 | if ( val is int) { 8 | return val; 9 | }else { 10 | return val.toInt(); 11 | } 12 | 13 | }catch(error) { 14 | print(error); 15 | return 0; 16 | } 17 | } 18 | 19 | static double toDouble(num val) { 20 | try { 21 | if (num == null) { 22 | return 0; 23 | } 24 | if (val is double) { 25 | return val; 26 | }else { 27 | return val.toDouble(); 28 | } 29 | 30 | }catch(error) { 31 | return 0; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /lib/flutter_maps/simple_google_map/show_map.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 3 | 4 | class ShowSimpleMap extends StatefulWidget { 5 | @override 6 | _ShowSimpleMapState createState() => _ShowSimpleMapState(); 7 | } 8 | 9 | class _ShowSimpleMapState extends State { 10 | GoogleMapController mapController; 11 | static LatLng _center = const LatLng(45.521563, -122.677433); 12 | static LatLng _anotherLocation = const LatLng(45.509244, -122.633476); 13 | 14 | void _onMapCreated(GoogleMapController controller) { 15 | mapController = controller; 16 | } 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Scaffold( 21 | appBar: AppBar( 22 | title: Text("Maps"), 23 | ), 24 | body: GoogleMap( 25 | markers: { portlandMarker, portlandMarkerSecond }, 26 | mapType: MapType.terrain, 27 | onMapCreated: _onMapCreated, 28 | initialCameraPosition: CameraPosition(target: _center, zoom: 11.0)) , 29 | 30 | floatingActionButton: FloatingActionButton.extended(onPressed: _goToIntel, 31 | label: Text("Intel Coorp!"), 32 | icon: Icon(Icons.place),), 33 | 34 | ); 35 | } 36 | 37 | static final CameraPosition intelPosition = 38 | CameraPosition(target: LatLng(45.5418295,-122.9170456), 39 | bearing: 191.789, 40 | tilt: 34.89, 41 | zoom: 14.780); 42 | 43 | Future _goToIntel() async { 44 | final GoogleMapController controller = await mapController; 45 | controller.animateCamera(CameraUpdate.newCameraPosition(intelPosition)); 46 | 47 | } 48 | 49 | Marker portlandMarker = Marker(markerId: MarkerId("Portland"), 50 | position: _center, 51 | infoWindow: InfoWindow(title: "Portland", snippet: "This is a great town!"), 52 | icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueMagenta)); 53 | 54 | Marker portlandMarkerSecond = Marker(markerId: MarkerId("Portland"), 55 | position: _anotherLocation, 56 | infoWindow: InfoWindow(title: "Portland Area", snippet: "This is a great town!"), 57 | icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueMagenta)); 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/ui/home.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | //void main() => runApp(ScaffoldExample()); 5 | 6 | final ThemeData _appTheme = _buildAppTheme(); 7 | 8 | ThemeData _buildAppTheme() { 9 | final ThemeData base = ThemeData.dark(); 10 | 11 | return base.copyWith( 12 | brightness: Brightness.dark, 13 | accentColor: Colors.amber, 14 | primaryColor: Colors.grey[800], 15 | scaffoldBackgroundColor: Colors.red, 16 | backgroundColor: Colors.amber, 17 | textTheme: _appTextTheme(base.textTheme)); 18 | } 19 | 20 | TextTheme _appTextTheme(TextTheme base) { 21 | return base 22 | .copyWith( 23 | headline: base.headline.copyWith( 24 | fontWeight: FontWeight.w500, 25 | ), 26 | title: 27 | base.title.copyWith(fontSize: 18.0, fontStyle: FontStyle.italic), 28 | caption: base.caption 29 | .copyWith(fontWeight: FontWeight.w400, fontSize: 14.0), 30 | button: base.button.copyWith( 31 | //fontSize: 23.9, 32 | 33 | ), 34 | body1: base.body1.copyWith( 35 | fontSize: 16.9, 36 | fontFamily: "Lobster", 37 | color: Colors.white, 38 | )) 39 | .apply( 40 | fontFamily: "Lobster", 41 | displayColor: Colors.amber, 42 | //bodyColor: Colors.red 43 | ); 44 | } 45 | 46 | void main() => runApp(new MaterialApp( 47 | /* 48 | Uncomment theme ( bellow ) to see the effects of _appTheme across the entire app 49 | */ 50 | // theme: _appTheme, 51 | // theme: ThemeData( 52 | // brightness: Brightness.dark, 53 | // primaryColor: Colors.grey[800], 54 | // 55 | // textTheme: TextTheme( 56 | // headline: TextStyle( 57 | // fontSize: 34, 58 | // fontWeight: FontWeight.bold, 59 | // ), 60 | // body1: TextStyle( 61 | // fontSize: 16.9, 62 | // color: Colors.white 63 | // ) 64 | // 65 | // ) 66 | 67 | //), 68 | home: Wisdom(), 69 | 70 | 71 | )); 72 | -------------------------------------------------------------------------------- /lib/model/Post.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class PostList { 4 | final List posts; 5 | 6 | PostList({this.posts}); 7 | 8 | factory PostList.fromJson(List parsedJson) { 9 | List posts = new List(); 10 | posts = parsedJson.map((i) => Post.fromJson(i)).toList(); 11 | 12 | return new PostList(posts: posts); 13 | } 14 | 15 | 16 | } 17 | 18 | 19 | class Post { 20 | int userId; 21 | int id; 22 | String title; 23 | String body; 24 | 25 | Post({this.userId, this.id, this.title, this.body}); 26 | 27 | factory Post.fromJson(Map json) { 28 | 29 | return Post( 30 | userId: json['userId'], 31 | id: json['id'], 32 | title: json['title'], 33 | body: json['body'] 34 | ); 35 | 36 | 37 | } 38 | 39 | 40 | 41 | 42 | } -------------------------------------------------------------------------------- /lib/model/movie.dart: -------------------------------------------------------------------------------- 1 | class Movie { 2 | 3 | static List getMovies() => [ 4 | Movie("Avatar", "2009", "PG-13", "18 Dec 2009", "162 min", "Action, Adventure, Fantasy", 5 | "James Cameron", "James Cameron", "Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang", 6 | "A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.", 7 | "English, Spanish", 8 | "USA, UK", 9 | "Won 3 Oscars. Another 80 wins & 121 nominations.", 10 | "http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg", 11 | "83", 12 | "7.9", 13 | "890,617", 14 | "tt0499549", 15 | "movie", 16 | "True", [ 17 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjEyOTYyMzUxNl5BMl5BanBnXkFtZTcwNTg0MTUzNA@@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 18 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNzM2MDk3MTcyMV5BMl5BanBnXkFtZTcwNjg0MTUzNA@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 19 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTY2ODQ3NjMyMl5BMl5BanBnXkFtZTcwODg0MTUzNA@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 20 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTMxOTEwNDcxN15BMl5BanBnXkFtZTcwOTg0MTUzNA@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 21 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTYxMDg1Nzk1MV5BMl5BanBnXkFtZTcwMDk0MTUzNA@@._V1_SX1500_CR0,0,1500,999_AL_.jpg" 22 | ]), 23 | 24 | Movie( "I Am Legend", 25 | "2007", 26 | "PG-13", 27 | "14 Dec 2007", 28 | "101 min", 29 | "Drama, Horror, Sci-Fi", 30 | "Francis Lawrence", 31 | "Mark Protosevich (screenplay), Akiva Goldsman (screenplay), Richard Matheson (novel), John William Corrington, Joyce Hooper Corrington", 32 | "Will Smith, Alice Braga, Charlie Tahan, Salli Richardson-Whitfield", 33 | "Years after a plague kills most of humanity and transforms the rest into monsters, the sole survivor in New York City struggles valiantly to find a cure.", 34 | "English", 35 | "USA", 36 | "9 wins & 21 nominations.", 37 | "http://ia.media-imdb.com/images/M/MV5BMTU4NzMyNDk1OV5BMl5BanBnXkFtZTcwOTEwMzU1MQ@@._V1_SX300.jpg", 38 | "65", 39 | "7.2", 40 | "533,874", 41 | "tt0480249", 42 | "movie", 43 | "True", 44 | [ 45 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTI0NTI4NjE3NV5BMl5BanBnXkFtZTYwMDA0Nzc4._V1_.jpg", 46 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTIwMDg2MDU4M15BMl5BanBnXkFtZTYwMTA0Nzc4._V1_.jpg", 47 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTc5MDM1OTU5OV5BMl5BanBnXkFtZTYwMjA0Nzc4._V1_.jpg", 48 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTA0MTI2NjMzMzFeQTJeQWpwZ15BbWU2MDMwNDc3OA@@._V1_.jpg" 49 | ]), 50 | 51 | Movie( "300", 52 | "2006", 53 | "R", 54 | "09 Mar 2007", 55 | "117 min", 56 | "Action, Drama, Fantasy", 57 | "Zack Snyder", 58 | "Zack Snyder (screenplay), Kurt Johnstad (screenplay), Michael Gordon (screenplay), Frank Miller (graphic novel), Lynn Varley (graphic novel)", 59 | "Gerard Butler, Lena Headey, Dominic West, David Wenham", 60 | "King Leonidas of Sparta and a force of 300 men fight the Persians at Thermopylae in 480 B.C.", 61 | "English", 62 | "USA", 63 | "16 wins & 42 nominations.", 64 | "http://ia.media-imdb.com/images/M/MV5BMjAzNTkzNjcxNl5BMl5BanBnXkFtZTYwNDA4NjE3._V1_SX300.jpg", 65 | "52", 66 | "7.7", 67 | "611,046", 68 | "tt0416449", 69 | "movie", 70 | "True", [ 71 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTMwNTg5MzMwMV5BMl5BanBnXkFtZTcwMzA2NTIyMw@@._V1_SX1777_CR0,0,1777,937_AL_.jpg", 72 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTQwNTgyNTMzNF5BMl5BanBnXkFtZTcwNDA2NTIyMw@@._V1_SX1777_CR0,0,1777,935_AL_.jpg", 73 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTc0MjQzOTEwMV5BMl5BanBnXkFtZTcwMzE2NTIyMw@@._V1_SX1777_CR0,0,1777,947_AL_.jpg" 74 | ]), 75 | 76 | 77 | Movie("The Avengers", 78 | "2012", 79 | "PG-13", 80 | "04 May 2012", 81 | "143 min", 82 | "Action, Sci-Fi, Thriller", 83 | "Joss Whedon", 84 | "Joss Whedon (screenplay), Zak Penn (story), Joss Whedon (story)", 85 | "Robert Downey Jr., Chris Evans, Mark Ruffalo, Chris Hemsworth", 86 | "Earth's mightiest heroes must come together and learn to fight as a team if they are to stop the mischievous Loki and his alien army from enslaving humanity.", 87 | "English, Russian", 88 | "USA", 89 | "Nominated for 1 Oscar. Another 34 wins & 75 nominations.", 90 | "http://ia.media-imdb.com/images/M/MV5BMTk2NTI1MTU4N15BMl5BanBnXkFtZTcwODg0OTY0Nw@@._V1_SX300.jpg", 91 | "69", 92 | "8.1", 93 | "1,003,301", 94 | "tt0848228", 95 | "movie", 96 | "True", 97 | [ 98 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTA0NjY0NzE4OTReQTJeQWpwZ15BbWU3MDczODg2Nzc@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 99 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjE1MzEzMjcyM15BMl5BanBnXkFtZTcwNDM4ODY3Nw@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 100 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjMwMzM2MTg1M15BMl5BanBnXkFtZTcwNjM4ODY3Nw@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 101 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ4NzM2Mjc5MV5BMl5BanBnXkFtZTcwMTkwOTY3Nw@@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 102 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTc3MzQ3NjA5N15BMl5BanBnXkFtZTcwMzY5OTY3Nw@@._V1_SX1777_CR0,0,1777,999_AL_.jpg" 103 | ]), 104 | 105 | Movie( "The Wolf of Wall Street", 106 | "2013", 107 | "R", 108 | "25 Dec 2013", 109 | "180 min", 110 | "Biography, Comedy, Crime", 111 | "Martin Scorsese", 112 | "Terence Winter (screenplay), Jordan Belfort (book)", 113 | "Leonardo DiCaprio, Jonah Hill, Margot Robbie, Matthew McConaughey", 114 | "Based on the true story of Jordan Belfort, from his rise to a wealthy stock-broker living the high life to his fall involving crime, corruption and the federal government.", 115 | "English, French", 116 | "USA", 117 | "Nominated for 5 Oscars. Another 35 wins & 154 nominations.", 118 | "http://ia.media-imdb.com/images/M/MV5BMjIxMjgxNTk0MF5BMl5BanBnXkFtZTgwNjIyOTg2MDE@._V1_SX300.jpg", 119 | "75", 120 | "8.2", 121 | "786,985", 122 | "tt0993846", 123 | "movie", 124 | "True", [ 125 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNDIwMDIxNzk3Ml5BMl5BanBnXkFtZTgwMTg0MzQ4MDE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 126 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTc0NzAxODAyMl5BMl5BanBnXkFtZTgwMDg0MzQ4MDE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 127 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTExMDk1MDE4NzVeQTJeQWpwZ15BbWU4MDM4NDM0ODAx._V1_SX1500_CR0,0,1500,999_AL_.jpg", 128 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTg3MTY4NDk4Nl5BMl5BanBnXkFtZTgwNjc0MzQ4MDE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 129 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTgzMTg4MDI0Ml5BMl5BanBnXkFtZTgwOTY0MzQ4MDE@._V1_SY1000_CR0,0,1553,1000_AL_.jpg" 130 | ]), 131 | 132 | Movie( "Interstellar", 133 | "2014", 134 | "PG-13", 135 | "07 Nov 2014", 136 | "169 min", 137 | "Adventure, Drama, Sci-Fi", 138 | "Christopher Nolan", 139 | "Jonathan Nolan, Christopher Nolan", 140 | "Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow", 141 | "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", 142 | "English", 143 | "USA, UK", 144 | "Won 1 Oscar. Another 39 wins & 134 nominations.", 145 | "http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg", 146 | "74", 147 | "8.6", 148 | "937,412", 149 | "tt0816692", 150 | "movie", 151 | "True", 152 | [ 153 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjA3NTEwOTMxMV5BMl5BanBnXkFtZTgwMjMyODgxMzE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 154 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMzQ5ODE2MzEwM15BMl5BanBnXkFtZTgwMTMyODgxMzE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 155 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTg4Njk4MzY0Nl5BMl5BanBnXkFtZTgwMzIyODgxMzE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 156 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMzE3MTM0MTc3Ml5BMl5BanBnXkFtZTgwMDIyODgxMzE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 157 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNjYzNjE2NDk3N15BMl5BanBnXkFtZTgwNzEyODgxMzE@._V1_SX1500_CR0,0,1500,999_AL_.jpg" 158 | ]), 159 | Movie("Game of Thrones", 160 | "2011–", 161 | "TV-MA", 162 | "17 Apr 2011", 163 | "56 min", 164 | "Adventure, Drama, Fantasy", 165 | "N/A", 166 | "David Benioff, D.B. Weiss", 167 | "Peter Dinklage, Lena Headey, Emilia Clarke, Kit Harington", 168 | "While a civil war brews between several noble families in Westeros, the children of the former rulers of the land attempt to rise up to power. Meanwhile a forgotten race, bent on destruction, plans to return after thousands of years in the North.", 169 | "English", 170 | "USA, UK", 171 | "Won 1 Golden Globe. Another 185 wins & 334 nominations.", 172 | "http://ia.media-imdb.com/images/M/MV5BMjM5OTQ1MTY5Nl5BMl5BanBnXkFtZTgwMjM3NzMxODE@._V1_SX300.jpg", 173 | "N/A", 174 | "9.5", 175 | "1,046,830", 176 | "tt0944947", 177 | "series", 178 | // "7", totalSeasons - no need for now! 179 | "True", 180 | [ 181 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNDc1MGUyNzItNWRkOC00MjM1LWJjNjMtZTZlYWIxMGRmYzVlXkEyXkFqcGdeQXVyMzU3MDEyNjk@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 182 | "https://images-na.ssl-images-amazon.com/images/M/MV5BZjZkN2M5ODgtMjQ2OC00ZjAxLWE1MjMtZDE0OTNmNGM0NWEwXkEyXkFqcGdeQXVyNjUxNzgwNTE@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 183 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMDk4Y2Y1MDAtNGVmMC00ZTlhLTlmMmQtYjcyN2VkNzUzZjg2XkEyXkFqcGdeQXVyNjUxNzgwNTE@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 184 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNjZjNWIzMzQtZWZjYy00ZTkwLWJiMTYtOWRkZDBhNWJhY2JmXkEyXkFqcGdeQXVyMjk3NTUyOTc@._V1_SX1777_CR0,0,1777,999_AL_.jpg", 185 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNTMyMTRjZWEtM2UxMS00ZjU5LWIxMTYtZDA5YmJhZmRjYTc4XkEyXkFqcGdeQXVyMjk3NTUyOTc@._V1_SX1777_CR0,0,1777,999_AL_.jpg" 186 | ]), 187 | 188 | Movie( 189 | "Vikings", 190 | "2013–", 191 | "TV-14", 192 | "03 Mar 2013", 193 | "44 min", 194 | "Action, Drama, History", 195 | "N/A", 196 | "Michael Hirst", 197 | "Travis Fimmel, Clive Standen, Gustaf Skarsgård, Katheryn Winnick", 198 | "The world of the Vikings is brought to life through the journey of Ragnar Lothbrok, the first Viking to emerge from Norse legend and onto the pages of history - a man on the edge of myth.", 199 | "English, Old English, Norse, Old, Latin", 200 | "Ireland, Canada", 201 | "Nominated for 7 Primetime Emmys. Another 17 wins & 49 nominations.", 202 | "http://ia.media-imdb.com/images/M/MV5BOTEzNzI3MDc0N15BMl5BanBnXkFtZTgwMzk1MzA5NzE@._V1_SX300.jpg", 203 | "N/A", 204 | "8.6", 205 | "198,041", 206 | "tt2306299", 207 | "series", 208 | // "totalSeasons": "5", 209 | "True", 210 | [ 211 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjM5MTM1ODUxNV5BMl5BanBnXkFtZTgwNTAzOTI2ODE@._V1_.jpg", 212 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNzU2NDcxODMyOF5BMl5BanBnXkFtZTgwNDAzOTI2ODE@._V1_.jpg", 213 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjMzMzIzOTU2M15BMl5BanBnXkFtZTgwODMzMTkyODE@._V1_SY1000_SX1500_AL_.jpg", 214 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ2NTQ2MDA3NF5BMl5BanBnXkFtZTgwODkxMDUxODE@._V1_SY1000_SX1500_AL_.jpg", 215 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTcxOTQ3NTA5N15BMl5BanBnXkFtZTgwMzExMDUxODE@._V1_SY1000_SX1500_AL_.jpg" 216 | ]), 217 | 218 | 219 | Movie( 220 | "Gotham", 221 | "2014–", 222 | "TV-14", 223 | "01 Aug 2014", 224 | "42 min", 225 | "Action, Crime, Drama", 226 | "N/A", 227 | "Bruno Heller", 228 | "Ben McKenzie, Donal Logue, David Mazouz, Sean Pertwee", 229 | "The story behind Detective James Gordon's rise to prominence in Gotham City in the years before Batman's arrival.", 230 | "English", 231 | "USA", 232 | "Nominated for 4 Primetime Emmys. Another 3 wins & 22 nominations.", 233 | "http://ia.media-imdb.com/images/M/MV5BMTY2MjMwNDE4OV5BMl5BanBnXkFtZTgwNjI1NjU0OTE@._V1_SX300.jpg", 234 | "N/A", 235 | "8.0", 236 | "133,375", 237 | "tt3749900", 238 | "series", 239 | // "totalSeasons": "3", 240 | "True", 241 | [ 242 | "https://images-na.ssl-images-amazon.com/images/M/MV5BNDI3ODYyODY4OV5BMl5BanBnXkFtZTgwNjE5NDMwMDI@._V1_SY1000_SX1500_AL_.jpg", 243 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjA5OTExMTIwNF5BMl5BanBnXkFtZTgwMjI5NDMwMDI@._V1_SY1000_SX1500_AL_.jpg", 244 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTA3MDY2NjA3MzBeQTJeQWpwZ15BbWU4MDU0MDkzODgx._V1_SX1499_CR0,0,1499,999_AL_.jpg", 245 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjM3MzYzNDgzOV5BMl5BanBnXkFtZTgwMjQwOTM4ODE@._V1_SY1000_CR0,0,1498,1000_AL_.jpg", 246 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjQwODAyNjk0NF5BMl5BanBnXkFtZTgwODU4MzMyODE@._V1_SY1000_CR0,0,1500,1000_AL_.jpg" 247 | ]), 248 | 249 | 250 | Movie( 251 | "Power", 252 | "2014–", 253 | "TV-MA", 254 | "N/A", 255 | "50 min", 256 | "Crime, Drama", 257 | "N/A", 258 | "Courtney Kemp Agboh", 259 | "Omari Hardwick, Joseph Sikora, Andy Bean, Lela Loren", 260 | "James \"Ghost\" St. Patrick, a wealthy New York night club owner who has it all, catering for the city's elite and dreaming big, lives a double life as a drug kingpin.", 261 | "English", 262 | "USA", 263 | "1 win & 6 nominations.", 264 | "http://ia.media-imdb.com/images/M/MV5BOTA4NTkzMjUzOF5BMl5BanBnXkFtZTgwNzg5ODkxOTE@._V1_SX300.jpg", 265 | "N/A", 266 | "8.0", 267 | "14,770", 268 | "tt3281796", 269 | "series", 270 | // "totalSeasons": "3", 271 | "True", 272 | [ 273 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTc2ODg0MzMzM15BMl5BanBnXkFtZTgwODYxODA5NTE@._V1_SY1000_SX1500_AL_.jpg", 274 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTcyMjA0MzczNV5BMl5BanBnXkFtZTgwNTIyODA5NTE@._V1_SY1000_SX1500_AL_.jpg", 275 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTk0MTI0NzQ2NV5BMl5BanBnXkFtZTgwMDkxODA5NTE@._V1_SY1000_SX1500_AL_.jpg", 276 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ4Mzk1ODcxM15BMl5BanBnXkFtZTgwNDQyODA5NTE@._V1_SY1000_SX1500_AL_.jpg", 277 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTUwNTE0NDI1M15BMl5BanBnXkFtZTgwMDQyODA5NTE@._V1_SY1000_SX1500_AL_.jpg" 278 | ]), 279 | Movie( 280 | "Narcos", 281 | "2015–", 282 | "TV-MA", 283 | "28 Aug 2015", 284 | "49 min", 285 | "Biography, Crime, Drama", 286 | "N/A", 287 | "Carlo Bernard, Chris Brancato, Doug Miro, Paul Eckstein", 288 | "Wagner Moura, Boyd Holbrook, Pedro Pascal, Joanna Christie", 289 | "A chronicled look at the criminal exploits of Colombian drug lord Pablo Escobar.", 290 | "English, Spanish", 291 | "USA", 292 | "Nominated for 2 Golden Globes. Another 4 nominations.", 293 | "http://ia.media-imdb.com/images/M/MV5BMTU0ODQ4NDg2OF5BMl5BanBnXkFtZTgwNzczNTE4OTE@._V1_SX300.jpg", 294 | "N/A", 295 | "8.9", 296 | "118,680", 297 | "tt2707408", 298 | // "series", 299 | "2", 300 | "True", 301 | [ 302 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTk2MDMzMTc0MF5BMl5BanBnXkFtZTgwMTAyMzA1OTE@._V1_SX1500_CR0,0,1500,999_AL_.jpg", 303 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjIxMDkyOTEyNV5BMl5BanBnXkFtZTgwNjY3Mjc3OTE@._V1_SY1000_SX1500_AL_.jpg", 304 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjA2NDUwMTU2NV5BMl5BanBnXkFtZTgwNTI1Mzc3OTE@._V1_SY1000_CR0,0,1499,1000_AL_.jpg", 305 | "https://images-na.ssl-images-amazon.com/images/M/MV5BODA1NjAyMTQ3Ml5BMl5BanBnXkFtZTgwNjI1Mzc3OTE@._V1_SY1000_CR0,0,1499,1000_AL_.jpg", 306 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTU0NzQ0OTAwNl5BMl5BanBnXkFtZTgwMDAyMzA1OTE@._V1_SX1500_CR0,0,1500,999_AL_.jpg" 307 | ]), 308 | 309 | 310 | Movie( 311 | "Breaking Bad", 312 | "2008–2013", 313 | "TV-14", 314 | "20 Jan 2008", 315 | "49 min", 316 | "Crime, Drama, Thriller", 317 | "N/A", 318 | "Vince Gilligan", 319 | "Bryan Cranston, Anna Gunn, Aaron Paul, Dean Norris", 320 | "A high school chemistry teacher diagnosed with inoperable lung cancer turns to manufacturing and selling methamphetamine in order to secure his family's financial future.", 321 | "English, Spanish", 322 | "USA", 323 | "Won 2 Golden Globes. Another 132 wins & 218 nominations.", 324 | "http://ia.media-imdb.com/images/M/MV5BMTQ0ODYzODc0OV5BMl5BanBnXkFtZTgwMDk3OTcyMDE@._V1_SX300.jpg", 325 | "N/A", 326 | "9.5", 327 | "889,883", 328 | "tt0903747", 329 | "series", 330 | // "totalSeasons": "5", 331 | "True", 332 | [ 333 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTgyMzI5NDc5Nl5BMl5BanBnXkFtZTgwMjM0MTI2MDE@._V1_SY1000_CR0,0,1498,1000_AL_.jpg", 334 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ2NDkwNDk5NV5BMl5BanBnXkFtZTgwNDM0MTI2MDE@._V1_SY1000_CR0,0,1495,1000_AL_.jpg", 335 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTM4NDcyNDMzMF5BMl5BanBnXkFtZTgwOTI0MTI2MDE@._V1_SY1000_CR0,0,1495,1000_AL_.jpg", 336 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMTAzMTczMjM3NjFeQTJeQWpwZ15BbWU4MDc1MTI1MzAx._V1_SY1000_CR0,0,1495,1000_AL_.jpg", 337 | "https://images-na.ssl-images-amazon.com/images/M/MV5BMjA5MTE3MTgwMF5BMl5BanBnXkFtZTgwOTQxMjUzMDE@._V1_SX1500_CR0,0,1500,999_AL_.jpg" 338 | ]), 339 | 340 | ]; 341 | 342 | 343 | 344 | String title; 345 | String year; 346 | String rated; 347 | String released; 348 | String runtime; 349 | String genre; 350 | String director; 351 | String writer; 352 | String actors; 353 | String plot; 354 | String language; 355 | String country; 356 | String awards; 357 | String poster; 358 | String metascore; 359 | String imdbRating; 360 | String imdbVotes; 361 | String imdbID; 362 | String type; 363 | String response; 364 | List images; 365 | 366 | Movie(this.title, this.year, this.rated, this.released, this.runtime, 367 | this.genre, this.director, this.writer, this.actors, this.plot, 368 | this.language, this.country, this.awards, this.poster, this.metascore, 369 | this.imdbRating, this.imdbVotes, this.imdbID, this.type, this.response, 370 | this.images); 371 | } -------------------------------------------------------------------------------- /lib/model/question.dart: -------------------------------------------------------------------------------- 1 | class Question { 2 | String questionText; 3 | bool isCorrect; 4 | 5 | Question.name(this.questionText, this.isCorrect); 6 | 7 | } -------------------------------------------------------------------------------- /lib/parsing_json/json_parsing.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:http/http.dart'; 5 | 6 | class JsonParsingSimple extends StatefulWidget { 7 | @override 8 | _JsonParsingSimpleState createState() => _JsonParsingSimpleState(); 9 | } 10 | 11 | class _JsonParsingSimpleState extends State { 12 | Future data; 13 | 14 | @override 15 | void initState() { 16 | // TODO: implement initState 17 | super.initState(); 18 | data = getData(); 19 | 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | appBar: AppBar( 26 | title: Text("Parsing Json"), 27 | ), 28 | 29 | body: Center( 30 | child: Container( 31 | child: FutureBuilder( 32 | future: getData(), 33 | builder: (context, AsyncSnapshot snapshot) { 34 | if (snapshot.hasData) { 35 | return createListView(snapshot.data, context); 36 | //return Text(snapshot.data[0]['userId'].toString()); 37 | } 38 | return CircularProgressIndicator(); 39 | 40 | }), 41 | ), 42 | ), 43 | 44 | ); 45 | } 46 | 47 | Future getData() async { 48 | Future data; 49 | 50 | 51 | String url = "https://jsonplaceholder.typicode.com/posts"; 52 | Network network = Network(url); 53 | 54 | data = network.fetchData(); 55 | // data.then((value) { 56 | // print(value[0]['title']); 57 | // }); 58 | 59 | 60 | return data; 61 | } 62 | 63 | Widget createListView(List data, BuildContext context) { 64 | return Container( 65 | child: ListView.builder( 66 | itemCount: data.length, 67 | itemBuilder: (context, int index) { 68 | return Column( 69 | mainAxisAlignment: MainAxisAlignment.center, 70 | children: [ 71 | Divider(height: 5.0,), 72 | ListTile( 73 | title: Text("${data[index]["title"]}"), 74 | subtitle: Text("${data[index]["body"]}"), 75 | leading: Column( 76 | children: [ 77 | CircleAvatar( 78 | backgroundColor: Colors.black26, 79 | radius: 23, 80 | child: Text("${data[index]["id"]}"), 81 | ) 82 | ], 83 | ), 84 | ) 85 | 86 | ], 87 | ); 88 | }), 89 | ); 90 | 91 | } 92 | } 93 | 94 | class Network { 95 | final String url; 96 | 97 | Network(this.url); 98 | 99 | Future fetchData() async { 100 | print("$url"); 101 | Response response = await get(Uri.encodeFull(url)); 102 | 103 | if (response.statusCode == 200) { 104 | //Ok 105 | // print(response.body[0]); 106 | return json.decode(response.body); 107 | }else { 108 | print(response.statusCode); 109 | } 110 | 111 | 112 | 113 | 114 | } 115 | 116 | 117 | } 118 | 119 | -------------------------------------------------------------------------------- /lib/parsing_json/json_parsing_map.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:first_flutter_app/model/Post.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart'; 6 | 7 | class JsonParsingMap extends StatefulWidget { 8 | @override 9 | _JsonParsingMapState createState() => _JsonParsingMapState(); 10 | } 11 | 12 | class _JsonParsingMapState extends State { 13 | Future data; 14 | 15 | @override 16 | void initState() { 17 | // TODO: implement initState 18 | super.initState(); 19 | Network network = Network("https://jsonplaceholder.typicode.com/posts"); 20 | data = network.loadPosts(); 21 | } 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | appBar: AppBar( 26 | title: Text("PODO"), 27 | ), 28 | body: Center( 29 | child: Container( 30 | child: FutureBuilder( 31 | future: data, 32 | builder: (context, AsyncSnapshot snapshot) { 33 | List allPosts; 34 | if ( snapshot.hasData) { 35 | allPosts = snapshot.data.posts; 36 | 37 | return createListView(allPosts, context); 38 | 39 | }else { 40 | return CircularProgressIndicator(); 41 | } 42 | }), 43 | ), 44 | ), 45 | ); 46 | } 47 | 48 | Widget createListView(List data, BuildContext context) { 49 | return Container( 50 | child: ListView.builder( 51 | itemCount: data.length, 52 | itemBuilder: (context, int index) { 53 | return Column( 54 | children: [ 55 | Divider(height: 5.0,), 56 | ListTile( 57 | title: Text("${data[index].title}"), 58 | subtitle: Text("${data[index].body}"), 59 | leading: Column( 60 | children: [ 61 | CircleAvatar( 62 | backgroundColor: Colors.amber, 63 | radius: 23, 64 | child: Text('${data[index].id}'), 65 | ) 66 | ], 67 | ), 68 | ) 69 | ], 70 | ); 71 | 72 | }), 73 | ); 74 | } 75 | } 76 | 77 | class Network { 78 | final String url; 79 | 80 | Network(this.url); 81 | 82 | Future loadPosts() async { 83 | final response = await get(Uri.encodeFull(url)); 84 | 85 | if (response.statusCode == 200) { 86 | //OK 87 | return PostList.fromJson(json.decode(response.body)); 88 | }else { 89 | throw Exception("Failed to get posts"); 90 | } 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /lib/ui/movie_ui/movie_ui.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/model/movie.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MovieDetailsThumbnail extends StatelessWidget { 5 | final String thumbnail; 6 | 7 | const MovieDetailsThumbnail({Key key, this.thumbnail}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Stack( 12 | alignment: Alignment.bottomCenter, 13 | children: [ 14 | Stack( 15 | alignment: Alignment.center, 16 | children: [ 17 | Container( 18 | width: MediaQuery.of(context).size.width, 19 | height: 170, 20 | decoration: BoxDecoration( 21 | image: DecorationImage( 22 | image: NetworkImage(thumbnail), 23 | fit: BoxFit.cover) 24 | ), 25 | ), 26 | Icon(Icons.play_circle_outline, size: 100, 27 | color: Colors.white,) 28 | ], 29 | ), 30 | Container( 31 | decoration: BoxDecoration( 32 | gradient: LinearGradient(colors: [Color(0x00f5f5f5), Color(0xfff5f5f5)], 33 | begin: Alignment.topCenter, 34 | end: Alignment.bottomCenter) 35 | ), 36 | height: 80, 37 | ) 38 | 39 | 40 | ], 41 | ); 42 | } 43 | } 44 | class MovieDetailsHeaderWithPoster extends StatelessWidget { 45 | final Movie movie; 46 | 47 | const MovieDetailsHeaderWithPoster({Key key, this.movie}) : super(key: key); 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return Padding( 52 | padding: const EdgeInsets.symmetric(horizontal: 16), 53 | child: Row( 54 | children: [ 55 | MoviePoster(poster: movie.images[0].toString()), 56 | SizedBox(width: 16,), 57 | Expanded( 58 | child: MovieDetailsHeader(movie: movie)) 59 | 60 | ], 61 | 62 | ), 63 | ); 64 | } 65 | } 66 | 67 | 68 | 69 | class MoviePoster extends StatelessWidget { 70 | final String poster; 71 | 72 | const MoviePoster({Key key, this.poster}) : super(key: key); 73 | @override 74 | Widget build(BuildContext context) { 75 | var borderRadius = BorderRadius.all(Radius.circular(10)); 76 | return Card( 77 | 78 | child: ClipRRect( 79 | borderRadius: borderRadius, 80 | child: Container( 81 | width: MediaQuery.of(context).size.width / 4, 82 | height: 160, 83 | decoration: BoxDecoration( 84 | image: DecorationImage(image: NetworkImage(poster), 85 | fit: BoxFit.cover) 86 | ), 87 | ), 88 | ), 89 | ); 90 | } 91 | } 92 | 93 | class MovieDetailsHeader extends StatelessWidget { 94 | final Movie movie; 95 | 96 | const MovieDetailsHeader({Key key, this.movie}) : super(key: key); 97 | @override 98 | Widget build(BuildContext context) { 99 | return Column( 100 | crossAxisAlignment: CrossAxisAlignment.start, 101 | children: [ 102 | Text("${movie.year} . ${movie.genre}".toUpperCase(), 103 | style: TextStyle( 104 | fontWeight: FontWeight.w400, 105 | color: Colors.cyan 106 | ),), 107 | Text(movie.title, style: TextStyle( 108 | fontWeight: FontWeight.w500, 109 | fontSize: 32 110 | ),), 111 | Text.rich(TextSpan(style: TextStyle( 112 | fontSize: 13, fontWeight: FontWeight.w300, 113 | ), children: [ 114 | TextSpan( 115 | text: movie.plot 116 | ), 117 | TextSpan( 118 | text: "More...", 119 | style: TextStyle( 120 | color: Colors.indigoAccent 121 | ) 122 | ) 123 | ])) 124 | ], 125 | ); 126 | } 127 | } 128 | 129 | class MovieDetailsCast extends StatelessWidget { 130 | final Movie movie; 131 | 132 | const MovieDetailsCast({Key key, this.movie}) : super(key: key); 133 | 134 | @override 135 | Widget build(BuildContext context) { 136 | return Padding( 137 | padding: const EdgeInsets.symmetric(horizontal: 16.0), 138 | child: Column( 139 | children: [ 140 | MovieField(field: "Cast", value: movie.actors), 141 | MovieField(field: "Directors", value: movie.director), 142 | MovieField(field: "Awards" , value: movie.awards) 143 | 144 | ], 145 | ), 146 | ); 147 | } 148 | } 149 | 150 | class MovieField extends StatelessWidget { 151 | final String field; 152 | final String value; 153 | 154 | const MovieField({Key key, this.field, this.value}) : super(key: key); 155 | @override 156 | Widget build(BuildContext context) { 157 | return Row( 158 | crossAxisAlignment: CrossAxisAlignment.start, 159 | children: [ 160 | Text("$field : ", style: TextStyle( 161 | color: Colors.black38, 162 | fontSize: 12, fontWeight: FontWeight.w300 163 | ),), 164 | Expanded( 165 | child: Text(value, style: TextStyle( 166 | color: Colors.black, fontSize: 12, fontWeight: FontWeight.w300 167 | ),), 168 | ) 169 | ], 170 | ); 171 | } 172 | } 173 | 174 | class HorizontalLine extends StatelessWidget { 175 | @override 176 | Widget build(BuildContext context) { 177 | return Padding( 178 | padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0), 179 | child: Container( 180 | height: 0.5, 181 | color: Colors.grey, 182 | ), 183 | ); 184 | } 185 | } 186 | 187 | class MovieDetailsExtraPosters extends StatelessWidget { 188 | final List posters; 189 | 190 | const MovieDetailsExtraPosters({Key key, this.posters}) : super(key: key); 191 | 192 | @override 193 | Widget build(BuildContext context) { 194 | return Column( 195 | crossAxisAlignment: CrossAxisAlignment.start, 196 | children: [ 197 | Padding( 198 | padding: const EdgeInsets.only(left:8.0), 199 | child: Text("More Movie Posters".toUpperCase(), 200 | style: TextStyle( 201 | fontSize: 14, 202 | color: Colors.black26 203 | ),), 204 | ), 205 | Container( 206 | height: 170, 207 | padding: EdgeInsets.symmetric(vertical: 16), 208 | child: ListView.separated( 209 | scrollDirection: Axis.horizontal, 210 | separatorBuilder: (context, index) => SizedBox(width: 8,), 211 | itemCount: posters.length, 212 | itemBuilder: (context, index) => ClipRRect( 213 | borderRadius: BorderRadius.all(Radius.circular(10)), 214 | child: Container( 215 | width: MediaQuery.of(context).size.width / 4, 216 | height: 160, 217 | decoration: BoxDecoration( 218 | image: DecorationImage(image: NetworkImage(posters[index]), 219 | fit: BoxFit.cover) 220 | ), 221 | 222 | ), 223 | 224 | ) ), 225 | ) 226 | 227 | ], 228 | ); 229 | } 230 | } 231 | 232 | -------------------------------------------------------------------------------- /lib/util/hexcolor.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HexColor extends Color { 4 | static int _getColorFromHex(String hexColor) { 5 | hexColor = hexColor.toUpperCase().replaceAll("#", ""); 6 | if (hexColor.length == 6) { 7 | hexColor = "FF" + hexColor; 8 | } 9 | return int.parse(hexColor, radix: 16); 10 | } 11 | 12 | HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); 13 | } 14 | //How to use: 15 | /* 16 | 17 | Color color1 = HexColor("b74093"); 18 | Color color2 = HexColor("#b74093"); 19 | Color color3 = HexColor("#88b74093"); // if you wish to use ARGB format 20 | */ 21 | -------------------------------------------------------------------------------- /lib/weather_forecast/model/weather_forecast_model.dart: -------------------------------------------------------------------------------- 1 | class WeatherForecastModel { 2 | City city; 3 | String cod; 4 | double message; 5 | int cnt; 6 | List list; 7 | 8 | WeatherForecastModel( 9 | {this.city, this.cod, this.message, this.cnt, this.list}); 10 | 11 | WeatherForecastModel.fromJson(Map json) { 12 | city = json['city'] != null ? new City.fromJson(json['city']) : null; 13 | cod = json['cod']; 14 | message = json['message']; 15 | cnt = json['cnt']; 16 | if (json['list'] != null) { 17 | list = new List(); 18 | json['list'].forEach((v) { 19 | list.add(new Lista.fromJson(v)); 20 | }); 21 | } 22 | } 23 | 24 | Map toJson() { 25 | final Map data = new Map(); 26 | if (this.city != null) { 27 | data['city'] = this.city.toJson(); 28 | } 29 | data['cod'] = this.cod; 30 | data['message'] = this.message; 31 | data['cnt'] = this.cnt; 32 | if (this.list != null) { 33 | data['list'] = this.list.map((v) => v.toJson()).toList(); 34 | } 35 | return data; 36 | } 37 | } 38 | 39 | class City { 40 | int id; 41 | String name; 42 | Coord coord; 43 | String country; 44 | int population; 45 | int timezone; 46 | 47 | City( 48 | {this.id, 49 | this.name, 50 | this.coord, 51 | this.country, 52 | this.population, 53 | this.timezone}); 54 | 55 | City.fromJson(Map json) { 56 | id = json['id']; 57 | name = json['name']; 58 | coord = json['coord'] != null ? new Coord.fromJson(json['coord']) : null; 59 | country = json['country']; 60 | population = json['population']; 61 | timezone = json['timezone']; 62 | } 63 | 64 | Map toJson() { 65 | final Map data = new Map(); 66 | data['id'] = this.id; 67 | data['name'] = this.name; 68 | if (this.coord != null) { 69 | data['coord'] = this.coord.toJson(); 70 | } 71 | data['country'] = this.country; 72 | data['population'] = this.population; 73 | data['timezone'] = this.timezone; 74 | return data; 75 | } 76 | } 77 | 78 | class Coord { 79 | double lon; 80 | double lat; 81 | 82 | Coord({this.lon, this.lat}); 83 | 84 | Coord.fromJson(Map json) { 85 | lon = json['lon']; 86 | lat = json['lat']; 87 | } 88 | 89 | Map toJson() { 90 | final Map data = new Map(); 91 | data['lon'] = this.lon; 92 | data['lat'] = this.lat; 93 | return data; 94 | } 95 | } 96 | 97 | class Lista { 98 | int dt; 99 | int sunrise; 100 | int sunset; 101 | Temp temp; 102 | FeelsLike feelsLike; 103 | int pressure; 104 | int humidity; 105 | List weather; 106 | double speed; 107 | int deg; 108 | int clouds; 109 | double snow; 110 | double rain; 111 | 112 | Lista( 113 | {this.dt, 114 | this.sunrise, 115 | this.sunset, 116 | this.temp, 117 | this.feelsLike, 118 | this.pressure, 119 | this.humidity, 120 | this.weather, 121 | this.speed, 122 | this.deg, 123 | this.clouds, 124 | this.snow, 125 | this.rain}); 126 | 127 | Lista.fromJson(Map json) { 128 | dt = json['dt']; 129 | sunrise = json['sunrise']; 130 | sunset = json['sunset']; 131 | temp = json['temp'] != null ? new Temp.fromJson(json['temp']) : null; 132 | feelsLike = json['feels_like'] != null 133 | ? new FeelsLike.fromJson(json['feels_like']) 134 | : null; 135 | pressure = json['pressure']; 136 | humidity = json['humidity']; 137 | if (json['weather'] != null) { 138 | weather = new List(); 139 | json['weather'].forEach((v) { 140 | weather.add(new Weather.fromJson(v)); 141 | }); 142 | } 143 | speed = json['speed']; 144 | deg = json['deg']; 145 | clouds = json['clouds']; 146 | snow = json['snow']; 147 | rain = json['rain']; 148 | } 149 | 150 | Map toJson() { 151 | final Map data = new Map(); 152 | data['dt'] = this.dt; 153 | data['sunrise'] = this.sunrise; 154 | data['sunset'] = this.sunset; 155 | if (this.temp != null) { 156 | data['temp'] = this.temp.toJson(); 157 | } 158 | if (this.feelsLike != null) { 159 | data['feels_like'] = this.feelsLike.toJson(); 160 | } 161 | data['pressure'] = this.pressure; 162 | data['humidity'] = this.humidity; 163 | if (this.weather != null) { 164 | data['weather'] = this.weather.map((v) => v.toJson()).toList(); 165 | } 166 | data['speed'] = this.speed; 167 | data['deg'] = this.deg; 168 | data['clouds'] = this.clouds; 169 | data['snow'] = this.snow; 170 | data['rain'] = this.rain; 171 | return data; 172 | } 173 | } 174 | 175 | class Temp { 176 | double day; 177 | double min; 178 | double max; 179 | double night; 180 | double eve; 181 | double morn; 182 | 183 | Temp({this.day, this.min, this.max, this.night, this.eve, this.morn}); 184 | 185 | Temp.fromJson(Map json) { 186 | day = json['day'].toDouble(); 187 | min = json['min'].toDouble(); 188 | max = json['max'].toDouble(); 189 | night = json['night'].toDouble(); 190 | eve = json['eve'].toDouble(); 191 | morn = json['morn'].toDouble(); 192 | } 193 | 194 | Map toJson() { 195 | final Map data = new Map(); 196 | data['day'] = this.day; 197 | data['min'] = this.min; 198 | data['max'] = this.max; 199 | data['night'] = this.night; 200 | data['eve'] = this.eve; 201 | data['morn'] = this.morn; 202 | return data; 203 | } 204 | } 205 | 206 | class FeelsLike { 207 | double day; 208 | double night; 209 | double eve; 210 | double morn; 211 | 212 | FeelsLike({this.day, this.night, this.eve, this.morn}); 213 | 214 | FeelsLike.fromJson(Map json) { 215 | day = json['day'].toDouble(); 216 | night = json['night'].toDouble(); 217 | eve = json['eve'].toDouble(); 218 | morn = json['morn'].toDouble(); 219 | } 220 | 221 | Map toJson() { 222 | final Map data = new Map(); 223 | data['day'] = this.day; 224 | data['night'] = this.night; 225 | data['eve'] = this.eve; 226 | data['morn'] = this.morn; 227 | return data; 228 | } 229 | } 230 | 231 | class Weather { 232 | int id; 233 | String main; 234 | String description; 235 | String icon; 236 | 237 | Weather({this.id, this.main, this.description, this.icon}); 238 | 239 | Weather.fromJson(Map json) { 240 | id = json['id']; 241 | main = json['main']; 242 | description = json['description']; 243 | icon = json['icon']; 244 | } 245 | 246 | Map toJson() { 247 | final Map data = new Map(); 248 | data['id'] = this.id; 249 | data['main'] = this.main; 250 | data['description'] = this.description; 251 | data['icon'] = this.icon; 252 | return data; 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /lib/weather_forecast/network/network.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:first_flutter_app/weather_forecast/model/weather_forecast_model.dart'; 4 | import 'package:first_flutter_app/weather_forecast/util/forecast_util.dart'; 5 | import 'package:http/http.dart'; 6 | 7 | class Network { 8 | Future getWeatherForecast({String cityName}) async{ 9 | var finalUrl = "https://api.openweathermap.org/data/2.5/forecast/daily?q="+cityName+ 10 | "&appid="+Util.appId+"&units=imperial"; //change to metric or imperial 11 | 12 | final response = await get(Uri.encodeFull(finalUrl)); 13 | print("URL: ${Uri.encodeFull(finalUrl)}"); 14 | 15 | if (response.statusCode == 200) { 16 | // we get the actual mapped model ( dart object ) 17 | print("weather data: ${response.body}"); 18 | return WeatherForecastModel.fromJson(json.decode(response.body)); 19 | }else { 20 | throw Exception("Error getting weather forecast"); 21 | } 22 | 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /lib/weather_forecast/ui/bottom_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/weather_forecast/model/weather_forecast_model.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'forecast_card.dart'; 5 | 6 | //Better way of doing business! 7 | class BottomView extends StatelessWidget { 8 | final AsyncSnapshot snapshot; 9 | 10 | const BottomView({Key key, this.snapshot}) : super(key: key); 11 | @override 12 | Widget build(BuildContext context) { 13 | return Column( 14 | mainAxisAlignment: MainAxisAlignment.start, 15 | children: [ 16 | Text( 17 | "7-Day Weather Forecast".toUpperCase(), 18 | style: TextStyle(fontSize: 14, color: Colors.black87), 19 | ), 20 | Container( 21 | height: 170, 22 | padding: EdgeInsets.symmetric(vertical: 16, horizontal: 10), 23 | child: ListView.separated( 24 | scrollDirection: Axis.horizontal, 25 | separatorBuilder: (context, index) => SizedBox(width: 8), 26 | itemCount: snapshot.data.list.length, 27 | itemBuilder: (context, index) => ClipRRect( 28 | borderRadius: BorderRadius.all(Radius.circular(10)), 29 | child: Container( 30 | width: MediaQuery.of(context).size.width / 2.5, 31 | height: 160, 32 | child: forecastCard(snapshot, index), 33 | decoration: BoxDecoration( 34 | gradient: LinearGradient( 35 | colors: [Color(0xff9661C3), Colors.white], 36 | begin: Alignment.topLeft, 37 | end: Alignment.bottomRight)), 38 | ), 39 | )), 40 | ) 41 | ], 42 | ); 43 | } 44 | } 45 | 46 | 47 | Widget bottomView( 48 | AsyncSnapshot snapshot, BuildContext context) { 49 | var forecastList = snapshot.data.list; 50 | 51 | return Column( 52 | mainAxisAlignment: MainAxisAlignment.start, 53 | children: [ 54 | Text( 55 | "7-Day Weather Forecast".toUpperCase(), 56 | style: TextStyle(fontSize: 14, color: Colors.black87), 57 | ), 58 | Container( 59 | height: 170, 60 | padding: EdgeInsets.symmetric(vertical: 16, horizontal: 10), 61 | child: ListView.separated( 62 | scrollDirection: Axis.horizontal, 63 | separatorBuilder: (context, index) => SizedBox(width: 8), 64 | itemCount: forecastList.length, 65 | itemBuilder: (context, index) => ClipRRect( 66 | borderRadius: BorderRadius.all(Radius.circular(10)), 67 | child: Container( 68 | width: MediaQuery.of(context).size.width / 2.5, 69 | height: 160, 70 | child: forecastCard(snapshot, index), 71 | decoration: BoxDecoration( 72 | gradient: LinearGradient( 73 | colors: [Color(0xff9661C3), Colors.white], 74 | begin: Alignment.topLeft, 75 | end: Alignment.bottomRight)), 76 | ), 77 | )), 78 | ) 79 | ], 80 | ); 81 | } 82 | -------------------------------------------------------------------------------- /lib/weather_forecast/ui/forecast_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/weather_forecast/model/weather_forecast_model.dart'; 2 | import 'package:first_flutter_app/weather_forecast/util/convert_icon.dart'; 3 | import 'package:first_flutter_app/weather_forecast/util/forecast_util.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | 7 | Widget forecastCard(AsyncSnapshot snapshot, int index) { 8 | var forecastList = snapshot.data.list; 9 | var dayOfWeek = ""; 10 | DateTime date = 11 | new DateTime.fromMillisecondsSinceEpoch(forecastList[index].dt * 1000); 12 | var fullDate = Util.getFormattedDate(date); 13 | dayOfWeek = fullDate.split(",")[0]; //[Saturday,Dec 14,2019] 14 | 15 | return Column( 16 | mainAxisAlignment: MainAxisAlignment.start, 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | Padding( 20 | padding: const EdgeInsets.all(8.0), 21 | child: Text(dayOfWeek), 22 | ), 23 | Row( 24 | mainAxisAlignment: MainAxisAlignment.start, 25 | children: [ 26 | CircleAvatar( 27 | radius: 33, 28 | backgroundColor: Colors.white, 29 | // If it doesn't show (Font awesome icons are not showing) 30 | 31 | /* 32 | Please try: 33 | 34 | Stopping the app 35 | Running flutter clean in your app directory 36 | Deleting the app from your simulator / emulator / device 37 | Rebuild & Deploy the app. 38 | 39 | */ 40 | //source: https://github.com/brianegan/font_awesome_flutter/issues/28#issuecomment-460109786 41 | child: getWeatherIcon( 42 | weatherDescription: forecastList[index].weather[0].main, 43 | color: Colors.pinkAccent, 44 | size: 45), 45 | ), 46 | Column( 47 | children: [ 48 | Row( 49 | children: [ 50 | Padding( 51 | padding: const EdgeInsets.only(left: 8.0), 52 | child: Text( 53 | "${forecastList[index].temp.min.toStringAsFixed(0)} °F"), 54 | ), 55 | Icon( 56 | FontAwesomeIcons.solidArrowAltCircleDown, 57 | color: Colors.white, 58 | size: 17, 59 | ) 60 | ], 61 | ), 62 | Padding( 63 | padding: const EdgeInsets.only(left: 8.0), 64 | child: Row( 65 | children: [ 66 | Text( 67 | "${forecastList[index].temp.max.toStringAsFixed(0)} °F"), 68 | Icon( 69 | FontAwesomeIcons.solidArrowAltCircleUp, 70 | color: Colors.white, 71 | size: 17, 72 | ) 73 | ], 74 | ), 75 | ), 76 | Padding( 77 | padding: const EdgeInsets.only(left: 8.0), 78 | child: Row( 79 | children: [ 80 | Text( 81 | "Hum:${forecastList[index].humidity.toStringAsFixed(0)} %"), 82 | // Icon(FontAwesomeIcons.solidGrinBeamSweat, color: Colors.white, 83 | // size: 17,) 84 | ], 85 | ), 86 | ), 87 | Padding( 88 | padding: const EdgeInsets.only(left: 8.0), 89 | child: Row( 90 | children: [ 91 | Text( 92 | "Win:${forecastList[index].speed.toStringAsFixed(1)} mi/h"), 93 | // Icon(FontAwesomeIcons.wind, color: Colors.white, 94 | // size: 17,) 95 | ], 96 | ), 97 | ) 98 | ], 99 | ) 100 | ], 101 | ), 102 | ], 103 | ); 104 | } 105 | -------------------------------------------------------------------------------- /lib/weather_forecast/ui/mid_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/weather_forecast/model/weather_forecast_model.dart'; 2 | import 'package:first_flutter_app/weather_forecast/util/convert_icon.dart'; 3 | import 'package:first_flutter_app/weather_forecast/util/forecast_util.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | 7 | class MidView extends StatelessWidget { 8 | final AsyncSnapshot snapshot; 9 | 10 | const MidView({Key key, this.snapshot}) : super(key: key); 11 | @override 12 | Widget build(BuildContext context) { 13 | 14 | var forecastList = snapshot.data.list; 15 | var city = snapshot.data.city.name; 16 | var country = snapshot.data.city.country; 17 | var formattedDate = 18 | new DateTime.fromMillisecondsSinceEpoch(forecastList[0].dt * 1000); 19 | var forecast = forecastList[0]; 20 | 21 | return Container( 22 | child: Padding( 23 | padding: const EdgeInsets.all(5.0), 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 26 | children: [ 27 | Text( 28 | "$city, $country", 29 | style: TextStyle( 30 | fontWeight: FontWeight.bold, 31 | fontSize: 18, 32 | color: Colors.black87), 33 | ), 34 | Text( 35 | "${Util.getFormattedDate(formattedDate)}", 36 | style: TextStyle(fontSize: 15), 37 | ), 38 | 39 | SizedBox( 40 | height: 10, 41 | ), 42 | Padding( 43 | padding: const EdgeInsets.all(8.0), 44 | child: getWeatherIcon( 45 | weatherDescription: forecastList[0].weather[0].main, 46 | color: Colors.pinkAccent, 47 | size: 198), 48 | ), 49 | //Icon(FontAwesomeIcons.cloud, size: 198, color: Colors.pinkAccent,), 50 | //Icon(Icons.wb_sunny, size: 195,), 51 | 52 | Padding( 53 | padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 12), 54 | child: Row( 55 | mainAxisAlignment: MainAxisAlignment.center, 56 | children: [ 57 | Text( 58 | "${forecast.temp.day.toStringAsFixed(0)}°F", 59 | style: TextStyle(fontSize: 34), 60 | ), 61 | Padding( 62 | padding: const EdgeInsets.all(8.0), 63 | child: Text("${forecast.weather[0].description.toUpperCase()}"), 64 | ), 65 | ], 66 | ), 67 | ), 68 | 69 | Padding( 70 | padding: 71 | const EdgeInsets.symmetric(vertical: 2.0, horizontal: 12.0), 72 | child: Row( 73 | mainAxisAlignment: MainAxisAlignment.center, 74 | children: [ 75 | Padding( 76 | padding: const EdgeInsets.all(8.0), 77 | child: Column( 78 | mainAxisAlignment: MainAxisAlignment.center, 79 | children: [ 80 | Text("${forecast.speed.toStringAsFixed(1)} mi/h"), 81 | Icon( 82 | FontAwesomeIcons.wind, 83 | size: 20, 84 | color: Colors.brown, 85 | ) 86 | //Icon(Icons.arrow_forward, size: 20, color: Colors.brown,) 87 | ], 88 | ), 89 | ), 90 | Padding( 91 | padding: const EdgeInsets.all(8.0), 92 | child: Column( 93 | mainAxisAlignment: MainAxisAlignment.center, 94 | children: [ 95 | Text("${forecast.humidity.toStringAsFixed(0)} %"), 96 | Icon( 97 | FontAwesomeIcons.solidGrinBeamSweat, 98 | size: 20, 99 | color: Colors.brown, 100 | ) 101 | ], 102 | ), 103 | ), 104 | Padding( 105 | padding: EdgeInsets.all(8), 106 | child: Column( 107 | mainAxisAlignment: MainAxisAlignment.center, 108 | children: [ 109 | Text("${forecast.temp.max.toStringAsFixed(0)}°F "), 110 | Icon( 111 | FontAwesomeIcons.temperatureHigh, 112 | size: 20, 113 | color: Colors.brown, 114 | ) 115 | //Icon(Icons.wb_sunny, size: 20, color: Colors.brown,) 116 | ], 117 | ), 118 | ) 119 | ], 120 | ), 121 | ), 122 | ], 123 | ), 124 | ), 125 | ); 126 | } 127 | } 128 | 129 | 130 | Widget midView(AsyncSnapshot snapshot) { 131 | var forecastList = snapshot.data.list; 132 | var city = snapshot.data.city.name; 133 | var country = snapshot.data.city.country; 134 | var formattedDate = 135 | new DateTime.fromMillisecondsSinceEpoch(forecastList[0].dt * 1000); 136 | 137 | var forecast = forecastList[0]; 138 | Container midView = Container( 139 | child: Padding( 140 | padding: const EdgeInsets.all(5.0), 141 | child: Column( 142 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 143 | children: [ 144 | Text( 145 | "$city, $country", 146 | style: TextStyle( 147 | fontWeight: FontWeight.bold, 148 | fontSize: 18, 149 | color: Colors.black87), 150 | ), 151 | Text( 152 | "${Util.getFormattedDate(formattedDate)}", 153 | style: TextStyle(fontSize: 15), 154 | ), 155 | 156 | SizedBox( 157 | height: 10, 158 | ), 159 | Padding( 160 | padding: const EdgeInsets.all(8.0), 161 | child: getWeatherIcon( 162 | weatherDescription: forecastList[0].weather[0].main, 163 | color: Colors.pinkAccent, 164 | size: 198), 165 | ), 166 | //Icon(FontAwesomeIcons.cloud, size: 198, color: Colors.pinkAccent,), 167 | //Icon(Icons.wb_sunny, size: 195,), 168 | 169 | Padding( 170 | padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12), 171 | child: Row( 172 | mainAxisAlignment: MainAxisAlignment.center, 173 | children: [ 174 | Text( 175 | "${forecast.temp.day.toStringAsFixed(0)}°F", 176 | style: TextStyle(fontSize: 34), 177 | ), 178 | Text("${forecast.weather[0].description.toUpperCase()}"), 179 | ], 180 | ), 181 | ), 182 | 183 | Padding( 184 | padding: 185 | const EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0), 186 | child: Row( 187 | mainAxisAlignment: MainAxisAlignment.center, 188 | children: [ 189 | Padding( 190 | padding: const EdgeInsets.all(8.0), 191 | child: Column( 192 | mainAxisAlignment: MainAxisAlignment.center, 193 | children: [ 194 | Text("${forecast.speed.toStringAsFixed(1)} mi/h"), 195 | Icon( 196 | FontAwesomeIcons.wind, 197 | size: 20, 198 | color: Colors.brown, 199 | ) 200 | //Icon(Icons.arrow_forward, size: 20, color: Colors.brown,) 201 | ], 202 | ), 203 | ), 204 | Padding( 205 | padding: const EdgeInsets.all(8.0), 206 | child: Column( 207 | mainAxisAlignment: MainAxisAlignment.center, 208 | children: [ 209 | Text("${forecast.humidity.toStringAsFixed(0)} %"), 210 | Icon( 211 | FontAwesomeIcons.solidGrinBeamSweat, 212 | size: 20, 213 | color: Colors.brown, 214 | ) 215 | ], 216 | ), 217 | ), 218 | Padding( 219 | padding: EdgeInsets.all(8), 220 | child: Column( 221 | mainAxisAlignment: MainAxisAlignment.center, 222 | children: [ 223 | Text("${forecast.temp.max.toStringAsFixed(0)}°F "), 224 | Icon( 225 | FontAwesomeIcons.temperatureHigh, 226 | size: 20, 227 | color: Colors.brown, 228 | ) 229 | //Icon(Icons.wb_sunny, size: 20, color: Colors.brown,) 230 | ], 231 | ), 232 | ) 233 | ], 234 | ), 235 | ), 236 | ], 237 | ), 238 | ), 239 | ); 240 | return midView; 241 | } 242 | -------------------------------------------------------------------------------- /lib/weather_forecast/util/convert_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | Widget getWeatherIcon({String weatherDescription, Color color, double size}) { 5 | 6 | switch(weatherDescription) { 7 | case "Clear": 8 | { return Icon(FontAwesomeIcons.sun, color: color, size: size,); } 9 | break; 10 | case "Clouds": 11 | { return Icon(FontAwesomeIcons.cloud, color: color, size: size); } 12 | break; 13 | case "Rain": 14 | { return Icon(FontAwesomeIcons.cloudRain,color: color,size: size,);} 15 | break; 16 | case "Snow": 17 | {return Icon(FontAwesomeIcons.snowman,color: color,size: size,);} 18 | break; 19 | default: {return Icon(FontAwesomeIcons.sun,color: color,size: size,);} 20 | break; 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /lib/weather_forecast/util/forecast_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | 3 | class Util { 4 | //static String appId ="ADD YOUR OWN APPID"; 5 | static String appId = "ed60fcfbd110ee65c7150605ea8aceea"; 6 | 7 | static String getFormattedDate(DateTime dateTime) { 8 | 9 | return new DateFormat("EEEE, MMM d, y").format(dateTime); 10 | //... 1999 11 | } 12 | 13 | 14 | } -------------------------------------------------------------------------------- /lib/weather_forecast/weather_forecast.dart: -------------------------------------------------------------------------------- 1 | import 'package:first_flutter_app/weather_forecast/ui/bottom_view.dart'; 2 | import 'package:first_flutter_app/weather_forecast/ui/mid_view.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'model/weather_forecast_model.dart'; 6 | import 'network/network.dart'; 7 | 8 | class WeatherForecast extends StatefulWidget { 9 | @override 10 | _WeatherForecastState createState() => _WeatherForecastState(); 11 | } 12 | 13 | class _WeatherForecastState extends State { 14 | Future forecastObject; 15 | String _cityName = "San Diego"; 16 | 17 | @override 18 | void initState() { 19 | // TODO: implement initState 20 | super.initState(); 21 | forecastObject = getWeather(cityName: _cityName); 22 | 23 | // forecastObject.then((weather) { 24 | // print(weather.list[0].weather[0].main); 25 | // }); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | body: ListView( 32 | children: [ 33 | textFieldView(), 34 | Container( 35 | child: FutureBuilder( 36 | future: forecastObject, 37 | builder: (BuildContext context, 38 | AsyncSnapshot snapshot) { 39 | if (snapshot.hasData) { 40 | return Column( 41 | children: [ 42 | MidView(snapshot: snapshot), 43 | //midView(snapshot), 44 | BottomView(snapshot: snapshot) 45 | //bottomView(snapshot, context) 46 | ], 47 | ); 48 | } else { 49 | return Container( 50 | child: Center( 51 | child: CircularProgressIndicator(), 52 | ), 53 | ); 54 | } 55 | }), 56 | ) 57 | ], 58 | ), 59 | ); 60 | } 61 | 62 | Widget textFieldView() { 63 | return Padding( 64 | padding: const EdgeInsets.all(12.0), 65 | child: Container( 66 | child: TextField( 67 | decoration: InputDecoration( 68 | hintText: "Enter City Name", 69 | prefixIcon: Icon(Icons.search), 70 | border: 71 | OutlineInputBorder(borderRadius: BorderRadius.circular(10)), 72 | contentPadding: EdgeInsets.all(8)), 73 | onSubmitted: (value) { 74 | setState(() { 75 | _cityName = value; 76 | forecastObject = getWeather(cityName: _cityName); 77 | }); 78 | }, 79 | ), 80 | ), 81 | ); 82 | } 83 | 84 | Future getWeather({String cityName}) => 85 | new Network().getWeatherForecast(cityName: _cityName); 86 | } 87 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 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.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 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.13.0+1" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.14.11" 53 | convert: 54 | dependency: transitive 55 | description: 56 | name: convert 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.1" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.3" 67 | cupertino_icons: 68 | dependency: "direct main" 69 | description: 70 | name: cupertino_icons 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.1.2" 74 | firebase: 75 | dependency: transitive 76 | description: 77 | name: firebase 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "7.1.0" 81 | firebase_core: 82 | dependency: transitive 83 | description: 84 | name: firebase_core 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.4.3+1" 88 | firebase_core_platform_interface: 89 | dependency: transitive 90 | description: 91 | name: firebase_core_platform_interface 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.0.2" 95 | firebase_core_web: 96 | dependency: transitive 97 | description: 98 | name: firebase_core_web 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "0.1.1+1" 102 | flutter: 103 | dependency: "direct main" 104 | description: flutter 105 | source: sdk 106 | version: "0.0.0" 107 | flutter_test: 108 | dependency: "direct dev" 109 | description: flutter 110 | source: sdk 111 | version: "0.0.0" 112 | flutter_web_plugins: 113 | dependency: transitive 114 | description: flutter 115 | source: sdk 116 | version: "0.0.0" 117 | font_awesome_flutter: 118 | dependency: "direct main" 119 | description: 120 | name: font_awesome_flutter 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "8.5.0" 124 | google_maps_flutter: 125 | dependency: "direct main" 126 | description: 127 | name: google_maps_flutter 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "0.5.21+15" 131 | http: 132 | dependency: "direct main" 133 | description: 134 | name: http 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.12.0+2" 138 | http_parser: 139 | dependency: transitive 140 | description: 141 | name: http_parser 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "3.1.3" 145 | image: 146 | dependency: transitive 147 | description: 148 | name: image 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.4" 152 | intl: 153 | dependency: "direct main" 154 | description: 155 | name: intl 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "0.16.0" 159 | js: 160 | dependency: transitive 161 | description: 162 | name: js 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "0.6.1+1" 166 | matcher: 167 | dependency: transitive 168 | description: 169 | name: matcher 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.12.6" 173 | meta: 174 | dependency: transitive 175 | description: 176 | name: meta 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.8" 180 | path: 181 | dependency: transitive 182 | description: 183 | name: path 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.6.4" 187 | pedantic: 188 | dependency: transitive 189 | description: 190 | name: pedantic 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.8.0+1" 194 | petitparser: 195 | dependency: transitive 196 | description: 197 | name: petitparser 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.4.0" 201 | quiver: 202 | dependency: transitive 203 | description: 204 | name: quiver 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.5" 208 | sky_engine: 209 | dependency: transitive 210 | description: flutter 211 | source: sdk 212 | version: "0.0.99" 213 | source_span: 214 | dependency: transitive 215 | description: 216 | name: source_span 217 | url: "https://pub.dartlang.org" 218 | source: hosted 219 | version: "1.5.5" 220 | stack_trace: 221 | dependency: transitive 222 | description: 223 | name: stack_trace 224 | url: "https://pub.dartlang.org" 225 | source: hosted 226 | version: "1.9.3" 227 | stream_channel: 228 | dependency: transitive 229 | description: 230 | name: stream_channel 231 | url: "https://pub.dartlang.org" 232 | source: hosted 233 | version: "2.0.0" 234 | string_scanner: 235 | dependency: transitive 236 | description: 237 | name: string_scanner 238 | url: "https://pub.dartlang.org" 239 | source: hosted 240 | version: "1.0.5" 241 | term_glyph: 242 | dependency: transitive 243 | description: 244 | name: term_glyph 245 | url: "https://pub.dartlang.org" 246 | source: hosted 247 | version: "1.1.0" 248 | test_api: 249 | dependency: transitive 250 | description: 251 | name: test_api 252 | url: "https://pub.dartlang.org" 253 | source: hosted 254 | version: "0.2.11" 255 | typed_data: 256 | dependency: transitive 257 | description: 258 | name: typed_data 259 | url: "https://pub.dartlang.org" 260 | source: hosted 261 | version: "1.1.6" 262 | vector_math: 263 | dependency: transitive 264 | description: 265 | name: vector_math 266 | url: "https://pub.dartlang.org" 267 | source: hosted 268 | version: "2.0.8" 269 | xml: 270 | dependency: transitive 271 | description: 272 | name: xml 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "3.5.0" 276 | sdks: 277 | dart: ">=2.4.0 <3.0.0" 278 | flutter: ">=1.12.13+hotfix.4 <2.0.0" 279 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: first_flutter_app 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.2.2 <3.0.0" 18 | 19 | dependencies: 20 | cloud_firestore: any 21 | flutter: 22 | sdk: flutter 23 | 24 | # The following adds the Cupertino Icons font to your application. 25 | # Use with the CupertinoIcons class for iOS style icons. 26 | cupertino_icons: ^0.1.2 27 | http: ^0.12.0+2 28 | intl: ^0.16.0 29 | font_awesome_flutter: ^8.5.0 30 | google_maps_flutter: ^0.5.21+15 31 | 32 | 33 | 34 | dev_dependencies: 35 | flutter_test: 36 | sdk: flutter 37 | 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://dart.dev/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | 50 | # To add assets to your application, add an assets section, like this: 51 | 52 | assets: 53 | - images/flag.png 54 | # - images/a_dot_ham.jpeg 55 | 56 | # An image asset can refer to one or more resolution-specific "variants", see 57 | # https://flutter.dev/assets-and-images/#resolution-aware. 58 | 59 | # For details regarding adding assets from package dependencies, see 60 | # https://flutter.dev/assets-and-images/#from-packages 61 | 62 | # To add custom fonts to your application, add a fonts section here, 63 | # in this "flutter" section. Each entry in this list should have a 64 | # "family" key with the font family name, and a "fonts" key with a 65 | # list giving the asset and other descriptors for the font. For 66 | # example: 67 | fonts: 68 | - family: Lobster 69 | fonts: 70 | - asset: fonts/Lobster-Regular.ttf 71 | # - asset: fonts/Schyler-Italic.ttf 72 | # style: italic 73 | # - family: Trajan Pro 74 | # fonts: 75 | # - asset: fonts/TrajanPro.ttf 76 | # - asset: fonts/TrajanPro_Bold.ttf 77 | # weight: 700 78 | # 79 | # For details regarding fonts from package dependencies, 80 | # see https://flutter.io/custom-fonts/#from-packages 81 | --------------------------------------------------------------------------------