Showing preview only (205K chars total). Download the full file or copy to clipboard to get everything.
Repository: jianggaocheng/30-days-of-flutter
Branch: master
Commit: df4bba0e1de5
Files: 68
Total size: 186.7 KB
Directory structure:
gitextract_ldgym_d8/
├── .gitignore
├── .idea/
│ ├── libraries/
│ │ ├── Dart_SDK.xml
│ │ └── Flutter_for_Android.xml
│ ├── modules.xml
│ ├── runConfigurations/
│ │ └── main_dart.xml
│ └── workspace.xml
├── .metadata
├── LICENSE
├── README.md
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── example/
│ │ │ └── flutterdemosgallery/
│ │ │ └── MainActivity.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── launch_background.xml
│ │ └── values/
│ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── flutter_demos_gallery.iml
├── flutter_demos_gallery_android.iml
├── fonts/
│ ├── Open_Sans/
│ │ └── LICENSE.txt
│ └── roboto_mono/
│ └── LICENSE.txt
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Runner.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Runner.xcscheme
│ └── Runner.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── lib/
│ ├── main.dart
│ ├── pages/
│ │ ├── day0.dart
│ │ ├── day1.dart
│ │ ├── day10.dart
│ │ ├── day11.dart
│ │ ├── day12.dart
│ │ ├── day13.dart
│ │ ├── day14.dart
│ │ ├── day15.dart
│ │ ├── day2.dart
│ │ ├── day3.dart
│ │ ├── day5.dart
│ │ ├── day6.dart
│ │ ├── day7.dart
│ │ ├── day8.dart
│ │ ├── day9.dart
│ │ └── home.dart
│ └── utils/
│ ├── carousel.dart
│ ├── carousel_pro.dart
│ ├── flutter_icon_icons.dart
│ └── throttle_debounce.dart
└── pubspec.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
.dart_tool/
.packages
.pub/
build/
.flutter-plugins
screenshot_gif
================================================
FILE: .idea/libraries/Dart_SDK.xml
================================================
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file:///Users/jianggc/Documents/sdk/flutter/bin/cache/dart-sdk/lib/typed_data" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
================================================
FILE: .idea/libraries/Flutter_for_Android.xml
================================================
<component name="libraryTable">
<library name="Flutter for Android">
<CLASSES>
<root url="jar:///Users/jianggc/Documents/sdk/flutter/bin/cache/artifacts/engine/android-arm/flutter.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/flutter_demos_gallery.iml" filepath="$PROJECT_DIR$/flutter_demos_gallery.iml" />
<module fileurl="file://$PROJECT_DIR$/flutter_demos_gallery_android.iml" filepath="$PROJECT_DIR$/flutter_demos_gallery_android.iml" />
</modules>
</component>
</project>
================================================
FILE: .idea/runConfigurations/main_dart.xml
================================================
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method />
</configuration>
</component>
================================================
FILE: .idea/workspace.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="ToolWindowManager">
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
</navigator>
<panes>
<pane id="ProjectPane">
<option name="show-excluded-files" value="false" />
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="dart.analysis.tool.window.force.activate" value="true" />
<property name="show.migrate.to.gradle.popup" value="false" />
</component>
</project>
================================================
FILE: .metadata
================================================
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
channel: beta
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018 jianggc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
### 30 Days of Flutter
30 days of Flutter examples/demos.
This project is inspired by
30 days of React Native (https://github.com/fangwei716/30-days-of-react-native)
#### Environment
Flutter 1.5.8 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 0ba67226ee (3 days ago) • 2019-04-24 17:18:28 -0700
Engine • revision c63d1cf9c9
Tools • Dart 2.3.0 (build 2.3.0-dev.0.1 1f1592edce)
#### Installation
1. ``` git clone git@github.com:jianggaocheng/30-days-of-flutter.git ```
2. ``` cd 30-days-of-flutter && flutter packages get ```
3. ``` flutter run -d <device_id> // replace with your device id ```
#### Day 1
An IOS-system-like stop watch.
Fully functioned as the system app.

#### Day 2
An IOS-system-like weather app.
The animation is partially done.

#### Day3
The Twitter app entrance animation.

#### Day4
TO BE UPDATED
#### Day5
!!! You need to get a google api key from https://console.developers.google.com/
Google Map view and find Geo location.

#### Day6
Spotify welcome screen

#### Day7
Pan gesture basic. Move a baseball around.

#### Day8
Google map style swipe menu

#### Day9
Layout of Twitter user page

#### Day10
Tumblr menu animation

#### Day11
Canvas

#### Day12
Charts with Flutter
Reference: https://github.com/google/charts

#### Day13
A tweet UI

#### Day14
TO BE UPDATED
#### Day15
A time picker

================================================
FILE: android/.gitignore
================================================
*.iml
*.class
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
GeneratedPluginRegistrant.java
================================================
FILE: android/app/build.gradle
================================================
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.flutterdemosgallery"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutterdemosgallery">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="flutter_demos_gallery"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: android/app/src/main/java/com/example/flutterdemosgallery/MainActivity.java
================================================
package com.example.flutterdemosgallery;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
================================================
FILE: android/build.gradle
================================================
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
================================================
FILE: android/gradlew
================================================
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
================================================
FILE: android/gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: android/settings.gradle
================================================
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
================================================
FILE: flutter_demos_gallery.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
================================================
FILE: flutter_demos_gallery_android.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/android/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/android/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/android/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/android/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/android/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/android/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/android/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/android">
<sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/android/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Flutter for Android" level="project" />
</component>
</module>
================================================
FILE: fonts/Open_Sans/LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: fonts/roboto_mono/LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: ios/.gitignore
================================================
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/app.flx
/Flutter/app.zip
/Flutter/flutter_assets/
/Flutter/App.framework
/Flutter/Flutter.framework
/Flutter/Generated.xcconfig
/ServiceDefinitions.json
Pods/
.symlinks/
================================================
FILE: ios/Flutter/AppFrameworkInfo.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
================================================
FILE: ios/Flutter/Debug.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/Release.xcconfig
================================================
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
================================================
FILE: ios/Podfile
================================================
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
================================================
FILE: ios/Runner/AppDelegate.h
================================================
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : FlutterAppDelegate
@end
================================================
FILE: ios/Runner/AppDelegate.m
================================================
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
================================================
FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
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.
================================================
FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
================================================
FILE: ios/Runner/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
================================================
FILE: ios/Runner/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>flutter_demos_gallery</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Using location to display on a map</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
================================================
FILE: ios/Runner/main.m
================================================
#import <Flutter/Flutter.h>
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2CD7A31970ED364B58879588 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FEE03FE0FC165698524041C2 /* libPods-Runner.a */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0A4BBC1699162544B3255671 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
283E2533291D8E5861309A88 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
FEE03FE0FC165698524041C2 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
2CD7A31970ED364B58879588 /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5E57053CE57448136F527426 /* Pods */ = {
isa = PBXGroup;
children = (
0A4BBC1699162544B3255671 /* Pods-Runner.debug.xcconfig */,
283E2533291D8E5861309A88 /* Pods-Runner.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
5E57053CE57448136F527426 /* Pods */,
9D9EC8ED7F098B711CEBF36F /* Frameworks */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
9D9EC8ED7F098B711CEBF36F /* Frameworks */ = {
isa = PBXGroup;
children = (
FEE03FE0FC165698524041C2 /* libPods-Runner.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
836036DFF50C19B01285E748 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
25D1DEF25058A4104D744EEA /* [CP] Embed Pods Frameworks */,
2A623B59ED11358E421429F8 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 7QR8M344DV;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
25D1DEF25058A4104D744EEA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
2A623B59ED11358E421429F8 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMaps.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
836036DFF50C19B01285E748 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7QR8M344DV;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterDemosGallery;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7QR8M344DV;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterDemosGallery;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
================================================
FILE: lib/main.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demos_gallery/pages/home.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new HomePage()
);
}
}
================================================
FILE: lib/pages/day0.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
class Day0Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('TO BE UPDATED'),
),
body: Container(
child: Center(
child: Text('TO BE UPDATED'),
)
),
);
}
}
================================================
FILE: lib/pages/day1.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:core';
import 'dart:async';
class Day1Page extends StatefulWidget {
@override
createState() => Day1PageState();
}
class Day1PageState extends State<Day1Page> {
String _sectionTime = '00:00.00';
String _totalTime = '00:00.00';
int _recordTime = 0;
Stopwatch _stopwatch = Stopwatch();
List<String> _recordList = List();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('A stopwatch'),
),
body: Column(
children: <Widget>[
WatchFace(
sectionTime: _sectionTime,
totalTime: _totalTime,
),
WatchControl(
watchOn: _stopwatch.isRunning,
onLeftBtn: _handleLeftBtn,
onRightBtn: _handleRightBtn,
),
Expanded(
child: WatchRecord(
recordList: _recordList,
)
)
],
)
);
}
void _handleRightBtn() {
if (_stopwatch.isRunning) {
_stopwatch.stop();
} else {
_stopwatch.start();
Timer.periodic(Duration(milliseconds: 10), (interval) {
var milSecond, second, minute, countingTime, secmilSecond, secsecond, secminute, seccountingTime;
countingTime = _stopwatch.elapsedMilliseconds;
minute = (countingTime / (60 * 1000)).floor();
second = ((countingTime - 6000 * minute) / 1000).floor();
milSecond = ((countingTime % 1000) / 10).floor();
seccountingTime = countingTime - _recordTime;
secminute =(seccountingTime / (60 * 1000)).floor();
secsecond = ((seccountingTime - 6000 * secminute) / 1000).floor();
secmilSecond = ((seccountingTime % 1000) / 10).floor();
setState(() {
_totalTime = (minute % 60).toString().padLeft(2, '0') + ":" + (second % 60).toString().padLeft(2, '0') + "." + (milSecond % 60).toString().padLeft(2, '0');
_sectionTime = (secminute % 60).toString().padLeft(2, '0') + ":" + (secsecond % 60).toString().padLeft(2, '0') + "." + (secmilSecond % 60).toString().padLeft(2, '0');
});
if (!_stopwatch.isRunning) {
interval.cancel();
}
});
}
}
void _handleLeftBtn() {
if (_stopwatch.isRunning) {
_recordList.add(_sectionTime);
_recordTime = _stopwatch.elapsedMilliseconds;
} else {
setState(() {
_sectionTime = '00:00.00';
_totalTime = '00:00.00';
_recordList.clear();
_recordTime = 0;
});
_stopwatch.reset();
}
}
}
class WatchFace extends StatelessWidget{
WatchFace({Key key, this.sectionTime: '00:00.00', this.totalTime: '00:00.00',}): super(key: key);
final String sectionTime;
final String totalTime;
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
decoration: BoxDecoration(
color: Color(0xFFF3F3F3),
border: Border(bottom: BorderSide(color: Color(0xFFDDDDDD)))
),
padding: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
height: 170.0,
child: Column(
children: <Widget>[
Container(
alignment: Alignment.centerRight,
padding: EdgeInsets.only(right: 30.0),
child: Text(sectionTime, style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.w100, color: Color(0xFF555555), fontFamily: "RobotoMono")),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(totalTime, style: const TextStyle(fontSize: 70.0, fontWeight: FontWeight.w100, color: Color(0xFF222222), fontFamily: "RobotoMono")),
)
],
),
);
}
}
class WatchControl extends StatefulWidget{
WatchControl({Key key, @required this.onRightBtn, @required this.onLeftBtn, this.watchOn})
: super(key: key);
final Function onLeftBtn;
final Function onRightBtn;
final bool watchOn;
@override
createState() => WatchControlState();
}
class WatchControlState extends State<WatchControl> {
String startBtnText = '启动';
Color startBtnColor = Color(0xFF60B644);
String stopBtnText = '复位';
Color underlayColor = Color(0xFFEEEEEE);
_onRightBtn() {
if (!widget.watchOn) {
setState(() {
startBtnText = '停止';
startBtnColor = Color(0xFFFF0044);
stopBtnText = '计次';
underlayColor = Color(0xFFEEEEEE);
});
} else {
setState(() {
startBtnText = '启动';
startBtnColor = Color(0xFF60B644);
stopBtnText = '复位';
underlayColor = Color(0xFFEEEEEE);
});
}
widget.onRightBtn();
}
@override
Widget build(BuildContext context) {
// TODO: implement build
return Ink(
height: 100.0,
decoration: BoxDecoration(
color: Color(0xFFF3F3F3)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Ink(
height: 70.0,
width: 70.0,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.all(Radius.circular(35.0)),
),
child: InkWell(
borderRadius: BorderRadius.all(Radius.circular(35.0)),
onTap: widget.onLeftBtn,
child: Center(
child: Text(stopBtnText),
)
),
),
Ink(
height: 70.0,
width: 70.0,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.all(Radius.circular(35.0)),
),
child: InkWell(
borderRadius: BorderRadius.all(Radius.circular(35.0)),
onTap: _onRightBtn,
child: Center(
child: Text(startBtnText, style: TextStyle(color: startBtnColor),),
)
),
),
],
)
);
}
}
class WatchRecord extends StatelessWidget {
WatchRecord({Key key, this.recordList}): super(key: key);
final List<String> recordList;
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: recordList.length,
itemBuilder: (context, index) {
int targetIndex = recordList.length - index;
return Container(
height: 40.0,
padding: EdgeInsets.only(top: 5.0, left: 30.0, right: 30.0, bottom: 5.0),
decoration: BoxDecoration(
border: BorderDirectional(bottom: BorderSide(color: Color(0xFFBBBBBB)))
),
child: Row(
children: <Widget>[
Container(
child: Text( '计次 $targetIndex', style: TextStyle(color: Color(0xFF777777)),),
),
Expanded(
child: Text(recordList[targetIndex - 1], textAlign: TextAlign.right, style: TextStyle(color: Color(0xFF222222), fontFamily: "RobotoMono"),),
)
],
)
);
},
);
}
}
================================================
FILE: lib/pages/day10.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
class Day10Page extends StatefulWidget {
@override
createState() => Day10PageState();
}
class Day10PageState extends State<Day10Page> with SingleTickerProviderStateMixin {
Animation<double> shiftAnimation;
Animation<double> opacityAnimation;
AnimationController controller;
@override
initState() {
super.initState();
controller = AnimationController(
duration: const Duration(milliseconds: 600),
vsync: this
);
final Animation curve = CurvedAnimation(
parent: controller,
curve: Interval(0.333, 1.0, curve: Curves.ease)
);
shiftAnimation = Tween(
begin: -120.0,
end: 50.0)
.animate(curve)
..addListener(() {
setState(() {
});
});
final Animation opacityCurve = CurvedAnimation(
parent: controller,
curve: Curves.ease
);
opacityAnimation = Tween(
begin: 0.0,
end: 1.0)
.animate(opacityCurve)
..addListener(() {
setState(() {
});
});
}
Widget menuItem (String assets, String text) {
return Container(
width: 150.0,
height: 150.0,
child: Column(
children: <Widget>[
Image.asset(assets, width: 120.0, height: 100.0, fit: BoxFit.contain,),
Text(text, style: TextStyle(color: Colors.white),)
],
)
);
}
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
return Scaffold(
body: Stack(
children: <Widget>[
InkWell(
onTap: (){
controller.forward();
},
child: Ink(
padding: EdgeInsets.only(top: 25.0),
decoration: BoxDecoration(
color: Color(0xFF37465C),
),
child: Image(
image: AssetImage('assets/tumblr.png'),
fit: BoxFit.cover,
),
),
),
IgnorePointer(
ignoring: opacityAnimation.value == 0,
child: Opacity(
opacity: opacityAnimation.value,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/tumblrblur.png'),
fit: BoxFit.fill,
)
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 150.0
),
child: Stack(
children: <Widget>[
Positioned(
top: 0.0,
left: shiftAnimation.value,
child: menuItem('assets/tumblr-text.png', 'Text'),
),
Positioned(
top: 0.0,
right: shiftAnimation.value,
child: menuItem('assets/tumblr-photo.png', 'Photo'),
),
]
)
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 150.0
),
child: Stack(
children: <Widget>[
Positioned(
top: 0.0,
left: shiftAnimation.value,
child: menuItem('assets/tumblr-quote.png', 'Quote'),
),
Positioned(
top: 0.0,
right: shiftAnimation.value,
child: menuItem('assets/tumblr-link.png', 'Link'),
),
]
)
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 150.0
),
child: Stack(
children: <Widget>[
Positioned(
top: 0.0,
left: shiftAnimation.value,
child: menuItem('assets/tumblr-chat.png', 'Chat'),
),
Positioned(
top: 0.0,
right: shiftAnimation.value,
child: menuItem('assets/tumblr-audio.png', 'Audio'),
),
]
)
),
InkWell(
onTap: (){
controller.reverse();
},
child: Ink(
width: 200.0,
height: 50.0,
child: Text('NeverMind', textAlign: TextAlign.center,style: TextStyle(color: Colors.white24, fontWeight: FontWeight.w700)),
)
),
],
)
)
),
),
],
),
);
}
}
================================================
FILE: lib/pages/day11.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:dart2_constant/math.dart';
class Day11Page extends StatefulWidget {
createState() => Day11PageStatus();
}
class Day11PageStatus extends State<Day11Page> {
double angle = 0.0;
double angleSlideValue = 0.0;
void onPieValueChange (value) {
setState(() {
angleSlideValue = value;
angle = 2 * pi * value;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('Canvas'),
),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
height: 50.0,
child: Center(
child: Text('Progress Pie')
),
),
Slider(
value: angleSlideValue,
onChanged: onPieValueChange,
),
Container(
height: 220.0,
padding: EdgeInsets.all(10.0),
color: Colors.grey,
child: CustomPaint(
painter: new Pie(MediaQuery.of(context).size.width / 2, 100.0, 100.0, angle),
child: Container()
)
),
],
),
),
);
}
}
class Pie extends CustomPainter {
Rect rect;
double angle;
@override
Pie(double x, double y, double radius, double angle) {
this.rect = Rect.fromCircle(center: Offset(x, y), radius: radius);
this.angle = angle;
}
@override
void paint(Canvas canvas, Size size) {
final Paint paint = new Paint()
..isAntiAlias = true
..strokeWidth = 1.0
..color = Colors.white
..style = PaintingStyle.fill;
canvas.drawArc(rect, 0.0, angle, true, paint);
}
@override
bool shouldRepaint(Pie oldDelegate) => false;
}
================================================
FILE: lib/pages/day12.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:charts_flutter/flutter.dart' as charts;
class Day12Page extends StatelessWidget {
final List<charts.Series<int, String>> chartData1 = [
charts.Series<int, String>(
id: 'barChart',
colorFn: (value, index) => charts.MaterialPalette.deepOrange.shadeDefault,
domainFn: (value, index) {
return index.toString();
},
measureFn:(value, index) {
return value;
},
data: [30, 1, 1, 2, 3, 5, 21, 13, 21, 34, 55, 30]
)
];
final List<charts.Series<int, int>> chartData2 = [
charts.Series<int, int>(
id: 'lineChart',
colorFn: (value, index) => charts.MaterialPalette.black.lighter,
domainFn: (value, index) {
return index;
},
measureFn:(value, index) {
return value;
},
data: [10, 12, 14, 25, 31, 52, 41, 31, 52, 66, 22, 11]
)
];
final List<charts.Series<int, int>> chartData3 = [
charts.Series<int, int>(
id: 'pieChart',
domainFn: (value, index) {
return index;
},
measureFn:(value, index) {
return value;
},
data: [30, 10, 31, 52, 63]
)
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('charts'),
),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.symmetric(vertical: 10.0),
alignment: Alignment.center,
child: Text('Bar chart', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 16.0),)
),
Container(
height: 200.0,
child: charts.BarChart(
chartData1
)
),
Container(
padding: EdgeInsets.symmetric(vertical: 10.0),
alignment: Alignment.center,
child: Text('Line chart', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 16.0),)
),
Container(
height: 200.0,
child: charts.LineChart(
chartData2
)
),
Container(
padding: EdgeInsets.symmetric(vertical: 10.0),
alignment: Alignment.center,
child: Text('Pie chart', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 16.0),)
),
Container(
height: 200.0,
child: charts.PieChart(
chartData3
)
),
],
)
),
);
}
}
/// Sample ordinal data type.
class OrdinalSales {
final String year;
final int sales;
OrdinalSales(this.year, this.sales);
}
================================================
FILE: lib/pages/day13.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:image_picker/image_picker.dart';
class Day13Page extends StatefulWidget {
@override
createState() => Day13PageState();
}
class Day13PageState extends State<Day13Page> {
int textCount = 140;
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomPadding: false,
body: new GestureDetector(
onTap: () {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: Container(
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.only(top: 30.0, left: 15.0, right: 15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
image: DecorationImage(
image: AssetImage('assets/icon.png')
)
),
width: 30.0,
height: 30.0,
),
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(Icons.close),
)
],
),
),
Expanded(
child: TextField(
maxLength: 140,
maxLines: null,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(10.0),
border: InputBorder.none,
hintStyle: TextStyle(color: Color(0xFFCED8DE)),
hintText: '有什么新鲜事?',
counterText: ''
),
onChanged: (val) {
setState(() {
this.textCount = 140 - val.length;
});
},
)
),
FunctionView(
numOfText: this.textCount,
),
],
)
),
)
);
}
}
class FunctionView extends StatelessWidget {
final int numOfText;
FunctionView({Key key, this.numOfText}): super(key: key);
@override
Widget build(BuildContext context) {
MediaQueryData mediaQuery = MediaQuery.of(context);
print("bottom ${mediaQuery.viewInsets.bottom}");
return Container(
margin: EdgeInsets.only(bottom: mediaQuery.viewInsets.bottom != 0.0? 290 - mediaQuery.viewInsets.bottom + 20 : 0.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
height: 50.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: 210.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Icon(Icons.pin_drop, size: 23.0, color: Color(0xFF8899A5)),
Icon(Icons.camera, size: 23.0, color: Color(0xFF8899A5)),
Icon(Icons.image, size: 23.0, color: Color(0xFF8899A5)),
Icon(Icons.pie_chart, size: 23.0, color: Color(0xFF8899A5))
]
),
),
Container(
width: 110.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Text(
this.numOfText.toString(), style: TextStyle(color: Color(0xFFCCD6DD), fontSize: 18.0),
),
InkWell(
child: Container(
alignment: Alignment.center,
child: Text('发推', style: TextStyle(color: this.numOfText == 140 ? Color(0xFFCCD6DD) : Color(0xFFFFFFFF))),
width: 60.0,
height: 35.0,
decoration: BoxDecoration(
border: this.numOfText == 140 ? Border.all(
color: Color(0xFFCCD6DD),
) : null,
color: this.numOfText == 140 ? null : Color(0xFF2AA2EF),
borderRadius: BorderRadius.circular(6.0)
),
)
)
]
),
)
],
),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
color: Color(0xFFCCD6DD),
)
)
),
),
Container(
height: 240.0,
child: GridView.count(
primary: false,
padding: EdgeInsets.all(0.0),
crossAxisCount: 3,
children: <Widget>[
InkWell(
onTap: () async {
var image = await ImagePicker.pickImage(source: ImageSource.gallery);
},
child: Container(
decoration: BoxDecoration(
border: BorderDirectional(
end: BorderSide(
color: Color(0xFFDDDDDD)
),
bottom: BorderSide(
color: Color(0xFFDDDDDD)
),
)
),
height: 113.0,
child: Icon(FontAwesomeIcons.camera, size: 50.0, color: Color(0xFF2AA2EF)),
),
),
Container(
decoration: BoxDecoration(
border: BorderDirectional(
end: BorderSide(
color: Color(0xFFDDDDDD)
),
bottom: BorderSide(
color: Color(0xFFDDDDDD)
),
)
),
height: 113.0,
child: Icon(FontAwesomeIcons.video, size: 50.0, color: Color(0xFF2AA2EF)),
),
]
)
)
]
)
);
}
}
================================================
FILE: lib/pages/day14.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
class Day14Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('TO BE UPDATED'),
),
body: Container(
child: Container()
),
);
}
}
================================================
FILE: lib/pages/day15.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
class Day15Page extends StatefulWidget {
@override
createState() => Day15PageState();
}
class Day15PageState extends State<Day15Page> {
DateTime _now;
@override
void initState() {
_now = DateTime.now();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('Time picker'),
),
body: Container(
child: Center(
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 200.0
),
child: Column(
children: [
Text(DateFormat('yyyy-MM-dd HH:mm').format(_now), style: TextStyle(fontSize: 25.0)),
Container(
padding: EdgeInsets.only(top: 10.0),
child: GestureDetector(
child: Text('change time', style: TextStyle(
fontSize: 16.0,
color: Color(0xFF4285F4)
)),
onTap: () async {
final result = await Navigator.push(
context,
CupertinoPageRoute(
builder: (context) => DateTimePickerPage(displayDateTime: _now),
),
);
setState(() {
if (result != null) {
this._now = result;
}
});
},
)
)
]
)
)
)
),
);
}
}
class DateTimePickerPage extends StatelessWidget {
DateTime displayDateTime;
DateTimePickerPage({Key key, @required this.displayDateTime}) :super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('Choose a time'),
trailing: GestureDetector(
child: Text('Set', style: TextStyle(color: Color(0xFF4285F4))),
onTap: () {
Navigator.pop(context, displayDateTime);
},
),
),
body: Column(
children: [
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 200.0
),
child: CupertinoDatePicker(
mode: CupertinoDatePickerMode.date,
initialDateTime: displayDateTime,
onDateTimeChanged: (value) {
displayDateTime = DateTime.utc(value.year, value.month, value.day, displayDateTime.hour, displayDateTime.minute);
},
),
),
ConstrainedBox(
constraints: BoxConstraints(
maxHeight: 200.0
),
child: CupertinoTimerPicker(
mode: CupertinoTimerPickerMode.hm,
initialTimerDuration: Duration(hours: displayDateTime.hour, minutes: displayDateTime.minute),
onTimerDurationChanged: (value) {
displayDateTime = DateTime.utc(displayDateTime.year, displayDateTime.month, displayDateTime.day, value.inHours, value.inMinutes);
}
),
),
]
)
);
}
}
================================================
FILE: lib/pages/day2.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demos_gallery/utils/carousel.dart';
import 'dart:convert';
class Day2Page extends StatelessWidget {
final _weatherData = jsonDecode('''
[{
"key": 0,
"city": "苏州市",
"night": true,
"bg": "w2.png",
"abs": "大部晴朗",
"degree": 15,
"today": {
"week": "星期六",
"day": "今天",
"high": 16,
"low": 14
},
"hours": [{
"key": 101,
"time": "现在",
"icon": "0xe804",
"degree": "15°",
"color": "0xFFFFFFFF"
}, {
"key": 102,
"time": "3时",
"icon": "0xe80c",
"degree": "15°",
"color": "0xCCFFFFFF"
}, {
"key": 103,
"time": "4时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 104,
"time": "5时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 105,
"time": "6时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 106,
"time": "06:21",
"icon": "0xe829",
"degree": "日出",
"color": "0xFFfedf32"
}, {
"key": 107,
"time": "7时",
"icon": "0xe80b",
"degree": "16°",
"color": "0xE6FFFFFF"
}, {
"key": 108,
"time": "8时",
"icon": "0xe80b",
"degree": "18°",
"color": "0xE6FFFFFF"
}, {
"key": 109,
"time": "9时",
"icon": "0xe803",
"degree": "19°",
"color": "0xFFfedf32"
}, {
"key": 110,
"time": "10时",
"icon": "0xe803",
"degree": "122°",
"color": "0xFFfedf32"
}, {
"key": 111,
"time": "11时",
"icon": "0xe803",
"degree": "23°",
"color": "0xFFfedf32"
}, {
"key": 112,
"time": "13时",
"icon": "0xe803",
"degree": "22°",
"color": "0xFFfedf32"
}, {
"key": 113,
"time": "13时",
"icon": "0xe803",
"degree": "22°",
"color": "0xFFfedf32"
}, {
"key": 114,
"time": "14时",
"icon": "0xe80b",
"degree": "16°",
"color": "0xE6FFFFFF"
}, {
"key": 115,
"time": "15时",
"icon": "0xe80b",
"degree": "22°",
"color": "0xE6FFFFFF"
}, {
"key": 116,
"time": "16时",
"icon": "0xe80b",
"degree": "21°",
"color": "0xE6FFFFFF"
}, {
"key": 117,
"time": "17时",
"icon": "0xe80b",
"degree": "19°",
"color": "0xE6FFFFFF"
}, {
"key": 118,
"time": "18时",
"icon": "0xe80b",
"degree": "18°",
"color": "0xE6FFFFFF"
}, {
"key": 119,
"time": "18:06",
"icon": "0xe80b",
"degree": "日落",
"color": "0xE6FFFFFF"
}, {
"key": 120,
"time": "19时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 121,
"time": "20时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 122,
"time": "21时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 123,
"time": "22时",
"icon": "0xe80c",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 124,
"time": "23时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 125,
"time": "0时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 126,
"time": "1时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 127,
"time": "2时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}],
"days": [{
"key": 21,
"day": "星期一",
"icon": "0xe80b",
"high": 21,
"low": 16
}, {
"key": 22,
"day": "星期二",
"icon": "0xe81a",
"high": 22,
"low": 14
}, {
"key": 23,
"day": "星期三",
"icon": "0xe81a",
"high": 21,
"low": 11
}, {
"key": 24,
"day": "星期四",
"icon": "0xe81a",
"high": 12,
"low": 8
}, {
"key": 25,
"day": "星期五",
"icon": "0xe81a",
"high": 9,
"low": 7
}, {
"key": 26,
"day": "星期六",
"icon": "0xe80b",
"high": 13,
"low": 9
}, {
"key": 27,
"day": "星期日",
"icon": "0xe81a",
"high": 17,
"low": 13
}, {
"key": 28,
"day": "星期一",
"icon": "0xe80b",
"high": 18,
"low": 14
}, {
"key": 29,
"day": "星期二",
"icon": "0xe80b",
"high": 22,
"low": 17
}],
"info": "今天:有暴雨,能见度低。最高气温29°。今晚局部多云,最低气温27°。",
"rise": "06:21",
"down": "18:06",
"prop": "10%",
"humi": "94%",
"dir": "东北偏北",
"speed": "3千米/小时",
"feel": "15°",
"rain": "0.0 厘米",
"pres": "1,016 百帕",
"sight": "5.0 公里",
"uv": "0"
}, {
"key": 1,
"city": "卡尔加里",
"night": false,
"bg": "w3.png",
"abs": "大部晴朗",
"degree": 15,
"today": {
"week": "星期六",
"day": "今天",
"high": 16,
"low": 14
},
"hours": [{
"key": 101,
"time": "现在",
"icon": "0xe804",
"degree": "15°",
"color": "0xFFFFFFFF"
}, {
"key": 102,
"time": "3时",
"icon": "0xe80c",
"degree": "15°",
"color": "0xCCFFFFFF"
}, {
"key": 103,
"time": "4时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 104,
"time": "5时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 105,
"time": "6时",
"icon": "0xe80c",
"degree": "16°",
"color": "0xCCFFFFFF"
}, {
"key": 106,
"time": "06:21",
"icon": "0xe829",
"degree": "日出",
"color": "0xFFfedf32"
}, {
"key": 107,
"time": "7时",
"icon": "0xe80b",
"degree": "16°",
"color": "0xE6FFFFFF"
}, {
"key": 108,
"time": "8时",
"icon": "0xe80b",
"degree": "18°",
"color": "0xE6FFFFFF"
}, {
"key": 109,
"time": "9时",
"icon": "0xe803",
"degree": "19°",
"color": "0xFFfedf32"
}, {
"key": 110,
"time": "10时",
"icon": "0xe803",
"degree": "122°",
"color": "0xFFfedf32"
}, {
"key": 111,
"time": "11时",
"icon": "0xe803",
"degree": "23°",
"color": "0xFFfedf32"
}, {
"key": 112,
"time": "13时",
"icon": "0xe803",
"degree": "22°",
"color": "0xFFfedf32"
}, {
"key": 113,
"time": "13时",
"icon": "0xe803",
"degree": "22°",
"color": "0xFFfedf32"
}, {
"key": 114,
"time": "14时",
"icon": "0xe80b",
"degree": "16°",
"color": "0xE6FFFFFF"
}, {
"key": 115,
"time": "15时",
"icon": "0xe80b",
"degree": "22°",
"color": "0xE6FFFFFF"
}, {
"key": 116,
"time": "16时",
"icon": "0xe80b",
"degree": "21°",
"color": "0xE6FFFFFF"
}, {
"key": 117,
"time": "17时",
"icon": "0xe80b",
"degree": "19°",
"color": "0xE6FFFFFF"
}, {
"key": 118,
"time": "18时",
"icon": "0xe80b",
"degree": "18°",
"color": "0xE6FFFFFF"
}, {
"key": 119,
"time": "18:06",
"icon": "0xe80b",
"degree": "日落",
"color": "0xE6FFFFFF"
}, {
"key": 120,
"time": "19时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 121,
"time": "20时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 122,
"time": "21时",
"icon": "0xe80c",
"degree": "18°",
"color": "0xCCFFFFFF"
}, {
"key": 123,
"time": "22时",
"icon": "0xe80c",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 124,
"time": "23时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 125,
"time": "0时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 126,
"time": "1时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}, {
"key": 127,
"time": "2时",
"icon": "0xe814",
"degree": "17°",
"color": "0xCCFFFFFF"
}],
"days": [{
"key": 21,
"day": "星期一",
"icon": "0xe80b",
"high": 21,
"low": 16
}, {
"key": 22,
"day": "星期二",
"icon": "0xe81a",
"high": 22,
"low": 14
}, {
"key": 23,
"day": "星期三",
"icon": "0xe81a",
"high": 21,
"low": 11
}, {
"key": 24,
"day": "星期四",
"icon": "0xe81a",
"high": 12,
"low": 8
}, {
"key": 25,
"day": "星期五",
"icon": "0xe81a",
"high": 9,
"low": 7
}, {
"key": 26,
"day": "星期六",
"icon": "0xe80b",
"high": 13,
"low": 9
}, {
"key": 27,
"day": "星期日",
"icon": "0xe81a",
"high": 17,
"low": 13
}, {
"key": 28,
"day": "星期一",
"icon": "0xe80b",
"high": 18,
"low": 14
}, {
"key": 29,
"day": "星期二",
"icon": "0xe80b",
"high": 22,
"low": 17
}],
"info": "今天:今天大部多云。现在气温 15°;最高气温23°。",
"rise": "06:21",
"down": "18:06",
"prop": "10%",
"humi": "94%",
"dir": "东北偏北",
"speed": "3千米/小时",
"feel": "15°",
"rain": "0.0 厘米",
"pres": "1,016 百帕",
"sight": "5.0 公里",
"uv": "0"
}]''');
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Carousel(
children: _weatherData.map((city) =>
WeatherPage(
cityData: city
)
).toList(),
),
),
floatingActionButton: FloatingActionButton(
tooltip: 'Back', // used by assistive technologies
child: Icon(Icons.arrow_back),
onPressed: (){
Navigator.pop(context);
},
),
);
}
}
class WeatherPage extends StatelessWidget {
WeatherPage({Key key, this.cityData}): super(key: key);
final cityData;
@override
Widget build(BuildContext context) {
List<Widget> hourViewList = cityData['hours'].map<Widget>((hourElem) => Container(
width: 55.0,
alignment: Alignment.center,
child: Column(
children: <Widget>[
Container(
child: Text(
hourElem['time'],
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 15.0)
)
),
Expanded(
child: Icon(
IconData(
int.parse(hourElem['icon']), fontFamily: 'FlutterIcon'),
color: Color(int.parse(hourElem['color'])
)
)
),
Container(
child: Text(
hourElem['degree'],
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 16.0)
)
),
],
),
)
).toList();
List<Widget> dayViewList = cityData['days'].map<Widget>((dayElem) => Container(
height: 28.0,
padding: EdgeInsets.only(left: 20.0, right: 20.0),
child: Row(
children: <Widget>[
Container(
child: Text(
dayElem['day'],
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 15.0)
)
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Icon(
IconData(int.parse(dayElem['icon']), fontFamily: 'FlutterIcon'),
color: Color(0xFFFFFFFF)
)
)
),
Container(
child: Row(
children: <Widget>[
Container(
width: 35.0,
alignment: Alignment.centerRight,
child: Text(
'${dayElem['high']}',
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 16.0)
)
),
Container(
width: 35.0,
alignment: Alignment.centerRight,
child: Text(
'${dayElem['low']}',
style: cityData['night'] ?
TextStyle(color: Color(0xFFAAAAAA), fontSize: 16.0):
TextStyle(color: Color(0xFFEEEEEE), fontSize: 16.0)
)
),
]
)
)
],
),
)
).toList();
Widget weatherOther(String title, String value) {
return Expanded(
flex: 1,
child: Container(
height: 55.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Container(
child: Text(title, style: TextStyle(color: Color(0xBBFFFFFF), fontSize: 12.0,fontWeight: FontWeight.w400)),
),
new Container(
child: Text(value, style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 24.0)),
),
],
)
)
);
}
// TODO: implement build
return new LayoutBuilder(
builder: (BuildContext context, BoxConstraints viewportConstraints) {
return SingleChildScrollView(
child: new ConstrainedBox(
constraints: new BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
child: new IntrinsicHeight(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/${cityData['bg']}'),
fit: BoxFit.cover
)
),
child: Container(
padding: EdgeInsets.only(top: 20.0),
child: Column(
children: <Widget>[
// headInfo
Container(
padding: EdgeInsets.only(top: 70.0, bottom: 60.0),
child: Column(
children: <Widget>[
Text(cityData['city'], style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 32.0),),
Text(cityData['abs'], style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 15.0)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'${cityData['degree']}',
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 85.0, letterSpacing: -5.0, fontFamily: 'OpenSans', fontWeight: FontWeight.w100)
),
Container(
padding: EdgeInsets.only(top: 25.0),
child: Text('°', style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 35.0, fontWeight: FontWeight.w300),),
)
],)
],
),
),
// withinDay
Container(
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.symmetric(horizontal: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Container(width: 60.0, child: Text(cityData['today']['week'], style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 18.0, fontWeight: FontWeight.w400))),
Container(width: 50.0, child: Text(cityData['today']['day'], style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 15.0))),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Container(width: 30.0, child: Text('${cityData['today']['high']}', style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 18.0, fontWeight: FontWeight.w200)),),
Container(width: 30.0, child: Text('${cityData['today']['low']}', style: TextStyle(color: cityData['night'] ? Color(0xFFAAAAAA) : Color(0xFFEEEEEE), fontSize: 18.0, fontWeight: FontWeight.w200)),)
],
)
],
),
),
Container(
height: 100.0,
margin: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.all(10.0),
decoration: BoxDecoration(
border: Border(top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5), bottom: BorderSide(color: Color(0xB3FFFFFF), width: 0.5)),
),
child: ListView(
scrollDirection: Axis.horizontal,
children: hourViewList,
),
),
],
),
),
// dayInWeek
Container(
margin: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.all(10.0),
child: Column(
children: dayViewList,
),
),
// weatherInfo
Container(
margin: EdgeInsets.only(top: 5.0),
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
decoration: BoxDecoration(
border: BorderDirectional(
top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
bottom: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
)
),
child: Text(
cityData['info'],
style: TextStyle(color: Color(0xFFFFFFFF), fontSize: 15.0),
),
),
Container(
child: Column(
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
weatherOther('日出', cityData['rise']),
weatherOther('日落', cityData['down']),
]),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
padding: EdgeInsets.symmetric(vertical: 10.0),
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
weatherOther('降雨概率', cityData['prop']),
weatherOther('湿度', cityData['humi']),
]),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
padding: EdgeInsets.symmetric(vertical: 10.0),
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
weatherOther('风速', cityData['speed']),
weatherOther('体感温度', cityData['feel']),
]),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
padding: EdgeInsets.symmetric(vertical: 10.0),
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
weatherOther('降水量', cityData['rain']),
weatherOther('气压', cityData['pres']),
]),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 20.0),
padding: EdgeInsets.symmetric(vertical: 10.0),
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: Color(0xB3FFFFFF), width: 0.5),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
weatherOther('能见度', cityData['sight']),
weatherOther('紫外线指数', cityData['uv']),
]),
),
],
),
)
],
),
),
)
),
),
);
},
);
}
}
================================================
FILE: lib/pages/day3.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:async';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class Day3Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
TwitterPage(),
Entrance(),
],
)
);
}
}
class Entrance extends StatefulWidget {
@override
createState() => EntranceState();
}
class EntranceState extends State<Entrance> with SingleTickerProviderStateMixin {
Animation<double> animation;
Animation<double> opacityAnimation;
AnimationController controller;
initState() {
super.initState();
controller = AnimationController(
duration: const Duration(milliseconds: 3200),
vsync: this
);
final Animation curve = CurvedAnimation(
parent: controller,
curve: Interval(0.625, 1.0, curve: Curves.ease)
);
animation = Tween(
begin: 1.0,
end: 50.0)
.animate(curve)
..addListener(() {
setState(() {
});
});
final Animation opactiyCurve = CurvedAnimation(
parent: controller,
curve: Interval(0.6875, 0.9375, curve: Curves.fastOutSlowIn)
);
opacityAnimation = Tween(
begin: 1.0,
end: 0.0)
.animate(opactiyCurve)
..addListener(() {
setState(() {
});
});
controller.forward();
}
dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return IgnorePointer(
ignoring: opacityAnimation.value == 0,
child: Opacity(
opacity: opacityAnimation.value,
child: Container(
color: Color(0xFF2AA2EF),
child: Center(
child: Transform(
alignment: FractionalOffset.center,
transform: Matrix4.identity()..scale(animation.value,),
child: Container(
child: Icon(
FontAwesomeIcons.twitter,
size: 70.0,
color: Color(0xFFFFFFFF),
// size: animation.value,
)
),
)
),
),
)
);
}
}
class TwitterPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
leading: Container(
child: CupertinoButton(
minSize: 20.0,
padding: EdgeInsets.all(0.0),
child: Icon(
FontAwesomeIcons.userPlus,
size: 18.0
),
onPressed: (){},
)
),
middle: Icon(
FontAwesomeIcons.twitter,
color: Color(0xFF2AA2EF),
),
trailing: Container(
width: 100.0,
alignment: Alignment.centerRight,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
CupertinoButton(
padding: EdgeInsets.symmetric(horizontal: 5.0),
minSize: 20.0,
child: Icon(
FontAwesomeIcons.search,
size: 18.0,
),
onPressed: (){},
),
CupertinoButton(
minSize: 20.0,
padding: EdgeInsets.only(right: 0.0, left: 5.0),
child: Icon(
FontAwesomeIcons.edit,
size: 18.0,
),
onPressed: (){},
)
],
),
)
),
child: CupertinoTabScaffold(
tabBar: CupertinoTabBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text('主页'),
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
title: Text('通知'),
),
BottomNavigationBarItem(
icon: Icon(Icons.mail),
title: Text('私信'),
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
title: Text('我'),
),
],
),
tabBuilder: (BuildContext context, int index) {
return Container(
padding: EdgeInsets.only(top: 10.0),
child: RefreshIndicator(
onRefresh: (){
final Completer<Null> completer = new Completer<Null>();
new Timer(const Duration(seconds: 3), () { completer.complete(null); });
return completer.future.then((_) {
});
},
child: ListView(
children: <Widget>[
Image.asset('assets/day3.png')
],
)
)
);
}
),
);
}
}
================================================
FILE: lib/pages/day5.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:cirrus_map_view/map_view.dart';
import 'package:location/location.dart' as location;
class Day5Page extends StatelessWidget {
final _location = location.Location();
static bool setKey = false;
Day5Page() {
if (!setKey) {
MapView.setApiKey("<Your secrect key>");
setKey = true;
}
}
@override
Widget build(BuildContext context) {
var _mapView = MapView();
_mapView.onToolbarAction.listen((id) {
if (id == 1) {
_mapView.dismiss();
}
});
//Add a method to call to show the map.
void showMap() async {
var currentLocation = await _location.getLocation();
print(currentLocation);
_mapView.show(MapOptions(
mapViewType: MapViewType.normal,
showUserLocation: true,
showMyLocationButton: true,
initialCameraPosition: CameraPosition(
Location(currentLocation['latitude'], currentLocation['longitude']),
16.0
),
title: "Find my location"),
toolbarActions: [ToolbarAction("Close", 1)]);
}
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('Find my location'),
),
body: Container(
child: Center(
child: CupertinoButton(
color: Colors.blueAccent,
onPressed: showMap,
child: Text('Find my location'),
),
),
),
);
}
}
================================================
FILE: lib/pages/day6.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter_simple_video_player/flutter_simple_video_player.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
class Day6Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
return Scaffold(
body: Stack(
children: <Widget>[
IgnorePointer(
child: Container(
child: SimpleViewPlayer("assets/moments.mp4"),
)
),
Positioned(
top: 80.0,
left: 0.0,
right: 0.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
padding: EdgeInsets.only(right: 5.0),
child: Icon(FontAwesomeIcons.spotify, size: 60.0, color: Colors.white,),
),
Container(
padding: EdgeInsets.only(right: 5.0),
child: Text('Spotify', style: TextStyle(fontSize: 35.0, color: Colors.white, fontWeight: FontWeight.w700)),
)
],
),
),
Positioned(
bottom: 90.0,
left: 0.0,
right: 0.0,
height: 90.0,
child: Container(
height: 100.0,
alignment: Alignment.bottomCenter,
child: Swiper(
autoplay: true,
autoplayDelay: 3000,
itemBuilder: (BuildContext context,int index){
String title = '';
String content = '';
String content2 = '';
switch (index) {
case 0:
title = 'Welcome';
content = 'Sign up for free music on your phone,tablet';
content2 = 'and computer.';
break;
case 1:
title = 'Browse';
content = 'Explore top tracks, new releases and the right';
content2 = 'playlist for every moment.';
break;
case 2:
title = 'Search';
content = 'Looking for that special album or artist? Just';
content2 = 'search and hit play!';
break;
case 3:
title = 'Running';
content = 'Music that perfectly matches';
content2 = 'your tempo.';
break;
case 4:
title = 'Your Library';
content = 'Save any song,album or artist to your own';
content2 = 'music collection.';
break;
default:
}
return Column(
children: <Widget>[
Text(title, style: TextStyle(color: Colors.white, fontWeight: FontWeight.w700)),
Text(content, style: TextStyle(color: Colors.white)),
Text(content2, style: TextStyle(color: Colors.white)),
],
);
},
itemCount: 5,
pagination: SwiperPagination(
builder: DotSwiperPaginationBuilder(
size: 6.0,
color: Colors.white10,
activeColor: Colors.white,
activeSize: 6.0
)
)
),
),
),
Positioned(
left: 0.0,
right: 0.0,
bottom: 0.0,
height: 40.0,
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
height: 40.0,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF201437),
),
child: InkWell(
child: Text('LOG IN', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 14.0)),
),
),
),
Expanded(
flex: 1,
child: Container(
height: 40.0,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF29B859),
),
child: InkWell(
child: Text('SIGN UP', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 14.0)),
),
),
),
],
),
)
],
),
);
}
}
================================================
FILE: lib/pages/day7.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demos_gallery/utils/throttle_debounce.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class Day7Page extends StatefulWidget {
@override
createState() => Day7PageState();
}
class Day7PageState extends State<Day7Page> {
double ballLeft = 0.0;
double ballTop = 0.0;
void handlePointerMove(List args) {
setState(() {
});
}
@override
Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
double screenHeight = MediaQuery.of(context).size.height;
double ballSize = 120.0;
var throttler = new Throttler(const Duration(milliseconds: 1), handlePointerMove, List());
return Scaffold(
body: Listener(
onPointerMove: (event) {
ballLeft = event.position.dx - ballSize / 2;
if (event.position.dx < ballSize / 2 ) {
ballLeft = 0.0;
}
if (event.position.dx > screenWidth - ballSize / 2) {
ballLeft = screenWidth - ballSize;
}
ballTop = event.position.dy - ballSize / 2;
if (event.position.dy < ballSize / 2 ) {
ballTop = 0.0;
}
if (event.position.dy > screenHeight - ballSize / 2) {
ballTop = screenHeight - ballSize;
}
throttler.throttle();
},
child: Stack(
children: <Widget>[
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/agrass.png'),
fit: BoxFit.cover
)
),
),
Positioned(
child: Icon(FontAwesomeIcons.baseballBall, size: ballSize, color: Colors.white70,),
left: ballLeft,
top: ballTop,
)
],
)
)
);
}
}
================================================
FILE: lib/pages/day8.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class Day8Page extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
drawer: Drawer (
child: ListView(
// Important: Remove any padding from the ListView.
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: 80.0,
height: 80.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(40.0)),
image: DecorationImage (
fit: BoxFit.fill,
image: AssetImage('assets/avatar.jpeg')
)
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text('gaocheng jiang', style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),),
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text('jianggaocheng@hotmail.com', style: TextStyle(color: Colors.white),),
)
],
),
decoration: BoxDecoration(
color: Color(0xFF242437),
),
),
ListTile(
leading: Icon(FontAwesomeIcons.mapMarker),
title: Text('你的地点'),
onTap: () {
// Update the state of the app
// ...
},
),
ListTile(
leading: Icon(FontAwesomeIcons.penSquare),
title: Text('你的贡献'),
onTap: () {
// Update the state of the app
// ...
},
),
ListTile(
leading: Icon(FontAwesomeIcons.productHunt),
title: Text('离线区域'),
onTap: () {
// Update the state of the app
// ...
},
),
Divider(),
ListTile(
leading: Icon(FontAwesomeIcons.road),
title: Text('实时路况'),
onTap: () {
},
),
ListTile(
leading: Icon(FontAwesomeIcons.bus),
title: Text('公交线路'),
onTap: () {
},
),
ListTile(
leading: Icon(FontAwesomeIcons.bicycle),
title: Text('骑车线路'),
onTap: () {
},
),
ListTile(
leading: Icon(Icons.photo),
title: Text('卫星图像'),
onTap: () {
},
),
ListTile(
leading: Icon(FontAwesomeIcons.tree),
title: Text('地形'),
onTap: () {
},
),
Divider(),
],
),
),
body: WillPopScope(
onWillPop: () async {
return false;
},
child:Container(
child: FlutterMap(
options: new MapOptions(
center: new LatLng(31.298886, 120.585316),
zoom: 13.0,
),
layers: [
new TileLayerOptions(
urlTemplate:
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: ['a', 'b', 'c']),
],
),
),
),
floatingActionButton: FloatingActionButton(
tooltip: 'Back', // used by assistive technologies
child: Icon(Icons.arrow_back),
onPressed: (){
Navigator.pop(context);
},
),
);
}
}
================================================
FILE: lib/pages/day9.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demos_gallery/utils/throttle_debounce.dart';
class Day9Page extends StatefulWidget {
@override
createState() => Day9State();
}
class Day9State extends State<Day9Page> {
@override
Widget build(BuildContext context) {
return CupertinoTabScaffold(
tabBar: CupertinoTabBar(
currentIndex: 3,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text('主页'),
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
title: Text('通知'),
),
BottomNavigationBarItem(
icon: Icon(Icons.mail),
title: Text('私信'),
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
title: Text('我'),
),
],
),
tabBuilder: (BuildContext context, int index) {
return UserPage();
}
);
}
}
class UserPage extends StatefulWidget {
@override
createState() => UserPageState();
}
class UserPageState extends State<UserPage> {
ScrollController _scrollController = new ScrollController();
double _blurOpacity = 0.0;
double _endFade = 200.0;
double _bannerTop = 0.0;
double _minBanner = 62.5;
double _lastOffset = 0.0;
double _iconScale = 1.5;
String _segmentIndex = '0';
void handleScrollUpdate(List args) {
double scrollOffset = _scrollController.offset < 0.0 ? 0.0 : _scrollController.offset.floor().toDouble();
if (scrollOffset == _lastOffset) {
return;
}
_lastOffset = scrollOffset;
if (scrollOffset > _endFade) {
_blurOpacity = 1.0;
}
if (scrollOffset < _minBanner) {
_blurOpacity = 0.0;
}
if (scrollOffset > _minBanner && scrollOffset < _endFade) {
_blurOpacity = (scrollOffset - _minBanner) / (_endFade - _minBanner);
}
if (scrollOffset < 150 - _minBanner) {
_bannerTop = -scrollOffset;
_iconScale = 1 + 0.5 * (150 - _minBanner - scrollOffset) / (150 - _minBanner);
} else {
_bannerTop = _minBanner - 150;
_iconScale = 1.0;
}
print('Position $scrollOffset $_blurOpacity $_iconScale');
setState(() {});
}
@override
Widget build(BuildContext context) {
var throttler = new Throttler(const Duration(milliseconds: 10), handleScrollUpdate, List());
_scrollController.addListener(() {
throttler.throttle();
});
Map<dynamic, Widget> segmentedMap = {'0': Text('推文'), '1': Text('媒体'), '2': Text('喜欢')};
Widget banner = Positioned(
key: Key('banner'),
top: _bannerTop,
left: 0.0,
height: 150.0,
right: 0.0,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage('assets/banner.png')
)
),
),
);
Widget bannerBlur = Positioned(
key: Key('bannerBlur'),
top:0.0,
left: 0.0,
height: _minBanner,
right: 0.0,
child: Opacity(
opacity: _blurOpacity,
child: Container(
height: _minBanner,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage('assets/bannerBlur.png')
)
),
child: Center(
child: Padding (
padding: EdgeInsets.only(top: 20.0),
child: Text('Github', style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500, color: Colors.white),),
)
),
)
)
);
Widget content = ListView(
key: Key('content'),
physics: new ClampingScrollPhysics(),
controller: _scrollController,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 130.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Transform(
alignment: FractionalOffset.bottomLeft,
transform: Matrix4.identity()..scale(_iconScale),
child: Container(
margin: EdgeInsets.only(left: 10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(5.0),
),
border: Border.all(
color: Colors.white,
width: 5.0
)
),
width: 68.0,
height: 68.0,
child: Image.asset('assets/icon.png')
),
),
Container(
width: 240.0,
margin: EdgeInsets.only(right: 10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
width: 40.0,
child: Icon(Icons.settings, color: Color(0xFF8999A5), size: 20.0,)
),
Container(
width: 40.0,
height: 30.0,
padding: EdgeInsets.symmetric(horizontal: 5.0, vertical: 3.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(3.0),
),
border: Border.all(
color: Color(0xFF8999A5),
width: 1.0
)
),
child: Icon(Icons.group, color: Color(0xFF8999A5), size: 20.0,)
),
Container(
width: 120.0,
height: 30.0,
padding: EdgeInsets.symmetric(horizontal: 5.0, vertical: 3.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(3.0),
),
border: Border.all(
color: Color(0xFF8999A5),
width: 1.0
)
),
alignment: Alignment.center,
child: Text('编辑个人资料', textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Color(0xFF8999A5)),)
)
],
)
),
],
),
),
Container(
padding: EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.only(bottom: 5.0),
child: Text('Github', style: TextStyle(color: Color(0xFF292F33), fontSize: 20.0, fontWeight: FontWeight.w500),),
),
Container(
padding: EdgeInsets.only(bottom: 5.0),
child: Text('@Github', style: TextStyle(color: Color(0xFF66757F)),),
),
Container(
child: Row(
children: <Widget> [
Container(
width: 110.0,
child: Row(
children: <Widget> [
Text('183', style: TextStyle(color: Color(0xFF292F33), fontWeight: FontWeight.w500)),
Text('正在关注', style: TextStyle(color: Color(0xFF95A4AE))),
]
)
),
Container(
width: 110.0,
child: Row(
children: <Widget> [
Text('830k', style: TextStyle(color: Color(0xFF292F33), fontWeight: FontWeight.w500),),
Text('关注者', style: TextStyle(color: Color(0xFF95A4AE))),
]
)
)
]
),
),
],
)
),
Container(
child: CupertinoSegmentedControl(
key: Key('segmented'),
groupValue: _segmentIndex,
onValueChanged: (index){
setState(() {
_segmentIndex = index;
});
},
children: segmentedMap,
),
),
Container(
height: 700.0,
color: Color(0xFFF5F8FA),
alignment: Alignment.topCenter,
padding: EdgeInsets.only(top: 20.0),
child: Image(
fit: BoxFit.contain,
image: AssetImage('assets/moreinfo.png'),
),
),
],
);
List<Widget> stackList = new List();
if (_iconScale != 1) {
stackList.add(banner);
stackList.add(content);
} else {
stackList.add(content);
stackList.add(banner);
}
stackList.add(bannerBlur);
return Scaffold(
body: Stack(
children: stackList
)
);
}
}
================================================
FILE: lib/pages/home.dart
================================================
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter_demos_gallery/utils/flutter_icon_icons.dart';
import 'package:flutter_demos_gallery/pages/day0.dart';
import 'package:flutter_demos_gallery/pages/day1.dart';
import 'package:flutter_demos_gallery/pages/day2.dart';
import 'package:flutter_demos_gallery/pages/day3.dart';
import 'package:flutter_demos_gallery/pages/day5.dart';
import 'package:flutter_demos_gallery/pages/day6.dart';
import 'package:flutter_demos_gallery/pages/day7.dart';
import 'package:flutter_demos_gallery/pages/day8.dart';
import 'package:flutter_demos_gallery/pages/day9.dart';
import 'package:flutter_demos_gallery/pages/day10.dart';
import 'package:flutter_demos_gallery/pages/day11.dart';
import 'package:flutter_demos_gallery/pages/day12.dart';
import 'package:flutter_demos_gallery/pages/day13.dart';
import 'package:flutter_demos_gallery/pages/day14.dart';
import 'package:flutter_demos_gallery/pages/day15.dart';
class HomePage extends StatelessWidget {
Widget menuIcons (BuildContext context, Icon icon,String title, Widget nextPage) {
return Container(
decoration: BoxDecoration(
border: BorderDirectional(
bottom: const BorderSide(color: const Color(0xFFCCCCCC)),
end: const BorderSide(color: const Color(0xFFCCCCCC)),
)
),
child: InkWell(
onTap: (){
Navigator.of(context).push(CupertinoPageRoute<bool>(
builder: (BuildContext context) => nextPage,
),);
},
child: Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
icon,
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
title
)
)
],
)
)
)
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: const Text('Flutter Demos Gallery'),
),
body: GridView.count(
primary: false,
crossAxisCount: 3,
children: <Widget>[
menuIcons(context, Icon(FontAwesomeIcons.stopwatch, size: 48.0, color: Color(0xFFFF856C)), 'Day1' ,Day1Page()),
menuIcons(context, Icon(FlutterIcon.cloud_sun_inv, size: 48.0, color: Color(0xFF90BDC1)), 'Day2' ,Day2Page()),
menuIcons(context, Icon(FontAwesomeIcons.twitter, size: 48.0, color: Color(0xFF2AA2EF)), 'Day3' ,Day3Page()),
menuIcons(context, Icon(FontAwesomeIcons.contao, size: 48.0, color: Color(0xFFFF9A05)), 'Day4' ,Day0Page()),
menuIcons(context, Icon(Icons.pin_drop, size: 48.0, color: Color(0xFF00D204)), 'Day5' ,Day5Page()),
menuIcons(context, Icon(FontAwesomeIcons.spotify, size: 48.0, color: Color(0xFF777777)), 'Day6' ,Day6Page()),
menuIcons(context, Icon(FontAwesomeIcons.baseballBall, size: 48.0, color: Color(0xFF5E2A06)), 'Day7' ,Day7Page()),
menuIcons(context, Icon(FontAwesomeIcons.google, size: 48.0, color: Color(0xFF4285F4)), 'Day8' ,Day8Page()),
menuIcons(context, Icon(FontAwesomeIcons.twitterSquare, size: 48.0, color: Color(0xFF2AA2EF)), 'Day9' ,Day9Page()),
menuIcons(context, Icon(FontAwesomeIcons.tumblr, size: 48.0, color: Color(0xFF37465C)), 'Day10' ,Day10Page()),
menuIcons(context, Icon(Icons.filter_b_and_w, size: 48.0, color: Color(0xFF2F3600)), 'Day11' ,Day11Page()),
menuIcons(context, Icon(FontAwesomeIcons.chartBar, size: 48.0, color: Color(0xFFFD8F9D)), 'Day12' ,Day12Page()),
menuIcons(context, Icon(Icons.chat, size: 48.0, color: Color(0xFF83709D)), 'Day13' ,Day13Page()),
menuIcons(context, Icon(FontAwesomeIcons.fire, size: 48.0, color: Color(0xFFFF6B6B)), 'Day14' ,Day14Page()),
menuIcons(context, Icon(FontAwesomeIcons.calendar, size: 48.0, color: Color(0xFFEC240E)), 'Day15' ,Day15Page()),
],
),
backgroundColor: Colors.white,
);
}
}
================================================
FILE: lib/utils/carousel.dart
================================================
import 'package:flutter/material.dart';
class Carousel extends StatefulWidget {
///All the [Widget] on this Carousel.
final List children;
///Returns [children]`s [lenght].
int get childrenCount => children.length;
///The transition animation timing curve. Default is [Curves.ease]
final Curve animationCurve;
///The transition animation duration. Default is 250ms.
final Duration animationDuration;
// Enable or Disable the indicator (dots). Default is true
final bool showIndicator;
//Enable/Disable radius Border for the images. Default is false
final bool borderRadius;
//Border Radius of the images. Default is [Radius.circular(8.0)]
final Radius radius;
//Move the Indicator From the Bottom
final double moveIndicatorFromBottom;
//Remove the radius bottom from the indicator background. Default false
final bool noRadiusForIndicator;
//Padding Size of the background Indicator. Default is 20.0
final double indicatorBgPadding;
// The base size of the dots. Default is 8.0
final double dotSize;
// The distance between the center of each dot. Default is 25.0
final double dotSpacing;
// The Color of each dot. Default is Colors.grey[300]
final Color dotColor;
// The Color of selected dot. Default is Colors.grey
final Color dotSelectedColor;
// The background Color of the dots. Default is [Colors.transparent]
final Color dotBgColor;
Carousel({
this.children,
this.animationCurve = Curves.ease,
this.animationDuration = const Duration(milliseconds: 250),
this.showIndicator = true,
this.borderRadius = false,
this.radius,
this.indicatorBgPadding = 20.0,
this.moveIndicatorFromBottom = 0.0,
this.noRadiusForIndicator = false,
this.dotSize = 8.0,
this.dotSpacing = 25.0,
this.dotColor = const Color(0xFFCCCCCC),
this.dotSelectedColor = Colors.grey,
this.dotBgColor,
}) :
assert(children != null),
assert(children.length > 1),
assert(animationCurve != null),
assert(animationDuration != null);
@override
State createState() => new _CarouselState();
}
class _CarouselState extends State<Carousel> with SingleTickerProviderStateMixin {
TabController _controller;
///Actual index of the displaying Widget
int get actualIndex => _controller.index;
int selectedIndex = 0;
///Returns the calculated value of the next index.
int get nextIndex {
var nextIndexValue = actualIndex;
if(nextIndexValue < _controller.length - 1)
nextIndexValue++;
else
nextIndexValue = 0;
return nextIndexValue;
}
@override
void initState() {
super.initState();
_controller = new TabController(length: widget.childrenCount, vsync: this);
_controller.addListener(_handleTabSelection);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
void _handleTabSelection() {
setState(() {
selectedIndex = _controller.index;
});
}
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Stack(
children: <Widget>[
new TabBarView(
children: widget.children.map((widget) => new Center(child: widget,)).toList(),
controller: this._controller,
),
widget.showIndicator ? new Positioned(
bottom: widget.moveIndicatorFromBottom,
left: 0.0,
right: 0.0,
child: new Container(
decoration: new BoxDecoration(
color: widget.dotBgColor == null ? Colors.transparent : widget.dotBgColor,
borderRadius: widget.borderRadius ? (widget.noRadiusForIndicator ? null : new BorderRadius.only(
bottomLeft: widget.radius != null ? widget.radius : new Radius.circular(8.0),
bottomRight: widget.radius != null ? widget.radius : new Radius.circular(8.0)
)) : null,
),
padding: new EdgeInsets.all(widget.indicatorBgPadding),
child: new Center(
child: new DotsIndicator(
controller: _controller,
itemCount: widget.children.length,
color: widget.dotColor,
selectedIndex: selectedIndex,
selectedColor: widget.dotSelectedColor,
dotSize: widget.dotSize,
dotSpacing: widget.dotSpacing,
),
),
),
) : new Container(),
],
)
);
}
}
/// An indicator showing the currently selected page of a PageController
class DotsIndicator extends StatelessWidget {
DotsIndicator({
this.controller,
this.itemCount,
this.color,
this.dotSize,
this.selectedIndex,
this.selectedColor,
this.dotSpacing
});
// The PageController that this DotsIndicator is representing.
final TabController controller;
// The number of items managed by the PageController
final int itemCount;
// Selected index
final int selectedIndex;
// The color of the dots.
final Color color;
// The color of the dots.
final Color selectedColor;
// The base size of the dots
final double dotSize;
// The distance between the center of each dot
final double dotSpacing;
Widget _buildDot(int index) {
return new Container(
width: dotSpacing,
child: new Center(
child: new Material(
color: index == selectedIndex ? selectedColor : color,
type: MaterialType.circle,
child: new Container(
width: dotSize,
height: dotSize,
),
),
),
);
}
Widget build(BuildContext context) {
return new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: new List<Widget>.generate(itemCount, _buildDot),
);
}
}
================================================
FILE: lib/utils/carousel_pro.dart
================================================
import 'dart:math';
import 'package:flutter/material.dart';
import 'dart:async';
class Carousel extends StatefulWidget {
//All the images on this Carousel.
final List<Widget> images;
//The transition animation timing curve. Default is [Curves.ease]
final Curve animationCurve;
//The transition animation duration. Default is 300ms.
final Duration animationDuration;
// The base size of the dots. Default is 8.0
final double dotSize;
// The increase in the size of the selected dot. Default is 2.0
final double dotIncreaseSize;
// The distance between the center of each dot. Default is 25.0
final double dotSpacing;
// The Color of each dot. Default is Colors.white
final Color dotColor;
// The background Color of the dots. Default is [Colors.grey[800].withOpacity(0.5)]
final Color dotBgColor;
// Enable or Disable the indicator (dots). Default is true
final bool showIndicator;
//Padding Size of the background Indicator. Default is 20.0
final double indicatorBgPadding;
//How to show the images in the box. Default is cover
final BoxFit boxFit;
//Enable/Disable radius Border for the images. Default is false
final bool borderRadius;
//Border Radius of the images. Default is [Radius.circular(8.0)]
final Radius radius;
//Move the Indicator From the Bottom
final double moveIndicatorFromBottom;
//Remove the radius bottom from the indicator background. Default false
final bool noRadiusForIndicator;
//Enable/Disable Image Overlay Shadow. Default false
final bool overlayShadow;
//Choose the color of the overlay Shadow color. Default Colors.grey[800]
final Color overlayShadowColors;
//Choose the size of the Overlay Shadow, from 0.0 to 1.0. Default 0.5
final double overlayShadowSize;
//Enable/Disable the auto play of the slider. Default true
final bool autoplay;
//Duration of the Auto play slider by seconds. Default 3 seconds
final Duration autoplayDuration;
final Color selectedColor;
Carousel({
this.images,
this.animationCurve = Curves.ease,
this.animationDuration = const Duration(milliseconds: 300),
this.dotSize = 8.0,
this.dotSpacing = 25.0,
this.dotIncreaseSize = 2.0,
this.dotColor = Colors.white,
this.dotBgColor,
this.selectedColor,
this.showIndicator = true,
this.indicatorBgPadding = 20.0,
this.boxFit = BoxFit.cover,
this.borderRadius = false,
this.radius,
this.moveIndicatorFromBottom = 0.0,
this.noRadiusForIndicator = false,
this.overlayShadow = false,
this.overlayShadowColors,
this.overlayShadowSize = 0.5,
this.autoplay = true,
this.autoplayDuration = const Duration(seconds: 3)
}) :
assert(images != null),
assert(animationCurve != null),
assert(animationDuration != null),
assert(dotSize != null),
assert(dotSpacing != null),
assert(dotIncreaseSize != null),
assert(dotColor != null);
@override
State createState() => new CarouselState();
}
class CarouselState extends State<Carousel> {
int _selected = 0;
final _controller = new PageController();
@override
void initState() {
super.initState();
if(widget.autoplay) {
new Timer.periodic(widget.autoplayDuration, (_) {
if(_controller.page == widget.images.length-1) {
_controller.animateToPage(
0,
duration: widget.animationDuration,
curve: widget.animationCurve,
);
} else {
_controller.nextPage(duration: widget.animationDuration, curve: widget.animationCurve);
}
});
}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
final List<Widget> listImages = widget.images;
return new Scaffold(
body: new Stack(
children: <Widget>[
new Container(
child: new PageView(
physics: new AlwaysScrollableScrollPhysics(),
controller: _controller,
children: listImages,
),
),
widget.showIndicator ? new Positioned(
bottom: widget.moveIndicatorFromBottom,
left: 0.0,
right: 0.0,
child: new Container(
decoration: new BoxDecoration(
color: widget.dotBgColor == null ? Colors.grey[800].withOpacity(0.5) : widget.dotBgColor,
borderRadius: widget.borderRadius ? (widget.noRadiusForIndicator ? null : new BorderRadius.only(
bottomLeft: widget.radius != null ? widget.radius : new Radius.circular(8.0),
bottomRight: widget.radius != null ? widget.radius : new Radius.circular(8.0)
)) : null,
),
padding: new EdgeInsets.all(widget.indicatorBgPadding),
child: new Center(
child: new DotsIndicator(
controller: _controller,
itemCount: listImages.length,
color: widget.dotColor,
dotSize: widget.dotSize,
selectedIndex: _selected,
selectedColor: widget.selectedColor,
dotSpacing: widget.dotSpacing,
dotIncreaseSize: widget.dotIncreaseSize,
onPageSelected: (int page) {
_controller.animateToPage(
page,
duration: widget.animationDuration,
curve: widget.animationCurve,
);
setState(() {
_selected = page;
});
},
),
),
),
) : new Container(),
],
),
);
}
}
/// An indicator showing the currently selected page of a PageController
class DotsIndicator extends StatelessWidget {
DotsIndicator({
this.controller,
this.itemCount,
this.onPageSelected,
this.color,
this.selectedIndex,
this.selectedColor,
this.dotSize,
this.dotIncreaseSize,
this.dotSpacing
});
// The PageController that this DotsIndicator is representing.
final PageController controller;
// The number of items managed by the PageController
final int itemCount;
// Called when a dot is tapped
final ValueChanged<int> onPageSelected;
// The color of the dots.
final Color color;
final int selectedIndex;
final Color selectedColor;
// The base size of the dots
final double dotSize;
// The increase in the size of the selected dot
final double dotIncreaseSize;
// The distance between the center of each dot
final double dotSpacing;
Widget _buildDot(int index) {
double selectedness = Curves.easeOut.transform(
max(
0.0,
1.0 - ((controller.page ?? controller.initialPage) - index).abs(),
),
);
print('selectednessd ${selectedness.round()} $index');
double zoom = 1.0 + (dotIncreaseSize - 1.0) * selectedness;
return new Container(
width: dotSpacing,
child: new Center(
child: new Material(
color: color,
type: MaterialType.circle,
child: new Container(
width: dotSize * zoom,
height: dotSize * zoom,
child: new InkWell(
onTap: () => onPageSelected(index),
),
),
),
),
);
}
Widget build(BuildContext context) {
return new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: new List<Widget>.generate(itemCount, _buildDot),
);
}
}
================================================
FILE: lib/utils/flutter_icon_icons.dart
================================================
/// Flutter icons FlutterIcon
/// Copyright (C) 2018 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
/// following in your pubspec.yaml
///
/// flutter:
/// fonts:
/// - family: FlutterIcon
/// fonts:
/// - asset: fonts/FlutterIcon.ttf
///
///
/// * Meteocons, Copyright (C) 2012 by Alessio Atzeni
/// Author: Alessio Atzeni
/// License: SIL (http://scripts.sil.org/OFL)
/// Homepage: http://www.alessioatzeni.com
///
import 'package:flutter/widgets.dart';
class FlutterIcon {
FlutterIcon._();
static const _kFontFam = 'FlutterIcon';
static const IconData cloud_moon = const IconData(0xe800, fontFamily: _kFontFam);
static const IconData fahrenheit = const IconData(0xe801, fontFamily: _kFontFam);
static const IconData clouds_flash_alt = const IconData(0xe802, fontFamily: _kFontFam);
static const IconData sun_inv = const IconData(0xe803, fontFamily: _kFontFam);
static const IconData moon_inv = const IconData(0xe804, fontFamily: _kFontFam);
static const IconData clouds_inv = const IconData(0xe805, fontFamily: _kFontFam);
static const IconData clouds_flash_inv = const IconData(0xe806, fontFamily: _kFontFam);
static const IconData temperature = const IconData(0xe807, fontFamily: _kFontFam);
static const IconData compass = const IconData(0xe808, fontFamily: _kFontFam);
static const IconData na = const IconData(0xe809, fontFamily: _kFontFam);
static const IconData celcius = const IconData(0xe80a, fontFamily: _kFontFam);
static const IconData cloud_sun_inv = const IconData(0xe80b, fontFamily: _kFontFam);
static const IconData cloud_moon_inv = const IconData(0xe80c, fontFamily: _kFontFam);
static const IconData moon = const IconData(0xe80d, fontFamily: _kFontFam);
static const IconData eclipse = const IconData(0xe80e, fontFamily: _kFontFam);
static const IconData mist = const IconData(0xe80f, fontFamily: _kFontFam);
static const IconData wind = const IconData(0xe810, fontFamily: _kFontFam);
static const IconData snowflake = const IconData(0xe811, fontFamily: _kFontFam);
static const IconData snow = const IconData(0xe812, fontFamily: _kFontFam);
static const IconData snow_alt = const IconData(0xe813, fontFamily: _kFontFam);
static const IconData cloud_inv = const IconData(0xe814, fontFamily: _kFontFam);
static const IconData hail = const IconData(0xe815, fontFamily: _kFontFam);
static const IconData clouds = const IconData(0xe816, fontFamily: _kFontFam);
static const IconData clouds_flash = const IconData(0xe817, fontFamily: _kFontFam);
static const IconData cloud_flash_inv = const IconData(0xe818, fontFamily: _kFontFam);
static const IconData drizzle_inv = const IconData(0xe819, fontFamily: _kFontFam);
static const IconData rain_inv = const IconData(0xe81a, fontFamily: _kFontFam);
static const IconData fog_sun = const IconData(0xe81b, fontFamily: _kFontFam);
static const IconData fog_moon = const IconData(0xe81c, fontFamily: _kFontFam);
static const IconData fog_cloud = const IconData(0xe81d, fontFamily: _kFontFam);
static const IconData fog = const IconData(0xe81e, fontFamily: _kFontFam);
static const IconData cloud = const IconData(0xe81f, fontFamily: _kFontFam);
static const IconData cloud_flash = const IconData(0xe820, fontFamily: _kFontFam);
static const IconData cloud_flash_alt = const IconData(0xe821, fontFamily: _kFontFam);
static const IconData drizzle = const IconData(0xe822, fontFamily: _kFontFam);
static const IconData rain = const IconData(0xe823, fontFamily: _kFontFam);
static const IconData windy = const IconData(0xe824, fontFamily: _kFontFam);
static const IconData windy_rain_inv = const IconData(0xe825, fontFamily: _kFontFam);
static const IconData snow_inv = const IconData(0xe826, fontFamily: _kFontFam);
static const IconData snow_heavy_inv = const IconData(0xe827, fontFamily: _kFontFam);
static const IconData windy_inv = const IconData(0xe828, fontFamily: _kFontFam);
static const IconData sunrise = const IconData(0xe829, fontFamily: _kFontFam);
static const IconData sun = const IconData(0xe82a, fontFamily: _kFontFam);
static const IconData hail_inv = const IconData(0xe82b, fontFamily: _kFontFam);
static const IconData windy_rain = const IconData(0xe82c, fontFamily: _kFontFam);
static const IconData snow_heavy = const IconData(0xe82d, fontFamily: _kFontFam);
static const IconData cloud_sun = const IconData(0xe82e, fontFamily: _kFontFam);
}
================================================
FILE: lib/utils/throttle_debounce.dart
================================================
import 'dart:async';
class Throttler{
Duration delay;
var callback;
List args;
bool noTrailing;
Throttler(this.delay, this.callback, this.args, [this.noTrailing=false]);
var timeoutId;
DateTime lastExec = new DateTime.now();
void throttle() {
Duration elapsed = new DateTime.now().difference(lastExec);
void exec() {
lastExec = new DateTime.now();
callback(args);
}
if(elapsed.compareTo(delay) >= 0) {
exec();
}
//cancel the timeout scheduled for trailing callback
if(timeoutId != null)
timeoutId.cancel();
if( noTrailing == false) {
//there should be a trailing callback, so schedule one
//buggy here, should be 'delay - elasped' but dart async only supports const Duration for delay
timeoutId = new Timer(delay, exec);
}
}
}
class Debouncer {
Duration delay;
var callback;
List args;
bool atBegin;
Debouncer(this.delay, this.callback, this.args, [this.atBegin=false]);
var timeoutId;
void debounce() {
void exec() {
callback(args);
}
void clear() {
timeoutId = null;
}
//cancel the previous timer if debounce is still being called before the delay period is over
if(timeoutId != null) {
timeoutId.cancel();
}
//if atBegin is true, 'exec' has to executed the first time debounce gets called
if(atBegin && timeoutId == null) {
exec();
}
//schedule a new call after delay time
timeoutId = new Timer(delay, atBegin ? clear : exec);
}
}
================================================
FILE: pubspec.yaml
================================================
name: flutter_demos_gallery
description: A new Flutter project.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
font_awesome_flutter: any
cirrus_map_view: ^0.0.20
location: ^1.4.1
flutter_map: ^0.1.0
flutter_simple_video_player: ^0.0.9
flutter_swiper: ^1.0.4
charts_flutter: ^0.4.0
dart2_constant: ^1.0.2+dart2
image_picker: ^0.4.10
intl: ^0.15.7
flutter_lock_widget: ^0.1.1
dev_dependencies:
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
fonts:
- family: RobotoMono
fonts:
- asset: fonts/roboto_mono/RobotoMono-Regular.ttf
- asset: fonts/roboto_mono/RobotoMono-Light.ttf
weight: 200
- asset: fonts/roboto_mono/RobotoMono-Thin.ttf
weight: 100
- family: OpenSans
fonts:
- asset: fonts/Open_Sans/OpenSans-Regular.ttf
- asset: fonts/Open_Sans/OpenSans-Light.ttf
weight: 200
- family: FlutterIcon
fonts:
- asset: fonts/FlutterIcon.ttf
assets:
- assets/
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# -
gitextract_ldgym_d8/ ├── .gitignore ├── .idea/ │ ├── libraries/ │ │ ├── Dart_SDK.xml │ │ └── Flutter_for_Android.xml │ ├── modules.xml │ ├── runConfigurations/ │ │ └── main_dart.xml │ └── workspace.xml ├── .metadata ├── LICENSE ├── README.md ├── android/ │ ├── .gitignore │ ├── app/ │ │ ├── build.gradle │ │ └── src/ │ │ └── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── example/ │ │ │ └── flutterdemosgallery/ │ │ │ └── MainActivity.java │ │ └── res/ │ │ ├── drawable/ │ │ │ └── launch_background.xml │ │ └── values/ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── flutter_demos_gallery.iml ├── flutter_demos_gallery_android.iml ├── fonts/ │ ├── Open_Sans/ │ │ └── LICENSE.txt │ └── roboto_mono/ │ └── LICENSE.txt ├── ios/ │ ├── .gitignore │ ├── Flutter/ │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Runner/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.imageset/ │ │ │ ├── Contents.json │ │ │ └── README.md │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m │ ├── Runner.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ └── Runner.xcscheme │ └── Runner.xcworkspace/ │ ├── contents.xcworkspacedata │ └── xcshareddata/ │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── lib/ │ ├── main.dart │ ├── pages/ │ │ ├── day0.dart │ │ ├── day1.dart │ │ ├── day10.dart │ │ ├── day11.dart │ │ ├── day12.dart │ │ ├── day13.dart │ │ ├── day14.dart │ │ ├── day15.dart │ │ ├── day2.dart │ │ ├── day3.dart │ │ ├── day5.dart │ │ ├── day6.dart │ │ ├── day7.dart │ │ ├── day8.dart │ │ ├── day9.dart │ │ └── home.dart │ └── utils/ │ ├── carousel.dart │ ├── carousel_pro.dart │ ├── flutter_icon_icons.dart │ └── throttle_debounce.dart └── pubspec.yaml
SYMBOL INDEX (106 symbols across 22 files)
FILE: android/app/src/main/java/com/example/flutterdemosgallery/MainActivity.java
class MainActivity (line 7) | public class MainActivity extends FlutterActivity {
method onCreate (line 8) | @Override
FILE: lib/main.dart
function main (line 6) | void main()
class MyApp (line 8) | class MyApp extends StatelessWidget {
method build (line 13) | Widget build(BuildContext context)
FILE: lib/pages/day0.dart
class Day0Page (line 4) | class Day0Page extends StatelessWidget {
method build (line 6) | Widget build(BuildContext context)
FILE: lib/pages/day1.dart
class Day1Page (line 6) | class Day1Page extends StatefulWidget {
class Day1PageState (line 11) | class Day1PageState extends State<Day1Page> {
method build (line 19) | Widget build(BuildContext context)
method _handleRightBtn (line 45) | void _handleRightBtn()
method _handleLeftBtn (line 75) | void _handleLeftBtn()
class WatchFace (line 92) | class WatchFace extends StatelessWidget{
method build (line 99) | Widget build(BuildContext context)
class WatchControl (line 126) | class WatchControl extends StatefulWidget{
class WatchControlState (line 138) | class WatchControlState extends State<WatchControl> {
method build (line 165) | Widget build(BuildContext context)
class WatchRecord (line 211) | class WatchRecord extends StatelessWidget {
method build (line 217) | Widget build(BuildContext context)
FILE: lib/pages/day10.dart
class Day10Page (line 5) | class Day10Page extends StatefulWidget {
class Day10PageState (line 10) | class Day10PageState extends State<Day10Page> with SingleTickerProviderS...
method menuItem (line 53) | Widget menuItem (String assets, String text)
method build (line 67) | Widget build(BuildContext context)
FILE: lib/pages/day11.dart
class Day11Page (line 5) | class Day11Page extends StatefulWidget {
class Day11PageStatus (line 9) | class Day11PageStatus extends State<Day11Page> {
method onPieValueChange (line 13) | void onPieValueChange (value)
method build (line 21) | Widget build(BuildContext context)
class Pie (line 55) | class Pie extends CustomPainter {
method paint (line 66) | void paint(Canvas canvas, Size size)
method shouldRepaint (line 77) | bool shouldRepaint(Pie oldDelegate)
FILE: lib/pages/day12.dart
class Day12Page (line 5) | class Day12Page extends StatelessWidget {
method build (line 48) | Widget build(BuildContext context)
class OrdinalSales (line 97) | class OrdinalSales {
FILE: lib/pages/day13.dart
class Day13Page (line 6) | class Day13Page extends StatefulWidget {
class Day13PageState (line 11) | class Day13PageState extends State<Day13Page> {
method build (line 15) | Widget build(BuildContext context)
class FunctionView (line 78) | class FunctionView extends StatelessWidget {
method build (line 84) | Widget build(BuildContext context)
FILE: lib/pages/day14.dart
class Day14Page (line 4) | class Day14Page extends StatelessWidget {
method build (line 6) | Widget build(BuildContext context)
FILE: lib/pages/day15.dart
class Day15Page (line 5) | class Day15Page extends StatefulWidget {
class Day15PageState (line 10) | class Day15PageState extends State<Day15Page> {
method initState (line 14) | void initState()
method build (line 20) | Widget build(BuildContext context)
class DateTimePickerPage (line 66) | class DateTimePickerPage extends StatelessWidget {
method build (line 72) | Widget build(BuildContext context)
FILE: lib/pages/day2.dart
class Day2Page (line 6) | class Day2Page extends StatelessWidget {
method build (line 497) | Widget build(BuildContext context)
class WeatherPage (line 519) | class WeatherPage extends StatelessWidget {
method build (line 525) | Widget build(BuildContext context)
method weatherOther (line 605) | Widget weatherOther(String title, String value)
FILE: lib/pages/day3.dart
class Day3Page (line 6) | class Day3Page extends StatelessWidget {
method build (line 8) | Widget build(BuildContext context)
class Entrance (line 20) | class Entrance extends StatefulWidget {
class EntranceState (line 25) | class EntranceState extends State<Entrance> with SingleTickerProviderSta...
method build (line 74) | Widget build(BuildContext context)
class TwitterPage (line 101) | class TwitterPage extends StatelessWidget {
method build (line 103) | Widget build(BuildContext context)
FILE: lib/pages/day5.dart
class Day5Page (line 6) | class Day5Page extends StatelessWidget {
method build (line 18) | Widget build(BuildContext context)
method showMap (line 28) | void showMap()
FILE: lib/pages/day6.dart
class Day6Page (line 8) | class Day6Page extends StatelessWidget {
method build (line 10) | Widget build(BuildContext context)
FILE: lib/pages/day7.dart
class Day7Page (line 6) | class Day7Page extends StatefulWidget {
class Day7PageState (line 11) | class Day7PageState extends State<Day7Page> {
method handlePointerMove (line 15) | void handlePointerMove(List args)
method build (line 22) | Widget build(BuildContext context)
FILE: lib/pages/day8.dart
class Day8Page (line 7) | class Day8Page extends StatelessWidget {
method build (line 9) | Widget build(BuildContext context)
FILE: lib/pages/day9.dart
class Day9Page (line 5) | class Day9Page extends StatefulWidget {
class Day9State (line 10) | class Day9State extends State<Day9Page> {
method build (line 13) | Widget build(BuildContext context)
class UserPage (line 43) | class UserPage extends StatefulWidget {
class UserPageState (line 48) | class UserPageState extends State<UserPage> {
method handleScrollUpdate (line 58) | void handleScrollUpdate(List args)
method build (line 93) | Widget build(BuildContext context)
FILE: lib/pages/home.dart
class HomePage (line 24) | class HomePage extends StatelessWidget {
method menuIcons (line 25) | Widget menuIcons (BuildContext context, Icon icon,String title, Widget...
method build (line 59) | Widget build(BuildContext context)
FILE: lib/utils/carousel.dart
class Carousel (line 3) | class Carousel extends StatefulWidget {
method createState (line 73) | State createState()
class _CarouselState (line 76) | class _CarouselState extends State<Carousel> with SingleTickerProviderSt...
method initState (line 96) | void initState()
method dispose (line 104) | void dispose()
method _handleTabSelection (line 109) | void _handleTabSelection()
method build (line 116) | Widget build(BuildContext context)
class DotsIndicator (line 157) | class DotsIndicator extends StatelessWidget {
method _buildDot (line 189) | Widget _buildDot(int index)
method build (line 205) | Widget build(BuildContext context)
FILE: lib/utils/carousel_pro.dart
class Carousel (line 5) | class Carousel extends StatefulWidget {
method createState (line 100) | State createState()
class CarouselState (line 103) | class CarouselState extends State<Carousel> {
method initState (line 108) | void initState()
method dispose (line 127) | void dispose()
method build (line 132) | Widget build(BuildContext context)
class DotsIndicator (line 193) | class DotsIndicator extends StatelessWidget {
method _buildDot (line 231) | Widget _buildDot(int index)
method build (line 260) | Widget build(BuildContext context)
FILE: lib/utils/flutter_icon_icons.dart
class FlutterIcon (line 22) | class FlutterIcon {
FILE: lib/utils/throttle_debounce.dart
class Throttler (line 3) | class Throttler{
method throttle (line 16) | void throttle()
method exec (line 20) | void exec()
class Debouncer (line 40) | class Debouncer {
method debounce (line 51) | void debounce()
method exec (line 53) | void exec()
method clear (line 57) | void clear()
Condensed preview — 68 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (207K chars).
[
{
"path": ".gitignore",
"chars": 80,
"preview": ".DS_Store\n.dart_tool/\n\n.packages\n.pub/\n\nbuild/\n\n.flutter-plugins\nscreenshot_gif\n"
},
{
"path": ".idea/libraries/Dart_SDK.xml",
"chars": 1194,
"preview": "<component name=\"libraryTable\">\n <library name=\"Dart SDK\">\n <CLASSES>\n <root url=\"file:///Users/jianggc/Documen"
},
{
"path": ".idea/libraries/Flutter_for_Android.xml",
"chars": 275,
"preview": "<component name=\"libraryTable\">\n <library name=\"Flutter for Android\">\n <CLASSES>\n <root url=\"jar:///Users/jiang"
},
{
"path": ".idea/modules.xml",
"chars": 424,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": ".idea/runConfigurations/main_dart.xml",
"chars": 271,
"preview": "<component name=\"ProjectRunConfigurationManager\">\n <configuration default=\"false\" name=\"main.dart\" type=\"FlutterRunConf"
},
{
"path": ".idea/workspace.xml",
"chars": 1517,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"FileEditorManager\">\n <leaf>\n <fi"
},
{
"path": ".metadata",
"chars": 284,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": "LICENSE",
"chars": 1064,
"preview": "MIT License\n\nCopyright (c) 2018 jianggc\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof"
},
{
"path": "README.md",
"chars": 2760,
"preview": "### 30 Days of Flutter \n30 days of Flutter examples/demos.\n\nThis project is inspired by \n30 days of React Native (http"
},
{
"path": "android/.gitignore",
"chars": 136,
"preview": "*.iml\n*.class\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\nGeneratedPlugin"
},
{
"path": "android/app/build.gradle",
"chars": 1552,
"preview": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertie"
},
{
"path": "android/app/src/main/AndroidManifest.xml",
"chars": 2009,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.example.flutterdemosgallery\">\n\n "
},
{
"path": "android/app/src/main/java/com/example/flutterdemosgallery/MainActivity.java",
"chars": 376,
"preview": "package com.example.flutterdemosgallery;\n\nimport android.os.Bundle;\nimport io.flutter.app.FlutterActivity;\nimport io.flu"
},
{
"path": "android/app/src/main/res/drawable/launch_background.xml",
"chars": 434,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
},
{
"path": "android/app/src/main/res/values/styles.xml",
"chars": 361,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTi"
},
{
"path": "android/build.gradle",
"chars": 785,
"preview": "buildscript {\n repositories {\n google()\n jcenter()\n }\n\n dependencies {\n classpath 'com.and"
},
{
"path": "android/gradle/wrapper/gradle-wrapper.properties",
"chars": 231,
"preview": "#Fri Jun 23 08:50:38 CEST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER"
},
{
"path": "android/gradle.properties",
"chars": 29,
"preview": "org.gradle.jvmargs=-Xmx1536M\n"
},
{
"path": "android/gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "android/gradlew.bat",
"chars": 2404,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "android/settings.gradle",
"chars": 484,
"preview": "include ':app'\n\ndef flutterProjectRoot = rootProject.projectDir.parentFile.toPath()\n\ndef plugins = new Properties()\ndef "
},
{
"path": "flutter_demos_gallery.iml",
"chars": 896,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "flutter_demos_gallery_android.iml",
"chars": 1451,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"FacetManager\">\n <fa"
},
{
"path": "fonts/Open_Sans/LICENSE.txt",
"chars": 11560,
"preview": "\r\n Apache License\r\n Version 2.0, January 2004\r\n "
},
{
"path": "fonts/roboto_mono/LICENSE.txt",
"chars": 11560,
"preview": "\r\n Apache License\r\n Version 2.0, January 2004\r\n "
},
{
"path": "ios/.gitignore",
"chars": 512,
"preview": ".idea/\n.vagrant/\n.sconsign.dblite\n.svn/\n\n.DS_Store\n*.swp\nprofile\n\nDerivedData/\nbuild/\nGeneratedPluginRegistrant.h\nGenera"
},
{
"path": "ios/Flutter/AppFrameworkInfo.plist",
"chars": 773,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Flutter/Debug.xcconfig",
"chars": 106,
"preview": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Flutter/Release.xcconfig",
"chars": 108,
"preview": "#include \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Podfile",
"chars": 2114,
"preview": "# Uncomment this line to define a global platform for your project\n# platform :ios, '9.0'\n\n# CocoaPods analytics sends n"
},
{
"path": "ios/Runner/AppDelegate.h",
"chars": 103,
"preview": "#import <Flutter/Flutter.h>\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : FlutterAppDelegate\n\n@end\n"
},
{
"path": "ios/Runner/AppDelegate.m",
"chars": 424,
"preview": "#include \"AppDelegate.h\"\n#include \"GeneratedPluginRegistrant.h\"\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApp"
},
{
"path": "ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2519,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
"chars": 391,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"LaunchImage.png\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
"chars": 336,
"preview": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in"
},
{
"path": "ios/Runner/Base.lproj/LaunchScreen.storyboard",
"chars": 2377,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Base.lproj/Main.storyboard",
"chars": 1605,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Info.plist",
"chars": 1469,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner/main.m",
"chars": 226,
"preview": "#import <Flutter/Flutter.h>\n#import <UIKit/UIKit.h>\n#import \"AppDelegate.h\"\n\nint main(int argc, char* argv[]) {\n @autor"
},
{
"path": "ios/Runner.xcodeproj/project.pbxproj",
"chars": 22221,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
"chars": 3331,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0910\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "ios/Runner.xcworkspace/contents.xcworkspacedata",
"chars": 224,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 243,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "lib/main.dart",
"chars": 458,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\n\nimport 'package:flutter_demos_gallery/"
},
{
"path": "lib/pages/day0.dart",
"chars": 398,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\n\nclass Day0Page extends StatelessWidget"
},
{
"path": "lib/pages/day1.dart",
"chars": 7149,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'dart:core';\nimport 'dart:async'"
},
{
"path": "lib/pages/day10.dart",
"chars": 5567,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/services.dart';"
},
{
"path": "lib/pages/day11.dart",
"chars": 1881,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:dart2_constant/math.dar"
},
{
"path": "lib/pages/day12.dart",
"chars": 2830,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:charts_flutter/flutter."
},
{
"path": "lib/pages/day13.dart",
"chars": 6954,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:font_awesome_flutter/fo"
},
{
"path": "lib/pages/day14.dart",
"chars": 355,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\n\nclass Day14Page extends StatelessWidge"
},
{
"path": "lib/pages/day15.dart",
"chars": 3387,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:intl/intl.dart';\n\nclass"
},
{
"path": "lib/pages/day2.dart",
"chars": 22040,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter_demos_gallery/u"
},
{
"path": "lib/pages/day3.dart",
"chars": 4990,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'dart:async';\nimport 'package:fo"
},
{
"path": "lib/pages/day5.dart",
"chars": 1504,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:cirrus_map_view/map_vie"
},
{
"path": "lib/pages/day6.dart",
"chars": 5162,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/services.dart';"
},
{
"path": "lib/pages/day7.dart",
"chars": 2047,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter_demos_gallery/u"
},
{
"path": "lib/pages/day8.dart",
"chars": 4100,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter_map/flutter_map"
},
{
"path": "lib/pages/day9.dart",
"chars": 9292,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter_demos_gallery/u"
},
{
"path": "lib/pages/home.dart",
"chars": 4159,
"preview": "import 'package:flutter/material.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:font_awesome_flutter/fo"
},
{
"path": "lib/utils/carousel.dart",
"chars": 5866,
"preview": "import 'package:flutter/material.dart';\n\nclass Carousel extends StatefulWidget {\n\n ///All the [Widget] on this Carousel"
},
{
"path": "lib/utils/carousel_pro.dart",
"chars": 7649,
"preview": "import 'dart:math';\nimport 'package:flutter/material.dart';\nimport 'dart:async';\n\nclass Carousel extends StatefulWidget "
},
{
"path": "lib/utils/flutter_icon_icons.dart",
"chars": 4631,
"preview": "/// Flutter icons FlutterIcon\n/// Copyright (C) 2018 by original authors @ fluttericon.com, fontello.com\n/// This font w"
},
{
"path": "lib/utils/throttle_debounce.dart",
"chars": 1555,
"preview": "import 'dart:async';\n\nclass Throttler{\n \n Duration delay;\n var callback;\n List args;\n bool noTrailing;\n\n Throttler"
},
{
"path": "pubspec.yaml",
"chars": 2607,
"preview": "name: flutter_demos_gallery\ndescription: A new Flutter project.\n\ndependencies:\n flutter:\n sdk: flutter\n\n # The foll"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the jianggaocheng/30-days-of-flutter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 68 files (186.7 KB), approximately 49.7k tokens, and a symbol index with 106 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.