├── .github
└── FUNDING.yml
├── .gitignore
├── .metadata
├── LICENSE.md
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── layout_basics_example
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── 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-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── main.dart
├── page
│ ├── container_page.dart
│ ├── expanded_page.dart
│ ├── listview_gridview_page.dart
│ ├── main_page.dart
│ ├── row_column_page.dart
│ └── stack_page.dart
└── widget
│ ├── items
│ ├── container_items.dart
│ ├── expanded_items.dart
│ ├── layout_type.dart
│ ├── list_grid_items.dart
│ ├── row_column_items.dart
│ └── stack_items.dart
│ ├── layout_selector_widget.dart
│ └── main_app_bar.dart
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── app_icon_1024.png
│ │ ├── app_icon_128.png
│ │ ├── app_icon_16.png
│ │ ├── app_icon_256.png
│ │ ├── app_icon_32.png
│ │ ├── app_icon_512.png
│ │ └── app_icon_64.png
│ ├── Base.lproj
│ └── MainMenu.xib
│ ├── Configs
│ ├── AppInfo.xcconfig
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
├── preview.gif
├── pubspec.lock
├── pubspec.yaml
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-512.png
├── index.html
└── manifest.json
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [JohannesMilke]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.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: b60c855af5150b695638b2195f500d3c003b71ab
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 Andrea Bizzotto 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 | # Flutter Tutorial - Flutter Layout Basics
2 | [][youtube]
3 | [][twitter]
4 | [][newsletter]
5 |
6 | [
][sponsor]
7 |
8 | [](https://github.com/JohannesMilke/layout_basics_example)
9 | [](https://github.com/JohannesMilke)
10 |
11 | Build basic Flutter layouts and widgets with the help of Row, Column, Stack, Expanded, Container, ListView, and GridView in Flutter.
12 |
13 | ### ✌ Preview
14 |
15 | | App Preview | Course Preview |
16 | | :----------------------------------: | :----------------------------------: |
17 | |
|
|
18 |
19 | ➜ [Buy My Courses](https://johannesmilke.teachable.com/p/home "Buy My Courses")
20 |
21 | ### 📺 Watch Video
22 |
23 | ##### [YouTube video](https://www.youtube.com/watch?v=yYxueTNIDlA "Youtube Johannes Milke") where the *source code* is explained. [Subscribe YouTube channel.](https://www.youtube.com/JohannesMilke?sub_confirmation=1 "YouTube Subscribe Johannes Milke")
24 |
27 |
28 | ➜ [Watch My Video](https://www.youtube.com/watch?v=yYxueTNIDlA "Watch My Video")
29 |
30 | ### ⚡ Social Media
31 |
32 | [
](https://www.youtube.com/JohannesMilke?sub_confirmation=1) YouTube: [@JohannesMilke](https://www.youtube.com/JohannesMilke?sub_confirmation=1 "YouTube Johannes Milke")
33 |
34 | [
](https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2FJohannesMilke&screen_name=JohannesMilke) Twitter: [@JohannesMilke](https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2FJohannesMilke&screen_name=JohannesMilke "Twitter Johannes Milke")
35 |
36 | [
](https://instagram.com/JohannesMilke) Instagram: [@JohannesMilke](https://instagram.com/JohannesMilke "Instagram Johannes Milke")
37 |
38 | [
](https://www.facebook.com/real.JohannesMilke) Facebook: [@JohannesMilke](https://www.facebook.com/real.JohannesMilke "Facebook Johannes Milke")
39 |
40 | [
](https://linkedin.com/in/JohannesMilke) LinkedIn: [@JohannesMilke](https://linkedin.com/in/JohannesMilke "LinkedIn Johannes Milke")
41 |
42 | [
](https://github.com/JohannesMilke) GitHub: [@JohannesMilke](https://github.com/JohannesMilke "GitHub Johannes Milke")
43 |
44 | [
](https://medium.com/@JohannesMilke) Medium: [@JohannesMilke](https://medium.com/@JohannesMilke "Medium Johannes Milke")
45 |
46 | [
](https://johannesmilke.com) Website: [@JohannesMilke](https://johannesmilke.com "Website Johannes Milke")
47 |
48 | [twitter]: https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2FJohannesMilke&screen_name=JohannesMilke
49 | [youtube]: https://www.youtube.com/JohannesMilke?sub_confirmation=1
50 | [courses]: https://johannesmilke.teachable.com/p/home
51 | [newsletter]: https://johannesmilke.com/newsletter
52 | [sponsor]: https://github.com/sponsors/JohannesMilke
53 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.layout_basics_example"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/layout_basics_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.layout_basics_example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/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-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/ephemeral/
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | INFOPLIST_FILE = Runner/Info.plist;
293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.layoutBasicsExample;
295 | PRODUCT_NAME = "$(TARGET_NAME)";
296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
297 | SWIFT_VERSION = 5.0;
298 | VERSIONING_SYSTEM = "apple-generic";
299 | };
300 | name = Profile;
301 | };
302 | 97C147031CF9000F007C117D /* Debug */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | ALWAYS_SEARCH_USER_PATHS = NO;
306 | CLANG_ANALYZER_NONNULL = YES;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
326 | CLANG_WARN_STRICT_PROTOTYPES = YES;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = dwarf;
333 | ENABLE_STRICT_OBJC_MSGSEND = YES;
334 | ENABLE_TESTABILITY = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_DYNAMIC_NO_PIC = NO;
337 | GCC_NO_COMMON_BLOCKS = YES;
338 | GCC_OPTIMIZATION_LEVEL = 0;
339 | GCC_PREPROCESSOR_DEFINITIONS = (
340 | "DEBUG=1",
341 | "$(inherited)",
342 | );
343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
345 | GCC_WARN_UNDECLARED_SELECTOR = YES;
346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
347 | GCC_WARN_UNUSED_FUNCTION = YES;
348 | GCC_WARN_UNUSED_VARIABLE = YES;
349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
350 | MTL_ENABLE_DEBUG_INFO = YES;
351 | ONLY_ACTIVE_ARCH = YES;
352 | SDKROOT = iphoneos;
353 | TARGETED_DEVICE_FAMILY = "1,2";
354 | };
355 | name = Debug;
356 | };
357 | 97C147041CF9000F007C117D /* Release */ = {
358 | isa = XCBuildConfiguration;
359 | buildSettings = {
360 | ALWAYS_SEARCH_USER_PATHS = NO;
361 | CLANG_ANALYZER_NONNULL = YES;
362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
363 | CLANG_CXX_LIBRARY = "libc++";
364 | CLANG_ENABLE_MODULES = YES;
365 | CLANG_ENABLE_OBJC_ARC = YES;
366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
367 | CLANG_WARN_BOOL_CONVERSION = YES;
368 | CLANG_WARN_COMMA = YES;
369 | CLANG_WARN_CONSTANT_CONVERSION = YES;
370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
372 | CLANG_WARN_EMPTY_BODY = YES;
373 | CLANG_WARN_ENUM_CONVERSION = YES;
374 | CLANG_WARN_INFINITE_RECURSION = YES;
375 | CLANG_WARN_INT_CONVERSION = YES;
376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
381 | CLANG_WARN_STRICT_PROTOTYPES = YES;
382 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386 | COPY_PHASE_STRIP = NO;
387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
388 | ENABLE_NS_ASSERTIONS = NO;
389 | ENABLE_STRICT_OBJC_MSGSEND = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu99;
391 | GCC_NO_COMMON_BLOCKS = YES;
392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
394 | GCC_WARN_UNDECLARED_SELECTOR = YES;
395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
396 | GCC_WARN_UNUSED_FUNCTION = YES;
397 | GCC_WARN_UNUSED_VARIABLE = YES;
398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
399 | MTL_ENABLE_DEBUG_INFO = NO;
400 | SDKROOT = iphoneos;
401 | SUPPORTED_PLATFORMS = iphoneos;
402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
403 | TARGETED_DEVICE_FAMILY = "1,2";
404 | VALIDATE_PRODUCT = YES;
405 | };
406 | name = Release;
407 | };
408 | 97C147061CF9000F007C117D /* Debug */ = {
409 | isa = XCBuildConfiguration;
410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
411 | buildSettings = {
412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
413 | CLANG_ENABLE_MODULES = YES;
414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
415 | ENABLE_BITCODE = NO;
416 | INFOPLIST_FILE = Runner/Info.plist;
417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.layoutBasicsExample;
419 | PRODUCT_NAME = "$(TARGET_NAME)";
420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
422 | SWIFT_VERSION = 5.0;
423 | VERSIONING_SYSTEM = "apple-generic";
424 | };
425 | name = Debug;
426 | };
427 | 97C147071CF9000F007C117D /* Release */ = {
428 | isa = XCBuildConfiguration;
429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
430 | buildSettings = {
431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432 | CLANG_ENABLE_MODULES = YES;
433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
434 | ENABLE_BITCODE = NO;
435 | INFOPLIST_FILE = Runner/Info.plist;
436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.layoutBasicsExample;
438 | PRODUCT_NAME = "$(TARGET_NAME)";
439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
440 | SWIFT_VERSION = 5.0;
441 | VERSIONING_SYSTEM = "apple-generic";
442 | };
443 | name = Release;
444 | };
445 | /* End XCBuildConfiguration section */
446 |
447 | /* Begin XCConfigurationList section */
448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
449 | isa = XCConfigurationList;
450 | buildConfigurations = (
451 | 97C147031CF9000F007C117D /* Debug */,
452 | 97C147041CF9000F007C117D /* Release */,
453 | 249021D3217E4FDB00AE95B9 /* Profile */,
454 | );
455 | defaultConfigurationIsVisible = 0;
456 | defaultConfigurationName = Release;
457 | };
458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
459 | isa = XCConfigurationList;
460 | buildConfigurations = (
461 | 97C147061CF9000F007C117D /* Debug */,
462 | 97C147071CF9000F007C117D /* Release */,
463 | 249021D4217E4FDB00AE95B9 /* Profile */,
464 | );
465 | defaultConfigurationIsVisible = 0;
466 | defaultConfigurationName = Release;
467 | };
468 | /* End XCConfigurationList section */
469 | };
470 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
471 | }
472 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
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: [UIApplication.LaunchOptionsKey: 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" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/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 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | layout_basics_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 |
4 | import 'page/main_page.dart';
5 |
6 | Future main() async {
7 | WidgetsFlutterBinding.ensureInitialized();
8 |
9 | await SystemChrome.setPreferredOrientations([
10 | DeviceOrientation.portraitUp,
11 | DeviceOrientation.portraitDown,
12 | ]);
13 |
14 | runApp(MyApp());
15 | }
16 |
17 | class MyApp extends StatelessWidget {
18 | static final String title = 'Layout Basics';
19 |
20 | @override
21 | Widget build(BuildContext context) => MaterialApp(
22 | debugShowCheckedModeBanner: false,
23 | title: title,
24 | theme: ThemeData(
25 | primaryColor: Colors.indigo,
26 | ),
27 | home: MainPage(),
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/lib/page/container_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:layout_basics_example/widget/items/container_items.dart';
3 |
4 | import '../widget/items/layout_type.dart';
5 | import '../widget/main_app_bar.dart';
6 |
7 | class ContainerPage extends StatefulWidget {
8 | @override
9 | _ContainerPageState createState() => new _ContainerPageState();
10 | }
11 |
12 | class _ContainerPageState extends State {
13 | EdgeInsets padding = EdgeInsets.zero;
14 | EdgeInsets margin = EdgeInsets.zero;
15 |
16 | EdgeInsets marginPaddingFromIndex(int index) {
17 | switch (index) {
18 | case 0:
19 | return EdgeInsets.zero;
20 | case 1:
21 | return EdgeInsets.all(10);
22 | case 2:
23 | return EdgeInsets.all(20);
24 | case 3:
25 | return EdgeInsets.all(30);
26 | default:
27 | return EdgeInsets.zero;
28 | }
29 | }
30 |
31 | void setMargin(int index) =>
32 | setState(() => margin = marginPaddingFromIndex(index));
33 |
34 | void setPadding(int index) =>
35 | setState(() => padding = marginPaddingFromIndex(index));
36 |
37 | @override
38 | Widget build(BuildContext context) => Scaffold(
39 | appBar: AppBarWidget(
40 | layoutType: LayoutType.container,
41 | bottom: PreferredSize(
42 | preferredSize: Size.fromHeight(80),
43 | child: buildBottom(),
44 | ),
45 | ),
46 | body: Center(
47 | child: Column(
48 | mainAxisAlignment: MainAxisAlignment.center,
49 | children: [
50 | buildBox('1. Widget'),
51 | buildContent(),
52 | buildBox('3. Widget'),
53 | ],
54 | ),
55 | ),
56 | );
57 |
58 | Widget buildBox(String text) => Container(
59 | height: 50,
60 | color: Colors.orange,
61 | child: Center(child: Text(text, style: TextStyle(fontSize: 16))),
62 | );
63 |
64 | Widget buildContent() => Container(
65 | color: Colors.blue,
66 | padding: padding,
67 | margin: margin,
68 | child: Container(
69 | color: Colors.yellow,
70 | child: Text(
71 | '2. Widget',
72 | style: TextStyle(fontSize: 32),
73 | )),
74 | );
75 | Widget buildBottom() => ContainerItems(
76 | onChangedMargin: setMargin,
77 | onChangedPadding: setPadding,
78 | );
79 | }
80 |
--------------------------------------------------------------------------------
/lib/page/expanded_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:layout_basics_example/widget/items/expanded_items.dart';
3 | import 'package:layout_basics_example/widget/items/layout_type.dart';
4 |
5 | import '../widget/main_app_bar.dart';
6 |
7 | class ExpandedPage extends StatefulWidget {
8 | @override
9 | _ExpandedPageState createState() => new _ExpandedPageState();
10 | }
11 |
12 | class _ExpandedPageState extends State {
13 | bool isExample1 = true;
14 | int flex1 = 1;
15 | int flex2 = 1;
16 | int flex3 = 1;
17 |
18 | void setLayout(int index) => setState(() => isExample1 = index == 0);
19 |
20 | int _flexFromIndex(int index) {
21 | if (index < 4 && index >= 0) {
22 | return index + 1;
23 | }
24 | return 1;
25 | }
26 |
27 | void setFlex1(int index) => setState(() => flex1 = _flexFromIndex(index));
28 |
29 | void setFlex2(int index) => setState(() => flex2 = _flexFromIndex(index));
30 |
31 | void setFlex3(int index) => setState(() => flex3 = _flexFromIndex(index));
32 |
33 | Widget buildBox({
34 | required int flex,
35 | required Color color,
36 | Color textColor = Colors.white,
37 | }) =>
38 | Expanded(
39 | flex: flex,
40 | child: Container(
41 | constraints: BoxConstraints.expand(),
42 | color: color,
43 | child: Center(
44 | child: Text(
45 | 'Flex:$flex',
46 | style: TextStyle(fontSize: 32.0, color: textColor),
47 | ),
48 | ),
49 | ),
50 | );
51 |
52 | @override
53 | Widget build(BuildContext context) => Scaffold(
54 | appBar: AppBarWidget(
55 | layoutType: LayoutType.expanded,
56 | bottom: PreferredSize(
57 | preferredSize: Size(0.0, 160.0),
58 | child: buildBottom(),
59 | ),
60 | ),
61 | body: Container(color: Colors.yellow, child: buildContent()),
62 | );
63 |
64 | Widget buildContent() {
65 | if (isExample1) {
66 | return Row(
67 | children: [
68 | buildBox(flex: flex1, color: Colors.red),
69 | Expanded(
70 | flex: flex2,
71 | child: Column(
72 | children: [
73 | buildBox(flex: flex2, color: Colors.blue),
74 | buildBox(flex: flex3, color: Colors.green),
75 | ],
76 | ),
77 | ),
78 | ],
79 | );
80 | } else {
81 | return Column(
82 | children: [
83 | buildBox(flex: flex1, color: Colors.red),
84 | Expanded(
85 | flex: flex2,
86 | child: Row(
87 | children: [
88 | buildBox(flex: flex2, color: Colors.blue),
89 | buildBox(flex: flex3, color: Colors.green),
90 | ],
91 | ),
92 | ),
93 | ],
94 | );
95 | }
96 | }
97 |
98 | Widget buildBottom() => ExpandedItems(
99 | onChangedExample: setLayout,
100 | onChangedFlex1: setFlex1,
101 | onChangedFlex2: setFlex2,
102 | onChangedFlex3: setFlex3,
103 | );
104 | }
105 |
--------------------------------------------------------------------------------
/lib/page/listview_gridview_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 | import 'package:layout_basics_example/widget/items/list_grid_items.dart';
4 |
5 | import '../widget/items/layout_type.dart';
6 | import '../widget/main_app_bar.dart';
7 |
8 | class ListViewGridViewPage extends StatefulWidget {
9 | @override
10 | _ListViewGridViewPageState createState() => new _ListViewGridViewPageState();
11 | }
12 |
13 | class _ListViewGridViewPageState extends State {
14 | bool isList = true;
15 | Axis scrollDirection = Axis.vertical;
16 | int count = 2;
17 | double aspectRatio = 0.5;
18 |
19 | void setLayout(int index) => setState(() => isList = index == 0);
20 |
21 | double aspectRatioFromIndex(int index) {
22 | switch (index) {
23 | case 0:
24 | return 0.5;
25 | case 1:
26 | return 0.75;
27 | case 2:
28 | return 1;
29 | case 3:
30 | return 1.25;
31 | case 4:
32 | return 1.5;
33 | default:
34 | return 0.5;
35 | }
36 | }
37 |
38 | void setAspectRatio(int index) =>
39 | setState(() => aspectRatio = aspectRatioFromIndex(index));
40 |
41 | Axis getAxis(int index) {
42 | switch (index) {
43 | case 0:
44 | return Axis.vertical;
45 | case 1:
46 | default:
47 | return Axis.horizontal;
48 | }
49 | }
50 |
51 | void setScrollAxis(int index) =>
52 | setState(() => scrollDirection = getAxis(index));
53 |
54 | int _countFromIndex(int index) {
55 | if (index < 4 && index >= 0) return index + 2;
56 |
57 | return 2;
58 | }
59 |
60 | void setCount(int index) => setState(() => count = _countFromIndex(index));
61 |
62 | Widget buildContent() {
63 | if (isList) {
64 | return ListView.builder(
65 | scrollDirection: scrollDirection,
66 | itemBuilder: (context, index) => Padding(
67 | padding: const EdgeInsets.all(8.0),
68 | child: SizedBox(
69 | height: scrollDirection == Axis.vertical ? 300 : double.infinity,
70 | width: scrollDirection == Axis.vertical ? double.infinity : 300,
71 | child: Image.network(
72 | 'https://source.unsplash.com/random?sig=$index',
73 | fit: BoxFit.cover,
74 | ),
75 | ),
76 | ),
77 | itemCount: 10,
78 | );
79 | } else {
80 | return GridView.builder(
81 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
82 | crossAxisCount: count,
83 | mainAxisSpacing: 4,
84 | crossAxisSpacing: 4,
85 | childAspectRatio: aspectRatio,
86 | ),
87 | itemBuilder: (context, index) => SizedBox(
88 | child: Image.network(
89 | 'https://source.unsplash.com/random?sig=$index',
90 | fit: BoxFit.cover,
91 | ),
92 | ),
93 | itemCount: 20,
94 | scrollDirection: scrollDirection,
95 | );
96 | }
97 | }
98 |
99 | @override
100 | Widget build(BuildContext context) => Scaffold(
101 | appBar: AppBarWidget(
102 | layoutType: LayoutType.list,
103 | bottom: PreferredSize(
104 | preferredSize: Size.fromHeight(160),
105 | child: buildBottom(),
106 | ),
107 | ),
108 | body: Container(color: Colors.yellow, child: buildContent()),
109 | );
110 |
111 | Widget buildBottom() => ListGridItems(
112 | onChangedLayout: setLayout,
113 | onChangedScrollDirection: setScrollAxis,
114 | onChangedCount: setCount,
115 | onChangedAspectRatio: setAspectRatio,
116 | );
117 | }
118 |
--------------------------------------------------------------------------------
/lib/page/main_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:layout_basics_example/page/container_page.dart';
3 | import 'package:layout_basics_example/page/listview_gridview_page.dart';
4 |
5 | import '../widget/items/layout_type.dart';
6 | import 'expanded_page.dart';
7 | import 'row_column_page.dart';
8 | import 'stack_page.dart';
9 |
10 | class MainPage extends StatefulWidget {
11 | @override
12 | _MainPageState createState() => _MainPageState();
13 | }
14 |
15 | class _MainPageState extends State {
16 | LayoutType selectedLayout = LayoutType.rowColumn;
17 |
18 | @override
19 | Widget build(BuildContext context) => Scaffold(
20 | body: buildBody(),
21 | bottomNavigationBar: buildBottomNavigationBar(),
22 | );
23 |
24 | Widget buildBody() => {
25 | LayoutType.rowColumn: (_) => RowColumnPage(),
26 | LayoutType.stack: (_) => StackPage(),
27 | LayoutType.expanded: (_) => ExpandedPage(),
28 | LayoutType.container: (_) => ContainerPage(),
29 | LayoutType.list: (_) => ListViewGridViewPage(),
30 | }[selectedLayout]!(context);
31 |
32 | Widget buildBottomNavigationBar() => BottomNavigationBar(
33 | type: BottomNavigationBarType.fixed,
34 | currentIndex: selectedLayout.index,
35 | items: [
36 | buildItem(
37 | icon: Icons.view_headline,
38 | layout: LayoutType.rowColumn,
39 | ),
40 | buildItem(
41 | icon: Icons.layers,
42 | layout: LayoutType.stack,
43 | ),
44 | buildItem(
45 | icon: Icons.line_weight,
46 | layout: LayoutType.expanded,
47 | ),
48 | buildItem(
49 | icon: Icons.format_line_spacing,
50 | layout: LayoutType.container,
51 | ),
52 | buildItem(
53 | icon: Icons.list,
54 | layout: LayoutType.list,
55 | ),
56 | ],
57 | onTap: setTab,
58 | );
59 |
60 | BottomNavigationBarItem buildItem({
61 | required IconData icon,
62 | required LayoutType layout,
63 | }) {
64 | final text = layoutNames[layout]!;
65 |
66 | return BottomNavigationBarItem(
67 | icon: Icon(icon),
68 | label: text,
69 | );
70 | }
71 |
72 | void setLayout(LayoutType layout) => setState(() => selectedLayout = layout);
73 |
74 | void setTab(int index) => setLayout(LayoutType.values[index]);
75 | }
76 |
--------------------------------------------------------------------------------
/lib/page/row_column_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:layout_basics_example/widget/items/layout_type.dart';
3 | import 'package:layout_basics_example/widget/items/row_column_items.dart';
4 |
5 | import '../widget/main_app_bar.dart';
6 |
7 | class RowColumnPage extends StatefulWidget {
8 | @override
9 | _RowColumnPageState createState() => new _RowColumnPageState();
10 | }
11 |
12 | class _RowColumnPageState extends State {
13 | bool isRow = true;
14 | MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start;
15 | CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start;
16 | MainAxisSize mainAxisSize = MainAxisSize.min;
17 |
18 | void setLayout(int index) => setState(() => isRow = index == 0);
19 |
20 | MainAxisAlignment getMainAxisAlignment(int index) {
21 | switch (index) {
22 | case 0:
23 | return MainAxisAlignment.start;
24 | case 1:
25 | return MainAxisAlignment.end;
26 | case 2:
27 | return MainAxisAlignment.center;
28 | case 3:
29 | return MainAxisAlignment.spaceBetween;
30 | case 4:
31 | return MainAxisAlignment.spaceAround;
32 | case 5:
33 | return MainAxisAlignment.spaceEvenly;
34 | }
35 | return MainAxisAlignment.start;
36 | }
37 |
38 | void setMainAxisAlignment(int index) =>
39 | setState(() => mainAxisAlignment = getMainAxisAlignment(index));
40 |
41 | CrossAxisAlignment getCrossAxisAlignment(int index) {
42 | switch (index) {
43 | case 0:
44 | return CrossAxisAlignment.start;
45 | case 1:
46 | return CrossAxisAlignment.end;
47 | case 2:
48 | return CrossAxisAlignment.center;
49 | case 3:
50 | return CrossAxisAlignment.stretch;
51 | case 4:
52 | return CrossAxisAlignment.baseline;
53 | }
54 | return CrossAxisAlignment.start;
55 | }
56 |
57 | void setCrossAxisAlignment(int index) =>
58 | setState(() => crossAxisAlignment = getCrossAxisAlignment(index));
59 |
60 | void setMainAxisSize(int index) => setState(
61 | () => mainAxisSize = index == 0 ? MainAxisSize.min : MainAxisSize.max);
62 |
63 | Widget buildContent() {
64 | final children = [
65 | FlutterLogo(size: 50),
66 | FlutterLogo(size: 100),
67 | FlutterLogo(size: 50),
68 | ];
69 |
70 | if (isRow) {
71 | return Row(
72 | mainAxisAlignment: mainAxisAlignment,
73 | crossAxisAlignment: crossAxisAlignment,
74 | mainAxisSize: mainAxisSize,
75 | children: children,
76 | );
77 | } else {
78 | return Column(
79 | mainAxisAlignment: mainAxisAlignment,
80 | crossAxisAlignment: crossAxisAlignment,
81 | mainAxisSize: mainAxisSize,
82 | children: children,
83 | );
84 | }
85 | }
86 |
87 | @override
88 | Widget build(BuildContext context) => Scaffold(
89 | appBar: AppBarWidget(
90 | layoutType: LayoutType.rowColumn,
91 | bottom: PreferredSize(
92 | preferredSize: Size(0.0, 160.0),
93 | child: buildBottom(),
94 | ),
95 | ),
96 | body: Container(color: Colors.yellow, child: buildContent()),
97 | );
98 |
99 | Widget buildBottom() => RowColumnItems(
100 | onChangedLayout: setLayout,
101 | onChangedMainAxisAlignment: setMainAxisAlignment,
102 | onChangedCrossAxisAlignment: setCrossAxisAlignment,
103 | onChangedMainAxisSize: setMainAxisSize,
104 | );
105 | }
106 |
--------------------------------------------------------------------------------
/lib/page/stack_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../widget/items/layout_type.dart';
3 | import '../widget/main_app_bar.dart';
4 | import '../widget/items/stack_items.dart';
5 |
6 | class StackPage extends StatefulWidget {
7 | StackPage({
8 | Key? key,
9 | }) : super(key: key);
10 |
11 | @override
12 | _StackPageState createState() => new _StackPageState();
13 | }
14 |
15 | class _StackPageState extends State {
16 | double? left = 0;
17 | double? right;
18 | double? top = 0;
19 | double? bottom;
20 | bool stretch = false;
21 | double padding = -20;
22 | bool _useAlignment = true;
23 | Clip clipBehaviour = Clip.antiAlias;
24 | AlignmentDirectional _alignmentDirectional = AlignmentDirectional.topStart;
25 |
26 | double getPaddingFromIndex(int index) {
27 | switch (index) {
28 | case 0:
29 | return -20;
30 | case 1:
31 | return -10;
32 |
33 | case 2:
34 | return 0;
35 |
36 | case 3:
37 | return 10;
38 | case 4:
39 | return 20;
40 | case 5:
41 | return 30;
42 | }
43 | return -20;
44 | }
45 |
46 | Clip clipFromIndex(int index) {
47 | switch (index) {
48 | case 0:
49 | return Clip.antiAlias;
50 | case 1:
51 | return Clip.antiAliasWithSaveLayer;
52 | case 2:
53 | return Clip.hardEdge;
54 | case 3:
55 | return Clip.none;
56 | }
57 | return Clip.antiAlias;
58 | }
59 |
60 | void setClipBehaviour(int index) =>
61 | setState(() => clipBehaviour = clipFromIndex(index));
62 |
63 | AlignmentDirectional alignmentFromIndex(int index) {
64 | switch (index) {
65 | case 0:
66 | return AlignmentDirectional.topStart;
67 | case 1:
68 | return AlignmentDirectional.topCenter;
69 | case 2:
70 | return AlignmentDirectional.topEnd;
71 | case 3:
72 | return AlignmentDirectional.centerStart;
73 | case 4:
74 | return AlignmentDirectional.center;
75 | case 5:
76 | return AlignmentDirectional.centerEnd;
77 | case 6:
78 | return AlignmentDirectional.bottomStart;
79 | case 7:
80 | return AlignmentDirectional.bottomCenter;
81 | case 8:
82 | return AlignmentDirectional.bottomEnd;
83 | }
84 | return AlignmentDirectional.center;
85 | }
86 |
87 | void setPadding(int index) =>
88 | setState(() => padding = getPaddingFromIndex(index));
89 |
90 | void setAlignment(int index) {
91 | stretch = false;
92 | if (_useAlignment)
93 | setState(() => _alignmentDirectional = alignmentFromIndex(index));
94 | else {
95 | switch (index) {
96 | case 0:
97 | setState(() {
98 | top = null;
99 | left = null;
100 | right = null;
101 | bottom = null;
102 | });
103 | return;
104 | case 1:
105 | setState(() {
106 | top = 0;
107 | left = 0;
108 | right = null;
109 | bottom = null;
110 | });
111 | return;
112 | case 2:
113 | setState(() {
114 | top = 0;
115 | left = 0;
116 | right = 0;
117 | bottom = null;
118 | });
119 | return;
120 | case 3:
121 | setState(() {
122 | top = 0;
123 | left = null;
124 | right = 0;
125 | bottom = null;
126 | });
127 | return;
128 | case 4:
129 | setState(() {
130 | top = 0;
131 | left = 0;
132 | right = 0;
133 | bottom = null;
134 | stretch = true;
135 | });
136 | return;
137 | case 5:
138 | setState(() {
139 | top = null;
140 | left = 0;
141 | right = null;
142 | bottom = 0;
143 | });
144 | return;
145 | case 6:
146 | setState(() {
147 | top = null;
148 | left = 0;
149 | right = 0;
150 | bottom = 0;
151 | });
152 | return;
153 | case 7:
154 | setState(() {
155 | top = null;
156 | left = null;
157 | right = 0;
158 | bottom = 0;
159 | });
160 | return;
161 | case 8:
162 | setState(() {
163 | top = null;
164 | left = 0;
165 | right = 0;
166 | bottom = 0;
167 | stretch = true;
168 | });
169 | return;
170 | }
171 |
172 | setState(() {
173 | top = null;
174 | left = null;
175 | right = null;
176 | bottom = null;
177 | });
178 | return;
179 | }
180 | }
181 |
182 | void setType(int index) => setState(() => _useAlignment = index == 0);
183 |
184 | Widget _buildStack() {
185 | if (_useAlignment) {
186 | return Stack(
187 | clipBehavior: clipBehaviour,
188 | alignment: _alignmentDirectional,
189 | children: [
190 | Container(color: Colors.green, width: 300, height: 300),
191 | Container(color: Colors.yellow, width: 200, height: 200),
192 | Container(color: Colors.red, width: 100, height: 100),
193 | ],
194 | );
195 | } else {
196 | final isNotCentered = (left ?? right ?? top ?? bottom) == null || stretch;
197 |
198 | return Stack(
199 | clipBehavior: clipBehaviour,
200 | alignment: _alignmentDirectional,
201 | children: [
202 | Container(color: Colors.yellow, width: 300, height: 300),
203 | Positioned(
204 | left: left == null ? null : left! + padding,
205 | top: top == null ? null : top! + padding,
206 | right: right == null ? null : right! + padding,
207 | bottom: bottom == null ? null : bottom! + padding,
208 | child: isNotCentered
209 | ? Container(height: 100, width: 100, color: Colors.indigo)
210 | : Center(
211 | child: Container(
212 | height: 100,
213 | width: 100,
214 | color: Colors.indigo,
215 | ),
216 | ),
217 | ),
218 | ],
219 | );
220 | }
221 | }
222 |
223 | @override
224 | Widget build(BuildContext context) => Scaffold(
225 | appBar: AppBarWidget(
226 | layoutType: LayoutType.stack,
227 | bottom: PreferredSize(
228 | preferredSize: Size(0.0, 160.0),
229 | child: buildBottom(),
230 | ),
231 | ),
232 | body: Container(
233 | color: Colors.white,
234 | child: Center(
235 | child: _buildStack(),
236 | ),
237 | ),
238 | );
239 |
240 | Widget buildBottom() => StackItems(
241 | onChangedType: setType,
242 | onChangedAlignment: setAlignment,
243 | onChangedClipBehaviour: setClipBehaviour,
244 | onChangedMargin: setPadding,
245 | );
246 | }
247 |
--------------------------------------------------------------------------------
/lib/widget/items/container_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../layout_selector_widget.dart';
3 |
4 | class ContainerItems extends StatelessWidget {
5 | final ValueChanged onChangedPadding;
6 | final ValueChanged onChangedMargin;
7 |
8 | const ContainerItems({
9 | required this.onChangedPadding,
10 | required this.onChangedMargin,
11 | });
12 |
13 | Widget build(BuildContext context) => Row(
14 | children: [
15 | Expanded(
16 | child: LayoutSelectorWidget(
17 | title: 'Padding',
18 | values: ['0', '10px', '20px', '30px'],
19 | onChanged: onChangedPadding,
20 | ),
21 | ),
22 | Expanded(
23 | child: LayoutSelectorWidget(
24 | title: 'Margin',
25 | values: ['0', '10px', '20px', '30px'],
26 | onChanged: onChangedMargin,
27 | ),
28 | ),
29 | ],
30 | );
31 | }
32 |
--------------------------------------------------------------------------------
/lib/widget/items/expanded_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../layout_selector_widget.dart';
3 |
4 | class ExpandedItems extends StatefulWidget {
5 | final ValueChanged onChangedExample;
6 | final ValueChanged onChangedFlex1;
7 | final ValueChanged onChangedFlex2;
8 | final ValueChanged onChangedFlex3;
9 |
10 | const ExpandedItems({
11 | required this.onChangedExample,
12 | required this.onChangedFlex1,
13 | required this.onChangedFlex2,
14 | required this.onChangedFlex3,
15 | });
16 |
17 | @override
18 | _ExpandedItemsState createState() => _ExpandedItemsState();
19 | }
20 |
21 | class _ExpandedItemsState extends State {
22 | bool isExample1 = true;
23 |
24 | @override
25 | Widget build(BuildContext context) => Row(
26 | children: [
27 | Expanded(
28 | child: Column(
29 | children: [
30 | LayoutSelectorWidget(
31 | title: 'Layout',
32 | values: ['Example1', 'Example2'],
33 | onChanged: setExample,
34 | ),
35 | LayoutSelectorWidget(
36 | title: 'Red',
37 | values: ['1', '2', '3', '4'],
38 | onChanged: widget.onChangedFlex1,
39 | ),
40 | ],
41 | ),
42 | ),
43 | Expanded(
44 | child: Column(
45 | children: [
46 | LayoutSelectorWidget(
47 | title: 'Blue',
48 | values: ['1', '2', '3', '4'],
49 | onChanged: widget.onChangedFlex2,
50 | ),
51 | LayoutSelectorWidget(
52 | title: 'Green',
53 | values: ['1', '2', '3', '4'],
54 | onChanged: widget.onChangedFlex3,
55 | ),
56 | ],
57 | ),
58 | ),
59 | ],
60 | );
61 |
62 | void setExample(int index) {
63 | widget.onChangedExample(index);
64 |
65 | setState(() => isExample1 = index == 0);
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/lib/widget/items/layout_type.dart:
--------------------------------------------------------------------------------
1 | enum LayoutType {
2 | rowColumn,
3 | stack,
4 | expanded,
5 | container,
6 | list,
7 | }
8 |
9 | Map layoutNames = {
10 | LayoutType.rowColumn: 'Row / Col',
11 | LayoutType.stack: 'Stack',
12 | LayoutType.expanded: 'Expanded',
13 | LayoutType.container: 'Container',
14 | LayoutType.list: 'List / Grid',
15 | };
16 |
--------------------------------------------------------------------------------
/lib/widget/items/list_grid_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../layout_selector_widget.dart';
3 |
4 | class ListGridItems extends StatefulWidget {
5 | final ValueChanged onChangedLayout;
6 |
7 | final ValueChanged onChangedCount;
8 | final ValueChanged onChangedScrollDirection;
9 | final ValueChanged onChangedAspectRatio;
10 |
11 | const ListGridItems({
12 | required this.onChangedLayout,
13 | required this.onChangedCount,
14 | required this.onChangedScrollDirection,
15 | required this.onChangedAspectRatio,
16 | });
17 |
18 | @override
19 | _ListGridItemsState createState() => _ListGridItemsState();
20 | }
21 |
22 | class _ListGridItemsState extends State {
23 | bool aspectRatioDisabled = true;
24 |
25 | @override
26 | Widget build(BuildContext context) => Row(
27 | children: [
28 | Expanded(
29 | child: Column(
30 | children: [
31 | LayoutSelectorWidget(
32 | title: 'Layout',
33 | values: ['list', 'grid'],
34 | onChanged: setLayout,
35 | ),
36 | LayoutSelectorWidget(
37 | title: 'Scroll Direction',
38 | values: ['vertical', 'horizontal'],
39 | onChanged: widget.onChangedScrollDirection,
40 | ),
41 | ],
42 | ),
43 | ),
44 | Expanded(
45 | child: Column(
46 | children: [
47 | LayoutSelectorWidget(
48 | title: 'CrossAxisCount',
49 | disabled: aspectRatioDisabled,
50 | values: [
51 | '2',
52 | '3',
53 | '4',
54 | '5',
55 | ],
56 | onChanged: widget.onChangedCount,
57 | ),
58 | LayoutSelectorWidget(
59 | title: 'AspectRatio',
60 | disabled: aspectRatioDisabled,
61 | values: ['1/2', '3/4', '1', '5/4', '3/2'],
62 | onChanged: widget.onChangedAspectRatio,
63 | ),
64 | ],
65 | ),
66 | ),
67 | ],
68 | );
69 |
70 | void setLayout(int index) {
71 | widget.onChangedLayout(index);
72 |
73 | setState(() => aspectRatioDisabled = index == 0);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/widget/items/row_column_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../layout_selector_widget.dart';
4 |
5 | class RowColumnItems extends StatefulWidget {
6 | final ValueChanged onChangedLayout;
7 | final ValueChanged onChangedMainAxisAlignment;
8 | final ValueChanged onChangedCrossAxisAlignment;
9 | final ValueChanged onChangedMainAxisSize;
10 |
11 | const RowColumnItems({
12 | required this.onChangedLayout,
13 | required this.onChangedMainAxisAlignment,
14 | required this.onChangedCrossAxisAlignment,
15 | required this.onChangedMainAxisSize,
16 | });
17 |
18 | @override
19 | _RowColumnItemsState createState() => _RowColumnItemsState();
20 | }
21 |
22 | class _RowColumnItemsState extends State {
23 | bool showMainAxisAlign = false;
24 |
25 | @override
26 | Widget build(BuildContext context) => Row(
27 | children: [
28 | Expanded(
29 | child: Column(
30 | children: [
31 | LayoutSelectorWidget(
32 | title: 'Layout',
33 | values: ['row', 'column'],
34 | onChanged: widget.onChangedLayout,
35 | ),
36 | LayoutSelectorWidget(
37 | title: 'Main Axis Size',
38 | values: ['min', 'max'],
39 | onChanged: setMainAxisSize,
40 | ),
41 | ],
42 | ),
43 | ),
44 | Expanded(
45 | child: Column(
46 | children: [
47 | LayoutSelectorWidget(
48 | title: 'Main Axis Alignment',
49 | values: [
50 | 'start',
51 | 'end',
52 | 'center',
53 | 'space\nbetween',
54 | 'space\naround',
55 | 'space\nevenly'
56 | ],
57 | disabled: !showMainAxisAlign,
58 | onChanged: widget.onChangedMainAxisAlignment,
59 | ),
60 | LayoutSelectorWidget(
61 | title: 'Cross Axis Alignment',
62 | values: [
63 | 'start',
64 | 'end',
65 | 'center',
66 | 'stretch',
67 | ],
68 | onChanged: widget.onChangedCrossAxisAlignment,
69 | ),
70 | ],
71 | ),
72 | ),
73 | ],
74 | );
75 |
76 | void setMainAxisSize(int index) {
77 | widget.onChangedMainAxisSize(index);
78 |
79 | setState(() => showMainAxisAlign = index == 1);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lib/widget/items/stack_items.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../layout_selector_widget.dart';
3 |
4 | class StackItems extends StatefulWidget {
5 | final ValueChanged onChangedType;
6 | final ValueChanged onChangedAlignment;
7 | final ValueChanged onChangedMargin;
8 | final ValueChanged onChangedClipBehaviour;
9 |
10 | const StackItems({
11 | required this.onChangedType,
12 | required this.onChangedAlignment,
13 | required this.onChangedMargin,
14 | required this.onChangedClipBehaviour,
15 | });
16 |
17 | @override
18 | State createState() => StackItemsState();
19 | }
20 |
21 | class StackItemsState extends State {
22 | bool alignmentDisabled = false;
23 | bool marginDisabled = false;
24 |
25 | void setAlignment(int index) {
26 | widget.onChangedAlignment(index);
27 | if (!alignmentDisabled) return;
28 |
29 | setState(() => marginDisabled = index == 0);
30 | }
31 |
32 | void setType(int index) {
33 | widget.onChangedType(index);
34 |
35 | setState(() => alignmentDisabled = index == 1);
36 | }
37 |
38 | @override
39 | Widget build(BuildContext context) => Column(
40 | children: [
41 | Row(
42 | children: [
43 | Expanded(
44 | child: LayoutSelectorWidget(
45 | title: 'Type',
46 | values: [
47 | 'align',
48 | 'position',
49 | ],
50 | onChanged: setType,
51 | ),
52 | ),
53 | Expanded(
54 | child: LayoutSelectorWidget(
55 | title: !alignmentDisabled ? 'Alignment' : 'Position From',
56 | values: !alignmentDisabled
57 | ? [
58 | 'top\nstart',
59 | 'top\ncenter',
60 | 'top\nend',
61 | 'center\nstart',
62 | 'center',
63 | 'center\nend',
64 | 'bottom\nstart',
65 | 'bottom\ncenter',
66 | 'bottom\nend',
67 | ]
68 | : [
69 | 'none',
70 | 'top\nleft',
71 | 'top\ncenter',
72 | 'top\nright',
73 | 'top\nstretch',
74 | 'bottom\nleft',
75 | 'bottom\ncenter',
76 | 'bottom\nright',
77 | 'bottom\nstretch',
78 | ],
79 | onChanged: setAlignment,
80 | ),
81 | ),
82 | ],
83 | ),
84 | Row(
85 | children: [
86 | Expanded(
87 | child: LayoutSelectorWidget(
88 | title: 'Margin',
89 | values: [
90 | '-20px',
91 | '-10px',
92 | '0',
93 | '10px',
94 | '20px',
95 | '30px',
96 | ],
97 | disabled: !alignmentDisabled || marginDisabled,
98 | onChanged: widget.onChangedMargin,
99 | ),
100 | ),
101 | Expanded(
102 | child: LayoutSelectorWidget(
103 | title: 'ClipBehaviour',
104 | values: [
105 | 'antiAlias',
106 | 'antiAlias\nSaveLayer',
107 | 'hardEdge',
108 | 'none',
109 | ],
110 | disabled: !alignmentDisabled,
111 | onChanged: widget.onChangedClipBehaviour,
112 | ),
113 | ),
114 | ],
115 | ),
116 | ],
117 | );
118 | }
119 |
--------------------------------------------------------------------------------
/lib/widget/layout_selector_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LayoutSelectorWidget extends StatefulWidget {
4 | final String title;
5 | final List values;
6 | final bool disabled;
7 | final ValueChanged onChanged;
8 |
9 | const LayoutSelectorWidget({
10 | required this.title,
11 | required this.values,
12 | this.disabled = false,
13 | required this.onChanged,
14 | });
15 |
16 | @override
17 | State createState() => LayoutSelectorWidgetState();
18 | }
19 |
20 | class LayoutSelectorWidgetState extends State {
21 | int index = 0;
22 |
23 | void next() {
24 | final hasNext = index + 1 < widget.values.length;
25 |
26 | index = hasNext ? index + 1 : 0;
27 | update();
28 | }
29 |
30 | void previous() {
31 | final hasPrevious = index > 0;
32 |
33 | index = hasPrevious ? index - 1 : widget.values.length - 1;
34 | update();
35 | }
36 |
37 | void update() => setState(() => widget.onChanged(index));
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | final color = widget.disabled ? Colors.white54 : Colors.white;
42 |
43 | return Column(
44 | children: [
45 | Divider(color: Colors.white),
46 | Text(
47 | widget.title,
48 | style: TextStyle(color: color),
49 | ),
50 | Row(
51 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
52 | children: [
53 | IconButton(
54 | icon: Icon(Icons.arrow_back, color: color),
55 | onPressed: widget.disabled ? null : previous,
56 | ),
57 | Text(
58 | widget.values[index],
59 | maxLines: 2,
60 | textAlign: TextAlign.center,
61 | style: TextStyle(fontWeight: FontWeight.bold, color: color),
62 | ),
63 | IconButton(
64 | icon: Icon(Icons.arrow_forward, color: color),
65 | onPressed: widget.disabled ? null : next,
66 | ),
67 | ],
68 | ),
69 | ],
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/widget/main_app_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'items/layout_type.dart';
3 |
4 | class AppBarWidget extends AppBar {
5 | AppBarWidget({
6 | required LayoutType layoutType,
7 | required PreferredSize bottom,
8 | }) : super(
9 | title: Text(layoutNames[layoutType]!),
10 | centerTitle: true,
11 | bottom: bottom,
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 |
9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10 | }
11 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13 | buildPhases = (
14 | 33CC111E2044C6BF0003C045 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Flutter Assemble";
19 | productName = FLX;
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 33CC111A2044C6BA0003C045;
37 | remoteInfo = FLX;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXCopyFilesBuildPhase section */
42 | 33CC110E2044A8840003C045 /* Bundle Framework */ = {
43 | isa = PBXCopyFilesBuildPhase;
44 | buildActionMask = 2147483647;
45 | dstPath = "";
46 | dstSubfolderSpec = 10;
47 | files = (
48 | );
49 | name = "Bundle Framework";
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
56 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
57 | 33CC10ED2044A3C60003C045 /* layout_basics_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "layout_basics_example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
59 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
60 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
61 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
62 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
63 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
64 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
65 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
66 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
67 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
68 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 33CC10EA2044A3C60003C045 /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | 33BA886A226E78AF003329D5 /* Configs */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
90 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
91 | );
92 | path = Configs;
93 | sourceTree = "";
94 | };
95 | 33CC10E42044A3C60003C045 = {
96 | isa = PBXGroup;
97 | children = (
98 | 33FAB671232836740065AC1E /* Runner */,
99 | 33CEB47122A05771004F2AC0 /* Flutter */,
100 | 33CC10EE2044A3C60003C045 /* Products */,
101 | D73912EC22F37F3D000D13A0 /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 33CC10EE2044A3C60003C045 /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 33CC10ED2044A3C60003C045 /* layout_basics_example.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 33CC11242044D66E0003C045 /* Resources */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 33CC10F22044A3C60003C045 /* Assets.xcassets */,
117 | 33CC10F42044A3C60003C045 /* MainMenu.xib */,
118 | 33CC10F72044A3C60003C045 /* Info.plist */,
119 | );
120 | name = Resources;
121 | path = ..;
122 | sourceTree = "";
123 | };
124 | 33CEB47122A05771004F2AC0 /* Flutter */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
128 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
129 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
130 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
131 | );
132 | path = Flutter;
133 | sourceTree = "";
134 | };
135 | 33FAB671232836740065AC1E /* Runner */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
139 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
140 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
141 | 33E51914231749380026EE4D /* Release.entitlements */,
142 | 33CC11242044D66E0003C045 /* Resources */,
143 | 33BA886A226E78AF003329D5 /* Configs */,
144 | );
145 | path = Runner;
146 | sourceTree = "";
147 | };
148 | D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149 | isa = PBXGroup;
150 | children = (
151 | );
152 | name = Frameworks;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXNativeTarget section */
158 | 33CC10EC2044A3C60003C045 /* Runner */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
161 | buildPhases = (
162 | 33CC10E92044A3C60003C045 /* Sources */,
163 | 33CC10EA2044A3C60003C045 /* Frameworks */,
164 | 33CC10EB2044A3C60003C045 /* Resources */,
165 | 33CC110E2044A8840003C045 /* Bundle Framework */,
166 | 3399D490228B24CF009A79C7 /* ShellScript */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 33CC11202044C79F0003C045 /* PBXTargetDependency */,
172 | );
173 | name = Runner;
174 | productName = Runner;
175 | productReference = 33CC10ED2044A3C60003C045 /* layout_basics_example.app */;
176 | productType = "com.apple.product-type.application";
177 | };
178 | /* End PBXNativeTarget section */
179 |
180 | /* Begin PBXProject section */
181 | 33CC10E52044A3C60003C045 /* Project object */ = {
182 | isa = PBXProject;
183 | attributes = {
184 | LastSwiftUpdateCheck = 0920;
185 | LastUpgradeCheck = 0930;
186 | ORGANIZATIONNAME = "";
187 | TargetAttributes = {
188 | 33CC10EC2044A3C60003C045 = {
189 | CreatedOnToolsVersion = 9.2;
190 | LastSwiftMigration = 1100;
191 | ProvisioningStyle = Automatic;
192 | SystemCapabilities = {
193 | com.apple.Sandbox = {
194 | enabled = 1;
195 | };
196 | };
197 | };
198 | 33CC111A2044C6BA0003C045 = {
199 | CreatedOnToolsVersion = 9.2;
200 | ProvisioningStyle = Manual;
201 | };
202 | };
203 | };
204 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
205 | compatibilityVersion = "Xcode 9.3";
206 | developmentRegion = en;
207 | hasScannedForEncodings = 0;
208 | knownRegions = (
209 | en,
210 | Base,
211 | );
212 | mainGroup = 33CC10E42044A3C60003C045;
213 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | 33CC10EC2044A3C60003C045 /* Runner */,
218 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
219 | );
220 | };
221 | /* End PBXProject section */
222 |
223 | /* Begin PBXResourcesBuildPhase section */
224 | 33CC10EB2044A3C60003C045 /* Resources */ = {
225 | isa = PBXResourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
229 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | /* End PBXResourcesBuildPhase section */
234 |
235 | /* Begin PBXShellScriptBuildPhase section */
236 | 3399D490228B24CF009A79C7 /* ShellScript */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputFileListPaths = (
242 | );
243 | inputPaths = (
244 | );
245 | outputFileListPaths = (
246 | );
247 | outputPaths = (
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
252 | };
253 | 33CC111E2044C6BF0003C045 /* ShellScript */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputFileListPaths = (
259 | Flutter/ephemeral/FlutterInputs.xcfilelist,
260 | );
261 | inputPaths = (
262 | Flutter/ephemeral/tripwire,
263 | );
264 | outputFileListPaths = (
265 | Flutter/ephemeral/FlutterOutputs.xcfilelist,
266 | );
267 | outputPaths = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | shellPath = /bin/sh;
271 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
272 | };
273 | /* End PBXShellScriptBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | 33CC10E92044A3C60003C045 /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
281 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
282 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | /* End PBXSourcesBuildPhase section */
287 |
288 | /* Begin PBXTargetDependency section */
289 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
290 | isa = PBXTargetDependency;
291 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
292 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
293 | };
294 | /* End PBXTargetDependency section */
295 |
296 | /* Begin PBXVariantGroup section */
297 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
298 | isa = PBXVariantGroup;
299 | children = (
300 | 33CC10F52044A3C60003C045 /* Base */,
301 | );
302 | name = MainMenu.xib;
303 | path = Runner;
304 | sourceTree = "";
305 | };
306 | /* End PBXVariantGroup section */
307 |
308 | /* Begin XCBuildConfiguration section */
309 | 338D0CE9231458BD00FA5F75 /* Profile */ = {
310 | isa = XCBuildConfiguration;
311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
317 | CLANG_CXX_LIBRARY = "libc++";
318 | CLANG_ENABLE_MODULES = YES;
319 | CLANG_ENABLE_OBJC_ARC = YES;
320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
321 | CLANG_WARN_BOOL_CONVERSION = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
326 | CLANG_WARN_EMPTY_BODY = YES;
327 | CLANG_WARN_ENUM_CONVERSION = YES;
328 | CLANG_WARN_INFINITE_RECURSION = YES;
329 | CLANG_WARN_INT_CONVERSION = YES;
330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
335 | CODE_SIGN_IDENTITY = "-";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu11;
341 | GCC_NO_COMMON_BLOCKS = YES;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
345 | GCC_WARN_UNUSED_FUNCTION = YES;
346 | GCC_WARN_UNUSED_VARIABLE = YES;
347 | MACOSX_DEPLOYMENT_TARGET = 10.11;
348 | MTL_ENABLE_DEBUG_INFO = NO;
349 | SDKROOT = macosx;
350 | SWIFT_COMPILATION_MODE = wholemodule;
351 | SWIFT_OPTIMIZATION_LEVEL = "-O";
352 | };
353 | name = Profile;
354 | };
355 | 338D0CEA231458BD00FA5F75 /* Profile */ = {
356 | isa = XCBuildConfiguration;
357 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
358 | buildSettings = {
359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 | CLANG_ENABLE_MODULES = YES;
361 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
362 | CODE_SIGN_STYLE = Automatic;
363 | COMBINE_HIDPI_IMAGES = YES;
364 | INFOPLIST_FILE = Runner/Info.plist;
365 | LD_RUNPATH_SEARCH_PATHS = (
366 | "$(inherited)",
367 | "@executable_path/../Frameworks",
368 | );
369 | PROVISIONING_PROFILE_SPECIFIER = "";
370 | SWIFT_VERSION = 5.0;
371 | };
372 | name = Profile;
373 | };
374 | 338D0CEB231458BD00FA5F75 /* Profile */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | CODE_SIGN_STYLE = Manual;
378 | PRODUCT_NAME = "$(TARGET_NAME)";
379 | };
380 | name = Profile;
381 | };
382 | 33CC10F92044A3C60003C045 /* Debug */ = {
383 | isa = XCBuildConfiguration;
384 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
385 | buildSettings = {
386 | ALWAYS_SEARCH_USER_PATHS = NO;
387 | CLANG_ANALYZER_NONNULL = YES;
388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
390 | CLANG_CXX_LIBRARY = "libc++";
391 | CLANG_ENABLE_MODULES = YES;
392 | CLANG_ENABLE_OBJC_ARC = YES;
393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
394 | CLANG_WARN_BOOL_CONVERSION = YES;
395 | CLANG_WARN_CONSTANT_CONVERSION = YES;
396 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
399 | CLANG_WARN_EMPTY_BODY = YES;
400 | CLANG_WARN_ENUM_CONVERSION = YES;
401 | CLANG_WARN_INFINITE_RECURSION = YES;
402 | CLANG_WARN_INT_CONVERSION = YES;
403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
404 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
407 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
408 | CODE_SIGN_IDENTITY = "-";
409 | COPY_PHASE_STRIP = NO;
410 | DEBUG_INFORMATION_FORMAT = dwarf;
411 | ENABLE_STRICT_OBJC_MSGSEND = YES;
412 | ENABLE_TESTABILITY = YES;
413 | GCC_C_LANGUAGE_STANDARD = gnu11;
414 | GCC_DYNAMIC_NO_PIC = NO;
415 | GCC_NO_COMMON_BLOCKS = YES;
416 | GCC_OPTIMIZATION_LEVEL = 0;
417 | GCC_PREPROCESSOR_DEFINITIONS = (
418 | "DEBUG=1",
419 | "$(inherited)",
420 | );
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | MACOSX_DEPLOYMENT_TARGET = 10.11;
427 | MTL_ENABLE_DEBUG_INFO = YES;
428 | ONLY_ACTIVE_ARCH = YES;
429 | SDKROOT = macosx;
430 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
431 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
432 | };
433 | name = Debug;
434 | };
435 | 33CC10FA2044A3C60003C045 /* Release */ = {
436 | isa = XCBuildConfiguration;
437 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
438 | buildSettings = {
439 | ALWAYS_SEARCH_USER_PATHS = NO;
440 | CLANG_ANALYZER_NONNULL = YES;
441 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
443 | CLANG_CXX_LIBRARY = "libc++";
444 | CLANG_ENABLE_MODULES = YES;
445 | CLANG_ENABLE_OBJC_ARC = YES;
446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
447 | CLANG_WARN_BOOL_CONVERSION = YES;
448 | CLANG_WARN_CONSTANT_CONVERSION = YES;
449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
451 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
452 | CLANG_WARN_EMPTY_BODY = YES;
453 | CLANG_WARN_ENUM_CONVERSION = YES;
454 | CLANG_WARN_INFINITE_RECURSION = YES;
455 | CLANG_WARN_INT_CONVERSION = YES;
456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
460 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
461 | CODE_SIGN_IDENTITY = "-";
462 | COPY_PHASE_STRIP = NO;
463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
464 | ENABLE_NS_ASSERTIONS = NO;
465 | ENABLE_STRICT_OBJC_MSGSEND = YES;
466 | GCC_C_LANGUAGE_STANDARD = gnu11;
467 | GCC_NO_COMMON_BLOCKS = YES;
468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
471 | GCC_WARN_UNUSED_FUNCTION = YES;
472 | GCC_WARN_UNUSED_VARIABLE = YES;
473 | MACOSX_DEPLOYMENT_TARGET = 10.11;
474 | MTL_ENABLE_DEBUG_INFO = NO;
475 | SDKROOT = macosx;
476 | SWIFT_COMPILATION_MODE = wholemodule;
477 | SWIFT_OPTIMIZATION_LEVEL = "-O";
478 | };
479 | name = Release;
480 | };
481 | 33CC10FC2044A3C60003C045 /* Debug */ = {
482 | isa = XCBuildConfiguration;
483 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
484 | buildSettings = {
485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486 | CLANG_ENABLE_MODULES = YES;
487 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
488 | CODE_SIGN_STYLE = Automatic;
489 | COMBINE_HIDPI_IMAGES = YES;
490 | INFOPLIST_FILE = Runner/Info.plist;
491 | LD_RUNPATH_SEARCH_PATHS = (
492 | "$(inherited)",
493 | "@executable_path/../Frameworks",
494 | );
495 | PROVISIONING_PROFILE_SPECIFIER = "";
496 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
497 | SWIFT_VERSION = 5.0;
498 | };
499 | name = Debug;
500 | };
501 | 33CC10FD2044A3C60003C045 /* Release */ = {
502 | isa = XCBuildConfiguration;
503 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
504 | buildSettings = {
505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
506 | CLANG_ENABLE_MODULES = YES;
507 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
508 | CODE_SIGN_STYLE = Automatic;
509 | COMBINE_HIDPI_IMAGES = YES;
510 | INFOPLIST_FILE = Runner/Info.plist;
511 | LD_RUNPATH_SEARCH_PATHS = (
512 | "$(inherited)",
513 | "@executable_path/../Frameworks",
514 | );
515 | PROVISIONING_PROFILE_SPECIFIER = "";
516 | SWIFT_VERSION = 5.0;
517 | };
518 | name = Release;
519 | };
520 | 33CC111C2044C6BA0003C045 /* Debug */ = {
521 | isa = XCBuildConfiguration;
522 | buildSettings = {
523 | CODE_SIGN_STYLE = Manual;
524 | PRODUCT_NAME = "$(TARGET_NAME)";
525 | };
526 | name = Debug;
527 | };
528 | 33CC111D2044C6BA0003C045 /* Release */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | CODE_SIGN_STYLE = Automatic;
532 | PRODUCT_NAME = "$(TARGET_NAME)";
533 | };
534 | name = Release;
535 | };
536 | /* End XCBuildConfiguration section */
537 |
538 | /* Begin XCConfigurationList section */
539 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
540 | isa = XCConfigurationList;
541 | buildConfigurations = (
542 | 33CC10F92044A3C60003C045 /* Debug */,
543 | 33CC10FA2044A3C60003C045 /* Release */,
544 | 338D0CE9231458BD00FA5F75 /* Profile */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
550 | isa = XCConfigurationList;
551 | buildConfigurations = (
552 | 33CC10FC2044A3C60003C045 /* Debug */,
553 | 33CC10FD2044A3C60003C045 /* Release */,
554 | 338D0CEA231458BD00FA5F75 /* Profile */,
555 | );
556 | defaultConfigurationIsVisible = 0;
557 | defaultConfigurationName = Release;
558 | };
559 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
560 | isa = XCConfigurationList;
561 | buildConfigurations = (
562 | 33CC111C2044C6BA0003C045 /* Debug */,
563 | 33CC111D2044C6BA0003C045 /* Release */,
564 | 338D0CEB231458BD00FA5F75 /* Profile */,
565 | );
566 | defaultConfigurationIsVisible = 0;
567 | defaultConfigurationName = Release;
568 | };
569 | /* End XCConfigurationList section */
570 | };
571 | rootObject = 33CC10E52044A3C60003C045 /* Project object */;
572 | }
573 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
71 |
73 |
79 |
80 |
81 |
82 |
84 |
85 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/macos/Runner/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = layout_basics_example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.layoutBasicsExample
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/preview.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/preview.gif
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.0.2"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.2.0"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_test:
66 | dependency: "direct dev"
67 | description: flutter
68 | source: sdk
69 | version: "0.0.0"
70 | matcher:
71 | dependency: transitive
72 | description:
73 | name: matcher
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "0.12.10"
77 | meta:
78 | dependency: transitive
79 | description:
80 | name: meta
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.3.0"
84 | path:
85 | dependency: transitive
86 | description:
87 | name: path
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.8.0"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.8.1"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.10.0"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.1.0"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.1.0"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.2.0"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.19"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.3.0"
145 | vector_math:
146 | dependency: transitive
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.1.0"
152 | sdks:
153 | dart: ">=2.12.0 <3.0.0"
154 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: layout_basics_example
2 | version: 1.0.0+1
3 |
4 | environment:
5 | sdk: ">=2.12.0 <3.0.0"
6 |
7 | dependencies:
8 | flutter:
9 | sdk: flutter
10 |
11 | cupertino_icons: ^1.0.2
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 |
17 | flutter:
18 | uses-material-design: true
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JohannesMilke/layout_basics_example/43a9edd63d04b7e48250948e1cc697affb2ba1a6/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | layout_basics_example
27 |
28 |
29 |
30 |
33 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "layout_basics_example",
3 | "short_name": "layout_basics_example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------