├── .gitignore ├── README.md ├── android.iml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── yourcompany │ │ │ └── sunshine │ │ │ └── MainActivity.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── mipmap-xxxhdpi │ │ └── ic_launcher.png ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── assets ├── font │ ├── Dosis-Medium.ttf │ └── Dosis-SemiBold.ttf └── img │ ├── bottom_parisback.png │ ├── d1s.png │ ├── d2s.png │ ├── d3s.png │ ├── d4s.png │ ├── d5s.png │ ├── d6s.png │ ├── d7s.png │ ├── d8s.png │ ├── d9s.png │ ├── dotBlueishFull.png │ ├── dotEmpty.png │ ├── n1s.png │ ├── n2s.png │ ├── parisback.png │ ├── pres.png │ ├── water.png │ └── wind.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-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 │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── main.dart ├── model │ ├── Condition.dart │ ├── ForecastData.dart │ └── WeatherData.dart ├── network │ └── ApiClient.dart ├── res │ └── Res.dart ├── store │ ├── ForecastStore.dart │ ├── StatelessStoreWidget.dart │ └── WeatherStore.dart └── ui │ ├── ForecastDetailPage.dart │ ├── HomePage.dart │ ├── forecast │ ├── Forecast.dart │ ├── ForecastList.dart │ └── ForecastPager.dart │ ├── forecast_detail │ └── ForecastDetail.dart │ ├── weather │ └── Weather.dart │ └── widgets │ ├── DotPageIndicator.dart │ ├── GradientAppBar.dart │ └── TextWithExponent.dart ├── pubspec.yaml ├── sunshine.iml ├── sunshine_android.iml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea 4 | .packages 5 | .pub/ 6 | build/ 7 | ios/.generated/ 8 | packages 9 | pubspec.lock 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sunshine 2 | 3 | Mobile app made with Flutter. More about flutter [here](http://flutter.io/). 4 | 5 | I wanted to try Flutter, so I grabbed some design from Uplabs, OpenWeatherMap API and developed simple weather app: 6 | 7 | 8 | ![](https://i.imgur.com/3S04TP9.png) 9 | -------------------------------------------------------------------------------- /android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | GeneratedPluginRegistrant.java 10 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withInputStream { stream -> 5 | localProperties.load(stream) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 25 19 | buildToolsVersion '25.0.3' 20 | 21 | lintOptions { 22 | disable 'InvalidPackage' 23 | } 24 | 25 | defaultConfig { 26 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 27 | applicationId "com.yourcompany.sunshine" 28 | minSdkVersion 16 29 | targetSdkVersion 25 30 | versionCode 1 31 | versionName "1.0" 32 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 33 | } 34 | 35 | buildTypes { 36 | release { 37 | // TODO: Add your own signing config for the release build. 38 | // Signing with the debug keys for now, so `flutter run --release` works. 39 | signingConfig signingConfigs.debug 40 | } 41 | } 42 | } 43 | 44 | flutter { 45 | source '../..' 46 | } 47 | 48 | dependencies { 49 | androidTestCompile 'com.android.support:support-annotations:25.4.0' 50 | androidTestCompile 'com.android.support.test:runner:0.5' 51 | androidTestCompile 'com.android.support.test:rules:0.5' 52 | } 53 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/yourcompany/sunshine/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.yourcompany.sunshine; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | maven { 5 | url "https://maven.google.com" 6 | } 7 | } 8 | 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:2.3.3' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | jcenter() 17 | maven { 18 | url "https://maven.google.com" 19 | } 20 | } 21 | } 22 | 23 | rootProject.buildDir = '../build' 24 | subprojects { 25 | project.buildDir = "${rootProject.buildDir}/${project.name}" 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withInputStream { stream -> plugins.load(stream) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/font/Dosis-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/font/Dosis-Medium.ttf -------------------------------------------------------------------------------- /assets/font/Dosis-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/font/Dosis-SemiBold.ttf -------------------------------------------------------------------------------- /assets/img/bottom_parisback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/bottom_parisback.png -------------------------------------------------------------------------------- /assets/img/d1s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d1s.png -------------------------------------------------------------------------------- /assets/img/d2s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d2s.png -------------------------------------------------------------------------------- /assets/img/d3s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d3s.png -------------------------------------------------------------------------------- /assets/img/d4s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d4s.png -------------------------------------------------------------------------------- /assets/img/d5s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d5s.png -------------------------------------------------------------------------------- /assets/img/d6s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d6s.png -------------------------------------------------------------------------------- /assets/img/d7s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d7s.png -------------------------------------------------------------------------------- /assets/img/d8s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d8s.png -------------------------------------------------------------------------------- /assets/img/d9s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/d9s.png -------------------------------------------------------------------------------- /assets/img/dotBlueishFull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/dotBlueishFull.png -------------------------------------------------------------------------------- /assets/img/dotEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/dotEmpty.png -------------------------------------------------------------------------------- /assets/img/n1s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/n1s.png -------------------------------------------------------------------------------- /assets/img/n2s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/n2s.png -------------------------------------------------------------------------------- /assets/img/parisback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/parisback.png -------------------------------------------------------------------------------- /assets/img/pres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/pres.png -------------------------------------------------------------------------------- /assets/img/water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/water.png -------------------------------------------------------------------------------- /assets/img/wind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/assets/img/wind.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | *.pbxuser 16 | *.mode1v3 17 | *.mode2v3 18 | *.perspectivev3 19 | 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | 25 | xcuserdata 26 | 27 | *.moved-aside 28 | 29 | *.pyc 30 | *sync/ 31 | Icon? 32 | .tags* 33 | 34 | /Flutter/app.flx 35 | /Flutter/app.zip 36 | /Flutter/App.framework 37 | /Flutter/Flutter.framework 38 | /Flutter/Generated.xcconfig 39 | /ServiceDefinitions.json 40 | 41 | Pods/ 42 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 18 | 9740EEBB1CF902C7004384FC /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 51 | 9740EEB71CF902C7004384FC /* app.flx */ = {isa = PBXFileReference; lastKnownFileType = file; name = app.flx; path = Flutter/app.flx; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 9740EEB71CF902C7004384FC /* app.flx */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0830; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 9740EEBB1CF902C7004384FC /* app.flx in Resources */, 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 193 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 194 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 195 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BOOL_CONVERSION = YES; 277 | CLANG_WARN_CONSTANT_CONVERSION = YES; 278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 279 | CLANG_WARN_EMPTY_BODY = YES; 280 | CLANG_WARN_ENUM_CONVERSION = YES; 281 | CLANG_WARN_INFINITE_RECURSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 285 | CLANG_WARN_UNREACHABLE_CODE = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 288 | COPY_PHASE_STRIP = NO; 289 | DEBUG_INFORMATION_FORMAT = dwarf; 290 | ENABLE_STRICT_OBJC_MSGSEND = YES; 291 | ENABLE_TESTABILITY = YES; 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_DYNAMIC_NO_PIC = NO; 294 | GCC_NO_COMMON_BLOCKS = YES; 295 | GCC_OPTIMIZATION_LEVEL = 0; 296 | GCC_PREPROCESSOR_DEFINITIONS = ( 297 | "DEBUG=1", 298 | "$(inherited)", 299 | ); 300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 302 | GCC_WARN_UNDECLARED_SELECTOR = YES; 303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 304 | GCC_WARN_UNUSED_FUNCTION = YES; 305 | GCC_WARN_UNUSED_VARIABLE = YES; 306 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 307 | MTL_ENABLE_DEBUG_INFO = YES; 308 | ONLY_ACTIVE_ARCH = YES; 309 | SDKROOT = iphoneos; 310 | TARGETED_DEVICE_FAMILY = "1,2"; 311 | }; 312 | name = Debug; 313 | }; 314 | 97C147041CF9000F007C117D /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 317 | buildSettings = { 318 | ALWAYS_SEARCH_USER_PATHS = NO; 319 | CLANG_ANALYZER_NONNULL = YES; 320 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 321 | CLANG_CXX_LIBRARY = "libc++"; 322 | CLANG_ENABLE_MODULES = YES; 323 | CLANG_ENABLE_OBJC_ARC = YES; 324 | CLANG_WARN_BOOL_CONVERSION = YES; 325 | CLANG_WARN_CONSTANT_CONVERSION = YES; 326 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 327 | CLANG_WARN_EMPTY_BODY = YES; 328 | CLANG_WARN_ENUM_CONVERSION = YES; 329 | CLANG_WARN_INFINITE_RECURSION = YES; 330 | CLANG_WARN_INT_CONVERSION = YES; 331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 332 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 333 | CLANG_WARN_UNREACHABLE_CODE = YES; 334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 336 | COPY_PHASE_STRIP = NO; 337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 338 | ENABLE_NS_ASSERTIONS = NO; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu99; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 344 | GCC_WARN_UNDECLARED_SELECTOR = YES; 345 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 346 | GCC_WARN_UNUSED_FUNCTION = YES; 347 | GCC_WARN_UNUSED_VARIABLE = YES; 348 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 349 | MTL_ENABLE_DEBUG_INFO = NO; 350 | SDKROOT = iphoneos; 351 | TARGETED_DEVICE_FAMILY = "1,2"; 352 | VALIDATE_PRODUCT = YES; 353 | }; 354 | name = Release; 355 | }; 356 | 97C147061CF9000F007C117D /* Debug */ = { 357 | isa = XCBuildConfiguration; 358 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 359 | buildSettings = { 360 | ARCHS = arm64; 361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 362 | ENABLE_BITCODE = NO; 363 | FRAMEWORK_SEARCH_PATHS = ( 364 | "$(inherited)", 365 | "$(PROJECT_DIR)/Flutter", 366 | ); 367 | INFOPLIST_FILE = Runner/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | LIBRARY_SEARCH_PATHS = ( 370 | "$(inherited)", 371 | "$(PROJECT_DIR)/Flutter", 372 | ); 373 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.sunshine; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | }; 376 | name = Debug; 377 | }; 378 | 97C147071CF9000F007C117D /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 381 | buildSettings = { 382 | ARCHS = arm64; 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | ENABLE_BITCODE = NO; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(PROJECT_DIR)/Flutter", 388 | ); 389 | INFOPLIST_FILE = Runner/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 391 | LIBRARY_SEARCH_PATHS = ( 392 | "$(inherited)", 393 | "$(PROJECT_DIR)/Flutter", 394 | ); 395 | PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.sunshine; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | }; 398 | name = Release; 399 | }; 400 | /* End XCBuildConfiguration section */ 401 | 402 | /* Begin XCConfigurationList section */ 403 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 404 | isa = XCConfigurationList; 405 | buildConfigurations = ( 406 | 97C147031CF9000F007C117D /* Debug */, 407 | 97C147041CF9000F007C117D /* Release */, 408 | ); 409 | defaultConfigurationIsVisible = 0; 410 | defaultConfigurationName = Release; 411 | }; 412 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 413 | isa = XCConfigurationList; 414 | buildConfigurations = ( 415 | 97C147061CF9000F007C117D /* Debug */, 416 | 97C147071CF9000F007C117D /* Release */, 417 | ); 418 | defaultConfigurationIsVisible = 0; 419 | defaultConfigurationName = Release; 420 | }; 421 | /* End XCConfigurationList section */ 422 | }; 423 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 424 | } 425 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 7 | [GeneratedPluginRegistrant registerWithRegistry:self]; 8 | // Override point for customization after application launch. 9 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/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/itsJoKr/Sunshine-Flutter/da814f0bf33897647025924fed2351ebcd37d4d4/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | sunshine 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sunshine/ui/HomePage.dart'; 3 | 4 | void main() { 5 | runApp(new MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return new MaterialApp( 12 | title: 'Flutter Demo', 13 | theme: theme, 14 | home: new HomePage(), 15 | ); 16 | } 17 | } 18 | 19 | class Pages { 20 | static const HOME = "/"; 21 | static const DETAIL = "/detail"; 22 | } 23 | 24 | var theme = new ThemeData ( 25 | primarySwatch: Colors.blue, 26 | fontFamily: 'Dosis' 27 | ); 28 | 29 | -------------------------------------------------------------------------------- /lib/model/Condition.dart: -------------------------------------------------------------------------------- 1 | 2 | class Condition { 3 | int id; 4 | String description; 5 | 6 | Condition(this.id, this.description); 7 | 8 | String getAssetString() { 9 | if (id >= 200 && id <= 299) 10 | return "assets/img/d7s.png"; 11 | else if (id >= 300 && id <= 399) 12 | return "assets/img/d6s.png"; 13 | else if (id >= 500 && id <= 599) 14 | return "assets/img/d5s.png"; 15 | else if (id >= 600 && id <= 699) 16 | return "assets/img/d8s.png"; 17 | else if (id >= 700 && id <= 799) 18 | return "assets/img/d9s.png"; 19 | else if (id >= 300 && id <= 399) 20 | return "assets/img/d6s.png"; 21 | else if (id == 800) 22 | return "assets/img/d1s.png"; 23 | else if (id == 801) 24 | return "assets/img/d2s.png"; 25 | else if (id == 802) 26 | return "assets/img/d3s.png"; 27 | else if (id == 803 || id == 804) 28 | return "assets/img/d4s.png"; 29 | 30 | print("Unknown condition ${id}"); 31 | return "assets/img/n1s.png"; 32 | } 33 | } -------------------------------------------------------------------------------- /lib/model/ForecastData.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:convert'; 3 | 4 | import 'package:sunshine/model/Condition.dart'; 5 | 6 | class ForecastData { 7 | 8 | List forecastList; 9 | 10 | ForecastData(this.forecastList); 11 | 12 | static ForecastData deserialize(String json) { 13 | JsonDecoder decoder = new JsonDecoder(); 14 | var map = decoder.convert(json); 15 | 16 | var list = map["list"]; 17 | List forecast = []; 18 | 19 | for (var weatherMap in list) { 20 | forecast.add(ForecastWeather._deserialize(weatherMap)); 21 | } 22 | 23 | return new ForecastData(forecast); 24 | } 25 | 26 | } 27 | 28 | class ForecastWeather { 29 | String temperature; 30 | Condition condition; 31 | DateTime dateTime; 32 | 33 | double pressure; 34 | double humidity; 35 | double wind; 36 | //Wind, rain, etc. 37 | 38 | ForecastWeather(this.temperature, this.condition, this.dateTime, this.pressure, this.humidity, this.wind); 39 | 40 | static ForecastWeather _deserialize(Map map) { 41 | String description = map["weather"][0]["description"]; 42 | int conditionId = map["weather"][0]["id"]; 43 | Condition condition = new Condition(conditionId, description); 44 | 45 | double temperature = map["main"]["temp"].toDouble(); 46 | double humidity = map["main"]["humidity"].toDouble(); 47 | double pressure = map["main"]["pressure"].toDouble(); 48 | double wind = map["wind"]["speed"].toDouble(); 49 | int epochTimeMs = map["dt"]*1000; 50 | DateTime dateTime = new DateTime.fromMillisecondsSinceEpoch(epochTimeMs); 51 | 52 | return new ForecastWeather(temperature.toString(), condition, dateTime, pressure, humidity, wind); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /lib/model/WeatherData.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:convert'; 3 | 4 | import 'package:sunshine/model/Condition.dart'; 5 | 6 | class WeatherData { 7 | String temperature; 8 | Condition condition; 9 | 10 | WeatherData(this.temperature, this.condition); 11 | 12 | static WeatherData deserialize(String json) { 13 | JsonDecoder decoder = new JsonDecoder(); 14 | var map = decoder.convert(json); 15 | 16 | String description = map["weather"][0]["description"]; 17 | int id = map["weather"][0]["id"]; 18 | Condition condition = new Condition(id, description); 19 | 20 | double temperature = map["main"]["temp"].toDouble(); 21 | 22 | return new WeatherData(temperature.toString(), condition); 23 | } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /lib/network/ApiClient.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | 3 | import 'package:sunshine/model/WeatherData.dart'; 4 | import 'package:sunshine/model/ForecastData.dart'; 5 | 6 | import 'dart:async'; 7 | 8 | class ApiClient { 9 | static ApiClient _instance; 10 | 11 | static ApiClient getInstance() { 12 | if (_instance == null) { 13 | _instance = new ApiClient(); 14 | } 15 | return _instance; 16 | } 17 | 18 | 19 | Future getWeather() async { 20 | http.Response response = await http.get( 21 | Uri.encodeFull(Endpoints.WEATHER), 22 | headers: { 23 | "Accept": "application/json" 24 | } 25 | ); 26 | 27 | return WeatherData.deserialize(response.body); 28 | } 29 | 30 | Future getForecast() async { 31 | http.Response response = await http.get( 32 | Uri.encodeFull(Endpoints.FORECAST), 33 | headers: { 34 | "Accept": "application/json" 35 | } 36 | ); 37 | 38 | return ForecastData.deserialize(response.body); 39 | } 40 | 41 | } 42 | 43 | class Endpoints { 44 | static const _ENDPOINT = "http://api.openweathermap.org/data/2.5"; 45 | static const WEATHER = _ENDPOINT + "/weather?lat=43.509645&lon=16.445783&APPID=af29567e139fe06b6c2d050515cdff0c&units=metric"; 46 | static const FORECAST = _ENDPOINT + "/forecast?lat=43.509645&lon=16.445783&APPID=af29567e139fe06b6c2d050515cdff0c&units=metric"; 47 | } -------------------------------------------------------------------------------- /lib/res/Res.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | /* 4 | App specific color suite 5 | */ 6 | class $Colors { 7 | static const Color empress = const Color(0xFF756C6F); 8 | static const Color ghostWhite = const Color(0xFFF6F6F7); 9 | static const Color quartz = const Color(0xFFE1E0E8); 10 | static const Color blueHaze = const Color(0xFFB3B2C2); 11 | static const Color lavender = const Color(0xFFCBCAD6); 12 | static const Color blueParis = const Color(0xDD595877); 13 | } 14 | 15 | /* 16 | Image paths 17 | */ 18 | class $Asset { 19 | static const String dotFull = "assets/img/dotBlueishFull.png"; 20 | static const String dotEmpty = "assets/img/dotEmpty.png"; 21 | static const String backgroundParis = "assets/img/parisback.png"; 22 | static const String pressure = "assets/img/pres.png"; 23 | static const String humidity = "assets/img/water.png"; 24 | static const String wind = "assets/img/wind.png"; 25 | } -------------------------------------------------------------------------------- /lib/store/ForecastStore.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_flux/flutter_flux.dart'; 4 | import 'package:sunshine/model/ForecastData.dart'; 5 | import 'package:sunshine/network/ApiClient.dart'; 6 | 7 | 8 | class ForecastStore extends Store { 9 | 10 | /// Forecast by day: list of days with each containing list of 11 | /// [ForecastWeather] through day 12 | List> forecastByDay; 13 | 14 | ForecastStore() { 15 | 16 | triggerOnAction(updateForecast, (dynamic) { 17 | _updateForecast(); 18 | }); 19 | } 20 | 21 | _updateForecast() { 22 | Future fForecastData = ApiClient.getInstance().getForecast(); 23 | fForecastData.then((content) { 24 | ForecastData forecastData = content; 25 | this.forecastByDay = groupForecastListByDay(forecastData); 26 | trigger(); 27 | }).catchError((e) { 28 | print(e); 29 | }); 30 | } 31 | 32 | static List> groupForecastListByDay( 33 | ForecastData forecastData) { 34 | if (forecastData == null) return null; 35 | 36 | List> forecastListByDay = []; 37 | final forecastList = forecastData.forecastList; 38 | 39 | int currentDay = forecastList[0].dateTime.day; 40 | List intermediateList = []; 41 | 42 | for (var forecast in forecastList) { 43 | if (currentDay == forecast.dateTime.day) { 44 | intermediateList.add(forecast); 45 | } else { 46 | forecastListByDay.add(intermediateList); 47 | currentDay = forecast.dateTime.day; 48 | intermediateList = []; 49 | intermediateList.add(forecast); 50 | } 51 | } 52 | 53 | forecastListByDay.add(intermediateList); 54 | return forecastListByDay; 55 | } 56 | 57 | } 58 | 59 | final Action updateForecast = new Action(); 60 | final StoreToken forecastStoreToken = new StoreToken(new ForecastStore()); -------------------------------------------------------------------------------- /lib/store/StatelessStoreWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/src/widgets/framework.dart'; 2 | import 'package:flutter_flux/flutter_flux.dart'; 3 | 4 | /// Workaround for flutter_flux implementation when state class is dealing 5 | /// with store. 6 | /// 7 | /// The widget then should be like regulare StateWidget, delegating build 8 | /// method to State class. StoreWatcher works like this, but has issue where 9 | /// that requires you to have concrete implementation of build and initStores 10 | /// methods, even though they are not used and we only need createState method. 11 | 12 | abstract class StatelessStoreWidget extends StoreWatcher { 13 | 14 | @override 15 | Widget build(BuildContext context, Map stores) { 16 | // This shouldn't be called if setState is implemented 17 | throw new Exception("Implement setState method in your widget"); 18 | } 19 | 20 | @override 21 | void initStores(ListenToStore listenToStore) { 22 | // This shouldn't be called if setState is implemented 23 | throw new Exception("Implement setState method in your widget"); 24 | } 25 | 26 | 27 | } -------------------------------------------------------------------------------- /lib/store/WeatherStore.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_flux/flutter_flux.dart'; 4 | import 'package:sunshine/model/Condition.dart'; 5 | import 'package:sunshine/model/WeatherData.dart'; 6 | import 'package:sunshine/network/ApiClient.dart'; 7 | 8 | class WeatherStore extends Store { 9 | 10 | WeatherData weatherData; 11 | 12 | WeatherStore() { 13 | // TODO make loading widget from here 14 | this.weatherData = new WeatherData("", new Condition(0, "Loading")); 15 | 16 | triggerOnAction(actionUpdateWeather, (dynamic) { 17 | _updateWeather(); 18 | }); 19 | } 20 | 21 | void _updateWeather() { 22 | var apiClient = ApiClient.getInstance(); 23 | Future fWeatherData = apiClient.getWeather(); 24 | fWeatherData 25 | .then((content) { 26 | this.weatherData = content; 27 | trigger(); 28 | }).catchError((e) { 29 | this.weatherData = null; 30 | // todo trigger error 31 | }); 32 | } 33 | 34 | } 35 | 36 | // Token and actions 37 | final Action actionUpdateWeather = new Action(); 38 | final StoreToken weatherStoreToken = new StoreToken(new WeatherStore()); -------------------------------------------------------------------------------- /lib/ui/ForecastDetailPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:sunshine/model/ForecastData.dart'; 4 | import 'package:sunshine/ui/forecast_detail/ForecastDetail.dart'; 5 | 6 | final monthFormat = new DateFormat('MMMM'); 7 | 8 | class ForecastDetailPage extends StatelessWidget { 9 | ForecastWeather weather; 10 | 11 | ForecastDetailPage(this.weather); 12 | 13 | static MaterialPageRoute getRoute(ForecastWeather forecastWeather) { 14 | return new MaterialPageRoute(builder: (BuildContext context) { 15 | return new ForecastDetailPage(forecastWeather); 16 | }); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | var title = weather.dateTime.hour.toString() + "h"; 22 | var month = monthFormat.format(weather.dateTime); 23 | title += " • " + weather.dateTime.day.toString() + " " + month; 24 | 25 | return new Scaffold( 26 | appBar: new AppBar(title: new Text(title)), 27 | body: new Container( 28 | decoration: new BoxDecoration( 29 | gradient: new LinearGradient( 30 | colors: [ 31 | const Color(0x99338600), 32 | const Color(0x9900CCFF), 33 | const Color(0xAA0077FF), 34 | ], 35 | begin: const FractionalOffset(0.0, 0.0), 36 | end: const FractionalOffset(0.7, 1.0), 37 | stops: [0.0, 0.7, 1.0], 38 | tileMode: TileMode.clamp)), 39 | child: new Center( 40 | child: new ForecastDetail(weather), 41 | )), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/ui/HomePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sunshine/ui/forecast/Forecast.dart'; 3 | import 'package:sunshine/ui/weather/Weather.dart'; 4 | class HomePage extends StatelessWidget{ 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return new Scaffold( 9 | body: new Container( 10 | child: new Column( 11 | children: [ 12 | new AspectRatio(child: new Weather(), aspectRatio: 750.0/805.0), 13 | new Expanded(child: new Forecast()), 14 | ], 15 | ) 16 | ), 17 | ); 18 | } 19 | } -------------------------------------------------------------------------------- /lib/ui/forecast/Forecast.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_flux/flutter_flux.dart'; 3 | 4 | import 'package:sunshine/res/Res.dart'; 5 | import 'package:sunshine/store/ForecastStore.dart'; 6 | 7 | import 'package:sunshine/ui/forecast/ForecastPager.dart'; 8 | import 'package:flutter_flux/src/store_watcher.dart'; 9 | 10 | class Forecast extends StoreWatcher { 11 | 12 | @override 13 | Widget build(BuildContext context, Map stores) { 14 | ForecastStore store = stores[forecastStoreToken]; 15 | if (store.forecastByDay == null) return new Container(); 16 | 17 | return new Stack( 18 | children: [ 19 | new Image( 20 | image: new AssetImage("assets/img/bottom_parisback.png"), 21 | fit: BoxFit.fitWidth, 22 | ), 23 | new Container( 24 | child: new ForecastPager(store.forecastByDay), 25 | decoration: new BoxDecoration( 26 | color: Colors.white, 27 | shape: BoxShape.rectangle, 28 | borderRadius: new BorderRadius.only( 29 | topLeft: new Radius.circular(15.0), 30 | topRight: new Radius.circular(15.0), 31 | ), 32 | boxShadow: [ 33 | new BoxShadow( 34 | color: Colors.black12, 35 | blurRadius: 10.0, 36 | offset: new Offset(0.0, -10.0)) 37 | ]), 38 | ), 39 | ], 40 | ); 41 | } 42 | 43 | 44 | @override 45 | void initStores(ListenToStore listenToStore) { 46 | listenToStore(forecastStoreToken); 47 | updateForecast.call(); // Initial load 48 | } 49 | } 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/ui/forecast/ForecastList.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | 4 | import 'package:sunshine/model/ForecastData.dart'; 5 | import 'package:sunshine/res/Res.dart'; 6 | import 'package:sunshine/ui/ForecastDetailPage.dart'; 7 | 8 | import 'package:sunshine/ui/widgets/TextWithExponent.dart'; 9 | 10 | final timeFormat = new DateFormat('HH'); 11 | 12 | class ForecastList extends StatelessWidget { 13 | final List _forecast; 14 | 15 | ForecastList(this._forecast); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return new ListView.builder( 20 | itemBuilder: (BuildContext context, int index) => 21 | new _ForecastListItem(_forecast[index]), 22 | itemCount: _forecast == null ? 0 : _forecast.length, 23 | ); 24 | } 25 | } 26 | 27 | class _ForecastListItem extends StatelessWidget { 28 | final ForecastWeather weather; 29 | 30 | _ForecastListItem(this.weather); 31 | 32 | void clicked(BuildContext context) { 33 | Navigator.of(context).push(ForecastDetailPage.getRoute(weather)); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | final time = timeFormat.format(weather.dateTime); 39 | 40 | return new Material( 41 | child: new InkWell( 42 | onTap: () => clicked(context), 43 | child: new Container( 44 | height: 65.0, 45 | padding: 46 | new EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), 47 | child: new Stack( 48 | children: [ 49 | new Align( 50 | child: new TextWithExponent(time, "h"), 51 | alignment: FractionalOffset.centerLeft, 52 | ), 53 | new Positioned( 54 | child: new Row( 55 | children: [ 56 | new Container( 57 | child: new Image.asset( 58 | weather.condition.getAssetString(), 59 | height: 46.0, 60 | width: 46.0, 61 | fit: BoxFit.scaleDown, 62 | color: $Colors.blueParis, 63 | ), 64 | margin: new EdgeInsets.only(right: 8.0), 65 | ), 66 | new Container( 67 | width: 80.0, 68 | alignment: FractionalOffset.centerRight, 69 | child: new Text( 70 | weather.temperature + "°C", 71 | style: new TextStyle(fontSize: 20.0), 72 | ), 73 | ), 74 | ], 75 | ), 76 | right: 0.0, 77 | ) 78 | ], 79 | )))); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/ui/forecast/ForecastPager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:sunshine/model/ForecastData.dart'; 4 | import 'package:sunshine/res/Res.dart'; 5 | 6 | import 'package:intl/intl.dart'; 7 | import 'package:sunshine/ui/forecast/ForecastList.dart'; 8 | import 'package:sunshine/ui/widgets/DotPageIndicator.dart'; 9 | import 'package:sunshine/ui/widgets/TextWithExponent.dart'; 10 | 11 | final weekdayFormat = new DateFormat('EEE'); 12 | 13 | class ForecastPager extends StatefulWidget { 14 | var _forecastByDay; 15 | ForecastPager(this._forecastByDay); 16 | 17 | @override 18 | _ForecastPagerState createState() { 19 | return new _ForecastPagerState(_forecastByDay); 20 | } 21 | } 22 | 23 | class _ForecastPagerState extends State { 24 | var currentPage = 0; 25 | List> _forecastByDay; 26 | 27 | _ForecastPagerState(this._forecastByDay); 28 | 29 | @override 30 | void didUpdateWidget(ForecastPager oldWidget) { 31 | setState(() { 32 | this._forecastByDay = widget._forecastByDay; 33 | }); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | DateTime currentDateTime; 39 | final pageCount = _forecastByDay != null ? _forecastByDay.length : 0; 40 | 41 | if (_forecastByDay != null) { 42 | if (_forecastByDay[currentPage].length > 0) { 43 | currentDateTime = _forecastByDay[currentPage][0].dateTime; 44 | } 45 | } 46 | 47 | return new Column( 48 | children: [ 49 | new _ForecastWeekTabs(currentDateTime, currentPage, pageCount), 50 | new Expanded( 51 | child: new PageView.builder( 52 | itemBuilder: (BuildContext context, int index) => 53 | new ForecastList(_forecastByDay[index]), 54 | itemCount: pageCount, 55 | scrollDirection: Axis.horizontal, 56 | onPageChanged: (index) => this.setState(() {this.currentPage = index;}), 57 | )), 58 | ], 59 | ); 60 | } 61 | } 62 | 63 | class _ForecastWeekTabs extends StatelessWidget { 64 | final DateTime dateTime; 65 | final int currentPage; 66 | final int pageCount; 67 | 68 | _ForecastWeekTabs(this.dateTime, this.currentPage, this.pageCount); 69 | 70 | 71 | @override 72 | Widget build(BuildContext context) { 73 | final textStyle = new TextStyle(fontSize: 24.0); 74 | final int dayOfMonth = dateTime != null ? dateTime.day : 0; 75 | String dayMonthSuffix = ""; 76 | 77 | final weekDay = weekdayFormat.format(dateTime).toString(); 78 | if (dayOfMonth == 1) { 79 | dayMonthSuffix += "st"; 80 | } else if (dayOfMonth == 2) { 81 | dayMonthSuffix += "nd"; 82 | } else { 83 | dayMonthSuffix += "th"; 84 | } 85 | 86 | 87 | return new Container( 88 | child: new Container( 89 | child: new Stack( 90 | children: [ 91 | new Container( 92 | child: new Text(weekDay, style: textStyle), 93 | padding: new EdgeInsets.only(left: 36.0), 94 | ), 95 | new Align( 96 | child: new DotPageIndicator(this.currentPage, this.pageCount), 97 | alignment: FractionalOffset.center, 98 | ), 99 | new Positioned( 100 | child: new TextWithExponent( 101 | dayOfMonth.toString(), 102 | dayMonthSuffix, 103 | textSize: 24.0, 104 | exponentTextSize: 18.0, 105 | ), 106 | right: 36.0), 107 | ], 108 | ), 109 | padding: new EdgeInsets.symmetric(vertical: 8.0), 110 | ), 111 | decoration: new BoxDecoration( 112 | border: new Border(bottom: new BorderSide(color: Colors.black12))), 113 | ); 114 | } 115 | } 116 | 117 | -------------------------------------------------------------------------------- /lib/ui/forecast_detail/ForecastDetail.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sunshine/model/ForecastData.dart'; 3 | import 'package:sunshine/res/Res.dart'; 4 | 5 | class ForecastDetail extends StatelessWidget { 6 | final ForecastWeather weather; 7 | 8 | ForecastDetail(this.weather); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return new Container( 13 | child: new Column( 14 | mainAxisAlignment: MainAxisAlignment.center, 15 | children: [ 16 | new _MainWeatherInfo(weather), 17 | new Container(margin: const EdgeInsets.all(20.0), height: 1.0, width: 220.0, color: Colors.black45,), 18 | new _WeatherInfo(weather.wind.toString(), $Asset.wind), 19 | new _WeatherInfo(weather.pressure.toString(), $Asset.pressure), 20 | new _WeatherInfo(weather.humidity.toString(), $Asset.humidity), 21 | ], 22 | ), 23 | ); 24 | } 25 | } 26 | 27 | class _MainWeatherInfo extends StatelessWidget { 28 | final ForecastWeather weather; 29 | 30 | _MainWeatherInfo(this.weather); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return new Container( 35 | child: new Row( 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | mainAxisAlignment: MainAxisAlignment.center, 38 | children: [ 39 | new Image.asset( 40 | this.weather.condition.getAssetString(), 41 | width: 50.0, 42 | color: $Colors.blueParis, 43 | ), 44 | new Padding( 45 | padding: new EdgeInsets.only(left: 16.0), 46 | child: new Text( 47 | this.weather.condition.description, 48 | style: new TextStyle(fontSize: 32.0), 49 | ), 50 | ) 51 | ])); 52 | } 53 | } 54 | 55 | class _WeatherInfo extends StatelessWidget { 56 | final String info; 57 | final String imageAsset; 58 | 59 | _WeatherInfo(this.info, this.imageAsset); 60 | 61 | @override 62 | Widget build(BuildContext context) { 63 | return new Container(child: new Row( 64 | mainAxisAlignment: MainAxisAlignment.center, 65 | children: [ 66 | new Image.asset(imageAsset, width: 30.0, color: $Colors.blueParis,), 67 | new Padding( 68 | padding: const EdgeInsets.only(left: 16.0, bottom: 12.0, top: 12.0), 69 | child: new Text(info, style: new TextStyle(fontSize: 20.0),), 70 | ) 71 | ], 72 | )); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/ui/weather/Weather.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:sunshine/model/Condition.dart'; 3 | import 'package:sunshine/model/WeatherData.dart'; 4 | 5 | import 'package:sunshine/res/Res.dart'; 6 | import 'package:sunshine/store/WeatherStore.dart'; 7 | import 'package:sunshine/ui/widgets/TextWithExponent.dart'; 8 | import 'package:flutter_flux/flutter_flux.dart'; 9 | 10 | class Weather extends StoreWatcher { 11 | @override 12 | Widget build(BuildContext context, Map stores) { 13 | WeatherStore store = stores[weatherStoreToken]; 14 | WeatherData weatherData = store.weatherData; 15 | 16 | return new Container( 17 | decoration: new BoxDecoration( 18 | image: new DecorationImage( 19 | image: new AssetImage($Asset.backgroundParis), 20 | fit: BoxFit.cover, 21 | )), 22 | child: new Row( 23 | children: [ 24 | new Flexible( 25 | child: new WeatherInfo(weatherData), 26 | ), 27 | ], 28 | )); 29 | } 30 | 31 | @override 32 | void initStores(ListenToStore listenToStore) { 33 | listenToStore(weatherStoreToken); 34 | actionUpdateWeather.call(); // Initial load 35 | } 36 | } 37 | 38 | class WeatherInfo extends StatelessWidget { 39 | WeatherInfo(WeatherData this._weather); 40 | 41 | final WeatherData _weather; 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | final roundedTemperature = this._weather.temperature.split(".")[0] + "°"; 46 | final condition = '${this._weather.condition.description[0] 47 | .toUpperCase()}${this._weather 48 | .condition.description.substring(1)}'; 49 | 50 | return new Container( 51 | child: new Column( 52 | mainAxisAlignment: MainAxisAlignment.center, 53 | children: [ 54 | new Text( 55 | "Paris", 56 | style: new TextStyle( 57 | fontSize: 21.0, 58 | fontWeight: FontWeight.w700, 59 | color: $Colors.blueParis), 60 | ), 61 | new Text( 62 | condition, 63 | style: new TextStyle( 64 | fontSize: 18.0, 65 | color: $Colors.blueParis, 66 | ), 67 | ), 68 | new Text(roundedTemperature, 69 | style: new TextStyle( 70 | fontSize: 72.0, 71 | color: $Colors.blueParis, 72 | fontFamily: "Roboto")), 73 | ], 74 | ), 75 | padding: new EdgeInsets.only(left: 64.0), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/ui/widgets/DotPageIndicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:sunshine/res/Res.dart'; 4 | 5 | class DotPageIndicator extends StatelessWidget { 6 | final int currentPage; 7 | final int pagesCount; 8 | 9 | DotPageIndicator(this.currentPage, this.pagesCount); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | var dots = []; 14 | final dotEmpty = new Flexible( 15 | child: new Image( 16 | image: new AssetImage($Asset.dotEmpty), 17 | width: 15.0, 18 | height: 15.0, 19 | )); 20 | 21 | final dotFull = new Flexible( 22 | child: new Image( 23 | image: new AssetImage($Asset.dotFull), 24 | width: 15.0, 25 | height: 15.0, 26 | )); 27 | 28 | for (var i=0; i[ 14 | new Text(text, style: new TextStyle(fontSize: textSize),), 15 | new Container( 16 | child: new Text(exponentText, style: new TextStyle(fontSize: exponentTextSize)), 17 | margin: new EdgeInsets.only(bottom: (textSize - exponentTextSize)), 18 | ), 19 | ],); 20 | } 21 | } -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: sunshine 2 | description: A new Flutter project. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | queries: "^0.0.15" 8 | flutter_flux: "^4.0.1" 9 | 10 | dev_dependencies: 11 | flutter_test: 12 | sdk: flutter 13 | 14 | 15 | # For information on the generic Dart part of this file, see the 16 | # following page: https://www.dartlang.org/tools/pub/pubspec 17 | 18 | # The following section is specific to Flutter. 19 | flutter: 20 | 21 | uses-material-design: true 22 | assets: 23 | - assets/img/parisback.png 24 | - assets/img/bottom_parisback.png 25 | - assets/img/dotEmpty.png 26 | - assets/img/dotBlueishFull.png 27 | - assets/img/d1s.png 28 | - assets/img/d2s.png 29 | - assets/img/d3s.png 30 | - assets/img/d4s.png 31 | - assets/img/d5s.png 32 | - assets/img/d6s.png 33 | - assets/img/d7s.png 34 | - assets/img/d8s.png 35 | - assets/img/d9s.png 36 | - assets/img/n1s.png 37 | - assets/img/n2s.png 38 | - assets/img/wind.png 39 | - assets/img/pres.png 40 | - assets/img/water.png 41 | 42 | 43 | # - images/a_dot_ham.jpeg 44 | 45 | # An image asset can refer to one or more resolution-specific "variants", see 46 | # https://flutter.io/assets-and-images/. 47 | 48 | # To add assets from package dependencies, first ensure the asset 49 | # is in the lib/ directory of the dependency. Then, 50 | # refer to the asset with a path prefixed with 51 | # `packages/PACKAGE_NAME/`. The `lib/` is implied, do not 52 | # include `lib/` in the asset path. 53 | # 54 | # Here is an example: 55 | # 56 | # assets: 57 | # - packages/PACKAGE_NAME/path/to/asset 58 | 59 | # To add custom fonts to your application, add a fonts section here, 60 | # in this "flutter" section. Each entry in this list should have a 61 | # "family" key with the font family name, and a "fonts" key with a 62 | # list giving the asset and other descriptors for the font. For 63 | # example: 64 | # fonts: 65 | 66 | fonts: 67 | - family: Dosis 68 | fonts: 69 | - asset: assets/font/Dosis-SemiBold.ttf 70 | weight: 700 71 | 72 | # - family: Schyler 73 | # fonts: 74 | # - asset: fonts/Schyler-Regular.ttf 75 | # - asset: fonts/Schyler-Italic.ttf 76 | # style: italic 77 | # - family: Trajan Pro 78 | # fonts: 79 | # - asset: fonts/TrajanPro.ttf 80 | # - asset: fonts/TrajanPro_Bold.ttf 81 | # weight: 700 82 | -------------------------------------------------------------------------------- /sunshine.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sunshine_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import '../lib/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | --------------------------------------------------------------------------------