├── .gitattributes ├── .gitignore ├── .metadata ├── LICENSE.md ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── musevisions │ │ │ └── layoutdemoflutter │ │ │ └── MainActivity.kt │ │ └── res │ │ ├── drawable │ │ └── launch_background.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── assets ├── moves │ ├── ic_preview_1.png │ ├── ic_preview_2.png │ ├── ic_preview_3.png │ ├── ic_preview_4.png │ ├── ic_thumb_11.png │ ├── ic_thumb_12.png │ ├── ic_thumb_13.png │ ├── ic_thumb_21.png │ ├── ic_thumb_31.png │ ├── ic_thumb_41.png │ ├── movie_banner_1.png │ ├── movie_banner_2.png │ ├── movie_banner_3.png │ └── movie_banner_4.png ├── pic_01.jpg ├── pic_02.jpg ├── pic_03.jpg ├── pic_04.jpg ├── pic_05.jpg ├── pic_06.jpg ├── pic_07.jpg ├── pic_08.jpg └── pic_09.jpg ├── doc └── flutter_layout.apk ├── flutter-stack.sketch ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── flutter_export_environment.sh ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── flutter-stack1024.png │ │ ├── flutter-stackn20.png │ │ ├── flutter-stackn40-1.png │ │ ├── flutter-stackn40-2.png │ │ ├── flutter-stackn40.png │ │ ├── flutter-stackn60.png │ │ ├── flutter-stackp152.png │ │ ├── flutter-stackp167.png │ │ ├── flutter-stackp76.png │ │ ├── flutter-stacks120-1.png │ │ ├── flutter-stacks120.png │ │ ├── flutter-stacks180.png │ │ ├── flutter-stacks29-1.png │ │ ├── flutter-stacks29.png │ │ ├── flutter-stacks58-1.png │ │ ├── flutter-stacks58.png │ │ ├── flutter-stacks80-1.png │ │ ├── flutter-stacks80.png │ │ └── flutter-stacks87.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── layout_demo_flutter.iml ├── layout_demo_flutter_android.iml ├── lib ├── constant │ ├── main_const.dart │ ├── move_data.dart │ └── size_const.dart ├── main.dart ├── nbmain.dart ├── screen │ ├── CrossAlignScreen.dart │ ├── ExpandScreen.dart │ ├── HeroScreen.dart │ ├── ListScreen.dart │ ├── NestedScreen.dart │ ├── PaddingScreen.dart │ ├── PageViewScreen.dart │ ├── RowColumnScreen.dart │ ├── SliverScreen.dart │ ├── StackScreen.dart │ ├── move │ │ ├── GridViewDetailPage.dart │ │ ├── GridViewPage.dart │ │ └── star_view.dart │ └── screen.dart └── view │ ├── app_bar.dart │ ├── cross_align_selector.dart │ ├── expand_selector.dart │ ├── list_selector.dart │ ├── nest_selector.dart │ ├── padding_selector.dart │ ├── page_selector.dart │ ├── row_column_selector.dart │ ├── sliver_selector.dart │ ├── stack_selector.dart │ └── view_selector.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshots ├── cross_align.jpg ├── expand_screen.png ├── flutter_layout.gif ├── hero_screen.png ├── list_screen_1.png ├── list_screen_2.png ├── move_grid_view_detail_screen.png ├── move_grid_view_screen.png ├── nest_screen.png ├── padding_screen.png ├── page_view_screen.png ├── row_column.jpg ├── sliver_screen.png ├── stack_screen_1.png └── stack_screen_2.png └── test └── widget_test.dart /.gitattributes: -------------------------------------------------------------------------------- 1 | android/* linguist-vendored 2 | ios/* linguist-vendored 3 | *.md linguist-language=Dart 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea 4 | .vscode/ 5 | .packages 6 | .pub/ 7 | build/ 8 | ios/.generated/ 9 | packages 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 1ba4336494b39285861963a12674802d0f7a208e 8 | channel: master 9 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Andrea Bizzotto [bizz84@gmail.com](mailto:bizz84@gmail.com) 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Just for learning 3 | ### :heart: Star :heart: the repo to support the project or :smile:[Follow Me](https://github.com/nb312).Thanks! 4 | Facebook Page | Facebook Group | QQ Group | Developer | 5 | --- | --- | --- | --- 6 | [Flutter Open ](https://www.facebook.com/flutteropen) | [Flutter Open](https://www.facebook.com/groups/948618338674126/) | 963828159 |[NieBin](https://github.com/nb312) 7 | ### This project contains contents are following: 8 | Scrollview | Sliver | common layout | Other | 9 | --- | --- | --- |--- 10 | Page view | SliverPersistentHeader| Row | InkWell 11 | ListView | SliverGrid | Stack | Shadow 12 | CustomScrollView | SliverFixedExtentList,SliverList | Expanded | Image.asset 13 | Nested ListView | SliverFillViewport | SizedBox | Padding 14 | GridView | CrossAxisAlignment | Center | Column 15 | 16 | ## ScrollView 17 | 18 | 19 | 20 | 21 | ## Common Layout 22 | 23 | 24 | 25 | 26 | # GrideView 27 | 28 | 29 | 30 | ## MyAccount 31 | [nb312](https://github.com/nb312) 32 | [Android APK Link of this project](./doc/flutter_layout.apk) 33 | [Thanks for this project](https://github.com/bizz84/layout-demo-flutter) 34 | 35 | # License 36 | The MIT License (MIT) 37 | Copyright © 2018 NieBin 38 | 39 | 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: 40 | 41 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 42 | 43 | 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. 44 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply plugin: 'kotlin-android' 16 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 17 | 18 | android { 19 | compileSdkVersion 28 20 | 21 | sourceSets { 22 | main.java.srcDirs += 'src/main/kotlin' 23 | } 24 | 25 | lintOptions { 26 | disable 'InvalidPackage' 27 | } 28 | 29 | defaultConfig { 30 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 31 | applicationId "com.nb.flutterlayout" 32 | minSdkVersion 16 33 | targetSdkVersion 28 34 | versionCode 1 35 | versionName "1.0" 36 | // testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 37 | } 38 | 39 | buildTypes { 40 | release { 41 | // TODO: Add your own signing config for the release build. 42 | // Signing with the debug keys for now, so `flutter run --release` works. 43 | signingConfig signingConfigs.debug 44 | } 45 | } 46 | } 47 | 48 | flutter { 49 | source '../..' 50 | } 51 | 52 | dependencies { 53 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 54 | testImplementation 'junit:junit:4.12' 55 | // androidTestImplementation 'com.android.support.test:runner:1.0.1' 56 | // androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 57 | } 58 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/musevisions/layoutdemoflutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.musevisions.layoutdemoflutter 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity(): FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | ext.gradle_version = '3.2.1' 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | 9 | dependencies { 10 | classpath "com.android.tools.build:gradle:$gradle_version" 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | jcenter() 20 | } 21 | } 22 | 23 | rootProject.buildDir = '../build' 24 | subprojects { 25 | project.buildDir = "${rootProject.buildDir}/${project.name}" 26 | } 27 | subprojects { 28 | project.evaluationDependsOn(':app') 29 | } 30 | 31 | task clean(type: Delete) { 32 | delete rootProject.buildDir 33 | } 34 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/moves/ic_preview_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_preview_1.png -------------------------------------------------------------------------------- /assets/moves/ic_preview_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_preview_2.png -------------------------------------------------------------------------------- /assets/moves/ic_preview_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_preview_3.png -------------------------------------------------------------------------------- /assets/moves/ic_preview_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_preview_4.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_11.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_12.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_13.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_21.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_31.png -------------------------------------------------------------------------------- /assets/moves/ic_thumb_41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/ic_thumb_41.png -------------------------------------------------------------------------------- /assets/moves/movie_banner_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/movie_banner_1.png -------------------------------------------------------------------------------- /assets/moves/movie_banner_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/movie_banner_2.png -------------------------------------------------------------------------------- /assets/moves/movie_banner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/movie_banner_3.png -------------------------------------------------------------------------------- /assets/moves/movie_banner_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/moves/movie_banner_4.png -------------------------------------------------------------------------------- /assets/pic_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_01.jpg -------------------------------------------------------------------------------- /assets/pic_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_02.jpg -------------------------------------------------------------------------------- /assets/pic_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_03.jpg -------------------------------------------------------------------------------- /assets/pic_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_04.jpg -------------------------------------------------------------------------------- /assets/pic_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_05.jpg -------------------------------------------------------------------------------- /assets/pic_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_06.jpg -------------------------------------------------------------------------------- /assets/pic_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_07.jpg -------------------------------------------------------------------------------- /assets/pic_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_08.jpg -------------------------------------------------------------------------------- /assets/pic_09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/assets/pic_09.jpg -------------------------------------------------------------------------------- /doc/flutter_layout.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/doc/flutter_layout.apk -------------------------------------------------------------------------------- /flutter-stack.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/flutter-stack.sketch -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/yangbang/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/yangbang/AndroidStudioProjects/flutter-layouts-exampls" 5 | export "FLUTTER_TARGET=lib/main.dart" 6 | export "FLUTTER_BUILD_DIR=build" 7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios" 8 | export "FLUTTER_FRAMEWORK_DIR=/Users/yangbang/flutter/bin/cache/artifacts/engine/ios" 9 | export "FLUTTER_BUILD_NAME=1.0.0" 10 | export "FLUTTER_BUILD_NUMBER=1" 11 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | def parse_KV_file(file, separator='=') 8 | file_abs_path = File.expand_path(file) 9 | if !File.exists? file_abs_path 10 | return []; 11 | end 12 | pods_ary = [] 13 | skip_line_start_symbols = ["#", "/"] 14 | File.foreach(file_abs_path) { |line| 15 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 16 | plugin = line.split(pattern=separator) 17 | if plugin.length == 2 18 | podname = plugin[0].strip() 19 | path = plugin[1].strip() 20 | podpath = File.expand_path("#{path}", file_abs_path) 21 | pods_ary.push({:name => podname, :path => podpath}); 22 | else 23 | puts "Invalid plugin specification: #{line}" 24 | end 25 | } 26 | return pods_ary 27 | end 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | 32 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 33 | # referring to absolute paths on developers' machines. 34 | system('rm -rf Pods/.symlinks') 35 | system('mkdir -p Pods/.symlinks/plugins') 36 | 37 | # Flutter Pods 38 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 39 | if generated_xcode_build_settings.empty? 40 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 41 | end 42 | generated_xcode_build_settings.map { |p| 43 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 44 | symlink = File.join('Pods', '.symlinks', 'flutter') 45 | File.symlink(File.dirname(p[:path]), symlink) 46 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 47 | end 48 | } 49 | 50 | # Plugin Pods 51 | plugin_pods = parse_KV_file('../.flutter-plugins') 52 | plugin_pods.map { |p| 53 | symlink = File.join('Pods', '.symlinks', 'plugins', p[:name]) 54 | File.symlink(p[:path], symlink) 55 | pod p[:name], :path => File.join(symlink, 'ios') 56 | } 57 | end 58 | 59 | post_install do |installer| 60 | installer.pods_project.targets.each do |target| 61 | target.build_configurations.each do |config| 62 | config.build_settings['ENABLE_BITCODE'] = 'NO' 63 | end 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Flutter (from `Pods/.symlinks/flutter/ios`) 6 | 7 | EXTERNAL SOURCES: 8 | Flutter: 9 | :path: Pods/.symlinks/flutter/ios 10 | 11 | SPEC CHECKSUMS: 12 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 13 | 14 | PODFILE CHECKSUM: ea0518673586564c605fb6593d385c0e3708ff8d 15 | 16 | COCOAPODS: 1.5.2 17 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 7B389692A7A7BC066BDFEC8B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61194A7D84C4245B2FBE0552 /* Pods_Runner.framework */; }; 17 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 18 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 20 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 61194A7D84C4245B2FBE0552 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 49 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 50 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 53 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 54 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | 7B389692A7A7BC066BDFEC8B /* Pods_Runner.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 8975A434CEF2121BDC4A9632 /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 61194A7D84C4245B2FBE0552 /* Pods_Runner.framework */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | 9740EEB11CF90186004384FC /* Flutter */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 87 | 3B80C3931E831B6300D905FE /* App.framework */, 88 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 89 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 90 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 91 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 92 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 93 | ); 94 | name = Flutter; 95 | sourceTree = ""; 96 | }; 97 | 97C146E51CF9000F007C117D = { 98 | isa = PBXGroup; 99 | children = ( 100 | 9740EEB11CF90186004384FC /* Flutter */, 101 | 97C146F01CF9000F007C117D /* Runner */, 102 | 97C146EF1CF9000F007C117D /* Products */, 103 | E6EFAB05F03EF5D1340CD2E6 /* Pods */, 104 | 8975A434CEF2121BDC4A9632 /* Frameworks */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 97C146EF1CF9000F007C117D /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 97C146EE1CF9000F007C117D /* Runner.app */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 97C146F01CF9000F007C117D /* Runner */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 120 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 121 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 122 | 97C147021CF9000F007C117D /* Info.plist */, 123 | 97C146F11CF9000F007C117D /* Supporting Files */, 124 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 125 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 126 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 127 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 128 | ); 129 | path = Runner; 130 | sourceTree = ""; 131 | }; 132 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | E6EFAB05F03EF5D1340CD2E6 /* Pods */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | ); 143 | name = Pods; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | 97C146ED1CF9000F007C117D /* Runner */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 152 | buildPhases = ( 153 | 28E82D3909AE0300E6FC3C50 /* [CP] Check Pods Manifest.lock */, 154 | 9740EEB61CF901F6004384FC /* Run Script */, 155 | 97C146EA1CF9000F007C117D /* Sources */, 156 | 97C146EB1CF9000F007C117D /* Frameworks */, 157 | 97C146EC1CF9000F007C117D /* Resources */, 158 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 159 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 160 | 4F5C128C8E4FAFEC9E8E40E5 /* [CP] Embed Pods Frameworks */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | ); 166 | name = Runner; 167 | productName = Runner; 168 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 169 | productType = "com.apple.product-type.application"; 170 | }; 171 | /* End PBXNativeTarget section */ 172 | 173 | /* Begin PBXProject section */ 174 | 97C146E61CF9000F007C117D /* Project object */ = { 175 | isa = PBXProject; 176 | attributes = { 177 | LastUpgradeCheck = 0910; 178 | ORGANIZATIONNAME = "The Chromium Authors"; 179 | TargetAttributes = { 180 | 97C146ED1CF9000F007C117D = { 181 | CreatedOnToolsVersion = 7.3.1; 182 | LastSwiftMigration = 0910; 183 | }; 184 | }; 185 | }; 186 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 187 | compatibilityVersion = "Xcode 3.2"; 188 | developmentRegion = English; 189 | hasScannedForEncodings = 0; 190 | knownRegions = ( 191 | en, 192 | Base, 193 | ); 194 | mainGroup = 97C146E51CF9000F007C117D; 195 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 196 | projectDirPath = ""; 197 | projectRoot = ""; 198 | targets = ( 199 | 97C146ED1CF9000F007C117D /* Runner */, 200 | ); 201 | }; 202 | /* End PBXProject section */ 203 | 204 | /* Begin PBXResourcesBuildPhase section */ 205 | 97C146EC1CF9000F007C117D /* Resources */ = { 206 | isa = PBXResourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 210 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 212 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 214 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 215 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXResourcesBuildPhase section */ 220 | 221 | /* Begin PBXShellScriptBuildPhase section */ 222 | 28E82D3909AE0300E6FC3C50 /* [CP] Check Pods Manifest.lock */ = { 223 | isa = PBXShellScriptBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | inputPaths = ( 228 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 229 | "${PODS_ROOT}/Manifest.lock", 230 | ); 231 | name = "[CP] Check Pods Manifest.lock"; 232 | outputPaths = ( 233 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | shellPath = /bin/sh; 237 | 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"; 238 | showEnvVarsInLog = 0; 239 | }; 240 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 241 | isa = PBXShellScriptBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | ); 245 | inputPaths = ( 246 | ); 247 | name = "Thin Binary"; 248 | outputPaths = ( 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | shellPath = /bin/sh; 252 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 253 | }; 254 | 4F5C128C8E4FAFEC9E8E40E5 /* [CP] Embed Pods Frameworks */ = { 255 | isa = PBXShellScriptBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | inputPaths = ( 260 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 261 | "${PODS_ROOT}/.symlinks/flutter/ios/Flutter.framework", 262 | ); 263 | name = "[CP] Embed Pods Frameworks"; 264 | outputPaths = ( 265 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | shellPath = /bin/sh; 269 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 270 | showEnvVarsInLog = 0; 271 | }; 272 | 9740EEB61CF901F6004384FC /* Run Script */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputPaths = ( 278 | ); 279 | name = "Run Script"; 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 285 | }; 286 | /* End PBXShellScriptBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 97C146EA1CF9000F007C117D /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 294 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXVariantGroup section */ 301 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 302 | isa = PBXVariantGroup; 303 | children = ( 304 | 97C146FB1CF9000F007C117D /* Base */, 305 | ); 306 | name = Main.storyboard; 307 | sourceTree = ""; 308 | }; 309 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | 97C147001CF9000F007C117D /* Base */, 313 | ); 314 | name = LaunchScreen.storyboard; 315 | sourceTree = ""; 316 | }; 317 | /* End PBXVariantGroup section */ 318 | 319 | /* Begin XCBuildConfiguration section */ 320 | 97C147031CF9000F007C117D /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = dwarf; 350 | ENABLE_STRICT_OBJC_MSGSEND = YES; 351 | ENABLE_TESTABILITY = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_DYNAMIC_NO_PIC = NO; 354 | GCC_NO_COMMON_BLOCKS = YES; 355 | GCC_OPTIMIZATION_LEVEL = 0; 356 | GCC_PREPROCESSOR_DEFINITIONS = ( 357 | "DEBUG=1", 358 | "$(inherited)", 359 | ); 360 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 361 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 362 | GCC_WARN_UNDECLARED_SELECTOR = YES; 363 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 364 | GCC_WARN_UNUSED_FUNCTION = YES; 365 | GCC_WARN_UNUSED_VARIABLE = YES; 366 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 367 | MTL_ENABLE_DEBUG_INFO = YES; 368 | ONLY_ACTIVE_ARCH = YES; 369 | SDKROOT = iphoneos; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | }; 372 | name = Debug; 373 | }; 374 | 97C147041CF9000F007C117D /* Release */ = { 375 | isa = XCBuildConfiguration; 376 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 377 | buildSettings = { 378 | ALWAYS_SEARCH_USER_PATHS = NO; 379 | CLANG_ANALYZER_NONNULL = YES; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_COMMA = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 389 | CLANG_WARN_EMPTY_BODY = YES; 390 | CLANG_WARN_ENUM_CONVERSION = YES; 391 | CLANG_WARN_INFINITE_RECURSION = YES; 392 | CLANG_WARN_INT_CONVERSION = YES; 393 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu99; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 415 | MTL_ENABLE_DEBUG_INFO = NO; 416 | SDKROOT = iphoneos; 417 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | VALIDATE_PRODUCT = YES; 420 | }; 421 | name = Release; 422 | }; 423 | 97C147061CF9000F007C117D /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 426 | buildSettings = { 427 | ARCHS = arm64; 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | CLANG_ENABLE_MODULES = YES; 430 | CURRENT_PROJECT_VERSION = 1; 431 | ENABLE_BITCODE = NO; 432 | FRAMEWORK_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "$(PROJECT_DIR)/Flutter", 435 | ); 436 | INFOPLIST_FILE = Runner/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | LIBRARY_SEARCH_PATHS = ( 439 | "$(inherited)", 440 | "$(PROJECT_DIR)/Flutter", 441 | ); 442 | PRODUCT_BUNDLE_IDENTIFIER = com.musevisions.layoutDemoFlutter; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 445 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 446 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 447 | SWIFT_VERSION = 4.0; 448 | VERSIONING_SYSTEM = "apple-generic"; 449 | }; 450 | name = Debug; 451 | }; 452 | 97C147071CF9000F007C117D /* Release */ = { 453 | isa = XCBuildConfiguration; 454 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 455 | buildSettings = { 456 | ARCHS = arm64; 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 458 | CLANG_ENABLE_MODULES = YES; 459 | CURRENT_PROJECT_VERSION = 1; 460 | ENABLE_BITCODE = NO; 461 | FRAMEWORK_SEARCH_PATHS = ( 462 | "$(inherited)", 463 | "$(PROJECT_DIR)/Flutter", 464 | ); 465 | INFOPLIST_FILE = Runner/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 467 | LIBRARY_SEARCH_PATHS = ( 468 | "$(inherited)", 469 | "$(PROJECT_DIR)/Flutter", 470 | ); 471 | PRODUCT_BUNDLE_IDENTIFIER = com.musevisions.layoutDemoFlutter; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 474 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 475 | SWIFT_VERSION = 4.0; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 493 | isa = XCConfigurationList; 494 | buildConfigurations = ( 495 | 97C147061CF9000F007C117D /* Debug */, 496 | 97C147071CF9000F007C117D /* Release */, 497 | ); 498 | defaultConfigurationIsVisible = 0; 499 | defaultConfigurationName = Release; 500 | }; 501 | /* End XCConfigurationList section */ 502 | }; 503 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 504 | } 505 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "flutter-stackn40-2.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "flutter-stackn60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "flutter-stacks29-1.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "flutter-stacks58-1.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "flutter-stacks87.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "flutter-stacks80-1.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "flutter-stacks120.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "flutter-stacks120-1.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "flutter-stacks180.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "flutter-stackn20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "flutter-stackn40-1.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "flutter-stacks29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "flutter-stacks58.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "flutter-stackn40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "flutter-stacks80.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "flutter-stackp76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "flutter-stackp152.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "flutter-stackp167.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "flutter-stack1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stack1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stack1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40-2.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackn60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stackp76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks120-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks29-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks29-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks58-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks80-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/AppIcon.appiconset/flutter-stacks87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Flutter Layout 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UIViewControllerBasedStatusBarAppearance 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /layout_demo_flutter.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /layout_demo_flutter_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/constant/main_const.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import 'package:flutter/material.dart'; 8 | 9 | const BOTTOM_TITLES = [ 10 | "Row / Col", 11 | 'CrossAlign', 12 | 'Stack', 13 | 'Expanded', 14 | 'Padding', 15 | 16 | //The second items. 17 | 'Page View', 18 | 'List', 19 | 'Slivers', 20 | 'Hero', 21 | 'Nested' 22 | ]; 23 | const BOTTOM_ICONS = [ 24 | Icons.view_headline, 25 | Icons.format_size, 26 | Icons.layers, 27 | Icons.line_weight, 28 | Icons.format_line_spacing, 29 | 30 | // The second items. 31 | Icons.view_week, 32 | Icons.format_list_bulleted, 33 | Icons.view_day, 34 | Icons.gradient, 35 | Icons.dashboard, 36 | ]; 37 | const BAR_ICONS = [ 38 | Icons.filter_1, 39 | Icons.filter_2, 40 | ]; 41 | const BAR_BACK_COLORS = [ 42 | Colors.green, 43 | Colors.blueAccent, 44 | ]; 45 | 46 | enum GroupType { 47 | simple, 48 | scroll, 49 | } 50 | 51 | enum ItemType { 52 | row_column, 53 | cross_align, 54 | stack, 55 | expanded, 56 | padding, 57 | 58 | //The second items. 59 | page_view, 60 | list, 61 | sliver, 62 | hero, 63 | nested 64 | } 65 | const GRID_VIEW_NAME = "GridView"; 66 | 67 | ItemType convertItemType(index) { 68 | switch (index) { 69 | case 0: 70 | return ItemType.row_column; 71 | case 1: 72 | return ItemType.cross_align; 73 | case 2: 74 | return ItemType.stack; 75 | case 3: 76 | return ItemType.expanded; 77 | case 4: 78 | return ItemType.padding; 79 | 80 | case 5: 81 | return ItemType.page_view; 82 | case 6: 83 | return ItemType.list; 84 | case 7: 85 | return ItemType.sliver; 86 | case 8: 87 | return ItemType.hero; 88 | case 9: 89 | return ItemType.nested; 90 | default: 91 | return ItemType.row_column; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/constant/move_data.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-8 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | /// 7 | import 'package:meta/meta.dart'; 8 | //import "package:flutter/material.dart"; 9 | 10 | class MoveItem { 11 | int id; 12 | String name; 13 | String category; 14 | String releaseDate; 15 | String releaseDateDesc; 16 | String directors; 17 | String runtime; 18 | String desc; 19 | double rating; 20 | String imageUrl; 21 | String bannerUrl; 22 | String trailerImg1; 23 | String trailerImg2; 24 | String trailerImg3; 25 | 26 | MoveItem({ 27 | @required this.id, 28 | @required this.name, 29 | @required this.category, 30 | @required this.directors, 31 | @required this.releaseDate, 32 | @required this.releaseDateDesc, 33 | @required this.runtime, 34 | @required this.desc, 35 | @required this.rating, 36 | @required this.imageUrl, 37 | @required this.bannerUrl, 38 | @required this.trailerImg1, 39 | @required this.trailerImg2, 40 | @required this.trailerImg3, 41 | }); 42 | } 43 | 44 | List getItemList() { 45 | return [ 46 | MoveItem( 47 | id: 0, 48 | name: 'Avengers: Infinity War', 49 | category: 'Action, Adventure, Fantasy', 50 | desc: 'The Avengers and their allies must be willing ' 51 | 'to sacrifice all in an attempt to defeat ' 52 | 'the powerful Thanos before his blitz of ' 53 | 'devastation and ruin puts an end to the universe.' 54 | '\nAs the Avengers and their allies have continued ' 55 | 'to protect the world from threats too large for ' 56 | 'any one hero to handle, a danger has emerged ' 57 | 'from the cosmic shadows: Thanos.', 58 | rating: 8.7, 59 | directors: 'Directors: Anthony Russo, Joe Russo', 60 | releaseDate: '27 April 2018', 61 | releaseDateDesc: 'USA (2018), 2h 29min', 62 | runtime: '2h 29min', 63 | bannerUrl: 'assets/moves/movie_banner_1.png', 64 | imageUrl: 'assets/moves/ic_preview_1.png', 65 | trailerImg1: 'assets/moves/ic_thumb_11.png', 66 | trailerImg2: 'assets/moves/ic_thumb_12.png', 67 | trailerImg3: 'assets/moves/ic_thumb_13.png', 68 | ), 69 | MoveItem( 70 | id: 1, 71 | name: 'Transformers: The Last Knight', 72 | category: 'Action, Adventure, Sci-Fi', 73 | desc: 'Autobots and Decepticons are at war, with humans ' 74 | 'on the sidelines. Optimus Prime is gone. The key to ' 75 | 'saving our future lies buried in the secrets of the past, ' 76 | 'in the hidden history of Transformers on Earth.', 77 | rating: 5.2, 78 | directors: 'Directors: Michael Bay', 79 | releaseDate: '21 June 2017', 80 | releaseDateDesc: 'USA (2017), 2h 34min', 81 | runtime: '2h 34min', 82 | bannerUrl: 'assets/moves/movie_banner_2.png', 83 | imageUrl: 'assets/moves/ic_preview_2.png', 84 | trailerImg1: 'assets/moves/ic_thumb_21.png', 85 | trailerImg2: 'assets/moves/ic_thumb_21.png', 86 | trailerImg3: 'assets/moves/ic_thumb_21.png', 87 | ), 88 | MoveItem( 89 | id: 2, 90 | name: 'Pacific Rim: Uprising', 91 | category: 'Action, Adventure, Sci-Fi', 92 | desc: 'Jake Pentecost, son of Stacker Pentecost, reunites with ' 93 | 'Mako Mori to lead a new generation of Jaeger pilots, including ' 94 | 'rival Lambert and 15-year-old hacker Amara, against a new Kaiju threat.', 95 | rating: 5.7, 96 | directors: 'Directors: Steven S. DeKnight', 97 | releaseDate: '23 March 2018', 98 | releaseDateDesc: 'USA (2018), 1h 51min', 99 | runtime: '1h 51min', 100 | bannerUrl: 'assets/moves/movie_banner_3.png', 101 | imageUrl: 'assets/moves/ic_preview_3.png', 102 | trailerImg1: 'assets/moves/ic_thumb_31.png', 103 | trailerImg2: 'assets/moves/ic_thumb_31.png', 104 | trailerImg3: 'assets/moves/ic_thumb_31.png', 105 | ), 106 | MoveItem( 107 | id: 3, 108 | name: 'Thor: Ragnarok', 109 | category: 'Action, Adventure, Comedy', 110 | desc: 'Thor is imprisoned on the planet Sakaar, and must ' 111 | 'race against time to return to Asgard and stop Ragnarök, ' 112 | 'the destruction of his world, at the hands of the powerful ' 113 | 'and ruthless villain Hela.', 114 | rating: 7.9, 115 | directors: 'Directors: Taika Waititi', 116 | releaseDate: '3 November 2017', 117 | releaseDateDesc: 'USA (2017), 2h 10min', 118 | runtime: '2h 10min', 119 | bannerUrl: 'assets/moves/movie_banner_4.png', 120 | imageUrl: 'assets/moves/ic_preview_4.png', 121 | trailerImg1: 'assets/moves/ic_thumb_41.png', 122 | trailerImg2: 'assets/moves/ic_thumb_41.png', 123 | trailerImg3: 'assets/moves/ic_thumb_41.png', 124 | ), 125 | MoveItem( 126 | id: 4, 127 | name: 'Thor: Ragnarok', 128 | category: 'Action, Adventure, Comedy', 129 | desc: 'Thor is imprisoned on the planet Sakaar, and must ' 130 | 'race against time to return to Asgard and stop Ragnarök, ' 131 | 'the destruction of his world, at the hands of the powerful ' 132 | 'and ruthless villain Hela.', 133 | rating: 7.9, 134 | directors: 'Directors: Taika Waititi', 135 | releaseDate: '3 November 2017', 136 | releaseDateDesc: 'USA (2017), 2h 10min', 137 | runtime: '2h 10min', 138 | bannerUrl: 'assets/moves/movie_banner_4.png', 139 | imageUrl: 'assets/moves/ic_preview_4.png', 140 | trailerImg1: 'assets/moves/ic_thumb_41.png', 141 | trailerImg2: 'assets/moves/ic_thumb_41.png', 142 | trailerImg3: 'assets/moves/ic_thumb_41.png', 143 | ), 144 | MoveItem( 145 | id: 5, 146 | name: 'Thor: Ragnarok', 147 | category: 'Action, Adventure, Comedy', 148 | desc: 'Thor is imprisoned on the planet Sakaar, and must ' 149 | 'race against time to return to Asgard and stop Ragnarök, ' 150 | 'the destruction of his world, at the hands of the powerful ' 151 | 'and ruthless villain Hela.', 152 | rating: 7.9, 153 | directors: 'Directors: Taika Waititi', 154 | releaseDate: '3 November 2017', 155 | releaseDateDesc: 'USA (2017), 2h 10min', 156 | runtime: '2h 10min', 157 | bannerUrl: 'assets/moves/movie_banner_4.png', 158 | imageUrl: 'assets/moves/ic_preview_4.png', 159 | trailerImg1: 'assets/moves/ic_thumb_41.png', 160 | trailerImg2: 'assets/moves/ic_thumb_41.png', 161 | trailerImg3: 'assets/moves/ic_thumb_41.png', 162 | ), 163 | MoveItem( 164 | id: 6, 165 | name: 'Thor: Ragnarok', 166 | category: 'Action, Adventure, Comedy', 167 | desc: 'Thor is imprisoned on the planet Sakaar, and must ' 168 | 'race against time to return to Asgard and stop Ragnarök, ' 169 | 'the destruction of his world, at the hands of the powerful ' 170 | 'and ruthless villain Hela.', 171 | rating: 7.9, 172 | directors: 'Directors: Taika Waititi', 173 | releaseDate: '3 November 2017', 174 | releaseDateDesc: 'USA (2017), 2h 10min', 175 | runtime: '2h 10min', 176 | bannerUrl: 'assets/moves/movie_banner_4.png', 177 | imageUrl: 'assets/moves/ic_preview_4.png', 178 | trailerImg1: 'assets/moves/ic_thumb_41.png', 179 | trailerImg2: 'assets/moves/ic_thumb_41.png', 180 | trailerImg3: 'assets/moves/ic_thumb_41.png', 181 | ), 182 | ]; 183 | } 184 | -------------------------------------------------------------------------------- /lib/constant/size_const.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-3 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | const TEXT_HUGE_SIZE = 100.0; 8 | const TEXT_LARGE_SIZE = 24.0; 9 | const TEXT_NORMAL_SIZE = 16.0; 10 | const TEXT_SMALL_SIZE = 10.0; 11 | const TEXT_SMALL_SIZE_2 = 8.0; 12 | 13 | const LINE_SMALL = 1.0; 14 | const LINE_NORMAL = 10.0; 15 | 16 | const SELECTOR_ONE_HEIGHT = 80.0; 17 | const SELECTOR_TWO_HEIGHT = 150.0; 18 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'nbmain.dart'; 3 | import 'package:flutter_layout/constant/main_const.dart'; 4 | import 'package:flutter_layout/screen/move/GridViewPage.dart'; 5 | 6 | void main() => runApp(new MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | title: 'Flutter layout', 13 | theme: ThemeData( 14 | primaryColor: Colors.grey[900], 15 | ), 16 | home: Scaffold( 17 | backgroundColor: Colors.grey, 18 | body: NBMain(), 19 | ), 20 | routes: { 21 | GRID_VIEW_NAME: (context) => GridViewPage(), 22 | }, 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/nbmain.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-1 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | /// 7 | import 'package:flutter/material.dart'; 8 | import './view/app_bar.dart'; 9 | import './constant/main_const.dart'; 10 | import "./screen/screen.dart"; 11 | 12 | class NBMain extends StatefulWidget { 13 | @override 14 | NBState createState() => NBState(); 15 | } 16 | 17 | const ITEM_COUNT = 5; 18 | 19 | class NBState extends State { 20 | var curGroup = GroupType.scroll; 21 | var curItemType = ItemType.page_view; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold( 26 | body: _itemBody(curItemType), 27 | bottomNavigationBar: BottomNavigationBar( 28 | type: BottomNavigationBarType.fixed, 29 | items: _bottomItems(), 30 | onTap: _selectItem, 31 | ), 32 | ); 33 | } 34 | 35 | List _bottomItems() { 36 | return curGroup == GroupType.simple 37 | ? [ 38 | _bottomItem(ItemType.row_column), 39 | _bottomItem(ItemType.cross_align), 40 | _bottomItem(ItemType.stack), 41 | _bottomItem(ItemType.expanded), 42 | _bottomItem(ItemType.padding) 43 | ] 44 | : [ 45 | _bottomItem(ItemType.page_view), 46 | _bottomItem(ItemType.list), 47 | _bottomItem(ItemType.sliver), 48 | _bottomItem(ItemType.hero), 49 | _bottomItem(ItemType.nested), 50 | ]; 51 | } 52 | 53 | BottomNavigationBarItem _bottomItem(ItemType type) { 54 | return BottomNavigationBarItem( 55 | icon: Icon( 56 | BOTTOM_ICONS[type.index], 57 | color: _itemColor(type), 58 | ), 59 | title: Text( 60 | BOTTOM_TITLES[type.index], 61 | style: TextStyle( 62 | color: _itemColor(type), 63 | ), 64 | ), 65 | ); 66 | } 67 | 68 | Widget _itemBody(ItemType type) { 69 | switch (type) { 70 | case ItemType.row_column: 71 | return RowColumnScreen(group: curGroup, onClick: _changeGroup); 72 | case ItemType.cross_align: 73 | return CrossAlignScreen(group: curGroup, onClick: _changeGroup); 74 | case ItemType.stack: 75 | return StackScreen(group: curGroup, onClick: _changeGroup); 76 | case ItemType.expanded: 77 | return ExpandScreen(group: curGroup, onClick: _changeGroup); 78 | case ItemType.padding: 79 | return PaddingScreen(group: curGroup, onClick: _changeGroup); 80 | case ItemType.page_view: 81 | return PageViewScreen(group: curGroup, onClick: _changeGroup); 82 | case ItemType.list: 83 | return ListScreen(group: curGroup, onClick: _changeGroup); 84 | case ItemType.sliver: 85 | return SliverScreen(group: curGroup, onClick: _changeGroup); 86 | case ItemType.hero: 87 | return HeroScreen(group: curGroup, onClick: _changeGroup); 88 | case ItemType.nested: 89 | return NestedScreen(group: curGroup, onClick: _changeGroup); 90 | default: 91 | return RowColumnScreen(group: curGroup, onClick: _changeGroup); 92 | } 93 | } 94 | 95 | Color _itemColor(type) { 96 | return curItemType == type ? BAR_BACK_COLORS[curGroup.index] : Colors.grey; 97 | } 98 | 99 | void _selectItem(index) { 100 | setState(() { 101 | var cur = curGroup == GroupType.simple ? index : index + ITEM_COUNT; 102 | curItemType = convertItemType(cur); 103 | }); 104 | } 105 | 106 | void _changeGroup() { 107 | setState(() { 108 | if (curGroup == GroupType.simple) { 109 | curGroup = GroupType.scroll; 110 | if (curItemType.index < ITEM_COUNT) { 111 | curItemType = convertItemType(curItemType.index + ITEM_COUNT); 112 | } 113 | } else { 114 | curGroup = GroupType.simple; 115 | if (curItemType.index >= ITEM_COUNT) { 116 | curItemType = convertItemType(curItemType.index - ITEM_COUNT); 117 | } 118 | } 119 | }); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/screen/CrossAlignScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/cross_align_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | import 'dart:math'; 12 | 13 | const CONTENT_VALUES_1 = ["This", "is", "an", "example."]; 14 | const CONTENT_VALUES_2 = ["Welcome", "To", "My", "World!"]; 15 | const COLORS = [ 16 | Colors.red, 17 | Colors.yellowAccent, 18 | Colors.deepPurple, 19 | Colors.teal 20 | ]; 21 | 22 | class CrossAlignScreen extends StatefulWidget { 23 | CrossAlignScreen({Key key, this.group, this.onClick}) : super(key: key); 24 | final VoidCallback onClick; 25 | final GroupType group; 26 | 27 | @override 28 | _CrossAlignState createState() => _CrossAlignState(); 29 | } 30 | 31 | class _CrossAlignState extends State { 32 | CrossAxisAlignment _alignment = CrossAxisAlignment.baseline; 33 | 34 | List _contents(List values) { 35 | List contents = List(); 36 | for (var i = 0; i < 4; i++) { 37 | var value = values[i]; 38 | Random random = Random(); 39 | int pos = random.nextInt(4); 40 | var text = Text( 41 | value, 42 | style: TextStyle( 43 | color: COLORS[pos], 44 | fontSize: i % 2 == 0 ? TEXT_NORMAL_SIZE : TEXT_LARGE_SIZE, 45 | ), 46 | ); 47 | contents.add(text); 48 | } 49 | return contents; 50 | } 51 | 52 | Container _bodyItem(List values) { 53 | return Container( 54 | margin: EdgeInsets.symmetric(vertical: 10.0), 55 | height: 100.0, 56 | color: Colors.grey, 57 | child: Row( 58 | mainAxisSize: MainAxisSize.max, 59 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 60 | crossAxisAlignment: _alignment, 61 | textBaseline: TextBaseline.alphabetic, 62 | children: _contents(values), 63 | ), 64 | ); 65 | } 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | return Scaffold( 70 | appBar: TopAppBar( 71 | group: widget.group, 72 | itemType: ItemType.cross_align, 73 | onClick: widget.onClick, 74 | bottomView: PreferredSize( 75 | child: CrossAlignSelector( 76 | mainColor: Colors.white, 77 | alignClick: (align) { 78 | setState(() { 79 | _alignment = align; 80 | }); 81 | }, 82 | ), 83 | preferredSize: Size(0.0, SELECTOR_ONE_HEIGHT), 84 | ), 85 | ), 86 | body: Container( 87 | child: Column( 88 | mainAxisSize: MainAxisSize.max, 89 | mainAxisAlignment: MainAxisAlignment.center, 90 | children: [ 91 | _bodyItem(CONTENT_VALUES_1), 92 | _bodyItem(CONTENT_VALUES_2), 93 | ], 94 | ), 95 | )); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /lib/screen/ExpandScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/expand_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | 12 | const _EXPAND_COLORS = [ 13 | Colors.deepPurple, 14 | Colors.amberAccent, 15 | Colors.red, 16 | ]; 17 | 18 | class ExpandScreen extends StatefulWidget { 19 | ExpandScreen({Key key, this.group, this.onClick}) : super(key: key); 20 | final VoidCallback onClick; 21 | final GroupType group; 22 | 23 | @override 24 | _ExpandState createState() => _ExpandState(); 25 | } 26 | 27 | class _ExpandState extends State { 28 | var _type = ArrangeType.Row; 29 | int _oneFlex = 1; 30 | int _twoFlex = 1; 31 | 32 | void _clickArrange(ArrangeType type) { 33 | setState(() { 34 | _type = type; 35 | }); 36 | } 37 | 38 | void _clickOne(int num) { 39 | setState(() { 40 | _oneFlex = num; 41 | }); 42 | } 43 | 44 | void _clickTwo(int num) { 45 | setState(() { 46 | _twoFlex = num; 47 | }); 48 | } 49 | 50 | Widget _bodyContent() { 51 | var list = [ 52 | Expanded( 53 | flex: _oneFlex, 54 | child: Container( 55 | color: _EXPAND_COLORS[0], 56 | child: Center( 57 | child: Text( 58 | TITLES[0], 59 | style: TextStyle(color: Colors.white, fontSize: TEXT_LARGE_SIZE), 60 | ), 61 | ), 62 | ), 63 | ), 64 | Expanded( 65 | flex: _twoFlex, 66 | child: Container( 67 | color: _EXPAND_COLORS[1], 68 | child: Center( 69 | child: Text( 70 | TITLES[1], 71 | style: TextStyle(color: Colors.white, fontSize: TEXT_LARGE_SIZE), 72 | ), 73 | ), 74 | ), 75 | ), 76 | ]; 77 | return _type == ArrangeType.Row 78 | ? Row( 79 | mainAxisSize: MainAxisSize.max, 80 | children: list, 81 | ) 82 | : Column( 83 | mainAxisSize: MainAxisSize.max, 84 | children: list, 85 | ); 86 | } 87 | 88 | @override 89 | Widget build(BuildContext context) { 90 | return Scaffold( 91 | appBar: TopAppBar( 92 | group: widget.group, 93 | itemType: ItemType.expanded, 94 | onClick: widget.onClick, 95 | bottomView: PreferredSize( 96 | child: ExpandSelector( 97 | mainColor: Colors.white, 98 | clickArrange: _clickArrange, 99 | clickOne: _clickOne, 100 | clickTwo: _clickTwo, 101 | ), 102 | preferredSize: Size(0.0, SELECTOR_TWO_HEIGHT)), 103 | ), 104 | body: Container( 105 | constraints: BoxConstraints.expand(), 106 | child: _bodyContent(), 107 | ), 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/screen/HeroScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../constant/main_const.dart'; 8 | import "../constant/size_const.dart"; 9 | import 'package:flutter/rendering.dart'; 10 | 11 | const BAR_FONT_SIZE = 21.0; 12 | const BAR_TITLE_COLOR = Colors.white; 13 | const IMAGES = [ 14 | "pic_01", 15 | "pic_02", 16 | "pic_04", 17 | "pic_05", 18 | "pic_06", 19 | "pic_07", 20 | "pic_08", 21 | "pic_09" 22 | ]; 23 | 24 | Image _getAssetImage(name) { 25 | return Image.asset( 26 | "assets/$name.jpg", 27 | fit: BoxFit.cover, 28 | ); 29 | } 30 | 31 | class HeaderDelegate implements SliverPersistentHeaderDelegate { 32 | HeaderDelegate({ 33 | Key key, 34 | this.maxExtent, 35 | this.minExtent, 36 | this.group, 37 | this.onClick, 38 | }); 39 | 40 | final VoidCallback onClick; 41 | final GroupType group; 42 | double maxExtent; 43 | double minExtent; 44 | 45 | @override 46 | Widget build( 47 | BuildContext context, double shrinkOffset, bool overlapsContent) { 48 | print("shrinkOffset:$shrinkOffset"); 49 | return Stack( 50 | fit: StackFit.expand, 51 | children: [ 52 | _getAssetImage("pic_03"), 53 | Container( 54 | decoration: BoxDecoration( 55 | gradient: LinearGradient( 56 | colors: [ 57 | Colors.transparent, 58 | Colors.black54, 59 | ], 60 | stops: [0.2, 1.0], 61 | begin: Alignment.topCenter, 62 | end: Alignment.bottomCenter, 63 | tileMode: TileMode.repeated, 64 | ), 65 | ), 66 | ), 67 | Positioned( 68 | top: 4.0, 69 | left: 4.0, 70 | child: SafeArea( 71 | child: IconButton( 72 | icon: Icon( 73 | BAR_ICONS[this.group.index], 74 | color: BAR_TITLE_COLOR, 75 | ), 76 | onPressed: onClick)), 77 | ), 78 | Container( 79 | alignment: shrinkOffset > 100 80 | ? AlignmentDirectional.topCenter 81 | : AlignmentDirectional.bottomStart, 82 | margin: shrinkOffset > 100 83 | ? EdgeInsets.only(top: 40.0) 84 | : EdgeInsets.only(left: 40.0, bottom: 20.0), 85 | child: Text( 86 | BOTTOM_TITLES[ItemType.hero.index], 87 | style: TextStyle(color: BAR_TITLE_COLOR, fontSize: BAR_FONT_SIZE), 88 | ), 89 | ) 90 | ], 91 | ); 92 | } 93 | 94 | @override 95 | bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => true; 96 | 97 | @override 98 | FloatingHeaderSnapConfiguration get snapConfiguration => null; 99 | } 100 | 101 | class HeroScreen extends StatefulWidget { 102 | HeroScreen({Key key, this.group, this.onClick}) : super(key: key); 103 | final VoidCallback onClick; 104 | final GroupType group; 105 | 106 | @override 107 | _HeroState createState() => _HeroState(); 108 | } 109 | 110 | class _HeroState extends State { 111 | @override 112 | Widget build(BuildContext context) { 113 | return CustomScrollView(slivers: [ 114 | SliverPersistentHeader( 115 | pinned: true, 116 | delegate: HeaderDelegate( 117 | maxExtent: 200, 118 | minExtent: 100, 119 | group: widget.group, 120 | onClick: widget.onClick, 121 | ), 122 | ), 123 | SliverGrid( 124 | gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( 125 | maxCrossAxisExtent: 200.0, 126 | mainAxisSpacing: 10.0, 127 | crossAxisSpacing: 10.0, 128 | childAspectRatio: 1.0, 129 | ), 130 | delegate: SliverChildBuilderDelegate( 131 | (context, index) { 132 | var name = IMAGES[index % 8]; 133 | return Container( 134 | margin: EdgeInsets.symmetric(vertical: 2.0), 135 | child: _getAssetImage(name), 136 | ); 137 | }, 138 | childCount: IMAGES.length, 139 | ), 140 | ), 141 | ]); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /lib/screen/ListScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/list_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | import 'package:flutter_layout/constant/main_const.dart'; 12 | import 'package:flutter_layout/screen/move/GridViewPage.dart'; 13 | class User { 14 | User({this.name, this.email}); 15 | 16 | final String name; 17 | final String email; 18 | } 19 | 20 | const USER_NAMES = [ 21 | "Isa Tusa", 22 | "Racquel Ricciardi", 23 | "Teresita Mccubbin", 24 | "Rhoda Hassinger", 25 | "Carson Cupps", 26 | "Devora Nantz", 27 | "Tyisha Primus", 28 | "Muriel Lewellyn", 29 | "Hunter Giraud", 30 | "Corina Whiddon", 31 | "Meaghan Covarrubias", 32 | "Ulysses Severson", 33 | "Richard Baxter", 34 | "Alessandra Kahn", 35 | "Libby Saari", 36 | "Valeria Salvador", 37 | "Fredrick Folkerts", 38 | "Delmy Izzi", 39 | "Leann Klock", 40 | "Rhiannon Macfarlane", 41 | ]; 42 | const USER_EMAILS = [ 43 | "isa.tusa@me.com", 44 | "racquel.ricciardi@me.com", 45 | "teresita.mccubbin@me.com", 46 | "rhoda.hassinger@me.com", 47 | "carson.cupps@me.com", 48 | "devora.nantz@me.com", 49 | "tyisha.primus@me.com", 50 | "muriel.lewellyn@me.com", 51 | "hunter.giraud@me.com", 52 | "corina.whiddon@me.com", 53 | "meaghan.covarrubias@me.com", 54 | "ulysses.severson@me.com", 55 | "richard.baxter@me.com", 56 | "alessandra.kahn@me.com", 57 | "libby.saari@me.com", 58 | "valeria.salvador@me.com", 59 | "fredrick.folkerts@me.com", 60 | "delmy.izzi@me.com", 61 | "leann.klock@me.com", 62 | "rhiannon.macfarlane@me.com", 63 | ]; 64 | 65 | class ListScreen extends StatefulWidget { 66 | ListScreen({Key key, this.group, this.onClick}) : super(key: key); 67 | final VoidCallback onClick; 68 | final GroupType group; 69 | 70 | @override 71 | _ListState createState() => _ListState(); 72 | } 73 | 74 | class _ListState extends State { 75 | var _direction = Axis.vertical; 76 | List users; 77 | 78 | List _users() { 79 | var list = List(); 80 | for (int i = 0; i < USER_NAMES.length; i++) { 81 | var user = User(name: USER_NAMES[i], email: USER_EMAILS[i]); 82 | list.add(user); 83 | } 84 | return list; 85 | } 86 | 87 | Widget _itemTitle(User user) { 88 | return ListTile( 89 | title: Text( 90 | user.name, 91 | style: TextStyle( 92 | color: Colors.white, 93 | ), 94 | ), 95 | subtitle: Text( 96 | user.email, 97 | style: TextStyle( 98 | color: Colors.white30, 99 | ), 100 | ), 101 | leading: CircleAvatar( 102 | child: Text( 103 | user.name[0], 104 | style: TextStyle( 105 | color: Colors.white, 106 | ), 107 | ), 108 | backgroundColor: BAR_BACK_COLORS[widget.group.index], 109 | ), 110 | ); 111 | } 112 | 113 | Widget _bodyContent() { 114 | if (users == null) { 115 | users = _users(); 116 | } 117 | var isVertical = _direction == Axis.vertical; 118 | return ListView.builder( 119 | scrollDirection: _direction, 120 | itemCount: users.length, 121 | itemBuilder: (context, index) { 122 | return Container( 123 | alignment: AlignmentDirectional.center, 124 | color: Colors.brown, 125 | margin: isVertical 126 | ? EdgeInsets.only(bottom: 1.0) 127 | : EdgeInsets.only(right: 1.0), 128 | constraints: isVertical 129 | ? BoxConstraints.tightForFinite(height: 80.0) 130 | : BoxConstraints.tightForFinite(width: 260.0), 131 | child: _itemTitle(users[index]), 132 | ); 133 | }, 134 | ); 135 | } 136 | 137 | Widget _topRight() { 138 | return InkWell( 139 | onTap: () { 140 | print("click"); 141 | Navigator.push( 142 | context, 143 | MaterialPageRoute( 144 | builder: (context) =>GridViewPage())); 145 | // Navigator.of(context).pushNamed(GRID_VIEW_NAME); 146 | }, 147 | child: Container( 148 | padding: EdgeInsets.only(right: 10.0), 149 | child: Center( 150 | child: Text( 151 | GRID_VIEW_NAME, 152 | style: TextStyle( 153 | color: Colors.white, 154 | fontWeight: FontWeight.w700, 155 | fontSize: TEXT_NORMAL_SIZE, 156 | shadows: [ 157 | Shadow(color: Colors.grey[800], offset: Offset(0.0, 1.0)) 158 | ]), 159 | ), 160 | ), 161 | ), 162 | ); 163 | } 164 | 165 | @override 166 | Widget build(BuildContext context) { 167 | return Scaffold( 168 | appBar: TopAppBar( 169 | group: widget.group, 170 | itemType: ItemType.list, 171 | onClick: widget.onClick, 172 | right: _topRight(), 173 | bottomView: PreferredSize( 174 | child: ListSelector( 175 | mainColor: Colors.white, 176 | clickDirection: (direct) { 177 | setState(() { 178 | _direction = direct; 179 | }); 180 | }, 181 | ), 182 | preferredSize: Size(0.0, SELECTOR_ONE_HEIGHT)), 183 | ), 184 | body: Container( 185 | constraints: _direction == Axis.vertical 186 | ? null 187 | : BoxConstraints.tightForFinite(height: 80.0), 188 | child: Center( 189 | child: _bodyContent(), 190 | ), 191 | ), 192 | ); 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /lib/screen/NestedScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/nest_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | 12 | final List _parentColors = [ 13 | Colors.deepOrange, 14 | Colors.green, 15 | Colors.brown, 16 | Colors.indigo, 17 | Colors.purple, 18 | ]; 19 | 20 | class NestedScreen extends StatefulWidget { 21 | NestedScreen({Key key, this.group, this.onClick}) : super(key: key); 22 | final VoidCallback onClick; 23 | final GroupType group; 24 | 25 | @override 26 | _NestedState createState() => _NestedState(); 27 | } 28 | 29 | class _NestedState extends State { 30 | var parentCount = 2; 31 | var childCount = 10; 32 | var _direction = Axis.vertical; 33 | 34 | Widget _buildParent() { 35 | var _height = 100.0; 36 | return ListView.builder( 37 | itemBuilder: (context, index) { 38 | return Container( 39 | constraints: _direction == Axis.vertical 40 | ? BoxConstraints.tightForFinite(height: _height) 41 | : BoxConstraints.tightForFinite(width: _height), 42 | alignment: AlignmentDirectional.centerStart, 43 | child: _buildChild(index, _height), 44 | ); 45 | }, 46 | itemCount: parentCount, 47 | scrollDirection: _direction, 48 | ); 49 | } 50 | 51 | Widget _buildChild(parentIndex, height) { 52 | return ListView.builder( 53 | itemBuilder: (context, index) { 54 | var i = index % 5 + 4; 55 | i *= 100; 56 | return SizedBox( 57 | width: height, 58 | height: height, 59 | child: Container( 60 | color: _parentColors[parentIndex % 5][i], 61 | margin: EdgeInsets.all(1.0), 62 | alignment: AlignmentDirectional.center, 63 | child: Text( 64 | "$index", 65 | style: TextStyle( 66 | color: Colors.white, 67 | fontWeight: FontWeight.w700, 68 | ), 69 | ), 70 | ), 71 | ); 72 | }, 73 | itemCount: childCount, 74 | scrollDirection: 75 | _direction == Axis.vertical ? Axis.horizontal : Axis.vertical, 76 | ); 77 | } 78 | 79 | @override 80 | Widget build(BuildContext context) { 81 | return Scaffold( 82 | appBar: TopAppBar( 83 | group: widget.group, 84 | itemType: ItemType.nested, 85 | onClick: widget.onClick, 86 | bottomView: PreferredSize( 87 | child: NestSelector( 88 | mainColor: Colors.white, 89 | clickChild: (count) { 90 | setState(() { 91 | childCount = count; 92 | }); 93 | }, 94 | clickParent: (count) { 95 | setState(() { 96 | parentCount = count; 97 | }); 98 | }, 99 | clickDirection: (direction) { 100 | setState(() { 101 | _direction = direction; 102 | }); 103 | }, 104 | ), 105 | preferredSize: Size(0.0, SELECTOR_TWO_HEIGHT), 106 | ), 107 | ), 108 | body: Container( 109 | constraints: BoxConstraints.expand(), 110 | child: _buildParent(), 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /lib/screen/PaddingScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/padding_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | const _PADDING_TIMES = 5.0; 12 | 13 | class PaddingScreen extends StatefulWidget { 14 | PaddingScreen({Key key, this.group, this.onClick}) : super(key: key); 15 | final VoidCallback onClick; 16 | final GroupType group; 17 | 18 | @override 19 | _PaddingState createState() => _PaddingState(); 20 | } 21 | 22 | class _PaddingState extends State { 23 | double paddingLeft = 0.0; 24 | double paddingRight = 0.0; 25 | double paddingTop = 0.0; 26 | double paddingBottom = 0.0; 27 | 28 | void _clickLeft(int pos) { 29 | setState(() { 30 | print("$pos"); 31 | paddingLeft = _PADDING_TIMES * pos; 32 | }); 33 | } 34 | 35 | void _clickRight(int pos) { 36 | setState(() { 37 | paddingRight = _PADDING_TIMES * pos; 38 | }); 39 | } 40 | 41 | void _clickTop(int pos) { 42 | setState(() { 43 | paddingTop = _PADDING_TIMES * pos; 44 | }); 45 | } 46 | 47 | void _clickBottom(int pos) { 48 | setState(() { 49 | paddingBottom = _PADDING_TIMES * pos; 50 | }); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return Scaffold( 56 | appBar: TopAppBar( 57 | group: widget.group, 58 | itemType: ItemType.padding, 59 | onClick: widget.onClick, 60 | bottomView: PreferredSize( 61 | child: PaddingSelector( 62 | clickLeft: _clickLeft, 63 | clickRight: _clickRight, 64 | clickTop: _clickTop, 65 | clickBottom: _clickBottom, 66 | mainColor: Colors.white, 67 | ), 68 | preferredSize: Size(0.0, SELECTOR_TWO_HEIGHT)), 69 | ), 70 | body: Container( 71 | constraints: BoxConstraints.expand(), 72 | color: Colors.deepPurple, 73 | child: Padding( 74 | padding: EdgeInsets.fromLTRB( 75 | paddingLeft, 76 | paddingTop, 77 | paddingRight, 78 | paddingBottom, 79 | ), 80 | child: Container( 81 | color: Colors.yellowAccent, 82 | ), 83 | ), 84 | ), 85 | ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/screen/PageViewScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/page_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | 12 | const PAGE_CONTENTS = ["One Page", "Two Page", "Three Page", "Four Page"]; 13 | const PAGE_COLORS = [ 14 | Colors.red, 15 | Colors.black38, 16 | Colors.deepPurple, 17 | Colors.brown 18 | ]; 19 | 20 | class PageViewScreen extends StatefulWidget { 21 | PageViewScreen({Key key, this.group, this.onClick}) : super(key: key); 22 | final VoidCallback onClick; 23 | final GroupType group; 24 | 25 | @override 26 | _PageViewState createState() => _PageViewState(); 27 | } 28 | 29 | class _PageViewState extends State { 30 | PageController _controller; 31 | 32 | @override 33 | void initState() { 34 | _controller = PageController( 35 | initialPage: 0, 36 | ); 37 | super.initState(); 38 | } 39 | 40 | var direction = Axis.horizontal; 41 | 42 | void _clickDirection(Axis direction) { 43 | setState(() { 44 | this.direction = direction; 45 | }); 46 | } 47 | 48 | void _changePage(int page) { 49 | _controller.jumpToPage(page); 50 | } 51 | 52 | Widget _childView(int pos) { 53 | return Container( 54 | color: PAGE_COLORS[pos], 55 | margin: EdgeInsets.symmetric(vertical: 20.0, horizontal: 10.0), 56 | constraints: BoxConstraints.expand(), 57 | alignment: AlignmentDirectional.center, 58 | child: Text( 59 | PAGE_CONTENTS[pos], 60 | style: TextStyle(color: Colors.white, fontSize: TEXT_HUGE_SIZE), 61 | ), 62 | ); 63 | } 64 | 65 | Widget _bodyContent() { 66 | var list = List(); 67 | for (int i = 0; i < PAGE_CONTENTS.length; i++) { 68 | list.add(_childView(i)); 69 | } 70 | if (_controller == null) { 71 | _controller = PageController( 72 | initialPage: 0, 73 | ); 74 | } 75 | return PageView( 76 | controller: _controller, 77 | scrollDirection: direction, 78 | children: list, 79 | ); 80 | } 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | return Scaffold( 85 | appBar: TopAppBar( 86 | group: widget.group, 87 | itemType: ItemType.page_view, 88 | onClick: widget.onClick, 89 | bottomView: PreferredSize( 90 | child: PageSelector( 91 | mainColor: Colors.white, 92 | clickDirection: _clickDirection, 93 | clickPage: _changePage, 94 | ), 95 | preferredSize: Size(0.0, SELECTOR_ONE_HEIGHT)), 96 | ), 97 | body: Container( 98 | constraints: BoxConstraints.expand(), 99 | child: _bodyContent(), 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /lib/screen/RowColumnScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | /// 7 | import "package:flutter/material.dart"; 8 | import '../view/app_bar.dart'; 9 | import '../constant/main_const.dart'; 10 | import '../view/row_column_selector.dart' show RowColumnSelector, LayType; 11 | import '../constant/size_const.dart'; 12 | class RowColumnScreen extends StatefulWidget { 13 | RowColumnScreen({Key key, this.group, this.onClick}) : super(key: key); 14 | final VoidCallback onClick; 15 | final GroupType group; 16 | 17 | @override 18 | _RowColumnState createState() => _RowColumnState(); 19 | } 20 | 21 | class _RowColumnState extends State { 22 | LayType _layType = LayType.row; 23 | MainAxisSize _size = MainAxisSize.min; 24 | MainAxisAlignment _mainAlign = MainAxisAlignment.start; 25 | CrossAxisAlignment _crossAlign = CrossAxisAlignment.start; 26 | 27 | void _changeLayout(LayType type) { 28 | setState(() { 29 | _layType = type; 30 | }); 31 | } 32 | 33 | void _changeMainSize(MainAxisSize size) { 34 | setState(() { 35 | _size = size; 36 | }); 37 | } 38 | 39 | void _changeMainAlign(MainAxisAlignment align) { 40 | setState(() { 41 | _mainAlign = align; 42 | }); 43 | } 44 | 45 | void _changeCrossAlign(CrossAxisAlignment align) { 46 | setState(() { 47 | _crossAlign = align; 48 | }); 49 | } 50 | 51 | Widget _body() { 52 | List children = [ 53 | Icon( 54 | Icons.add_a_photo, 55 | size: 50, 56 | color: BAR_BACK_COLORS[widget.group.index], 57 | ), 58 | Icon( 59 | Icons.add_a_photo, 60 | size: 100, 61 | color: BAR_BACK_COLORS[widget.group.index], 62 | ), 63 | Icon( 64 | Icons.add_a_photo, 65 | size: 50, 66 | color: BAR_BACK_COLORS[widget.group.index], 67 | ) 68 | ]; 69 | return _layType == LayType.column 70 | ? Column( 71 | mainAxisSize: _size, 72 | mainAxisAlignment: _mainAlign, 73 | crossAxisAlignment: _crossAlign, 74 | children: children, 75 | ) 76 | : Row( 77 | mainAxisSize: _size, 78 | mainAxisAlignment: _mainAlign, 79 | crossAxisAlignment: _crossAlign, 80 | children: children, 81 | ); 82 | } 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | return Scaffold( 87 | appBar: TopAppBar( 88 | group: widget.group, 89 | itemType: ItemType.row_column, 90 | onClick: widget.onClick, 91 | bottomView: PreferredSize( 92 | preferredSize: Size(0.0, SELECTOR_TWO_HEIGHT), 93 | child: RowColumnSelector( 94 | clickLayout: _changeLayout, 95 | clickMainSize: _changeMainSize, 96 | clickMainAlign: _changeMainAlign, 97 | clickCrossAlign: _changeCrossAlign, 98 | mainColor: Colors.white, 99 | ), 100 | )), 101 | body: Container( 102 | color: Colors.black26, 103 | child: _body(), 104 | ), 105 | ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /lib/screen/SliverScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | 10 | const _ITEM_CONTENTS = [ 11 | "SliverGrid", 12 | "SliverFixedExtentList", 13 | "SliverList", 14 | "SliverFillViewport", 15 | ]; 16 | 17 | class SliverScreen extends StatefulWidget { 18 | SliverScreen({Key key, this.group, this.onClick}) : super(key: key); 19 | final VoidCallback onClick; 20 | final GroupType group; 21 | 22 | @override 23 | _SliverState createState() => _SliverState(); 24 | } 25 | 26 | class _SliverState extends State { 27 | Widget _buildContent(context, index, int type) { 28 | var c = 100 * (index % 9); 29 | return Container( 30 | alignment: AlignmentDirectional.center, 31 | margin: EdgeInsets.symmetric(vertical: 10.0), 32 | color: Colors.brown[c == 0 ? 400 : c], 33 | child: Text( 34 | "${_ITEM_CONTENTS[type]} $index", 35 | style: TextStyle(color: Colors.white), 36 | ), 37 | ); 38 | } 39 | 40 | Widget _sliverGrid() { 41 | return SliverGrid( 42 | gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent( 43 | maxCrossAxisExtent: 200.0, 44 | mainAxisSpacing: 10.0, 45 | crossAxisSpacing: 10.0, 46 | childAspectRatio: 2.0, 47 | ), 48 | delegate: SliverChildBuilderDelegate( 49 | (context, index) { 50 | return _buildContent(context, index, 0); 51 | }, 52 | childCount: 20, 53 | ), 54 | ); 55 | } 56 | 57 | Widget _sliverFixed() { 58 | return SliverFixedExtentList( 59 | delegate: SliverChildBuilderDelegate((context, index) { 60 | return _buildContent(context, index, 1); 61 | }, childCount: 10), 62 | itemExtent: 100.0, 63 | ); 64 | } 65 | 66 | Widget _sliverList() { 67 | return SliverList( 68 | delegate: SliverChildBuilderDelegate((context, index) { 69 | return _buildContent(context, index, 2); 70 | }, childCount: 10), 71 | ); 72 | } 73 | 74 | Widget _sliverViewPort() { 75 | return SliverFillViewport( 76 | delegate: SliverChildBuilderDelegate((context, index) { 77 | return _buildContent(context, index, 2); 78 | }, childCount: 4), 79 | ); 80 | } 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | return CustomScrollView( 85 | slivers: [ 86 | SliverBar( 87 | group: widget.group, 88 | itemType: ItemType.sliver, 89 | onClick: widget.onClick, 90 | ), 91 | _sliverGrid(), 92 | _sliverFixed(), 93 | _sliverList(), 94 | _sliverViewPort(), 95 | ], 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/screen/StackScreen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../view/app_bar.dart'; 8 | import '../constant/main_const.dart'; 9 | import '../view/stack_selector.dart'; 10 | import '../constant/size_const.dart'; 11 | const _BOX_COLORS = [ 12 | Colors.deepPurple, 13 | Colors.cyan, 14 | Colors.amberAccent, 15 | Colors.red, 16 | Colors.lightGreen 17 | ]; 18 | 19 | class StackScreen extends StatefulWidget { 20 | StackScreen({Key key, this.group, this.onClick}) : super(key: key); 21 | final VoidCallback onClick; 22 | final GroupType group; 23 | 24 | @override 25 | _StackState createState() => _StackState(); 26 | } 27 | 28 | class _StackState extends State { 29 | var _type = StackType.Align; 30 | var _alignDirection = AlignmentDirectional.topStart; 31 | 32 | Widget _body() { 33 | return _type == StackType.Align 34 | ? Stack( 35 | alignment: _alignDirection, 36 | children: [ 37 | SizedBox( 38 | width: 400, 39 | height: 400, 40 | child: Container( 41 | color: _BOX_COLORS[0], 42 | ), 43 | ), 44 | SizedBox( 45 | width: 200, 46 | height: 200, 47 | child: Container( 48 | color: _BOX_COLORS[1], 49 | ), 50 | ), 51 | SizedBox( 52 | width: 100, 53 | height: 100, 54 | child: Container( 55 | color: _BOX_COLORS[2], 56 | ), 57 | ), 58 | SizedBox( 59 | width: 50, 60 | height: 50, 61 | child: Container( 62 | color: _BOX_COLORS[3], 63 | ), 64 | ) 65 | ], 66 | ) 67 | : Stack( 68 | alignment: _alignDirection, 69 | children: [ 70 | SizedBox( 71 | width: 400, 72 | height: 400, 73 | child: Container( 74 | color: _BOX_COLORS[0], 75 | ), 76 | ), 77 | Positioned( 78 | top: 50, 79 | left: 30, 80 | width: 100, 81 | height: 100, 82 | child: Container( 83 | color: _BOX_COLORS[1], 84 | ), 85 | ), 86 | Positioned( 87 | top: 50, 88 | right: 30, 89 | width: 100, 90 | height: 100, 91 | child: Container( 92 | color: _BOX_COLORS[2], 93 | ), 94 | ), 95 | Positioned( 96 | bottom: 50, 97 | left: 30, 98 | width: 100, 99 | height: 100, 100 | child: Container( 101 | color: _BOX_COLORS[3], 102 | ), 103 | ), 104 | Positioned( 105 | width: 100, 106 | height: 100, 107 | bottom: 50, 108 | right: 30, 109 | child: Container( 110 | color: _BOX_COLORS[4], 111 | ), 112 | ) 113 | ], 114 | ); 115 | } 116 | 117 | @override 118 | Widget build(BuildContext context) { 119 | return Scaffold( 120 | appBar: TopAppBar( 121 | group: widget.group, 122 | itemType: ItemType.stack, 123 | onClick: widget.onClick, 124 | bottomView: PreferredSize( 125 | child: StackSelector( 126 | mainColor: Colors.white, 127 | typeClick: (type) { 128 | setState(() { 129 | _type = type; 130 | }); 131 | }, 132 | alignClick: (direction) { 133 | setState(() { 134 | _alignDirection = direction; 135 | }); 136 | }, 137 | ), 138 | preferredSize: Size(0.0, SELECTOR_ONE_HEIGHT), 139 | ), 140 | ), 141 | body: Container( 142 | padding: EdgeInsets.all(10.0), 143 | color: Colors.grey, 144 | child: _body(), 145 | ), 146 | ); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /lib/screen/move/GridViewDetailPage.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-7 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../../constant/size_const.dart'; 8 | import '../../constant/move_data.dart'; 9 | import 'package:flutter_layout/view/app_bar.dart'; 10 | import 'star_view.dart'; 11 | const OTHER_MOVES = "Other Moves"; 12 | const WATCH_MOVES = "Watch Move"; 13 | 14 | class GridViewDetailPage extends StatefulWidget { 15 | GridViewDetailPage({this.item}); 16 | 17 | final MoveItem item; 18 | 19 | @override 20 | _GridDetailState createState() => _GridDetailState(); 21 | } 22 | 23 | class _GridDetailState extends State { 24 | MoveItem item; 25 | 26 | void initState() { 27 | super.initState(); 28 | item = widget.item; 29 | } 30 | 31 | Text _textWhite(name, {size = TEXT_NORMAL_SIZE, bool isBold = false}) { 32 | return Text( 33 | name, 34 | style: TextStyle( 35 | color: Colors.white, 36 | fontSize: size, 37 | fontWeight: isBold ? FontWeight.w700 : null, 38 | shadows: isBold 39 | ? [ 40 | Shadow(color: Colors.grey[500], offset: Offset(0.0, 1.0)), 41 | ] 42 | : null, 43 | ), 44 | ); 45 | } 46 | 47 | Widget _topImage() { 48 | return Image.asset(item.bannerUrl, fit: BoxFit.cover); 49 | } 50 | 51 | Widget _topContent() { 52 | return Container( 53 | padding: EdgeInsets.symmetric(horizontal: 8.0, vertical: 10.0), 54 | constraints: BoxConstraints.expand(), 55 | child: Column( 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | mainAxisAlignment: MainAxisAlignment.end, 58 | children: [ 59 | _textWhite(item.name, size: TEXT_LARGE_SIZE, isBold: true), 60 | SizedBox(height: 1.0), 61 | countStar(item.rating, color: Colors.white), 62 | SizedBox(height: 2.0), 63 | _textWhite(item.directors), 64 | SizedBox(height: 2.0), 65 | _textWhite(item.releaseDateDesc), 66 | ], 67 | ), 68 | ); 69 | } 70 | 71 | Widget _categoryButton(name, VoidCallback back) { 72 | return Container( 73 | padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), 74 | child: InkWell( 75 | onTap: () { 76 | back(); 77 | }, 78 | child: Container( 79 | constraints: BoxConstraints.expand(), 80 | decoration: BoxDecoration( 81 | color: Colors.transparent, 82 | border: Border.all(color: Colors.white, width: 3.0), 83 | borderRadius: BorderRadius.circular(30.0), 84 | ), 85 | child: Center( 86 | child: _textWhite(name, isBold: true), 87 | ), 88 | ), 89 | ), 90 | ); 91 | } 92 | 93 | Widget _category() { 94 | var sp = item.category.split(","); 95 | assert(sp.length == 3); 96 | return Container( 97 | height: 50.0, 98 | child: Row( 99 | children: [ 100 | Expanded( 101 | flex: 1, 102 | child: _categoryButton(sp[0], () { 103 | print("click: ${sp[0]}"); 104 | }), 105 | ), 106 | Expanded( 107 | flex: 1, 108 | child: _categoryButton(sp[1], () { 109 | print("click: ${sp[1]}"); 110 | }), 111 | ), 112 | Expanded( 113 | flex: 1, 114 | child: _categoryButton(sp[2], () { 115 | print("click: ${sp[2]}"); 116 | }), 117 | ), 118 | ], 119 | ), 120 | ); 121 | } 122 | 123 | Widget _watchButton() { 124 | return InkWell( 125 | onTap: () { 126 | print(WATCH_MOVES); 127 | }, 128 | child: Container( 129 | constraints: BoxConstraints.expand(height: 40.0), 130 | margin: EdgeInsets.symmetric(horizontal: 20.0), 131 | padding: EdgeInsets.symmetric(vertical: 4.0, horizontal: 20.0), 132 | decoration: BoxDecoration( 133 | color: Colors.white, 134 | borderRadius: BorderRadius.circular(30.0), 135 | ), 136 | child: Center( 137 | child: Text( 138 | WATCH_MOVES, 139 | style: TextStyle( 140 | color: Colors.grey[900], 141 | fontWeight: FontWeight.w700, 142 | fontSize: TEXT_LARGE_SIZE, 143 | shadows: [ 144 | Shadow(color: Colors.grey[500], offset: Offset(0.0, 2.0)), 145 | ], 146 | ), 147 | ), 148 | )), 149 | ); 150 | } 151 | 152 | Widget _topView() { 153 | return Container( 154 | constraints: BoxConstraints.expand(height: 380.0), 155 | padding: EdgeInsets.only(bottom: 4.0), 156 | child: Stack( 157 | fit: StackFit.expand, 158 | children: [ 159 | _topImage(), 160 | _topContent(), 161 | ], 162 | ), 163 | ); 164 | } 165 | 166 | Widget _middleView() { 167 | return Container( 168 | child: Column( 169 | children: [ 170 | _category(), 171 | Padding( 172 | padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0), 173 | child: _textWhite(item.desc), 174 | ), 175 | _watchButton(), 176 | ], 177 | ), 178 | ); 179 | } 180 | 181 | Widget _bottomView() { 182 | return Container( 183 | padding: EdgeInsets.symmetric(horizontal: 4.0, vertical: 4.0), 184 | child: Column( 185 | crossAxisAlignment: CrossAxisAlignment.start, 186 | children: [ 187 | _textWhite(OTHER_MOVES), 188 | Container( 189 | height: 100.0, 190 | margin: EdgeInsets.only(top: 8.0), 191 | child: ListView( 192 | scrollDirection: Axis.horizontal, 193 | children: [ 194 | _childMove(item.trailerImg1), 195 | SizedBox(width: 4.0), 196 | _childMove(item.trailerImg2), 197 | SizedBox(width: 4.0), 198 | _childMove(item.trailerImg3), 199 | SizedBox(width: 4.0), 200 | _childMove(item.trailerImg3), 201 | SizedBox(width: 4.0), 202 | _childMove(item.trailerImg3), 203 | SizedBox(width: 4.0), 204 | _childMove(item.trailerImg3), 205 | SizedBox(width: 4.0), 206 | _childMove(item.trailerImg3), 207 | ], 208 | ), 209 | ) 210 | ], 211 | ), 212 | ); 213 | } 214 | 215 | Widget _childMove(img) { 216 | return Container( 217 | child: Image.asset( 218 | img, 219 | fit: BoxFit.cover, 220 | width: 140.0, 221 | height: 100.0, 222 | ), 223 | ); 224 | } 225 | 226 | @override 227 | Widget build(BuildContext context) { 228 | return Scaffold( 229 | appBar: MainAppBar( 230 | titleText: item.name, 231 | ), 232 | backgroundColor: Color(0xFF761322), 233 | body: ListView( 234 | scrollDirection: Axis.vertical, 235 | children: [ 236 | _topView(), 237 | _middleView(), 238 | _bottomView(), 239 | ], 240 | ), 241 | ); 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /lib/screen/move/GridViewPage.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-7 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | 8 | import 'GridViewDetailPage.dart'; 9 | import 'package:flutter_layout/constant/move_data.dart'; 10 | import 'package:flutter_layout/constant/size_const.dart'; 11 | import 'star_view.dart'; 12 | import 'package:flutter_layout/view/app_bar.dart'; 13 | import 'package:flutter_layout/constant/main_const.dart'; 14 | 15 | const RELEASE_DATE = "RELEASE DATE", RUNTIME = "RUMTIME"; 16 | 17 | class GridViewPage extends StatefulWidget { 18 | @override 19 | _GridState createState() => _GridState(); 20 | } 21 | 22 | class _GridState extends State { 23 | Widget _backImage(MoveItem item) { 24 | return AspectRatio( 25 | aspectRatio: 1.5, 26 | child: Image.asset( 27 | item.trailerImg1, 28 | fit: BoxFit.cover, 29 | ), 30 | ); 31 | } 32 | 33 | Widget _showtimeItem(name, value) { 34 | return Column( 35 | children: [ 36 | Text( 37 | name, 38 | style: 39 | TextStyle(fontSize: TEXT_SMALL_SIZE_2, color: Colors.grey[500]), 40 | ), 41 | SizedBox(height: 2.0), 42 | Text( 43 | value, 44 | style: 45 | TextStyle(fontSize: TEXT_SMALL_SIZE_2, color: Colors.grey[900]), 46 | ) 47 | ], 48 | ); 49 | } 50 | 51 | Widget _cardBottom(MoveItem item) { 52 | return Column( 53 | mainAxisAlignment: MainAxisAlignment.start, 54 | crossAxisAlignment: CrossAxisAlignment.start, 55 | children: [ 56 | SizedBox( 57 | height: 1.0, 58 | ), 59 | Text( 60 | item.name, 61 | style: TextStyle( 62 | color: Colors.grey[900], 63 | fontSize: TEXT_SMALL_SIZE, 64 | fontWeight: FontWeight.w700, 65 | ), 66 | ), 67 | SizedBox(height: 1.0), 68 | Text( 69 | item.category, 70 | style: TextStyle(color: Colors.grey[500], fontSize: TEXT_SMALL_SIZE), 71 | ), 72 | SizedBox(height: 1.0), 73 | countStar(item.rating), 74 | SizedBox(height: 2.0), 75 | Row( 76 | children: [ 77 | _showtimeItem(RELEASE_DATE, item.releaseDate), 78 | SizedBox(width: 6.0), 79 | _showtimeItem(RUNTIME, item.runtime), 80 | ], 81 | ) 82 | ], 83 | ); 84 | } 85 | 86 | Widget _grdItem(MoveItem item) { 87 | return InkWell( 88 | onTap: () { 89 | Navigator.push( 90 | context, 91 | MaterialPageRoute( 92 | builder: (context) => GridViewDetailPage(item: item))); 93 | }, 94 | child: Card( 95 | elevation: 1.0, 96 | shape: RoundedRectangleBorder( 97 | borderRadius: BorderRadius.circular(10.0), 98 | ), 99 | child: Column( 100 | mainAxisAlignment: MainAxisAlignment.start, 101 | children: [ 102 | _backImage(item), 103 | Container( 104 | padding: EdgeInsets.only(left: 4.0, right: 4.0, bottom: 6.0), 105 | child: _cardBottom(item), 106 | ), 107 | ], 108 | ), 109 | ), 110 | ); 111 | } 112 | 113 | @override 114 | Widget build(BuildContext context) { 115 | var items = getItemList(); 116 | var l = List(); 117 | for (var item in items) { 118 | l.add(_grdItem(item)); 119 | } 120 | return Scaffold( 121 | appBar: MainAppBar( 122 | titleText: GRID_VIEW_NAME, 123 | 124 | ), 125 | body: Container( 126 | child: GridView.count( 127 | crossAxisCount: 2, 128 | mainAxisSpacing: 4.0, 129 | crossAxisSpacing: 2.0, 130 | childAspectRatio: 0.9, 131 | children: l, 132 | ), 133 | ), 134 | ); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /lib/screen/move/star_view.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-8 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | 8 | //The total star is 5 and the total score is 10. 9 | Widget countStar(double rating, {color = Colors.deepOrange}) { 10 | int num = rating ~/ 2; //the entire star 11 | bool isHalf = (rating - num * 2) > 1.0; // half star 12 | List stars = List(); 13 | var line = SizedBox( 14 | width: 0.0, 15 | ); 16 | var size = 20.0; 17 | for (int n = 0; n < num; n++) { 18 | stars.add( 19 | Icon( 20 | Icons.star, 21 | color: color, 22 | size: size, 23 | ), 24 | ); 25 | stars.add(line); 26 | } 27 | if (isHalf) { 28 | stars.add(Icon( 29 | Icons.star_half, 30 | color: color, 31 | size: size, 32 | )); 33 | stars.add(line); 34 | } 35 | int surplus = num + (isHalf ? 1 : 0); 36 | surplus = 5 - surplus; 37 | for (int n = 0; n < surplus; n++) { 38 | stars.add( 39 | Icon( 40 | Icons.star_border, 41 | color: color, 42 | size: size, 43 | ), 44 | ); 45 | stars.add(line); 46 | } 47 | return Row( 48 | children: stars, 49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /lib/screen/screen.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | library screen; 7 | 8 | export 'CrossAlignScreen.dart'; 9 | export 'ExpandScreen.dart'; 10 | export 'HeroScreen.dart'; 11 | export 'ListScreen.dart'; 12 | export 'NestedScreen.dart'; 13 | export 'PaddingScreen.dart'; 14 | export 'RowColumnScreen.dart'; 15 | export 'SliverScreen.dart'; 16 | export 'StackScreen.dart'; 17 | export 'PageViewScreen.dart'; 18 | -------------------------------------------------------------------------------- /lib/view/app_bar.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-2 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import '../constant/main_const.dart'; 9 | import '../constant/size_const.dart'; 10 | 11 | const BAR_FONT_SIZE = 21.0; 12 | const BAR_TITLE_COLOR = Colors.white; 13 | 14 | class TopAppBar extends AppBar { 15 | TopAppBar( 16 | {GroupType group, 17 | ItemType itemType, 18 | PreferredSize bottomView, 19 | VoidCallback onClick, 20 | Widget right}) 21 | : super( 22 | leading: IconButton( 23 | icon: Icon( 24 | BAR_ICONS[group.index], 25 | color: BAR_TITLE_COLOR, 26 | ), 27 | onPressed: onClick, 28 | ), 29 | title: Text( 30 | BOTTOM_TITLES[itemType.index], 31 | style: TextStyle( 32 | color: BAR_TITLE_COLOR, 33 | fontSize: BAR_FONT_SIZE, 34 | ), 35 | ), 36 | bottom: bottomView, 37 | backgroundColor: BAR_BACK_COLORS[group.index], 38 | elevation: 0.0, 39 | actions: right == null ? null : [right]); 40 | } 41 | 42 | class SliverBar extends SliverAppBar { 43 | SliverBar({ 44 | GroupType group, 45 | ItemType itemType, 46 | PreferredSize bottomView, 47 | VoidCallback onClick, 48 | }) : super( 49 | pinned: true, 50 | expandedHeight: 150.0, 51 | flexibleSpace: FlexibleSpaceBar( 52 | collapseMode: CollapseMode.none, 53 | title: Text( 54 | BOTTOM_TITLES[itemType.index], 55 | style: TextStyle( 56 | color: BAR_TITLE_COLOR, 57 | fontSize: BAR_FONT_SIZE, 58 | ), 59 | ), 60 | ), 61 | leading: IconButton( 62 | icon: Icon( 63 | BAR_ICONS[group.index], 64 | color: BAR_TITLE_COLOR, 65 | ), 66 | onPressed: onClick, 67 | ), 68 | bottom: bottomView, 69 | backgroundColor: BAR_BACK_COLORS[group.index], 70 | ); 71 | } 72 | 73 | 74 | class MainAppBar extends AppBar { 75 | MainAppBar({ 76 | Key key, 77 | this.titleText, 78 | this.titleColor = Colors.white, 79 | this.rightWidget, 80 | this.bottomWidget, 81 | this.bottomHeight = 0, 82 | }) : super( 83 | key: key, 84 | title: Text( 85 | titleText, 86 | style: TextStyle( 87 | fontSize: TEXT_LARGE_SIZE, 88 | color: Colors.white, 89 | ), 90 | ), 91 | bottom: bottomWidget == null 92 | ? null 93 | : PreferredSize( 94 | child: bottomWidget, 95 | preferredSize: Size(0.0, bottomHeight), 96 | ), 97 | actions: rightWidget == null ? null : [rightWidget], 98 | elevation: 1.0); 99 | 100 | final String titleText; 101 | final Color titleColor; 102 | final Widget rightWidget; 103 | final Widget bottomWidget; 104 | final double bottomHeight; 105 | } 106 | 107 | -------------------------------------------------------------------------------- /lib/view/cross_align_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-4 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import 'view_selector.dart'; 8 | 9 | const BASELINE_TITLE = "cross axis align"; 10 | const BASELINE_VALUES = ["baseline", "start", "end", "center", "stretch"]; 11 | 12 | class CrossAlignSelector extends StatefulWidget { 13 | CrossAlignSelector({Key key, this.mainColor, this.alignClick}) 14 | : super(key: key); 15 | final Color mainColor; 16 | final ValueChanged alignClick; 17 | 18 | @override 19 | _CrossAlignState createState() => _CrossAlignState(); 20 | } 21 | 22 | class _CrossAlignState extends State { 23 | void _alignClick(int pos) { 24 | CrossAxisAlignment align = CrossAxisAlignment.baseline; 25 | switch (pos) { 26 | case 0: 27 | align = CrossAxisAlignment.baseline; 28 | break; 29 | case 1: 30 | align = CrossAxisAlignment.start; 31 | break; 32 | case 2: 33 | align = CrossAxisAlignment.end; 34 | break; 35 | case 3: 36 | align = CrossAxisAlignment.center; 37 | break; 38 | case 4: 39 | align = CrossAxisAlignment.stretch; 40 | break; 41 | default: 42 | align = CrossAxisAlignment.baseline; 43 | break; 44 | } 45 | widget.alignClick(align); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return Container( 51 | child: Row( 52 | mainAxisAlignment: MainAxisAlignment.center, 53 | mainAxisSize: MainAxisSize.max, 54 | crossAxisAlignment: CrossAxisAlignment.center, 55 | children: [ 56 | Expanded( 57 | child: ViewSelector( 58 | title: BASELINE_TITLE, 59 | values: BASELINE_VALUES, 60 | mainColor: widget.mainColor, 61 | onClick: _alignClick, 62 | ), 63 | ) 64 | ], 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/view/expand_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-4 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import 'view_selector.dart'; 9 | 10 | const ARRANGE_TITLE = "Row/Column"; 11 | const ARRANGE_VALUES = ["Row", "Column"]; 12 | 13 | const TITLES = ["Expand One", "Expand Two"]; 14 | const _NUM_VALUES = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; 15 | 16 | enum ArrangeType { Row, Column } 17 | 18 | class ExpandSelector extends StatefulWidget { 19 | ExpandSelector( 20 | {Key key, 21 | this.clickArrange, 22 | this.clickOne, 23 | this.clickTwo, 24 | this.mainColor}) 25 | : super(key: key); 26 | final ValueChanged clickArrange; 27 | final ValueChanged clickOne; 28 | final ValueChanged clickTwo; 29 | final Color mainColor; 30 | 31 | @override 32 | ExpandState createState() => ExpandState(); 33 | } 34 | 35 | class ExpandState extends State { 36 | void _clickArrange(pos) { 37 | widget.clickArrange(pos == 0 ? ArrangeType.Row : ArrangeType.Column); 38 | } 39 | 40 | void _clickOne(pos) { 41 | widget.clickOne(pos); 42 | } 43 | 44 | void _clickTwo(pos) { 45 | widget.clickTwo(pos); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return Column( 51 | children: [ 52 | ViewSelector( 53 | title: ARRANGE_TITLE, 54 | values: ARRANGE_VALUES, 55 | mainColor: widget.mainColor, 56 | onClick: _clickArrange, 57 | ), 58 | Row( 59 | children: [ 60 | Expanded( 61 | flex: 1, 62 | child: ViewSelector( 63 | title: TITLES[0], 64 | values: _NUM_VALUES, 65 | mainColor: widget.mainColor, 66 | onClick: _clickOne, 67 | ), 68 | ), 69 | Expanded( 70 | flex: 1, 71 | child: ViewSelector( 72 | title: TITLES[1], 73 | values: _NUM_VALUES, 74 | mainColor: widget.mainColor, 75 | onClick: _clickTwo, 76 | ), 77 | ), 78 | ], 79 | ) 80 | ], 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/view/list_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-5 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import 'view_selector.dart'; 8 | 9 | const _SCROLL_TITLE = "Scroll Direction"; 10 | const _SCROLL_VALUES = ["Vertical", "Horizontal"]; 11 | 12 | class ListSelector extends StatefulWidget { 13 | ListSelector({ 14 | Key key, 15 | this.clickDirection, 16 | this.mainColor = Colors.white, 17 | }) : super(key: key); 18 | final Color mainColor; 19 | final ValueChanged clickDirection; 20 | 21 | @override 22 | _ListState createState() => _ListState(); 23 | } 24 | 25 | class _ListState extends State { 26 | @override 27 | Widget build(BuildContext context) { 28 | return Row( 29 | children: [ 30 | Expanded( 31 | child: ViewSelector( 32 | title: _SCROLL_TITLE, 33 | values: _SCROLL_VALUES, 34 | mainColor: widget.mainColor, 35 | onClick: (pos) { 36 | widget.clickDirection(pos == 0 ? Axis.vertical : Axis.horizontal); 37 | }, 38 | ), 39 | ) 40 | ], 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/view/nest_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-5 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import 'view_selector.dart'; 9 | 10 | const _DIRECTION_TITTLE = "Parent Scroll Direction"; 11 | const _DIRECTION_VALUES = ["Vertical", "Horizontal"]; 12 | 13 | const _PARENT_TITLE = "Parent List Count"; 14 | const _PARENT_VALUES = ["2", "4", "6", "8", "10"]; 15 | 16 | const _CHILD_TITLE = "Clild List Count"; 17 | const _CHILD_VALUES = ["10", "20", "30", "40", "50"]; 18 | 19 | class NestSelector extends StatefulWidget { 20 | NestSelector( 21 | {Key key, 22 | this.clickParent, 23 | this.clickChild, 24 | this.clickDirection, 25 | this.mainColor = Colors.white}) 26 | : super(key: key); 27 | final ValueChanged clickParent; 28 | final ValueChanged clickChild; 29 | final ValueChanged clickDirection; 30 | final Color mainColor; 31 | 32 | @override 33 | _NestState createState() => _NestState(); 34 | } 35 | 36 | class _NestState extends State { 37 | void _clickParent(pos) { 38 | widget.clickParent((pos + 1) * 2); 39 | } 40 | 41 | void _clickChild(pos) { 42 | widget.clickChild((pos + 1) * 10); 43 | } 44 | 45 | void _clickDirection(pos) { 46 | widget.clickDirection(pos == 0 ? Axis.vertical : Axis.horizontal); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return Column( 52 | children: [ 53 | Row(children: [ 54 | Expanded( 55 | child: ViewSelector( 56 | title: _DIRECTION_TITTLE, 57 | values: _DIRECTION_VALUES, 58 | mainColor: widget.mainColor, 59 | onClick: _clickDirection, 60 | ), 61 | ), 62 | ]), 63 | Row( 64 | children: [ 65 | Expanded( 66 | flex: 1, 67 | child: ViewSelector( 68 | title: _PARENT_TITLE, 69 | values: _PARENT_VALUES, 70 | mainColor: widget.mainColor, 71 | onClick: _clickParent, 72 | ), 73 | ), 74 | Expanded( 75 | flex: 1, 76 | child: ViewSelector( 77 | title: _CHILD_TITLE, 78 | values: _CHILD_VALUES, 79 | mainColor: widget.mainColor, 80 | onClick: _clickChild, 81 | ), 82 | ), 83 | ], 84 | ), 85 | ], 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/view/padding_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-4 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import "../constant/size_const.dart"; 8 | import "../view/view_selector.dart"; 9 | 10 | const _LEFT_TITLE = "padding left"; 11 | const _RIGHT_TITLE = "padding right"; 12 | const _TOP_TITLE = "padding top"; 13 | const _BOTTOM_TITLE = "padding bottom"; 14 | 15 | const PADDING_VALUES = [ 16 | "0", 17 | "5", 18 | "10", 19 | "15", 20 | "20", 21 | "25", 22 | "30", 23 | "35", 24 | "40", 25 | "45", 26 | "50" 27 | ]; 28 | 29 | class PaddingSelector extends StatefulWidget { 30 | PaddingSelector( 31 | {Key key, 32 | this.clickLeft, 33 | this.clickRight, 34 | this.clickTop, 35 | this.clickBottom, 36 | this.mainColor = Colors.white}) 37 | : super(key: key); 38 | final Color mainColor; 39 | final ValueChanged clickLeft; 40 | final ValueChanged clickRight; 41 | final ValueChanged clickTop; 42 | final ValueChanged clickBottom; 43 | 44 | @override 45 | _PaddingState createState() => _PaddingState(); 46 | } 47 | 48 | class _PaddingState extends State { 49 | Widget _selector(String title, List values, ValueChanged click) { 50 | return ViewSelector( 51 | title: title, 52 | values: values, 53 | mainColor: widget.mainColor, 54 | onClick: click, 55 | ); 56 | } 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | return Column( 61 | children: [ 62 | Row( 63 | children: [ 64 | Expanded( 65 | flex: 1, 66 | child: _selector(_LEFT_TITLE, PADDING_VALUES, widget.clickLeft), 67 | ), 68 | Expanded( 69 | flex: 1, 70 | child: _selector(_RIGHT_TITLE, PADDING_VALUES, widget.clickRight), 71 | ) 72 | ], 73 | ), 74 | Row( 75 | children: [ 76 | Expanded( 77 | flex: 1, 78 | child: _selector(_TOP_TITLE, PADDING_VALUES, widget.clickTop), 79 | ), 80 | Expanded( 81 | flex: 1, 82 | child: 83 | _selector(_BOTTOM_TITLE, PADDING_VALUES, widget.clickBottom), 84 | ), 85 | ], 86 | ), 87 | ], 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/view/page_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-5 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import 'view_selector.dart'; 9 | 10 | const _DIRECTION_TITLE = "Scroll Direction"; 11 | const _DIRECTION_VALUES = ["Horizontal", "Vertical"]; 12 | 13 | const _JUMP_TITLE = "Jump To Page"; 14 | const _JUMP_VALUES = ["1", "2", "3", "4"]; 15 | 16 | class PageSelector extends StatefulWidget { 17 | PageSelector({Key key, this.mainColor, this.clickDirection, this.clickPage}) 18 | : super(key: key); 19 | final Color mainColor; 20 | final ValueChanged clickDirection; 21 | final ValueChanged clickPage; 22 | 23 | @override 24 | _PageState createState() => _PageState(); 25 | } 26 | 27 | class _PageState extends State { 28 | void _clickDirection(pos) { 29 | widget.clickDirection(pos == 0 ? Axis.horizontal : Axis.vertical); 30 | } 31 | 32 | void _clickPage(pos) { 33 | widget.clickPage(pos); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return Row( 39 | children: [ 40 | Expanded( 41 | flex: 1, 42 | child: ViewSelector( 43 | title: _DIRECTION_TITLE, 44 | values: _DIRECTION_VALUES, 45 | mainColor: widget.mainColor, 46 | onClick: _clickDirection, 47 | ), 48 | ), 49 | Expanded( 50 | flex: 1, 51 | child: ViewSelector( 52 | title: _JUMP_TITLE, 53 | values: _JUMP_VALUES, 54 | mainColor: widget.mainColor, 55 | onClick: _clickPage, 56 | ), 57 | ) 58 | ], 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/view/row_column_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-3 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import 'view_selector.dart' show ViewSelector; 8 | 9 | const LAY_TITLE = "layout"; 10 | const LAY_VALUES = ['row', 'column']; 11 | 12 | const MAIN_SIZE_TITLE = "Main Axis Size"; 13 | const MAIN_SIZE_VALUES = ['min', 'max']; 14 | 15 | const MAIN_ALIGN_TITLE = "Main Axis Alignment"; 16 | const MAIN_ALIGN_VALUES = [ 17 | 'start', 18 | 'end', 19 | 'center', 20 | 'space\nbetween', 21 | 'space\naround', 22 | 'space\nevenly', 23 | ]; 24 | 25 | const CROSS_ALIGN_TITLE = "Cross Axis Alignment"; 26 | const CROSS_ALIGN_VALUES = [ 27 | 'start', 28 | 'end', 29 | 'center', 30 | 'stretch', 31 | ]; 32 | 33 | enum LayType { row, column } 34 | enum SizeType { min, max } 35 | //enum MainAlignType { 36 | // start, 37 | // end, 38 | // center, 39 | // space_between, 40 | // space_around, 41 | // space_evenly 42 | //} 43 | //// 44 | //enum CrossAlignType { start, end, center, stretch } 45 | 46 | class RowColumnSelector extends StatefulWidget { 47 | RowColumnSelector( 48 | {Key key, 49 | this.clickLayout, 50 | this.clickMainSize, 51 | this.clickMainAlign, 52 | this.clickCrossAlign, 53 | this.mainColor = Colors.black26}) 54 | : super(key: key); 55 | final ValueChanged clickLayout; 56 | final ValueChanged clickMainSize; 57 | final ValueChanged clickMainAlign; 58 | final ValueChanged clickCrossAlign; 59 | final Color mainColor; 60 | 61 | @override 62 | _RowColumnState createState() => _RowColumnState(); 63 | } 64 | 65 | class _RowColumnState extends State { 66 | void _changeLay(pos) { 67 | widget.clickLayout(pos == 0 ? LayType.row : LayType.column); 68 | } 69 | 70 | void _changeMainSize(pos) { 71 | print("pos:$pos"); 72 | MainAxisSize size = MainAxisSize.min; 73 | if (pos == SizeType.min.index) { 74 | size = MainAxisSize.min; 75 | } else { 76 | size = MainAxisSize.max; 77 | } 78 | widget.clickMainSize(size); 79 | } 80 | 81 | /// start, 82 | /// end, 83 | /// center, 84 | /// space_between, 85 | /// space_around, 86 | /// space_evenly 87 | void _changeMainAlign(int pos) { 88 | var align = MainAxisAlignment.start; 89 | switch (pos) { 90 | case 0: //start 91 | align = MainAxisAlignment.start; 92 | break; 93 | case 1: //end, 94 | align = MainAxisAlignment.end; 95 | break; 96 | case 2: //center, 97 | align = MainAxisAlignment.center; 98 | break; 99 | case 3: //space_between 100 | align = MainAxisAlignment.spaceBetween; 101 | break; 102 | case 4: //space_around 103 | align = MainAxisAlignment.spaceEvenly; 104 | break; 105 | case 5: //space_evenly 106 | align = MainAxisAlignment.spaceAround; 107 | break; 108 | default: 109 | align = MainAxisAlignment.start; 110 | break; 111 | } 112 | widget.clickMainAlign(align); 113 | } 114 | 115 | ///start, end, center, stretch 116 | void _changeCrossAlign(int pos) { 117 | var align = CrossAxisAlignment.start; 118 | switch (pos) { 119 | case 0: //start 120 | align = CrossAxisAlignment.start; 121 | break; 122 | case 1: //end 123 | align = CrossAxisAlignment.end; 124 | break; 125 | case 2: //center 126 | align = CrossAxisAlignment.center; 127 | break; 128 | case 3: //stretch 129 | align = CrossAxisAlignment.stretch; 130 | break; 131 | default: ////start 132 | align = CrossAxisAlignment.start; 133 | break; 134 | } 135 | widget.clickCrossAlign(align); 136 | } 137 | 138 | @override 139 | Widget build(BuildContext context) { 140 | var color = widget.mainColor; 141 | return Row( 142 | mainAxisSize: MainAxisSize.min, 143 | children: [ 144 | Expanded( 145 | flex: 1, 146 | child: Column( 147 | mainAxisSize: MainAxisSize.max, 148 | children: [ 149 | ViewSelector( 150 | title: LAY_TITLE, 151 | values: LAY_VALUES, 152 | onClick: _changeLay, 153 | mainColor: color, 154 | ), 155 | ViewSelector( 156 | title: MAIN_SIZE_TITLE, 157 | values: MAIN_SIZE_VALUES, 158 | onClick: _changeMainSize, 159 | mainColor: color, 160 | ), 161 | ], 162 | ), 163 | ), 164 | Expanded( 165 | flex: 1, 166 | child: Column( 167 | mainAxisSize: MainAxisSize.max, 168 | children: [ 169 | ViewSelector( 170 | title: MAIN_ALIGN_TITLE, 171 | values: MAIN_ALIGN_VALUES, 172 | onClick: _changeMainAlign, 173 | mainColor: color, 174 | ), 175 | ViewSelector( 176 | title: CROSS_ALIGN_TITLE, 177 | values: CROSS_ALIGN_VALUES, 178 | onClick: _changeCrossAlign, 179 | mainColor: color, 180 | ), 181 | ], 182 | ), 183 | ) 184 | ], 185 | ); 186 | } 187 | } 188 | -------------------------------------------------------------------------------- /lib/view/sliver_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-5 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import 'view_selector.dart'; 9 | 10 | const _SLIVER_TITLE = "sliver type"; 11 | const _SLIVER_VALUES = [ 12 | "SliverGrid", 13 | "SliverFixedExtentList", 14 | "SliverList", 15 | "SliverFillViewport" 16 | ]; 17 | enum SliverType { 18 | SliverGrid, 19 | SliverFixedExtentList, 20 | SliverList, 21 | SliverFillViewport, 22 | } 23 | 24 | class SliverSelector extends StatefulWidget { 25 | SliverSelector({Key key, this.clickType, this.mainColor}) : super(key: key); 26 | final ValueChanged clickType; 27 | final Color mainColor; 28 | 29 | @override 30 | _SliverState createState() => _SliverState(); 31 | } 32 | 33 | class _SliverState extends State { 34 | void _clickType(pos) { 35 | var type = SliverType.SliverGrid; 36 | switch (pos) { 37 | case 0: 38 | type = SliverType.SliverGrid; 39 | break; 40 | case 1: 41 | type = SliverType.SliverFixedExtentList; 42 | break; 43 | case 2: 44 | type = SliverType.SliverList; 45 | break; 46 | case 3: 47 | type = SliverType.SliverFillViewport; 48 | break; 49 | default: 50 | type = SliverType.SliverGrid; 51 | break; 52 | } 53 | widget.clickType(type); 54 | } 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | return Row( 59 | children: [ 60 | Expanded( 61 | child: ViewSelector( 62 | title: _SLIVER_TITLE, 63 | values: _SLIVER_VALUES, 64 | mainColor: widget.mainColor, 65 | onClick: _clickType, 66 | ), 67 | ) 68 | ], 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/view/stack_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-4 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | 7 | import "package:flutter/material.dart"; 8 | import "view_selector.dart"; 9 | 10 | const _SET_TYPE_TITLE = "Set Type"; 11 | const _SET_TYPE_VALUES = ["Align", "Position"]; 12 | 13 | const _DIRECTION_TITLE = "Align Direcation"; 14 | const _DIRECTION_VALUES = [ 15 | "top\nstart", 16 | "top\ncenter", 17 | "top\nend", 18 | "center\nstart", 19 | "center", 20 | "center\nend", 21 | "bottom\nstart", 22 | "bottom\ncenter", 23 | "bottom\nend", 24 | ]; 25 | enum StackType { 26 | Align, 27 | Position, 28 | } 29 | 30 | class StackSelector extends StatefulWidget { 31 | StackSelector( 32 | {Key key, this.typeClick, this.alignClick, this.mainColor = Colors.white}) 33 | : super(key: key); 34 | final Color mainColor; 35 | final ValueChanged typeClick; 36 | final ValueChanged alignClick; 37 | 38 | @override 39 | _StackState createState() => _StackState(); 40 | } 41 | 42 | class _StackState extends State { 43 | void _clickType(pos) { 44 | widget.typeClick(pos == 0 ? StackType.Align : StackType.Position); 45 | } 46 | 47 | void _clickDirection(pos) { 48 | var align = AlignmentDirectional.topStart; 49 | switch (pos) { 50 | case 0: 51 | align = AlignmentDirectional.topStart; 52 | break; 53 | case 1: 54 | align = AlignmentDirectional.topCenter; 55 | break; 56 | case 2: 57 | align = AlignmentDirectional.topEnd; 58 | break; 59 | case 3: 60 | align = AlignmentDirectional.centerStart; 61 | break; 62 | case 4: 63 | align = AlignmentDirectional.center; 64 | break; 65 | case 5: 66 | align = AlignmentDirectional.centerEnd; 67 | break; 68 | case 6: 69 | align = AlignmentDirectional.bottomStart; 70 | break; 71 | case 7: 72 | align = AlignmentDirectional.bottomCenter; 73 | break; 74 | case 8: 75 | align = AlignmentDirectional.bottomEnd; 76 | break; 77 | default: 78 | align = AlignmentDirectional.topStart; 79 | break; 80 | } 81 | widget.alignClick(align); 82 | } 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | return Container( 87 | child: Row( 88 | children: [ 89 | Expanded( 90 | child: ViewSelector( 91 | title: _SET_TYPE_TITLE, 92 | values: _SET_TYPE_VALUES, 93 | mainColor: widget.mainColor, 94 | onClick: _clickType, 95 | ), 96 | ), 97 | Expanded( 98 | child: ViewSelector( 99 | title: _DIRECTION_TITLE, 100 | values: _DIRECTION_VALUES, 101 | mainColor: widget.mainColor, 102 | onClick: _clickDirection, 103 | ), 104 | ), 105 | ], 106 | ), 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /lib/view/view_selector.dart: -------------------------------------------------------------------------------- 1 | /// 2 | /// Created by NieBin on 18-12-3 3 | /// Github: https://github.com/nb312 4 | /// Email: niebin312@gmail.com 5 | /// 6 | import "package:flutter/material.dart"; 7 | import '../constant/size_const.dart'; 8 | 9 | class ViewSelector extends StatefulWidget { 10 | ViewSelector( 11 | {Key key, 12 | this.title, 13 | this.values, 14 | this.onClick, 15 | this.mainColor = Colors.white}) 16 | : super(key: key); 17 | final String title; 18 | final List values; 19 | final ValueChanged onClick; 20 | final Color mainColor; 21 | 22 | @override 23 | _ViewSelectorState createState() => _ViewSelectorState(); 24 | } 25 | 26 | class _ViewSelectorState extends State { 27 | var curPos = 0; 28 | 29 | void _update() { 30 | setState(() {}); 31 | widget.onClick(curPos); 32 | } 33 | 34 | void _next() { 35 | curPos++; 36 | if (curPos >= widget.values.length) { 37 | curPos = 0; 38 | } 39 | _update(); 40 | } 41 | 42 | void _back() { 43 | curPos--; 44 | if (curPos < 0) { 45 | curPos = widget.values.length - 1; 46 | } 47 | _update(); 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | return Container( 53 | child: Column( 54 | mainAxisAlignment: MainAxisAlignment.spaceAround, 55 | mainAxisSize: MainAxisSize.max, 56 | children: [ 57 | Divider(color: widget.mainColor), 58 | Padding( 59 | padding: EdgeInsets.all(1), 60 | child: Center( 61 | child: Text( 62 | widget.title, 63 | style: TextStyle( 64 | color: widget.mainColor, 65 | fontSize: TEXT_NORMAL_SIZE, 66 | ), 67 | ), 68 | ), 69 | ), 70 | Row( 71 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 72 | mainAxisSize: MainAxisSize.max, 73 | children: [ 74 | IconButton( 75 | icon: Icon( 76 | Icons.arrow_left, 77 | color: widget.mainColor, 78 | ), 79 | onPressed: _back, 80 | ), 81 | Text( 82 | widget.values[curPos], 83 | textAlign: TextAlign.center, 84 | style: TextStyle( 85 | fontWeight: FontWeight.w700, 86 | color: widget.mainColor, 87 | fontSize: TEXT_NORMAL_SIZE, 88 | ), 89 | ), 90 | IconButton( 91 | icon: Icon( 92 | Icons.arrow_right, 93 | color: widget.mainColor, 94 | ), 95 | onPressed: _next, 96 | ), 97 | ], 98 | ), 99 | ], 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.10" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.3.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.11" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.3" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.2" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | image: 78 | dependency: transitive 79 | description: 80 | name: image 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "2.1.4" 84 | matcher: 85 | dependency: transitive 86 | description: 87 | name: matcher 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "0.12.5" 91 | meta: 92 | dependency: transitive 93 | description: 94 | name: meta 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.1.7" 98 | path: 99 | dependency: transitive 100 | description: 101 | name: path 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.6.4" 105 | pedantic: 106 | dependency: transitive 107 | description: 108 | name: pedantic 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.8.0+1" 112 | petitparser: 113 | dependency: transitive 114 | description: 115 | name: petitparser 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "2.4.0" 119 | quiver: 120 | dependency: transitive 121 | description: 122 | name: quiver 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.0.5" 126 | sky_engine: 127 | dependency: transitive 128 | description: flutter 129 | source: sdk 130 | version: "0.0.99" 131 | source_span: 132 | dependency: transitive 133 | description: 134 | name: source_span 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.5.5" 138 | stack_trace: 139 | dependency: transitive 140 | description: 141 | name: stack_trace 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.9.3" 145 | stream_channel: 146 | dependency: transitive 147 | description: 148 | name: stream_channel 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.0.0" 152 | string_scanner: 153 | dependency: transitive 154 | description: 155 | name: string_scanner 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.0.5" 159 | term_glyph: 160 | dependency: transitive 161 | description: 162 | name: term_glyph 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.1.0" 166 | test_api: 167 | dependency: transitive 168 | description: 169 | name: test_api 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.2.5" 173 | typed_data: 174 | dependency: transitive 175 | description: 176 | name: typed_data 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.6" 180 | vector_math: 181 | dependency: transitive 182 | description: 183 | name: vector_math 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.0.8" 187 | xml: 188 | dependency: transitive 189 | description: 190 | name: xml 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "3.5.0" 194 | sdks: 195 | dart: ">=2.4.0 <3.0.0" 196 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_layout 2 | description: A Flutter layout project. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | # The following adds the Cupertino Icons font to your application. 9 | # Use with the CupertinoIcons class for iOS style icons. 10 | cupertino_icons: ^0.1.0 11 | 12 | dev_dependencies: 13 | flutter_test: 14 | sdk: flutter 15 | 16 | 17 | # For information on the generic Dart part of this file, see the 18 | # following page: https://www.dartlang.org/tools/pub/pubspec 19 | 20 | # The following section is specific to Flutter. 21 | flutter: 22 | assets: 23 | - assets/ 24 | - assets/moves/ 25 | 26 | 27 | 28 | # The following line ensures that the Material Icons font is 29 | # included with your application, so that you can use the icons in 30 | # the material Icons class. 31 | uses-material-design: true 32 | 33 | # To add assets to your application, add an assets section, like this: 34 | # assets: 35 | # - images/a_dot_burr.jpeg 36 | # - images/a_dot_ham.jpeg 37 | 38 | # An image asset can refer to one or more resolution-specific "variants", see 39 | # https://flutter.io/assets-and-images/#resolution-aware. 40 | 41 | # For details regarding adding assets from package dependencies, see 42 | # https://flutter.io/assets-and-images/#from-packages 43 | 44 | # To add custom fonts to your application, add a fonts section here, 45 | # in this "flutter" section. Each entry in this list should have a 46 | # "family" key with the font family name, and a "fonts" key with a 47 | # list giving the asset and other descriptors for the font. For 48 | # example: 49 | # fonts: 50 | # - family: Schyler 51 | # fonts: 52 | # - asset: fonts/Schyler-Regular.ttf 53 | # - asset: fonts/Schyler-Italic.ttf 54 | # style: italic 55 | # - family: Trajan Pro 56 | # fonts: 57 | # - asset: fonts/TrajanPro.ttf 58 | # - asset: fonts/TrajanPro_Bold.ttf 59 | # weight: 700 60 | # 61 | # For details regarding fonts from package dependencies, 62 | # see https://flutter.io/custom-fonts/#from-packages 63 | -------------------------------------------------------------------------------- /screenshots/cross_align.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/cross_align.jpg -------------------------------------------------------------------------------- /screenshots/expand_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/expand_screen.png -------------------------------------------------------------------------------- /screenshots/flutter_layout.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/flutter_layout.gif -------------------------------------------------------------------------------- /screenshots/hero_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/hero_screen.png -------------------------------------------------------------------------------- /screenshots/list_screen_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/list_screen_1.png -------------------------------------------------------------------------------- /screenshots/list_screen_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/list_screen_2.png -------------------------------------------------------------------------------- /screenshots/move_grid_view_detail_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/move_grid_view_detail_screen.png -------------------------------------------------------------------------------- /screenshots/move_grid_view_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/move_grid_view_screen.png -------------------------------------------------------------------------------- /screenshots/nest_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/nest_screen.png -------------------------------------------------------------------------------- /screenshots/padding_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/padding_screen.png -------------------------------------------------------------------------------- /screenshots/page_view_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/page_view_screen.png -------------------------------------------------------------------------------- /screenshots/row_column.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/row_column.jpg -------------------------------------------------------------------------------- /screenshots/sliver_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/sliver_screen.png -------------------------------------------------------------------------------- /screenshots/stack_screen_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/stack_screen_1.png -------------------------------------------------------------------------------- /screenshots/stack_screen_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FlutterOpen/flutter-layouts-exampls/2db697f95d3d25556c5bf11c38b20ba6f881bd85/screenshots/stack_screen_2.png -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | void main() { 11 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 12 | // Build our app and trigger a frame. 13 | }); 14 | } 15 | --------------------------------------------------------------------------------