Showing
119 changed files
with
5971 additions
and
2 deletions
.gitignore
0 → 100644
| 1 | +# Miscellaneous | ||
| 2 | +*.class | ||
| 3 | +*.log | ||
| 4 | +*.pyc | ||
| 5 | +*.swp | ||
| 6 | +.DS_Store | ||
| 7 | +.atom/ | ||
| 8 | +.buildlog/ | ||
| 9 | +.history | ||
| 10 | +.svn/ | ||
| 11 | + | ||
| 12 | +# IntelliJ related | ||
| 13 | +*.iml | ||
| 14 | +*.ipr | ||
| 15 | +*.iws | ||
| 16 | +.idea/ | ||
| 17 | + | ||
| 18 | +# The .vscode folder contains launch configuration and tasks you configure in | ||
| 19 | +# VS Code which you may wish to be included in version control, so this line | ||
| 20 | +# is commented out by default. | ||
| 21 | +#.vscode/ | ||
| 22 | + | ||
| 23 | +# Flutter/Dart/Pub related | ||
| 24 | +**/doc/api/ | ||
| 25 | +.dart_tool/ | ||
| 26 | +.flutter-plugins | ||
| 27 | +.flutter-plugins-dependencies | ||
| 28 | +.packages | ||
| 29 | +.pub-cache/ | ||
| 30 | +.pub/ | ||
| 31 | +build/ | ||
| 32 | + | ||
| 33 | +# Android related | ||
| 34 | +**/android/**/gradle-wrapper.jar | ||
| 35 | +**/android/.gradle | ||
| 36 | +**/android/captures/ | ||
| 37 | +**/android/gradlew | ||
| 38 | +**/android/gradlew.bat | ||
| 39 | +**/android/local.properties | ||
| 40 | +**/android/**/GeneratedPluginRegistrant.java | ||
| 41 | + | ||
| 42 | +# iOS/XCode related | ||
| 43 | +**/ios/**/*.mode1v3 | ||
| 44 | +**/ios/**/*.mode2v3 | ||
| 45 | +**/ios/**/*.moved-aside | ||
| 46 | +**/ios/**/*.pbxuser | ||
| 47 | +**/ios/**/*.perspectivev3 | ||
| 48 | +**/ios/**/*sync/ | ||
| 49 | +**/ios/**/.sconsign.dblite | ||
| 50 | +**/ios/**/.tags* | ||
| 51 | +**/ios/**/.vagrant/ | ||
| 52 | +**/ios/**/DerivedData/ | ||
| 53 | +**/ios/**/Icon? | ||
| 54 | +**/ios/**/Pods/ | ||
| 55 | +**/ios/**/.symlinks/ | ||
| 56 | +**/ios/**/profile | ||
| 57 | +**/ios/**/xcuserdata | ||
| 58 | +**/ios/.generated/ | ||
| 59 | +**/ios/Flutter/App.framework | ||
| 60 | +**/ios/Flutter/Flutter.framework | ||
| 61 | +**/ios/Flutter/Flutter.podspec | ||
| 62 | +**/ios/Flutter/Generated.xcconfig | ||
| 63 | +**/ios/Flutter/app.flx | ||
| 64 | +**/ios/Flutter/app.zip | ||
| 65 | +**/ios/Flutter/flutter_export_environment.sh | ||
| 66 | +**/ios/ServiceDefinitions.json | ||
| 67 | +**/ios/Runner/GeneratedPluginRegistrant.* | ||
| 68 | + | ||
| 69 | +# Exceptions to above rules. | ||
| 70 | +!**/ios/**/default.mode1v3 | ||
| 71 | +!**/ios/**/default.mode2v3 | ||
| 72 | +!**/ios/**/default.pbxuser | ||
| 73 | +!**/ios/**/default.perspectivev3 | ||
| 74 | +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages |
.metadata
0 → 100644
| 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: 0d07788069f41ff3cb4b4324fc7a8db0ebe4e670 | ||
| 8 | + channel: master | ||
| 9 | + | ||
| 10 | +project_type: package |
CHANGELOG.md
0 → 100644
| 1 | -# modal_bottom_sheet | ||
| 2 | -Flutter Modal Bottom Sheets: Material, Cupertino or your own style | 1 | +# Flutter Modal BottomSheet |
| 2 | + | ||
| 3 | +Create awesome and powerful modal bottom sheets | ||
| 4 | + | ||
| 5 | +## Material Modal BottomSheet | ||
| 6 | + | ||
| 7 | +`showMaterialModalBottomSheet` | ||
| 8 | + | ||
| 9 | +Improved showModalBottomSheet that support scroll and drag at the same time. | ||
| 10 | + | ||
| 11 | +## Cupertino Modal BottomSheet | ||
| 12 | + | ||
| 13 | +iOS 13 came with an amazing new modal navigation and now it is available to use with Flutter. | ||
| 14 | + | ||
| 15 | +###OPTION 1. Recommended. | ||
| 16 | +1. use `showCupertinoModalBottomSheet` | ||
| 17 | +2. `MaterialPageRoute` does not allow animated translation for routes that are not `MaterialPageRoute` or `CupertinoPageRoute`. | ||
| 18 | +For this we created `MaterialWithModalsPageRoute` that needs to replace the route you are using now. | ||
| 19 | +Notice this route type works the same as `MaterialPageRoute` and will support custom `PageTransitionsTheme`. | ||
| 20 | + | ||
| 21 | + | ||
| 22 | +###OPTION 2. | ||
| 23 | +1. Wrap previous page inside a `CupertinoScaffold`. | ||
| 24 | +2. Call `CupertinoScaffold.showCupertinoModalBottomSheet(context:context, builder: ...)` | ||
| 25 | + | ||
| 26 | +This two methods won't work together. | ||
| 27 | + | ||
| 28 | +It supports native features as bouncing, blurred background, dark mode, stacking modals and inside navigation. | ||
| 29 | + | ||
| 30 | +For stacking modals call `showCupertinoModalBottomSheet` inside a modal; | ||
| 31 | +For inside navigation use a CupertinoTabScaffold or a Navigator. | ||
| 32 | + | ||
| 33 | +Also it support flutter features as WillPopScope. | ||
| 34 | + | ||
| 35 | +## Build other BottomSheets | ||
| 36 | + | ||
| 37 | +Try `showBarModalBottomSheet` for a bottomSheet with the appearance used by Facebook or Slack | ||
| 38 | + | ||
| 39 | +Check in the example project `showAvatarModalBottomSheet` for how to create your own ModalBottomSheet | ||
| 40 | + | ||
| 41 | +## Roadmap | ||
| 42 | +[ ] Support closing by dragging fast on a modal with a scroll view. | ||
| 43 | +[ ] Improve animation curves when user is not dragging. | ||
| 44 | +[ ] Allow to set the initial size of the bottom sheet | ||
| 45 | +[ ] Support hero animations | ||
| 46 | + |
example/.gitignore
0 → 100644
| 1 | +# Miscellaneous | ||
| 2 | +*.class | ||
| 3 | +*.log | ||
| 4 | +*.pyc | ||
| 5 | +*.swp | ||
| 6 | +.DS_Store | ||
| 7 | +.atom/ | ||
| 8 | +.buildlog/ | ||
| 9 | +.history | ||
| 10 | +.svn/ | ||
| 11 | + | ||
| 12 | +# IntelliJ related | ||
| 13 | +*.iml | ||
| 14 | +*.ipr | ||
| 15 | +*.iws | ||
| 16 | +.idea/ | ||
| 17 | + | ||
| 18 | +# The .vscode folder contains launch configuration and tasks you configure in | ||
| 19 | +# VS Code which you may wish to be included in version control, so this line | ||
| 20 | +# is commented out by default. | ||
| 21 | +#.vscode/ | ||
| 22 | + | ||
| 23 | +# Flutter/Dart/Pub related | ||
| 24 | +**/doc/api/ | ||
| 25 | +.dart_tool/ | ||
| 26 | +.flutter-plugins | ||
| 27 | +.flutter-plugins-dependencies | ||
| 28 | +.packages | ||
| 29 | +.pub-cache/ | ||
| 30 | +.pub/ | ||
| 31 | +/build/ | ||
| 32 | + | ||
| 33 | +# Web related | ||
| 34 | +lib/generated_plugin_registrant.dart | ||
| 35 | + | ||
| 36 | +# Symbolication related | ||
| 37 | +app.*.symbols | ||
| 38 | + | ||
| 39 | +# Obfuscation related | ||
| 40 | +app.*.map.json | ||
| 41 | + | ||
| 42 | +# Exceptions to above rules. | ||
| 43 | +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages |
example/.metadata
0 → 100644
| 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: 32b17974ea81619064ab60e2513c5ce044c3fef2 | ||
| 8 | + channel: master | ||
| 9 | + | ||
| 10 | +project_type: app |
example/README.md
0 → 100644
| 1 | +# example | ||
| 2 | + | ||
| 3 | +A new Flutter project. | ||
| 4 | + | ||
| 5 | +## Getting Started | ||
| 6 | + | ||
| 7 | +This project is a starting point for a Flutter application. | ||
| 8 | + | ||
| 9 | +A few resources to get you started if this is your first Flutter project: | ||
| 10 | + | ||
| 11 | +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
| 12 | +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
| 13 | + | ||
| 14 | +For help getting started with Flutter, view our | ||
| 15 | +[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
| 16 | +samples, guidance on mobile development, and a full API reference. |
example/android/.gitignore
0 → 100644
example/android/app/build.gradle
0 → 100644
| 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 28 | ||
| 30 | + | ||
| 31 | + sourceSets { | ||
| 32 | + main.java.srcDirs += 'src/main/kotlin' | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + lintOptions { | ||
| 36 | + disable 'InvalidPackage' | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + defaultConfig { | ||
| 40 | + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
| 41 | + applicationId "com.example.example" | ||
| 42 | + minSdkVersion 16 | ||
| 43 | + targetSdkVersion 28 | ||
| 44 | + versionCode flutterVersionCode.toInteger() | ||
| 45 | + versionName flutterVersionName | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + buildTypes { | ||
| 49 | + release { | ||
| 50 | + // TODO: Add your own signing config for the release build. | ||
| 51 | + // Signing with the debug keys for now, so `flutter run --release` works. | ||
| 52 | + signingConfig signingConfigs.debug | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +flutter { | ||
| 58 | + source '../..' | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +dependencies { | ||
| 62 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| 63 | +} |
| 1 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | + package="com.example.example"> | ||
| 3 | + <!-- Flutter needs it to communicate with the running application | ||
| 4 | + to allow setting breakpoints, to provide hot reload, etc. | ||
| 5 | + --> | ||
| 6 | + <uses-permission android:name="android.permission.INTERNET"/> | ||
| 7 | +</manifest> |
| 1 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | + package="com.example.example"> | ||
| 3 | + <!-- io.flutter.app.FlutterApplication is an android.app.Application that | ||
| 4 | + calls FlutterMain.startInitialization(this); in its onCreate method. | ||
| 5 | + In most cases you can leave this as-is, but you if you want to provide | ||
| 6 | + additional functionality it is fine to subclass or reimplement | ||
| 7 | + FlutterApplication and put your custom class here. --> | ||
| 8 | + <application | ||
| 9 | + android:name="io.flutter.app.FlutterApplication" | ||
| 10 | + android:label="example" | ||
| 11 | + android:icon="@mipmap/ic_launcher"> | ||
| 12 | + <activity | ||
| 13 | + android:name=".MainActivity" | ||
| 14 | + android:launchMode="singleTop" | ||
| 15 | + android:theme="@style/LaunchTheme" | ||
| 16 | + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
| 17 | + android:hardwareAccelerated="true" | ||
| 18 | + android:windowSoftInputMode="adjustResize"> | ||
| 19 | + <!-- Specifies an Android theme to apply to this Activity as soon as | ||
| 20 | + the Android process has started. This theme is visible to the user | ||
| 21 | + while the Flutter UI initializes. After that, this theme continues | ||
| 22 | + to determine the Window background behind the Flutter UI. --> | ||
| 23 | + <meta-data | ||
| 24 | + android:name="io.flutter.embedding.android.NormalTheme" | ||
| 25 | + android:resource="@style/NormalTheme" | ||
| 26 | + /> | ||
| 27 | + <!-- Displays an Android View that continues showing the launch screen | ||
| 28 | + Drawable until Flutter paints its first frame, then this splash | ||
| 29 | + screen fades out. A splash screen is useful to avoid any visual | ||
| 30 | + gap between the end of Android's launch screen and the painting of | ||
| 31 | + Flutter's first frame. --> | ||
| 32 | + <meta-data | ||
| 33 | + android:name="io.flutter.embedding.android.SplashScreenDrawable" | ||
| 34 | + android:resource="@drawable/launch_background" | ||
| 35 | + /> | ||
| 36 | + <intent-filter> | ||
| 37 | + <action android:name="android.intent.action.MAIN"/> | ||
| 38 | + <category android:name="android.intent.category.LAUNCHER"/> | ||
| 39 | + </intent-filter> | ||
| 40 | + </activity> | ||
| 41 | + <!-- Don't delete the meta-data below. | ||
| 42 | + This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
| 43 | + <meta-data | ||
| 44 | + android:name="flutterEmbedding" | ||
| 45 | + android:value="2" /> | ||
| 46 | + </application> | ||
| 47 | +</manifest> |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<!-- Modify this file to customize your launch splash screen --> | ||
| 3 | +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 4 | + <item android:drawable="@android:color/white" /> | ||
| 5 | + | ||
| 6 | + <!-- You can insert your own image assets here --> | ||
| 7 | + <!-- <item> | ||
| 8 | + <bitmap | ||
| 9 | + android:gravity="center" | ||
| 10 | + android:src="@mipmap/launch_image" /> | ||
| 11 | + </item> --> | ||
| 12 | +</layer-list> |
544 Bytes
442 Bytes
721 Bytes
1.01 KB
1.41 KB
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<resources> | ||
| 3 | + <!-- Theme applied to the Android Window while the process is starting --> | ||
| 4 | + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| 5 | + <!-- Show a splash screen on the activity. Automatically removed when | ||
| 6 | + Flutter draws its first frame --> | ||
| 7 | + <item name="android:windowBackground">@drawable/launch_background</item> | ||
| 8 | + </style> | ||
| 9 | + <!-- Theme applied to the Android Window as soon as the process has started. | ||
| 10 | + This theme determines the color of the Android Window while your | ||
| 11 | + Flutter UI initializes, as well as behind your Flutter UI while its | ||
| 12 | + running. | ||
| 13 | + | ||
| 14 | + This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
| 15 | + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| 16 | + <item name="android:windowBackground">@android:color/white</item> | ||
| 17 | + </style> | ||
| 18 | +</resources> |
| 1 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | + package="com.example.example"> | ||
| 3 | + <!-- Flutter needs it to communicate with the running application | ||
| 4 | + to allow setting breakpoints, to provide hot reload, etc. | ||
| 5 | + --> | ||
| 6 | + <uses-permission android:name="android.permission.INTERNET"/> | ||
| 7 | +</manifest> |
example/android/build.gradle
0 → 100644
| 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:3.5.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 | +} | ||
| 25 | +subprojects { | ||
| 26 | + project.evaluationDependsOn(':app') | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +task clean(type: Delete) { | ||
| 30 | + delete rootProject.buildDir | ||
| 31 | +} |
example/android/gradle.properties
0 → 100644
example/android/settings.gradle
0 → 100644
| 1 | +include ':app' | ||
| 2 | + | ||
| 3 | +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() | ||
| 4 | + | ||
| 5 | +def plugins = new Properties() | ||
| 6 | +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') | ||
| 7 | +if (pluginsFile.exists()) { | ||
| 8 | + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } | ||
| 9 | +} | ||
| 10 | + | ||
| 11 | +plugins.each { name, path -> | ||
| 12 | + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() | ||
| 13 | + include ":$name" | ||
| 14 | + project(":$name").projectDir = pluginDirectory | ||
| 15 | +} |
example/ios/.gitignore
0 → 100644
| 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/app.flx | ||
| 22 | +Flutter/app.zip | ||
| 23 | +Flutter/flutter_assets/ | ||
| 24 | +Flutter/flutter_export_environment.sh | ||
| 25 | +ServiceDefinitions.json | ||
| 26 | +Runner/GeneratedPluginRegistrant.* | ||
| 27 | + | ||
| 28 | +# Exceptions to above rules. | ||
| 29 | +!default.mode1v3 | ||
| 30 | +!default.mode2v3 | ||
| 31 | +!default.pbxuser | ||
| 32 | +!default.perspectivev3 |
example/ios/Flutter/AppFrameworkInfo.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>App</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>io.flutter.flutter.app</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundleName</key> | ||
| 14 | + <string>App</string> | ||
| 15 | + <key>CFBundlePackageType</key> | ||
| 16 | + <string>FMWK</string> | ||
| 17 | + <key>CFBundleShortVersionString</key> | ||
| 18 | + <string>1.0</string> | ||
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 21 | + <key>CFBundleVersion</key> | ||
| 22 | + <string>1.0</string> | ||
| 23 | + <key>MinimumOSVersion</key> | ||
| 24 | + <string>8.0</string> | ||
| 25 | +</dict> | ||
| 26 | +</plist> |
example/ios/Flutter/Debug.xcconfig
0 → 100644
| 1 | +#include "Generated.xcconfig" |
example/ios/Flutter/Release.xcconfig
0 → 100644
| 1 | +#include "Generated.xcconfig" |
example/ios/Runner.xcodeproj/project.pbxproj
0 → 100644
| 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 = "<group>"; }; | ||
| 33 | + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | ||
| 34 | + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | ||
| 35 | + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; | ||
| 36 | + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | ||
| 37 | + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | ||
| 38 | + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; | ||
| 39 | + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; | ||
| 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 = "<group>"; }; | ||
| 42 | + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||
| 43 | + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | ||
| 44 | + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| 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 = "<group>"; | ||
| 68 | + }; | ||
| 69 | + 97C146E51CF9000F007C117D = { | ||
| 70 | + isa = PBXGroup; | ||
| 71 | + children = ( | ||
| 72 | + 9740EEB11CF90186004384FC /* Flutter */, | ||
| 73 | + 97C146F01CF9000F007C117D /* Runner */, | ||
| 74 | + 97C146EF1CF9000F007C117D /* Products */, | ||
| 75 | + ); | ||
| 76 | + sourceTree = "<group>"; | ||
| 77 | + }; | ||
| 78 | + 97C146EF1CF9000F007C117D /* Products */ = { | ||
| 79 | + isa = PBXGroup; | ||
| 80 | + children = ( | ||
| 81 | + 97C146EE1CF9000F007C117D /* Runner.app */, | ||
| 82 | + ); | ||
| 83 | + name = Products; | ||
| 84 | + sourceTree = "<group>"; | ||
| 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 | + 97C146F11CF9000F007C117D /* Supporting Files */, | ||
| 94 | + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, | ||
| 95 | + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, | ||
| 96 | + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, | ||
| 97 | + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, | ||
| 98 | + ); | ||
| 99 | + path = Runner; | ||
| 100 | + sourceTree = "<group>"; | ||
| 101 | + }; | ||
| 102 | + 97C146F11CF9000F007C117D /* Supporting Files */ = { | ||
| 103 | + isa = PBXGroup; | ||
| 104 | + children = ( | ||
| 105 | + ); | ||
| 106 | + name = "Supporting Files"; | ||
| 107 | + sourceTree = "<group>"; | ||
| 108 | + }; | ||
| 109 | +/* End PBXGroup section */ | ||
| 110 | + | ||
| 111 | +/* Begin PBXNativeTarget section */ | ||
| 112 | + 97C146ED1CF9000F007C117D /* Runner */ = { | ||
| 113 | + isa = PBXNativeTarget; | ||
| 114 | + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | ||
| 115 | + buildPhases = ( | ||
| 116 | + 9740EEB61CF901F6004384FC /* Run Script */, | ||
| 117 | + 97C146EA1CF9000F007C117D /* Sources */, | ||
| 118 | + 97C146EB1CF9000F007C117D /* Frameworks */, | ||
| 119 | + 97C146EC1CF9000F007C117D /* Resources */, | ||
| 120 | + 9705A1C41CF9048500538489 /* Embed Frameworks */, | ||
| 121 | + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, | ||
| 122 | + ); | ||
| 123 | + buildRules = ( | ||
| 124 | + ); | ||
| 125 | + dependencies = ( | ||
| 126 | + ); | ||
| 127 | + name = Runner; | ||
| 128 | + productName = Runner; | ||
| 129 | + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; | ||
| 130 | + productType = "com.apple.product-type.application"; | ||
| 131 | + }; | ||
| 132 | +/* End PBXNativeTarget section */ | ||
| 133 | + | ||
| 134 | +/* Begin PBXProject section */ | ||
| 135 | + 97C146E61CF9000F007C117D /* Project object */ = { | ||
| 136 | + isa = PBXProject; | ||
| 137 | + attributes = { | ||
| 138 | + LastUpgradeCheck = 1020; | ||
| 139 | + ORGANIZATIONNAME = ""; | ||
| 140 | + TargetAttributes = { | ||
| 141 | + 97C146ED1CF9000F007C117D = { | ||
| 142 | + CreatedOnToolsVersion = 7.3.1; | ||
| 143 | + LastSwiftMigration = 1100; | ||
| 144 | + }; | ||
| 145 | + }; | ||
| 146 | + }; | ||
| 147 | + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; | ||
| 148 | + compatibilityVersion = "Xcode 9.3"; | ||
| 149 | + developmentRegion = en; | ||
| 150 | + hasScannedForEncodings = 0; | ||
| 151 | + knownRegions = ( | ||
| 152 | + en, | ||
| 153 | + Base, | ||
| 154 | + ); | ||
| 155 | + mainGroup = 97C146E51CF9000F007C117D; | ||
| 156 | + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; | ||
| 157 | + projectDirPath = ""; | ||
| 158 | + projectRoot = ""; | ||
| 159 | + targets = ( | ||
| 160 | + 97C146ED1CF9000F007C117D /* Runner */, | ||
| 161 | + ); | ||
| 162 | + }; | ||
| 163 | +/* End PBXProject section */ | ||
| 164 | + | ||
| 165 | +/* Begin PBXResourcesBuildPhase section */ | ||
| 166 | + 97C146EC1CF9000F007C117D /* Resources */ = { | ||
| 167 | + isa = PBXResourcesBuildPhase; | ||
| 168 | + buildActionMask = 2147483647; | ||
| 169 | + files = ( | ||
| 170 | + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, | ||
| 171 | + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, | ||
| 172 | + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, | ||
| 173 | + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, | ||
| 174 | + ); | ||
| 175 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 176 | + }; | ||
| 177 | +/* End PBXResourcesBuildPhase section */ | ||
| 178 | + | ||
| 179 | +/* Begin PBXShellScriptBuildPhase section */ | ||
| 180 | + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | ||
| 181 | + isa = PBXShellScriptBuildPhase; | ||
| 182 | + buildActionMask = 2147483647; | ||
| 183 | + files = ( | ||
| 184 | + ); | ||
| 185 | + inputPaths = ( | ||
| 186 | + ); | ||
| 187 | + name = "Thin Binary"; | ||
| 188 | + outputPaths = ( | ||
| 189 | + ); | ||
| 190 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 191 | + shellPath = /bin/sh; | ||
| 192 | + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; | ||
| 193 | + }; | ||
| 194 | + 9740EEB61CF901F6004384FC /* Run Script */ = { | ||
| 195 | + isa = PBXShellScriptBuildPhase; | ||
| 196 | + buildActionMask = 2147483647; | ||
| 197 | + files = ( | ||
| 198 | + ); | ||
| 199 | + inputPaths = ( | ||
| 200 | + ); | ||
| 201 | + name = "Run Script"; | ||
| 202 | + outputPaths = ( | ||
| 203 | + ); | ||
| 204 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 205 | + shellPath = /bin/sh; | ||
| 206 | + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; | ||
| 207 | + }; | ||
| 208 | +/* End PBXShellScriptBuildPhase section */ | ||
| 209 | + | ||
| 210 | +/* Begin PBXSourcesBuildPhase section */ | ||
| 211 | + 97C146EA1CF9000F007C117D /* Sources */ = { | ||
| 212 | + isa = PBXSourcesBuildPhase; | ||
| 213 | + buildActionMask = 2147483647; | ||
| 214 | + files = ( | ||
| 215 | + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, | ||
| 216 | + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, | ||
| 217 | + ); | ||
| 218 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 219 | + }; | ||
| 220 | +/* End PBXSourcesBuildPhase section */ | ||
| 221 | + | ||
| 222 | +/* Begin PBXVariantGroup section */ | ||
| 223 | + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { | ||
| 224 | + isa = PBXVariantGroup; | ||
| 225 | + children = ( | ||
| 226 | + 97C146FB1CF9000F007C117D /* Base */, | ||
| 227 | + ); | ||
| 228 | + name = Main.storyboard; | ||
| 229 | + sourceTree = "<group>"; | ||
| 230 | + }; | ||
| 231 | + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { | ||
| 232 | + isa = PBXVariantGroup; | ||
| 233 | + children = ( | ||
| 234 | + 97C147001CF9000F007C117D /* Base */, | ||
| 235 | + ); | ||
| 236 | + name = LaunchScreen.storyboard; | ||
| 237 | + sourceTree = "<group>"; | ||
| 238 | + }; | ||
| 239 | +/* End PBXVariantGroup section */ | ||
| 240 | + | ||
| 241 | +/* Begin XCBuildConfiguration section */ | ||
| 242 | + 249021D3217E4FDB00AE95B9 /* Profile */ = { | ||
| 243 | + isa = XCBuildConfiguration; | ||
| 244 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 245 | + buildSettings = { | ||
| 246 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 247 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 248 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 249 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 250 | + CLANG_ENABLE_MODULES = YES; | ||
| 251 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 252 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 253 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 254 | + CLANG_WARN_COMMA = YES; | ||
| 255 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 256 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 257 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 258 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 259 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 260 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 261 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 262 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 263 | + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | ||
| 264 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 265 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 266 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 267 | + CLANG_WARN_STRICT_PROTOTYPES = YES; | ||
| 268 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 269 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 270 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 271 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 272 | + COPY_PHASE_STRIP = NO; | ||
| 273 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 274 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 275 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 276 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 277 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 278 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 279 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 280 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 281 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 282 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 283 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 284 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | ||
| 285 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 286 | + SDKROOT = iphoneos; | ||
| 287 | + SUPPORTED_PLATFORMS = iphoneos; | ||
| 288 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 289 | + VALIDATE_PRODUCT = YES; | ||
| 290 | + }; | ||
| 291 | + name = Profile; | ||
| 292 | + }; | ||
| 293 | + 249021D4217E4FDB00AE95B9 /* Profile */ = { | ||
| 294 | + isa = XCBuildConfiguration; | ||
| 295 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 296 | + buildSettings = { | ||
| 297 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 298 | + CLANG_ENABLE_MODULES = YES; | ||
| 299 | + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | ||
| 300 | + ENABLE_BITCODE = NO; | ||
| 301 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 302 | + "$(inherited)", | ||
| 303 | + "$(PROJECT_DIR)/Flutter", | ||
| 304 | + ); | ||
| 305 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 306 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
| 307 | + LIBRARY_SEARCH_PATHS = ( | ||
| 308 | + "$(inherited)", | ||
| 309 | + "$(PROJECT_DIR)/Flutter", | ||
| 310 | + ); | ||
| 311 | + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | ||
| 312 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 313 | + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | ||
| 314 | + SWIFT_VERSION = 5.0; | ||
| 315 | + VERSIONING_SYSTEM = "apple-generic"; | ||
| 316 | + }; | ||
| 317 | + name = Profile; | ||
| 318 | + }; | ||
| 319 | + 97C147031CF9000F007C117D /* Debug */ = { | ||
| 320 | + isa = XCBuildConfiguration; | ||
| 321 | + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||
| 322 | + buildSettings = { | ||
| 323 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 324 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 325 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 326 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 327 | + CLANG_ENABLE_MODULES = YES; | ||
| 328 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 329 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 330 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 331 | + CLANG_WARN_COMMA = YES; | ||
| 332 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 333 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 334 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 335 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 336 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 337 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 338 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 339 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 340 | + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | ||
| 341 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 342 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 343 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 344 | + CLANG_WARN_STRICT_PROTOTYPES = YES; | ||
| 345 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 346 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 347 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 348 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 349 | + COPY_PHASE_STRIP = NO; | ||
| 350 | + DEBUG_INFORMATION_FORMAT = dwarf; | ||
| 351 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 352 | + ENABLE_TESTABILITY = YES; | ||
| 353 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 354 | + GCC_DYNAMIC_NO_PIC = NO; | ||
| 355 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 356 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
| 357 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 358 | + "DEBUG=1", | ||
| 359 | + "$(inherited)", | ||
| 360 | + ); | ||
| 361 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 362 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 363 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 364 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 365 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 366 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 367 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | ||
| 368 | + MTL_ENABLE_DEBUG_INFO = YES; | ||
| 369 | + ONLY_ACTIVE_ARCH = YES; | ||
| 370 | + SDKROOT = iphoneos; | ||
| 371 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 372 | + }; | ||
| 373 | + name = Debug; | ||
| 374 | + }; | ||
| 375 | + 97C147041CF9000F007C117D /* Release */ = { | ||
| 376 | + isa = XCBuildConfiguration; | ||
| 377 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 378 | + buildSettings = { | ||
| 379 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 380 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 381 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 382 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 383 | + CLANG_ENABLE_MODULES = YES; | ||
| 384 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 385 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 386 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 387 | + CLANG_WARN_COMMA = YES; | ||
| 388 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 389 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 390 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 391 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 392 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 393 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 394 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 395 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 396 | + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | ||
| 397 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 398 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 399 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 400 | + CLANG_WARN_STRICT_PROTOTYPES = YES; | ||
| 401 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 402 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 403 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 404 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | ||
| 405 | + COPY_PHASE_STRIP = NO; | ||
| 406 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 407 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 408 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 409 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 410 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 411 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 412 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 413 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 414 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 415 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 416 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 417 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | ||
| 418 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 419 | + SDKROOT = iphoneos; | ||
| 420 | + SUPPORTED_PLATFORMS = iphoneos; | ||
| 421 | + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; | ||
| 422 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
| 423 | + VALIDATE_PRODUCT = YES; | ||
| 424 | + }; | ||
| 425 | + name = Release; | ||
| 426 | + }; | ||
| 427 | + 97C147061CF9000F007C117D /* Debug */ = { | ||
| 428 | + isa = XCBuildConfiguration; | ||
| 429 | + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.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 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 436 | + "$(inherited)", | ||
| 437 | + "$(PROJECT_DIR)/Flutter", | ||
| 438 | + ); | ||
| 439 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 440 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
| 441 | + LIBRARY_SEARCH_PATHS = ( | ||
| 442 | + "$(inherited)", | ||
| 443 | + "$(PROJECT_DIR)/Flutter", | ||
| 444 | + ); | ||
| 445 | + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | ||
| 446 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 447 | + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | ||
| 448 | + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| 449 | + SWIFT_VERSION = 5.0; | ||
| 450 | + VERSIONING_SYSTEM = "apple-generic"; | ||
| 451 | + }; | ||
| 452 | + name = Debug; | ||
| 453 | + }; | ||
| 454 | + 97C147071CF9000F007C117D /* Release */ = { | ||
| 455 | + isa = XCBuildConfiguration; | ||
| 456 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 457 | + buildSettings = { | ||
| 458 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 459 | + CLANG_ENABLE_MODULES = YES; | ||
| 460 | + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | ||
| 461 | + ENABLE_BITCODE = NO; | ||
| 462 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 463 | + "$(inherited)", | ||
| 464 | + "$(PROJECT_DIR)/Flutter", | ||
| 465 | + ); | ||
| 466 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 467 | + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | ||
| 468 | + LIBRARY_SEARCH_PATHS = ( | ||
| 469 | + "$(inherited)", | ||
| 470 | + "$(PROJECT_DIR)/Flutter", | ||
| 471 | + ); | ||
| 472 | + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | ||
| 473 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 474 | + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | ||
| 475 | + SWIFT_VERSION = 5.0; | ||
| 476 | + VERSIONING_SYSTEM = "apple-generic"; | ||
| 477 | + }; | ||
| 478 | + name = Release; | ||
| 479 | + }; | ||
| 480 | +/* End XCBuildConfiguration section */ | ||
| 481 | + | ||
| 482 | +/* Begin XCConfigurationList section */ | ||
| 483 | + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { | ||
| 484 | + isa = XCConfigurationList; | ||
| 485 | + buildConfigurations = ( | ||
| 486 | + 97C147031CF9000F007C117D /* Debug */, | ||
| 487 | + 97C147041CF9000F007C117D /* Release */, | ||
| 488 | + 249021D3217E4FDB00AE95B9 /* Profile */, | ||
| 489 | + ); | ||
| 490 | + defaultConfigurationIsVisible = 0; | ||
| 491 | + defaultConfigurationName = Release; | ||
| 492 | + }; | ||
| 493 | + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { | ||
| 494 | + isa = XCConfigurationList; | ||
| 495 | + buildConfigurations = ( | ||
| 496 | + 97C147061CF9000F007C117D /* Debug */, | ||
| 497 | + 97C147071CF9000F007C117D /* Release */, | ||
| 498 | + 249021D4217E4FDB00AE95B9 /* Profile */, | ||
| 499 | + ); | ||
| 500 | + defaultConfigurationIsVisible = 0; | ||
| 501 | + defaultConfigurationName = Release; | ||
| 502 | + }; | ||
| 503 | +/* End XCConfigurationList section */ | ||
| 504 | + }; | ||
| 505 | + rootObject = 97C146E61CF9000F007C117D /* Project object */; | ||
| 506 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "1020" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "YES" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "97C146ED1CF9000F007C117D" | ||
| 18 | + BuildableName = "Runner.app" | ||
| 19 | + BlueprintName = "Runner" | ||
| 20 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + </BuildActionEntries> | ||
| 24 | + </BuildAction> | ||
| 25 | + <TestAction | ||
| 26 | + buildConfiguration = "Debug" | ||
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | + <Testables> | ||
| 31 | + </Testables> | ||
| 32 | + <MacroExpansion> | ||
| 33 | + <BuildableReference | ||
| 34 | + BuildableIdentifier = "primary" | ||
| 35 | + BlueprintIdentifier = "97C146ED1CF9000F007C117D" | ||
| 36 | + BuildableName = "Runner.app" | ||
| 37 | + BlueprintName = "Runner" | ||
| 38 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 39 | + </BuildableReference> | ||
| 40 | + </MacroExpansion> | ||
| 41 | + <AdditionalOptions> | ||
| 42 | + </AdditionalOptions> | ||
| 43 | + </TestAction> | ||
| 44 | + <LaunchAction | ||
| 45 | + buildConfiguration = "Debug" | ||
| 46 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 47 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 48 | + launchStyle = "0" | ||
| 49 | + useCustomWorkingDirectory = "NO" | ||
| 50 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 51 | + debugDocumentVersioning = "YES" | ||
| 52 | + debugServiceExtension = "internal" | ||
| 53 | + allowLocationSimulation = "YES"> | ||
| 54 | + <BuildableProductRunnable | ||
| 55 | + runnableDebuggingMode = "0"> | ||
| 56 | + <BuildableReference | ||
| 57 | + BuildableIdentifier = "primary" | ||
| 58 | + BlueprintIdentifier = "97C146ED1CF9000F007C117D" | ||
| 59 | + BuildableName = "Runner.app" | ||
| 60 | + BlueprintName = "Runner" | ||
| 61 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 62 | + </BuildableReference> | ||
| 63 | + </BuildableProductRunnable> | ||
| 64 | + <AdditionalOptions> | ||
| 65 | + </AdditionalOptions> | ||
| 66 | + </LaunchAction> | ||
| 67 | + <ProfileAction | ||
| 68 | + buildConfiguration = "Profile" | ||
| 69 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 70 | + savedToolIdentifier = "" | ||
| 71 | + useCustomWorkingDirectory = "NO" | ||
| 72 | + debugDocumentVersioning = "YES"> | ||
| 73 | + <BuildableProductRunnable | ||
| 74 | + runnableDebuggingMode = "0"> | ||
| 75 | + <BuildableReference | ||
| 76 | + BuildableIdentifier = "primary" | ||
| 77 | + BlueprintIdentifier = "97C146ED1CF9000F007C117D" | ||
| 78 | + BuildableName = "Runner.app" | ||
| 79 | + BlueprintName = "Runner" | ||
| 80 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 81 | + </BuildableReference> | ||
| 82 | + </BuildableProductRunnable> | ||
| 83 | + </ProfileAction> | ||
| 84 | + <AnalyzeAction | ||
| 85 | + buildConfiguration = "Debug"> | ||
| 86 | + </AnalyzeAction> | ||
| 87 | + <ArchiveAction | ||
| 88 | + buildConfiguration = "Release" | ||
| 89 | + revealArchiveInOrganizer = "YES"> | ||
| 90 | + </ArchiveAction> | ||
| 91 | +</Scheme> |
example/ios/Runner/AppDelegate.swift
0 → 100644
| 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 | +} |
| 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 | +} |
564 Bytes
1.25 KB
1.55 KB
1.68 KB
1.88 KB
1.25 KB
1.85 KB
3.74 KB
1.84 KB
3.22 KB
| 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 | +} |
68 Bytes
68 Bytes
68 Bytes
| 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. |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
| 3 | + <dependencies> | ||
| 4 | + <deployment identifier="iOS"/> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> | ||
| 6 | + </dependencies> | ||
| 7 | + <scenes> | ||
| 8 | + <!--View Controller--> | ||
| 9 | + <scene sceneID="EHf-IW-A2E"> | ||
| 10 | + <objects> | ||
| 11 | + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
| 12 | + <layoutGuides> | ||
| 13 | + <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> | ||
| 14 | + <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> | ||
| 15 | + </layoutGuides> | ||
| 16 | + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
| 17 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 18 | + <subviews> | ||
| 19 | + <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> | ||
| 20 | + </imageView> | ||
| 21 | + </subviews> | ||
| 22 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
| 23 | + <constraints> | ||
| 24 | + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> | ||
| 25 | + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> | ||
| 26 | + </constraints> | ||
| 27 | + </view> | ||
| 28 | + </viewController> | ||
| 29 | + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
| 30 | + </objects> | ||
| 31 | + <point key="canvasLocation" x="53" y="375"/> | ||
| 32 | + </scene> | ||
| 33 | + </scenes> | ||
| 34 | + <resources> | ||
| 35 | + <image name="LaunchImage" width="168" height="185"/> | ||
| 36 | + </resources> | ||
| 37 | +</document> |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | ||
| 3 | + <dependencies> | ||
| 4 | + <deployment identifier="iOS"/> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | ||
| 6 | + </dependencies> | ||
| 7 | + <scenes> | ||
| 8 | + <!--Flutter View Controller--> | ||
| 9 | + <scene sceneID="tne-QT-ifu"> | ||
| 10 | + <objects> | ||
| 11 | + <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> | ||
| 12 | + <layoutGuides> | ||
| 13 | + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
| 14 | + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
| 15 | + </layoutGuides> | ||
| 16 | + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
| 17 | + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
| 18 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 19 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
| 20 | + </view> | ||
| 21 | + </viewController> | ||
| 22 | + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
| 23 | + </objects> | ||
| 24 | + </scene> | ||
| 25 | + </scenes> | ||
| 26 | +</document> |
example/ios/Runner/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 9 | + <key>CFBundleIdentifier</key> | ||
| 10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 12 | + <string>6.0</string> | ||
| 13 | + <key>CFBundleName</key> | ||
| 14 | + <string>example</string> | ||
| 15 | + <key>CFBundlePackageType</key> | ||
| 16 | + <string>APPL</string> | ||
| 17 | + <key>CFBundleShortVersionString</key> | ||
| 18 | + <string>$(FLUTTER_BUILD_NAME)</string> | ||
| 19 | + <key>CFBundleSignature</key> | ||
| 20 | + <string>????</string> | ||
| 21 | + <key>CFBundleVersion</key> | ||
| 22 | + <string>$(FLUTTER_BUILD_NUMBER)</string> | ||
| 23 | + <key>LSRequiresIPhoneOS</key> | ||
| 24 | + <true/> | ||
| 25 | + <key>UILaunchStoryboardName</key> | ||
| 26 | + <string>LaunchScreen</string> | ||
| 27 | + <key>UIMainStoryboardFile</key> | ||
| 28 | + <string>Main</string> | ||
| 29 | + <key>UISupportedInterfaceOrientations</key> | ||
| 30 | + <array> | ||
| 31 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 32 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 33 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 34 | + </array> | ||
| 35 | + <key>UISupportedInterfaceOrientations~ipad</key> | ||
| 36 | + <array> | ||
| 37 | + <string>UIInterfaceOrientationPortrait</string> | ||
| 38 | + <string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
| 39 | + <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 40 | + <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 41 | + </array> | ||
| 42 | + <key>UIViewControllerBasedStatusBarAppearance</key> | ||
| 43 | + <false/> | ||
| 44 | +</dict> | ||
| 45 | +</plist> |
example/ios/Runner/Runner-Bridging-Header.h
0 → 100644
| 1 | +#import "GeneratedPluginRegistrant.h" |
example/lib/examples/cupertino_share.dart
0 → 100644
| 1 | +import 'dart:ui'; | ||
| 2 | + | ||
| 3 | +import 'package:example/examples/sliver_container.dart'; | ||
| 4 | +import 'package:example/modals/modal_fit.dart'; | ||
| 5 | +import 'package:flutter/cupertino.dart'; | ||
| 6 | +import 'package:flutter/gestures.dart'; | ||
| 7 | +import 'package:flutter/material.dart'; | ||
| 8 | +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
| 9 | + | ||
| 10 | +class CupertinoSharePage extends StatelessWidget { | ||
| 11 | + @override | ||
| 12 | + Widget build(BuildContext context) { | ||
| 13 | + return Scaffold( | ||
| 14 | + appBar: appBar(context), | ||
| 15 | + body: CupertinoPageScaffold( | ||
| 16 | + child: Center( | ||
| 17 | + child: Hero( | ||
| 18 | + tag: 'image', | ||
| 19 | + child: Image.network( | ||
| 20 | + 'https://images.unsplash.com/photo-1586042062881-03688ce69774')), | ||
| 21 | + ), | ||
| 22 | + ), | ||
| 23 | + bottomNavigationBar: bottomAppBar(context)); | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + PreferredSizeWidget appBar(BuildContext context) { | ||
| 27 | + return CupertinoNavigationBar( | ||
| 28 | + middle: Column( | ||
| 29 | + children: <Widget>[ | ||
| 30 | + Text('New York', style: TextStyle(fontWeight: FontWeight.normal)), | ||
| 31 | + Text('1 February 11:45', | ||
| 32 | + style: TextStyle(fontWeight: FontWeight.normal, fontSize: 12)) | ||
| 33 | + ], | ||
| 34 | + ), | ||
| 35 | + trailing: Text( | ||
| 36 | + 'Edit', | ||
| 37 | + style: TextStyle( | ||
| 38 | + color: CupertinoTheme.of(context).primaryColor, | ||
| 39 | + ), | ||
| 40 | + ), | ||
| 41 | + ); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + Widget bottomAppBar(BuildContext context) { | ||
| 45 | + return BottomAppBar( | ||
| 46 | + child: Row( | ||
| 47 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 48 | + children: <Widget>[ | ||
| 49 | + CupertinoButton( | ||
| 50 | + child: Icon( | ||
| 51 | + CupertinoIcons.share, | ||
| 52 | + size: 28, | ||
| 53 | + ), | ||
| 54 | + onPressed: () { | ||
| 55 | + showCupertinoModalBottomSheet( | ||
| 56 | + expand: true, | ||
| 57 | + context: context, | ||
| 58 | + backgroundColor: Colors.transparent, | ||
| 59 | + builder: (context, scrollController) => | ||
| 60 | + PhotoShareBottomSheet(scrollController: scrollController), | ||
| 61 | + ); | ||
| 62 | + }, | ||
| 63 | + ), | ||
| 64 | + CupertinoButton( | ||
| 65 | + child: Icon(CupertinoIcons.heart, size: 28), | ||
| 66 | + onPressed: null, | ||
| 67 | + ), | ||
| 68 | + CupertinoButton( | ||
| 69 | + child: Icon(CupertinoIcons.delete, size: 28), | ||
| 70 | + onPressed: null, | ||
| 71 | + ) | ||
| 72 | + ], | ||
| 73 | + ), | ||
| 74 | + ); | ||
| 75 | + } | ||
| 76 | +} | ||
| 77 | + | ||
| 78 | +class PhotoShareBottomSheet extends StatelessWidget { | ||
| 79 | + final ScrollController scrollController; | ||
| 80 | + | ||
| 81 | + const PhotoShareBottomSheet({Key key, this.scrollController}) | ||
| 82 | + : super(key: key); | ||
| 83 | + | ||
| 84 | + @override | ||
| 85 | + Widget build(BuildContext context) { | ||
| 86 | + return BackdropFilter( | ||
| 87 | + filter: ImageFilter.blur(sigmaX: 12, sigmaY: 12), | ||
| 88 | + child: Material( | ||
| 89 | + color: Colors.transparent, | ||
| 90 | + child: Scaffold( | ||
| 91 | + backgroundColor: CupertinoTheme.of(context) | ||
| 92 | + .scaffoldBackgroundColor | ||
| 93 | + .withOpacity(0.95), | ||
| 94 | + extendBodyBehindAppBar: true, | ||
| 95 | + appBar: appBar(context), | ||
| 96 | + body: CustomScrollView( | ||
| 97 | + physics: ClampingScrollPhysics(), | ||
| 98 | + controller: scrollController, | ||
| 99 | + slivers: <Widget>[ | ||
| 100 | + SliverSafeArea( | ||
| 101 | + bottom: false, | ||
| 102 | + sliver: SliverToBoxAdapter( | ||
| 103 | + child: Container( | ||
| 104 | + height: 318, | ||
| 105 | + child: ListView( | ||
| 106 | + padding: EdgeInsets.all(12).copyWith( | ||
| 107 | + right: | ||
| 108 | + MediaQuery.of(context).size.width / 2 - 100), | ||
| 109 | + reverse: true, | ||
| 110 | + scrollDirection: Axis.horizontal, | ||
| 111 | + physics: PageScrollPhysics(), | ||
| 112 | + children: <Widget>[ | ||
| 113 | + Padding( | ||
| 114 | + padding: EdgeInsets.symmetric(horizontal: 6), | ||
| 115 | + child: ClipRRect( | ||
| 116 | + borderRadius: BorderRadius.circular(12), | ||
| 117 | + child: Hero( | ||
| 118 | + tag: 'image', | ||
| 119 | + child: Image.network( | ||
| 120 | + 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | ||
| 121 | + ))), | ||
| 122 | + Padding( | ||
| 123 | + padding: EdgeInsets.symmetric(horizontal: 6), | ||
| 124 | + child: ClipRRect( | ||
| 125 | + borderRadius: BorderRadius.circular(12), | ||
| 126 | + child: Image.network( | ||
| 127 | + 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | ||
| 128 | + )), | ||
| 129 | + Padding( | ||
| 130 | + padding: EdgeInsets.symmetric(horizontal: 6), | ||
| 131 | + child: ClipRRect( | ||
| 132 | + borderRadius: BorderRadius.circular(12), | ||
| 133 | + child: Image.network( | ||
| 134 | + 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | ||
| 135 | + )), | ||
| 136 | + ], | ||
| 137 | + ), | ||
| 138 | + ), | ||
| 139 | + ), | ||
| 140 | + ), | ||
| 141 | + SliverToBoxAdapter( | ||
| 142 | + child: Divider(height: 1), | ||
| 143 | + ), | ||
| 144 | + sliverContactsSection(context), | ||
| 145 | + SliverToBoxAdapter( | ||
| 146 | + child: Divider(height: 1), | ||
| 147 | + ), | ||
| 148 | + SliverToBoxAdapter( | ||
| 149 | + child: Container( | ||
| 150 | + height: 120, | ||
| 151 | + padding: EdgeInsets.only(top: 12), | ||
| 152 | + child: ListView.builder( | ||
| 153 | + padding: EdgeInsets.all(10), | ||
| 154 | + scrollDirection: Axis.horizontal, | ||
| 155 | + itemBuilder: (context, index) { | ||
| 156 | + final app = apps[index]; | ||
| 157 | + return Container( | ||
| 158 | + width: 72, | ||
| 159 | + margin: EdgeInsets.symmetric(horizontal: 4), | ||
| 160 | + child: Column( | ||
| 161 | + children: <Widget>[ | ||
| 162 | + Material( | ||
| 163 | + child: ClipRRect( | ||
| 164 | + child: Container( | ||
| 165 | + height: 60, | ||
| 166 | + width: 60, | ||
| 167 | + decoration: BoxDecoration( | ||
| 168 | + image: DecorationImage( | ||
| 169 | + image: | ||
| 170 | + NetworkImage(app.imageUrl), | ||
| 171 | + fit: BoxFit.cover), | ||
| 172 | + color: Colors.white, | ||
| 173 | + borderRadius: | ||
| 174 | + BorderRadius.circular(15)), | ||
| 175 | + ), | ||
| 176 | + ), | ||
| 177 | + shape: RoundedRectangleBorder( | ||
| 178 | + borderRadius: | ||
| 179 | + BorderRadius.circular(15)), | ||
| 180 | + elevation: 12, | ||
| 181 | + shadowColor: Colors.black12, | ||
| 182 | + ), | ||
| 183 | + SizedBox(height: 8), | ||
| 184 | + Text( | ||
| 185 | + app.title, | ||
| 186 | + maxLines: 2, | ||
| 187 | + textAlign: TextAlign.center, | ||
| 188 | + style: TextStyle(fontSize: 11), | ||
| 189 | + ) | ||
| 190 | + ], | ||
| 191 | + )); | ||
| 192 | + }, | ||
| 193 | + itemCount: apps.length, | ||
| 194 | + ), | ||
| 195 | + ), | ||
| 196 | + ), | ||
| 197 | + SliverPadding( | ||
| 198 | + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), | ||
| 199 | + sliver: SliverContainer( | ||
| 200 | + decoration: BoxDecoration( | ||
| 201 | + color: Colors.white, | ||
| 202 | + borderRadius: BorderRadius.circular(12)), | ||
| 203 | + sliver: SliverList( | ||
| 204 | + delegate: SliverChildListDelegate.fixed( | ||
| 205 | + List<Widget>.from(actions.map( | ||
| 206 | + (action) => Container( | ||
| 207 | + padding: EdgeInsets.symmetric( | ||
| 208 | + vertical: 16, horizontal: 16), | ||
| 209 | + child: Text( | ||
| 210 | + action.title, | ||
| 211 | + style: CupertinoTheme.of(context) | ||
| 212 | + .textTheme | ||
| 213 | + .textStyle, | ||
| 214 | + )), | ||
| 215 | + )).addItemInBetween(Divider( | ||
| 216 | + height: 1, | ||
| 217 | + ))), | ||
| 218 | + )), | ||
| 219 | + ), | ||
| 220 | + SliverPadding( | ||
| 221 | + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), | ||
| 222 | + sliver: SliverContainer( | ||
| 223 | + decoration: BoxDecoration( | ||
| 224 | + color: Colors.white, | ||
| 225 | + borderRadius: BorderRadius.circular(12)), | ||
| 226 | + sliver: SliverList( | ||
| 227 | + delegate: SliverChildListDelegate.fixed( | ||
| 228 | + List<Widget>.from(actions1.map( | ||
| 229 | + (action) => Container( | ||
| 230 | + padding: EdgeInsets.symmetric( | ||
| 231 | + vertical: 16, horizontal: 16), | ||
| 232 | + child: Text( | ||
| 233 | + action.title, | ||
| 234 | + style: CupertinoTheme.of(context) | ||
| 235 | + .textTheme | ||
| 236 | + .textStyle, | ||
| 237 | + )), | ||
| 238 | + )).addItemInBetween(Divider( | ||
| 239 | + height: 1, | ||
| 240 | + ))), | ||
| 241 | + )), | ||
| 242 | + ), | ||
| 243 | + SliverPadding( | ||
| 244 | + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 4), | ||
| 245 | + sliver: SliverContainer( | ||
| 246 | + decoration: BoxDecoration( | ||
| 247 | + color: Colors.white, | ||
| 248 | + borderRadius: BorderRadius.circular(12)), | ||
| 249 | + sliver: SliverList( | ||
| 250 | + delegate: SliverChildListDelegate.fixed( | ||
| 251 | + List<Widget>.from(actions2.map( | ||
| 252 | + (action) => Container( | ||
| 253 | + padding: EdgeInsets.symmetric( | ||
| 254 | + vertical: 16, horizontal: 16), | ||
| 255 | + child: Text( | ||
| 256 | + action.title, | ||
| 257 | + style: CupertinoTheme.of(context) | ||
| 258 | + .textTheme | ||
| 259 | + .textStyle, | ||
| 260 | + )), | ||
| 261 | + )).addItemInBetween(Divider( | ||
| 262 | + height: 1, | ||
| 263 | + ))), | ||
| 264 | + )), | ||
| 265 | + ), | ||
| 266 | + SliverSafeArea( | ||
| 267 | + top: false, | ||
| 268 | + sliver: SliverPadding( | ||
| 269 | + padding: EdgeInsets.only( | ||
| 270 | + bottom: 20, | ||
| 271 | + )), | ||
| 272 | + ) | ||
| 273 | + ], | ||
| 274 | + ), | ||
| 275 | + ))); | ||
| 276 | + } | ||
| 277 | + | ||
| 278 | + Widget sliverContactsSection(BuildContext context) { | ||
| 279 | + return SliverToBoxAdapter( | ||
| 280 | + child: Container( | ||
| 281 | + height: 132, | ||
| 282 | + padding: EdgeInsets.only(top: 12), | ||
| 283 | + child: ListView.builder( | ||
| 284 | + padding: EdgeInsets.all(10), | ||
| 285 | + scrollDirection: Axis.horizontal, | ||
| 286 | + itemBuilder: (context, index) { | ||
| 287 | + final person = people[index]; | ||
| 288 | + return Container( | ||
| 289 | + width: 72, | ||
| 290 | + margin: EdgeInsets.symmetric(horizontal: 4), | ||
| 291 | + child: Column( | ||
| 292 | + children: <Widget>[ | ||
| 293 | + Material( | ||
| 294 | + child: CircleAvatar( | ||
| 295 | + backgroundImage: NetworkImage( | ||
| 296 | + person.imageUrl, | ||
| 297 | + ), | ||
| 298 | + radius: 30, | ||
| 299 | + backgroundColor: Colors.white, | ||
| 300 | + ), | ||
| 301 | + shape: CircleBorder(), | ||
| 302 | + elevation: 12, | ||
| 303 | + shadowColor: Colors.black12, | ||
| 304 | + ), | ||
| 305 | + SizedBox(height: 8), | ||
| 306 | + Text( | ||
| 307 | + person.title, | ||
| 308 | + maxLines: 2, | ||
| 309 | + textAlign: TextAlign.center, | ||
| 310 | + style: TextStyle(fontSize: 11), | ||
| 311 | + ) | ||
| 312 | + ], | ||
| 313 | + ), | ||
| 314 | + ); | ||
| 315 | + }, | ||
| 316 | + itemCount: people.length, | ||
| 317 | + ), | ||
| 318 | + ), | ||
| 319 | + ); | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + PreferredSizeWidget appBar(BuildContext context) { | ||
| 323 | + return PreferredSize( | ||
| 324 | + preferredSize: Size(double.infinity, 74), | ||
| 325 | + child: ClipRect( | ||
| 326 | + child: BackdropFilter( | ||
| 327 | + filter: ImageFilter.blur(sigmaX: 12, sigmaY: 12), | ||
| 328 | + child: Container( | ||
| 329 | + color: CupertinoTheme.of(context) | ||
| 330 | + .scaffoldBackgroundColor | ||
| 331 | + .withOpacity(0.8), | ||
| 332 | + child: Column( | ||
| 333 | + children: <Widget>[ | ||
| 334 | + Expanded( | ||
| 335 | + child: Row( | ||
| 336 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 337 | + children: <Widget>[ | ||
| 338 | + SizedBox(width: 18), | ||
| 339 | + ClipRRect( | ||
| 340 | + borderRadius: BorderRadius.circular(4), | ||
| 341 | + child: Image.network( | ||
| 342 | + 'https://images.unsplash.com/photo-1586042062881-03688ce69774', | ||
| 343 | + fit: BoxFit.cover, | ||
| 344 | + height: 40, | ||
| 345 | + width: 40, | ||
| 346 | + )), | ||
| 347 | + SizedBox(width: 12), | ||
| 348 | + Expanded( | ||
| 349 | + child: Column( | ||
| 350 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 351 | + crossAxisAlignment: CrossAxisAlignment.stretch, | ||
| 352 | + children: <Widget>[ | ||
| 353 | + Text( | ||
| 354 | + '1 Photo selected', | ||
| 355 | + style: CupertinoTheme.of(context) | ||
| 356 | + .textTheme | ||
| 357 | + .textStyle | ||
| 358 | + .copyWith(fontWeight: FontWeight.w600), | ||
| 359 | + ), | ||
| 360 | + SizedBox(height: 4), | ||
| 361 | + Row( | ||
| 362 | + crossAxisAlignment: CrossAxisAlignment.baseline, | ||
| 363 | + textBaseline: TextBaseline.alphabetic, | ||
| 364 | + children: <Widget>[ | ||
| 365 | + Text( | ||
| 366 | + 'Options', | ||
| 367 | + style: CupertinoTheme.of(context) | ||
| 368 | + .textTheme | ||
| 369 | + .actionTextStyle | ||
| 370 | + .copyWith( | ||
| 371 | + fontSize: 14, | ||
| 372 | + fontWeight: FontWeight.normal), | ||
| 373 | + ), | ||
| 374 | + SizedBox(width: 2), | ||
| 375 | + Icon( | ||
| 376 | + CupertinoIcons.right_chevron, | ||
| 377 | + size: 14, | ||
| 378 | + color: | ||
| 379 | + CupertinoTheme.of(context).primaryColor, | ||
| 380 | + ) | ||
| 381 | + ]), | ||
| 382 | + ], | ||
| 383 | + )), | ||
| 384 | + GestureDetector( | ||
| 385 | + onTap: () => Navigator.of(context).pop(), | ||
| 386 | + child: Align( | ||
| 387 | + alignment: Alignment.topCenter, | ||
| 388 | + child: Container( | ||
| 389 | + margin: EdgeInsets.only(top: 14), | ||
| 390 | + padding: EdgeInsets.all(4), | ||
| 391 | + decoration: BoxDecoration( | ||
| 392 | + color: Colors.black.withOpacity(0.1), | ||
| 393 | + shape: BoxShape.circle, | ||
| 394 | + ), | ||
| 395 | + child: Icon( | ||
| 396 | + Icons.close, | ||
| 397 | + size: 24, | ||
| 398 | + color: Colors.black54, | ||
| 399 | + ), | ||
| 400 | + ), | ||
| 401 | + ), | ||
| 402 | + ), | ||
| 403 | + SizedBox(width: 14), | ||
| 404 | + ], | ||
| 405 | + ), | ||
| 406 | + ), | ||
| 407 | + Divider(height: 1), | ||
| 408 | + ], | ||
| 409 | + ), | ||
| 410 | + ), | ||
| 411 | + ), | ||
| 412 | + ), | ||
| 413 | + ); | ||
| 414 | + } | ||
| 415 | +} | ||
| 416 | + | ||
| 417 | +class Item { | ||
| 418 | + final String title; | ||
| 419 | + final String imageUrl; | ||
| 420 | + | ||
| 421 | + Item(this.title, this.imageUrl); | ||
| 422 | +} | ||
| 423 | + | ||
| 424 | +final people = [ | ||
| 425 | + Item('MacBook Pro', | ||
| 426 | + 'https://www.uoduckstore.com/TDS%20Product%20Images/Apple%20MacBook%20Pro%2016%20w%20T%20Bar%20Late%202019_1.jpg'), | ||
| 427 | + Item('Jaime Blasco', | ||
| 428 | + 'https://media-exp1.licdn.com/dms/image/C5603AQGfIMBxWBRMSg/profile-displayphoto-shrink_200_200/0?e=1591833600&v=beta&t=r6xnd4oBDfb3A3IcsgliyrT_avYaeBEwRr9XtlizWq8'), | ||
| 429 | + Item('Mya Johnston', | ||
| 430 | + 'https://images.unsplash.com/photo-1520813792240-56fc4a3765a7'), | ||
| 431 | + Item('Maxime Nicholls', | ||
| 432 | + 'https://images.unsplash.com/photo-1520719627573-5e2c1a6610f0'), | ||
| 433 | + Item('Susanna Thorne', | ||
| 434 | + 'https://images.unsplash.com/photo-1568707043650-eb03f2536825'), | ||
| 435 | + Item('Jarod Aguilar', | ||
| 436 | + 'https://images.unsplash.com/photo-1547106634-56dcd53ae883') | ||
| 437 | +]; | ||
| 438 | + | ||
| 439 | +final apps = [ | ||
| 440 | + Item('Messages', | ||
| 441 | + 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/IMessage_logo.svg/1200px-IMessage_logo.svg.png'), | ||
| 442 | + Item('Github', | ||
| 443 | + 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'), | ||
| 444 | + Item('Slack', | ||
| 445 | + 'https://is3-ssl.mzstatic.com/image/thumb/Purple113/v4/6e/80/06/6e80063f-e5c8-3f20-d8d5-22dd0740f5ba/AppIcon-0-0-1x_U007emarketing-0-0-0-7-0-0-sRGB-0-0-0-GLES2_U002c0-512MB-85-220-0-0.png/246x0w.png'), | ||
| 446 | + Item('Twitter', | ||
| 447 | + 'https://cfcdnpull-creativefreedoml.netdna-ssl.com/wp-content/uploads/2015/06/Twitter-bird-white-blue2.png'), | ||
| 448 | + Item('Mail', | ||
| 449 | + 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Mail_%28iOS%29.svg/1200px-Mail_%28iOS%29.svg.png'), | ||
| 450 | +]; | ||
| 451 | + | ||
| 452 | +final actions = [ | ||
| 453 | + Item('Copy Photo', null), | ||
| 454 | +]; | ||
| 455 | +final actions1 = [ | ||
| 456 | + Item('Add to Shared Album', null), | ||
| 457 | + Item('Add to Album', null), | ||
| 458 | + Item('Duplicate', null), | ||
| 459 | + Item('Hide', null), | ||
| 460 | + Item('Slideshow', null), | ||
| 461 | + Item('AirPlay', null), | ||
| 462 | + Item('Use as Wallpaper', null), | ||
| 463 | +]; | ||
| 464 | + | ||
| 465 | +final actions2 = [ | ||
| 466 | + Item('Create Watch', null), | ||
| 467 | + Item('Save to Files', null), | ||
| 468 | + Item('Asign to Contact', null), | ||
| 469 | + Item('Print', null), | ||
| 470 | +]; | ||
| 471 | + | ||
| 472 | +extension ListUtils<T> on List<T> { | ||
| 473 | + List<T> addItemInBetween<T>(T item) => this.length == 0 | ||
| 474 | + ? this | ||
| 475 | + : (this.fold([], (r, element) => [...r, element as T, item]) | ||
| 476 | + ..removeLast()); | ||
| 477 | +} | ||
| 478 | + | ||
| 479 | +class SimpleSliverDelegate extends SliverPersistentHeaderDelegate { | ||
| 480 | + final Widget child; | ||
| 481 | + final double height; | ||
| 482 | + | ||
| 483 | + SimpleSliverDelegate({ | ||
| 484 | + this.child, | ||
| 485 | + this.height, | ||
| 486 | + }); | ||
| 487 | + | ||
| 488 | + @override | ||
| 489 | + Widget build( | ||
| 490 | + BuildContext context, double shrinkOffset, bool overlapsContent) { | ||
| 491 | + return SizedBox(height: height, child: child); | ||
| 492 | + } | ||
| 493 | + | ||
| 494 | + @override | ||
| 495 | + double get minExtent => height; | ||
| 496 | + | ||
| 497 | + @override | ||
| 498 | + double get maxExtent => height; | ||
| 499 | + | ||
| 500 | + @override | ||
| 501 | + bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) { | ||
| 502 | + return false; | ||
| 503 | + } | ||
| 504 | +} |
example/lib/examples/sliver_container.dart
0 → 100644
| 1 | +import 'package:flutter/rendering.dart'; | ||
| 2 | +import 'package:flutter/widgets.dart'; | ||
| 3 | + | ||
| 4 | +@immutable | ||
| 5 | +class SliverContainer extends RenderObjectWidget { | ||
| 6 | + SliverContainer( | ||
| 7 | + {Key key, | ||
| 8 | + this.padding = EdgeInsets.zero, | ||
| 9 | + this.margin = EdgeInsets.zero, | ||
| 10 | + this.borderRadius, | ||
| 11 | + this.decoration, | ||
| 12 | + this.foregroundDecoration, | ||
| 13 | + this.sliver}) | ||
| 14 | + : super(key: key); | ||
| 15 | + | ||
| 16 | + final EdgeInsets margin; | ||
| 17 | + | ||
| 18 | + final BorderRadius borderRadius; | ||
| 19 | + final EdgeInsets padding; | ||
| 20 | + final Decoration decoration; | ||
| 21 | + final Decoration foregroundDecoration; | ||
| 22 | + final Widget sliver; | ||
| 23 | + | ||
| 24 | + Widget get child => SliverPadding(padding: padding + margin, sliver: sliver); | ||
| 25 | + | ||
| 26 | + Container get backgroundDecorationBox => Container(decoration: decoration); | ||
| 27 | + | ||
| 28 | + Container get foregroundDecorationBox => | ||
| 29 | + Container(decoration: foregroundDecoration); | ||
| 30 | + | ||
| 31 | + @override | ||
| 32 | + _RenderSliverGroup createRenderObject(BuildContext context) { | ||
| 33 | + return _RenderSliverGroup( | ||
| 34 | + margin: this.margin, borderRadius: this.borderRadius, padding: padding); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + @override | ||
| 38 | + _SliverGroupElement createElement() => _SliverGroupElement(this); | ||
| 39 | + | ||
| 40 | + @override | ||
| 41 | + void updateRenderObject( | ||
| 42 | + BuildContext context, _RenderSliverGroup renderObject) { | ||
| 43 | + renderObject | ||
| 44 | + ..margin = margin | ||
| 45 | + ..padding = padding | ||
| 46 | + ..borderRadius = borderRadius; | ||
| 47 | + } | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +class _SliverGroupElement extends RenderObjectElement { | ||
| 51 | + _SliverGroupElement(SliverContainer widget) : super(widget); | ||
| 52 | + | ||
| 53 | + Element _backgroundDecoration; | ||
| 54 | + Element _foregroundDecoration; | ||
| 55 | + Element _sliver; | ||
| 56 | + | ||
| 57 | + @override | ||
| 58 | + SliverContainer get widget => super.widget; | ||
| 59 | + | ||
| 60 | + @override | ||
| 61 | + void visitChildren(ElementVisitor visitor) { | ||
| 62 | + if (_backgroundDecoration != null) visitor(_backgroundDecoration); | ||
| 63 | + if (_foregroundDecoration != null) visitor(_foregroundDecoration); | ||
| 64 | + if (_sliver != null) visitor(_sliver); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @override | ||
| 68 | + void forgetChild(Element child) { | ||
| 69 | + if (child == _backgroundDecoration) _backgroundDecoration = null; | ||
| 70 | + if (child == _foregroundDecoration) _foregroundDecoration = null; | ||
| 71 | + if (child == _sliver) _sliver = null; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + @override | ||
| 75 | + void mount(Element parent, newSlot) { | ||
| 76 | + super.mount(parent, newSlot); | ||
| 77 | + _backgroundDecoration = | ||
| 78 | + updateChild(_backgroundDecoration, widget.backgroundDecorationBox, 0); | ||
| 79 | + _foregroundDecoration = | ||
| 80 | + updateChild(_foregroundDecoration, widget.foregroundDecorationBox, 1); | ||
| 81 | + _sliver = updateChild(_sliver, widget.child, 2); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + @override | ||
| 85 | + void update(RenderObjectWidget newWidget) { | ||
| 86 | + super.update(newWidget); | ||
| 87 | + assert(widget == newWidget); | ||
| 88 | + _backgroundDecoration = | ||
| 89 | + updateChild(_backgroundDecoration, widget.backgroundDecorationBox, 0); | ||
| 90 | + _foregroundDecoration = | ||
| 91 | + updateChild(_foregroundDecoration, widget.foregroundDecorationBox, 1); | ||
| 92 | + _sliver = updateChild(_sliver, widget.child, 2); | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + @override | ||
| 96 | + void insertChildRenderObject(RenderObject child, int slot) { | ||
| 97 | + final _RenderSliverGroup renderObject = this.renderObject; | ||
| 98 | + if (slot == 0) renderObject.decoration = child; | ||
| 99 | + if (slot == 1) renderObject.foregroundDecoration = child; | ||
| 100 | + if (slot == 2) renderObject.child = child; | ||
| 101 | + assert(renderObject == this.renderObject); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + @override | ||
| 105 | + void moveChildRenderObject(RenderObject child, slot) { | ||
| 106 | + assert(false); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + @override | ||
| 110 | + void removeChildRenderObject(RenderObject child) { | ||
| 111 | + final _RenderSliverGroup renderObject = this.renderObject; | ||
| 112 | + if (renderObject.decoration == child) renderObject.decoration = null; | ||
| 113 | + if (renderObject.foregroundDecoration == child) | ||
| 114 | + renderObject.foregroundDecoration = null; | ||
| 115 | + if (renderObject.child == child) renderObject.child = null; | ||
| 116 | + assert(renderObject == this.renderObject); | ||
| 117 | + } | ||
| 118 | +} | ||
| 119 | + | ||
| 120 | +class _RenderSliverGroup extends RenderSliver with RenderSliverHelpers { | ||
| 121 | + _RenderSliverGroup( | ||
| 122 | + {EdgeInsetsGeometry margin, | ||
| 123 | + EdgeInsetsGeometry padding, | ||
| 124 | + BorderRadius borderRadius, | ||
| 125 | + RenderBox decoration, | ||
| 126 | + RenderBox foregroundDecoration, | ||
| 127 | + RenderSliver child}) { | ||
| 128 | + this.margin = margin; | ||
| 129 | + this.padding = padding; | ||
| 130 | + this.borderRadius = borderRadius; | ||
| 131 | + this.foregroundDecoration = foregroundDecoration; | ||
| 132 | + this.decoration = decoration; | ||
| 133 | + this.child = child; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + RRect _clipRRect; | ||
| 137 | + | ||
| 138 | + EdgeInsetsGeometry get padding => _padding; | ||
| 139 | + EdgeInsetsGeometry _padding; | ||
| 140 | + | ||
| 141 | + set padding(EdgeInsetsGeometry value) { | ||
| 142 | + assert(value != null); | ||
| 143 | + assert(value.isNonNegative); | ||
| 144 | + if (_padding == value) return; | ||
| 145 | + _padding = value; | ||
| 146 | + markNeedsLayout(); | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + EdgeInsetsGeometry get margin => _margin; | ||
| 150 | + EdgeInsetsGeometry _margin; | ||
| 151 | + | ||
| 152 | + set margin(EdgeInsetsGeometry value) { | ||
| 153 | + assert(value != null); | ||
| 154 | + assert(value.isNonNegative); | ||
| 155 | + if (_margin == value) return; | ||
| 156 | + _margin = value; | ||
| 157 | + markNeedsLayout(); | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + BorderRadiusGeometry get borderRadius => _borderRadius; | ||
| 161 | + BorderRadiusGeometry _borderRadius; | ||
| 162 | + | ||
| 163 | + set borderRadius(BorderRadiusGeometry value) { | ||
| 164 | + if (value == _borderRadius) return; | ||
| 165 | + _borderRadius = value; | ||
| 166 | + markNeedsPaint(); | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + RenderBox get decoration => _decoration; | ||
| 170 | + RenderBox _decoration; | ||
| 171 | + | ||
| 172 | + set decoration(RenderBox value) { | ||
| 173 | + if (_decoration != null) dropChild(_decoration); | ||
| 174 | + _decoration = value; | ||
| 175 | + if (_decoration != null) adoptChild(_decoration); | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + RenderBox get foregroundDecoration => _foregroundDecoration; | ||
| 179 | + RenderBox _foregroundDecoration; | ||
| 180 | + | ||
| 181 | + set foregroundDecoration(RenderBox value) { | ||
| 182 | + if (_foregroundDecoration != null) dropChild(_foregroundDecoration); | ||
| 183 | + _foregroundDecoration = value; | ||
| 184 | + if (_foregroundDecoration != null) adoptChild(_foregroundDecoration); | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + RenderSliver get child => _child; | ||
| 188 | + RenderSliver _child; | ||
| 189 | + | ||
| 190 | + set child(RenderSliver value) { | ||
| 191 | + if (_child != null) dropChild(_child); | ||
| 192 | + _child = value; | ||
| 193 | + if (_child != null) adoptChild(_child); | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + @override | ||
| 197 | + void setupParentData(RenderObject child) { | ||
| 198 | + if (child.parentData is! SliverPhysicalParentData) | ||
| 199 | + child.parentData = new SliverPhysicalParentData(); | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + @override | ||
| 203 | + void attach(PipelineOwner owner) { | ||
| 204 | + super.attach(owner); | ||
| 205 | + if (_decoration != null) _decoration.attach(owner); | ||
| 206 | + if (_child != null) _child.attach(owner); | ||
| 207 | + if (_foregroundDecoration != null) _foregroundDecoration.attach(owner); | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + @override | ||
| 211 | + void detach() { | ||
| 212 | + super.detach(); | ||
| 213 | + if (_decoration != null) _decoration.detach(); | ||
| 214 | + if (_child != null) _child.detach(); | ||
| 215 | + if (_foregroundDecoration != null) _foregroundDecoration.detach(); | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + @override | ||
| 219 | + void redepthChildren() { | ||
| 220 | + if (_decoration != null) redepthChild(_decoration); | ||
| 221 | + if (_child != null) redepthChild(_child); | ||
| 222 | + if (_foregroundDecoration != null) redepthChild(_foregroundDecoration); | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + @override | ||
| 226 | + void visitChildren(RenderObjectVisitor visitor) { | ||
| 227 | + if (_decoration != null) visitor(_decoration); | ||
| 228 | + if (_child != null) visitor(_child); | ||
| 229 | + if (_foregroundDecoration != null) visitor(_foregroundDecoration); | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | + @override | ||
| 233 | + List<DiagnosticsNode> debugDescribeChildren() { | ||
| 234 | + List<DiagnosticsNode> result = <DiagnosticsNode>[]; | ||
| 235 | + if (decoration != null) { | ||
| 236 | + result.add(decoration.toDiagnosticsNode(name: 'decoration')); | ||
| 237 | + } | ||
| 238 | + if (foregroundDecoration != null) { | ||
| 239 | + result.add(foregroundDecoration.toDiagnosticsNode( | ||
| 240 | + name: 'foreground_decoration')); | ||
| 241 | + } | ||
| 242 | + if (child != null) { | ||
| 243 | + result.add(child.toDiagnosticsNode(name: 'child')); | ||
| 244 | + } | ||
| 245 | + return result; | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + @override | ||
| 249 | + bool hitTestChildren(HitTestResult result, | ||
| 250 | + {double mainAxisPosition, double crossAxisPosition}) { | ||
| 251 | + assert(geometry.hitTestExtent > 0.0); | ||
| 252 | + return child.hitTest(result, | ||
| 253 | + mainAxisPosition: mainAxisPosition, | ||
| 254 | + crossAxisPosition: crossAxisPosition); | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + @override | ||
| 258 | + void performLayout() { | ||
| 259 | + if (child == null) { | ||
| 260 | + geometry = SliverGeometry(); | ||
| 261 | + return; | ||
| 262 | + } | ||
| 263 | + // child not null | ||
| 264 | + AxisDirection axisDirection = applyGrowthDirectionToAxisDirection( | ||
| 265 | + constraints.axisDirection, constraints.growthDirection); | ||
| 266 | + // layout sliver | ||
| 267 | + child.layout(constraints, parentUsesSize: true); | ||
| 268 | + final SliverGeometry childLayoutGeometry = child.geometry; | ||
| 269 | + geometry = childLayoutGeometry; | ||
| 270 | + | ||
| 271 | + // layout decoration with child size + margin | ||
| 272 | + //Todo: Support rtl | ||
| 273 | + EdgeInsets margin = this.margin.resolve(TextDirection.ltr); | ||
| 274 | + final maxExtent = childLayoutGeometry.maxPaintExtent - margin.horizontal; | ||
| 275 | + final crossAxisExtent = constraints.crossAxisExtent - margin.vertical; | ||
| 276 | + if (decoration != null) { | ||
| 277 | + decoration.layout( | ||
| 278 | + constraints.asBoxConstraints( | ||
| 279 | + maxExtent: maxExtent, crossAxisExtent: crossAxisExtent), | ||
| 280 | + parentUsesSize: true); | ||
| 281 | + } | ||
| 282 | + if (foregroundDecoration != null) { | ||
| 283 | + foregroundDecoration.layout( | ||
| 284 | + constraints.asBoxConstraints( | ||
| 285 | + maxExtent: maxExtent, crossAxisExtent: crossAxisExtent), | ||
| 286 | + parentUsesSize: true); | ||
| 287 | + } | ||
| 288 | + // compute decoration offset | ||
| 289 | + | ||
| 290 | + final SliverPhysicalParentData headerParentData = decoration.parentData; | ||
| 291 | + final SliverPhysicalParentData foregroundParentData = | ||
| 292 | + foregroundDecoration.parentData; | ||
| 293 | + double scrollOffset = -constraints.scrollOffset; | ||
| 294 | + Offset offset; | ||
| 295 | + switch (axisDirection) { | ||
| 296 | + case AxisDirection.up: | ||
| 297 | + offset = Offset(0.0, geometry.paintExtent); | ||
| 298 | + break; | ||
| 299 | + case AxisDirection.down: | ||
| 300 | + offset = Offset(0, scrollOffset); | ||
| 301 | + break; | ||
| 302 | + case AxisDirection.left: | ||
| 303 | + offset = Offset(geometry.paintExtent, 0.0); | ||
| 304 | + break; | ||
| 305 | + case AxisDirection.right: | ||
| 306 | + offset = Offset.zero; | ||
| 307 | + break; | ||
| 308 | + } | ||
| 309 | + offset += Offset(margin.left, margin.top); | ||
| 310 | + headerParentData.paintOffset = offset; | ||
| 311 | + foregroundParentData.paintOffset = offset; | ||
| 312 | + | ||
| 313 | + //compute child clip | ||
| 314 | + if (this.borderRadius != null) { | ||
| 315 | + BorderRadius borderRadius = this.borderRadius.resolve(TextDirection.ltr); | ||
| 316 | + _clipRRect = borderRadius.toRRect(Rect.fromLTRB( | ||
| 317 | + 0, 0, constraints.crossAxisExtent, geometry.maxPaintExtent)); | ||
| 318 | + double offSetY = scrollOffset; | ||
| 319 | + _clipRRect = _clipRRect.shift(Offset(0, offSetY)); | ||
| 320 | + } | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + @override | ||
| 324 | + void applyPaintTransform(RenderObject child, Matrix4 transform) { | ||
| 325 | + assert(child != null); | ||
| 326 | + final SliverPhysicalParentData childParentData = child.parentData; | ||
| 327 | + childParentData.applyPaintTransform(transform); | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + @override | ||
| 331 | + void paint(PaintingContext context, Offset offset) { | ||
| 332 | + if (geometry.visible) { | ||
| 333 | + // paint decoration | ||
| 334 | + if (decoration != null) { | ||
| 335 | + final SliverPhysicalParentData childParentData = decoration.parentData; | ||
| 336 | + context.paintChild(decoration, offset + childParentData.paintOffset); | ||
| 337 | + } | ||
| 338 | + // paint child | ||
| 339 | + if (child != null && child.geometry.visible) { | ||
| 340 | + final SliverPhysicalParentData childParentData = child.parentData; | ||
| 341 | + final PaintingContextCallback painter = | ||
| 342 | + (PaintingContext context, Offset offset) { | ||
| 343 | + context.paintChild(child, offset); | ||
| 344 | + }; | ||
| 345 | + if (_clipRRect != null && _clipRRect != RRect.zero) { | ||
| 346 | + context.pushClipRRect( | ||
| 347 | + needsCompositing, | ||
| 348 | + offset + childParentData.paintOffset, | ||
| 349 | + _clipRRect.outerRect, | ||
| 350 | + _clipRRect, | ||
| 351 | + painter, | ||
| 352 | + ); | ||
| 353 | + } else { | ||
| 354 | + painter(context, offset + childParentData.paintOffset); | ||
| 355 | + } | ||
| 356 | + } | ||
| 357 | + if (foregroundDecoration != null) { | ||
| 358 | + final SliverPhysicalParentData childParentData = | ||
| 359 | + foregroundDecoration.parentData; | ||
| 360 | + context.paintChild( | ||
| 361 | + foregroundDecoration, offset + childParentData.paintOffset); | ||
| 362 | + } | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | +} |
example/lib/main.dart
0 → 100644
| 1 | +import 'package:example/modals/circular_modal.dart'; | ||
| 2 | +import 'package:flutter/cupertino.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | + | ||
| 5 | +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
| 6 | + | ||
| 7 | +import 'modals/modal_complex_all.dart'; | ||
| 8 | +import 'modals/modal_fit.dart'; | ||
| 9 | +import 'modals/modal_inside_modal.dart'; | ||
| 10 | +import 'modals/modal_inside_modal.dart'; | ||
| 11 | +import 'modals/modal_simple.dart'; | ||
| 12 | +import 'modals/modal_will_scope.dart'; | ||
| 13 | +import 'modals/modal_with_navigator.dart'; | ||
| 14 | +import 'modals/modal_with_scroll.dart'; | ||
| 15 | + | ||
| 16 | +import 'examples/cupertino_share.dart'; | ||
| 17 | + | ||
| 18 | +void main() => runApp(MyApp()); | ||
| 19 | + | ||
| 20 | +class MyApp extends StatelessWidget { | ||
| 21 | + @override | ||
| 22 | + Widget build(BuildContext context) { | ||
| 23 | + return MaterialApp( | ||
| 24 | + onGenerateRoute: (RouteSettings settings) { | ||
| 25 | + switch (settings.name) { | ||
| 26 | + case '/': | ||
| 27 | + return MaterialWithModalsPageRoute( | ||
| 28 | + builder: (_) => MyHomePage(title: 'Flutter Demo Home Page'), | ||
| 29 | + settings: settings); | ||
| 30 | + } | ||
| 31 | + return MaterialPageRoute( | ||
| 32 | + builder: (context) => Scaffold( | ||
| 33 | + body: CupertinoScaffold( | ||
| 34 | + body: Builder( | ||
| 35 | + builder: (context) => CupertinoPageScaffold( | ||
| 36 | + backgroundColor: Colors.white, | ||
| 37 | + navigationBar: CupertinoNavigationBar( | ||
| 38 | + middle: Text('Normal Navigation Presentation'), | ||
| 39 | + trailing: GestureDetector( | ||
| 40 | + child: Icon(Icons.arrow_upward), | ||
| 41 | + onTap: () => CupertinoScaffold.showCupertinoModalBottomSheet( | ||
| 42 | + expand: true, | ||
| 43 | + context: context, | ||
| 44 | + backgroundColor: Colors.transparent, | ||
| 45 | + builder: (context, scrollController) => Stack( | ||
| 46 | + children: <Widget>[ | ||
| 47 | + ModalWithScroll( | ||
| 48 | + scrollController: scrollController), | ||
| 49 | + Positioned( | ||
| 50 | + height: 40, | ||
| 51 | + left: 40, | ||
| 52 | + right: 40, | ||
| 53 | + bottom: 20, | ||
| 54 | + child: MaterialButton( | ||
| 55 | + onPressed: () => Navigator.of(context) | ||
| 56 | + .popUntil((route) => | ||
| 57 | + route.settings.name == '/'), | ||
| 58 | + child: Text('Pop back home'), | ||
| 59 | + ), | ||
| 60 | + ) | ||
| 61 | + ], | ||
| 62 | + ), | ||
| 63 | + )), | ||
| 64 | + ), | ||
| 65 | + child: Center(child: Container()), | ||
| 66 | + ), | ||
| 67 | + ),),), | ||
| 68 | + settings: settings); | ||
| 69 | + }, | ||
| 70 | + debugShowCheckedModeBanner: false, | ||
| 71 | + ); | ||
| 72 | + } | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +class MyHomePage extends StatefulWidget { | ||
| 76 | + MyHomePage({Key key, this.title}) : super(key: key); | ||
| 77 | + | ||
| 78 | + final String title; | ||
| 79 | + | ||
| 80 | + @override | ||
| 81 | + _MyHomePageState createState() => _MyHomePageState(); | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +class _MyHomePageState extends State<MyHomePage> { | ||
| 85 | + @override | ||
| 86 | + Widget build(BuildContext context) { | ||
| 87 | + print(MediaQuery.of(context).size.height); | ||
| 88 | + return Material( | ||
| 89 | + child: CupertinoPageScaffold( | ||
| 90 | + backgroundColor: Colors.white, | ||
| 91 | + navigationBar: CupertinoNavigationBar( | ||
| 92 | + middle: Text('iOS13 Modal Presentation'), | ||
| 93 | + trailing: GestureDetector( | ||
| 94 | + child: Icon(Icons.arrow_forward), | ||
| 95 | + onTap: () => Navigator.of(context).pushNamed('ss'), | ||
| 96 | + ), | ||
| 97 | + ), | ||
| 98 | + child: SizedBox.expand( | ||
| 99 | + child: SingleChildScrollView( | ||
| 100 | + child: SafeArea( | ||
| 101 | + bottom: false, | ||
| 102 | + child: Column( | ||
| 103 | + mainAxisSize: MainAxisSize.min, | ||
| 104 | + children: <Widget>[ | ||
| 105 | + ListTile( | ||
| 106 | + title: Text('Cupertino Photo Share Example'), | ||
| 107 | + onTap: () => Navigator.of(context).push( | ||
| 108 | + MaterialWithModalsPageRoute( | ||
| 109 | + builder: (context) => CupertinoSharePage()))), | ||
| 110 | + ListTile( | ||
| 111 | + title: Text('Material fit'), | ||
| 112 | + onTap: () => showMaterialModalBottomSheet( | ||
| 113 | + expand: false, | ||
| 114 | + context: context, | ||
| 115 | + backgroundColor: Colors.transparent, | ||
| 116 | + builder: (context, scrollController) => | ||
| 117 | + ModalFit( | ||
| 118 | + scrollController: scrollController), | ||
| 119 | + )), | ||
| 120 | + ListTile( | ||
| 121 | + title: Text('Bar Modal'), | ||
| 122 | + onTap: () => showBarModalBottomSheet( | ||
| 123 | + expand: true, | ||
| 124 | + context: context, | ||
| 125 | + backgroundColor: Colors.transparent, | ||
| 126 | + builder: (context, scrollController) => | ||
| 127 | + ModalInsideModal( | ||
| 128 | + scrollController: scrollController), | ||
| 129 | + )), | ||
| 130 | + ListTile( | ||
| 131 | + title: Text('Avatar Modal'), | ||
| 132 | + onTap: () => showAvatarModalBottomSheet( | ||
| 133 | + expand: true, | ||
| 134 | + context: context, | ||
| 135 | + backgroundColor: Colors.transparent, | ||
| 136 | + builder: (context, scrollController) => | ||
| 137 | + ModalInsideModal( | ||
| 138 | + scrollController: scrollController), | ||
| 139 | + )), | ||
| 140 | + ListTile( | ||
| 141 | + title: Text('Cupertino Modal fit'), | ||
| 142 | + onTap: () => showCupertinoModalBottomSheet( | ||
| 143 | + expand: false, | ||
| 144 | + context: context, | ||
| 145 | + backgroundColor: Colors.transparent, | ||
| 146 | + builder: (context, scrollController) => | ||
| 147 | + ModalFit( | ||
| 148 | + scrollController: scrollController), | ||
| 149 | + )), | ||
| 150 | + ListTile( | ||
| 151 | + title: Text('Cupertino Small Modal forzed to expand'), | ||
| 152 | + onTap: () => showCupertinoModalBottomSheet( | ||
| 153 | + expand: true, | ||
| 154 | + context: context, | ||
| 155 | + backgroundColor: Colors.transparent, | ||
| 156 | + builder: (context, scrollController) => | ||
| 157 | + ModalFit( | ||
| 158 | + scrollController: scrollController), | ||
| 159 | + )), | ||
| 160 | + ListTile( | ||
| 161 | + title: Text('Cupertino Modal inside modal'), | ||
| 162 | + onTap: () => | ||
| 163 | + showCupertinoModalBottomSheet( | ||
| 164 | + expand: true, | ||
| 165 | + context: context, | ||
| 166 | + backgroundColor: Colors.transparent, | ||
| 167 | + builder: (context, scrollController) => | ||
| 168 | + ModalInsideModal( | ||
| 169 | + scrollController: scrollController), | ||
| 170 | + )), | ||
| 171 | + ListTile( | ||
| 172 | + title: | ||
| 173 | + Text('Cupertino Navigator + Scroll + WillScope'), | ||
| 174 | + onTap: () => showCupertinoModalBottomSheet( | ||
| 175 | + expand: true, | ||
| 176 | + context: context, | ||
| 177 | + backgroundColor: Colors.transparent, | ||
| 178 | + builder: (context, scrollController) => | ||
| 179 | + ComplexModal( | ||
| 180 | + scrollController: scrollController), | ||
| 181 | + )), | ||
| 182 | + ListTile( | ||
| 183 | + title: Text('Cupertino Modal with WillScope'), | ||
| 184 | + onTap: () => showCupertinoModalBottomSheet( | ||
| 185 | + expand: true, | ||
| 186 | + context: context, | ||
| 187 | + backgroundColor: Colors.transparent, | ||
| 188 | + builder: (context, scrollController) => | ||
| 189 | + ModalWillScope( | ||
| 190 | + scrollController: scrollController), | ||
| 191 | + )), | ||
| 192 | + ], | ||
| 193 | + ), | ||
| 194 | + ), | ||
| 195 | + ), | ||
| 196 | + ), | ||
| 197 | + | ||
| 198 | + ), | ||
| 199 | + ); | ||
| 200 | + } | ||
| 201 | +} |
example/lib/modals/circular_modal.dart
0 → 100644
| 1 | +import 'dart:math'; | ||
| 2 | + | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:flutter/services.dart'; | ||
| 5 | +import 'package:flutter/widgets.dart'; | ||
| 6 | +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
| 7 | + | ||
| 8 | +class AvatarBottomSheet extends StatelessWidget { | ||
| 9 | + final Widget child; | ||
| 10 | + final Animation<double> animation; | ||
| 11 | + | ||
| 12 | + const AvatarBottomSheet({Key key, this.child, this.animation}) | ||
| 13 | + : super(key: key); | ||
| 14 | + | ||
| 15 | + @override | ||
| 16 | + Widget build(BuildContext context) { | ||
| 17 | + return AnnotatedRegion<SystemUiOverlayStyle>( | ||
| 18 | + value: SystemUiOverlayStyle.light, | ||
| 19 | + child: Column( | ||
| 20 | + mainAxisSize: MainAxisSize.min, | ||
| 21 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 22 | + children: [ | ||
| 23 | + SizedBox(height: 12), | ||
| 24 | + SafeArea( | ||
| 25 | + bottom: false, | ||
| 26 | + child: AnimatedBuilder( | ||
| 27 | + animation: animation, | ||
| 28 | + builder: (context, child) => Transform.translate( | ||
| 29 | + offset: Offset(0, (1 - animation.value) * 100), | ||
| 30 | + child: Opacity( | ||
| 31 | + child: child, opacity: max(0, animation.value * 2 - 1))), | ||
| 32 | + child: Row( | ||
| 33 | + children: <Widget>[ | ||
| 34 | + SizedBox(width: 20), | ||
| 35 | + CircleAvatar( | ||
| 36 | + child: Text('JB'), | ||
| 37 | + radius: 32, | ||
| 38 | + ), | ||
| 39 | + ], | ||
| 40 | + ), | ||
| 41 | + )), | ||
| 42 | + SizedBox(height: 12), | ||
| 43 | + Flexible( | ||
| 44 | + flex: 1, | ||
| 45 | + fit: FlexFit.loose, | ||
| 46 | + child: ClipRRect( | ||
| 47 | + borderRadius: BorderRadius.only( | ||
| 48 | + topLeft: Radius.circular(15), | ||
| 49 | + topRight: Radius.circular(15)), | ||
| 50 | + child: Container( | ||
| 51 | + decoration: BoxDecoration( | ||
| 52 | + color: Theme.of(context).scaffoldBackgroundColor, | ||
| 53 | + boxShadow: [ | ||
| 54 | + BoxShadow( | ||
| 55 | + blurRadius: 10, | ||
| 56 | + color: Colors.black12, | ||
| 57 | + spreadRadius: 5) | ||
| 58 | + ]), | ||
| 59 | + width: double.infinity, | ||
| 60 | + child: MediaQuery.removePadding( | ||
| 61 | + context: context, removeTop: true, child: child)), | ||
| 62 | + ), | ||
| 63 | + ), | ||
| 64 | + ]), | ||
| 65 | + ); | ||
| 66 | + } | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | +Future<T> showAvatarModalBottomSheet<T>({ | ||
| 70 | + @required BuildContext context, | ||
| 71 | + @required ScrollWidgetBuilder builder, | ||
| 72 | + Color backgroundColor, | ||
| 73 | + double elevation, | ||
| 74 | + ShapeBorder shape, | ||
| 75 | + Clip clipBehavior, | ||
| 76 | + Color barrierColor = Colors.black87, | ||
| 77 | + bool bounce = true, | ||
| 78 | + bool expand = false, | ||
| 79 | + AnimationController secondAnimation, | ||
| 80 | + bool useRootNavigator = false, | ||
| 81 | + bool isDismissible = true, | ||
| 82 | + bool enableDrag = true, | ||
| 83 | +}) async { | ||
| 84 | + assert(context != null); | ||
| 85 | + assert(builder != null); | ||
| 86 | + assert(expand != null); | ||
| 87 | + assert(useRootNavigator != null); | ||
| 88 | + assert(isDismissible != null); | ||
| 89 | + assert(enableDrag != null); | ||
| 90 | + assert(debugCheckHasMediaQuery(context)); | ||
| 91 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 92 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 93 | + .push(ModalBottomSheetRoute<T>( | ||
| 94 | + builder: builder, | ||
| 95 | + containerBuilder: (_, animation, child) => AvatarBottomSheet( | ||
| 96 | + child: child, | ||
| 97 | + animation: animation, | ||
| 98 | + ), | ||
| 99 | + bounce: bounce, | ||
| 100 | + secondAnimationController: secondAnimation, | ||
| 101 | + expanded: expand, | ||
| 102 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 103 | + isDismissible: isDismissible, | ||
| 104 | + modalBarrierColor: barrierColor, | ||
| 105 | + enableDrag: enableDrag, | ||
| 106 | + )); | ||
| 107 | + return result; | ||
| 108 | +} |
example/lib/modals/modal_complex_all.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class ComplexModal extends StatelessWidget { | ||
| 5 | + final ScrollController scrollController; | ||
| 6 | + | ||
| 7 | + const ComplexModal({Key key, this.scrollController}) : super(key: key); | ||
| 8 | + | ||
| 9 | + @override | ||
| 10 | + Widget build(BuildContext context) { | ||
| 11 | + return Material( | ||
| 12 | + child: WillPopScope( | ||
| 13 | + onWillPop: () async { | ||
| 14 | + bool shouldClose = true; | ||
| 15 | + await showCupertinoDialog( | ||
| 16 | + context: context, | ||
| 17 | + builder: (context) => CupertinoAlertDialog( | ||
| 18 | + title: Text('Should Close?'), | ||
| 19 | + actions: <Widget>[ | ||
| 20 | + CupertinoButton( | ||
| 21 | + child: Text('Yes'), | ||
| 22 | + onPressed: () { | ||
| 23 | + shouldClose = true; | ||
| 24 | + Navigator.of(context).pop(); | ||
| 25 | + }, | ||
| 26 | + ), | ||
| 27 | + CupertinoButton( | ||
| 28 | + child: Text('No'), | ||
| 29 | + onPressed: () { | ||
| 30 | + shouldClose = false; | ||
| 31 | + Navigator.of(context).pop(); | ||
| 32 | + }, | ||
| 33 | + ), | ||
| 34 | + ], | ||
| 35 | + )); | ||
| 36 | + print('hello'); | ||
| 37 | + return shouldClose; | ||
| 38 | + }, | ||
| 39 | + child: Navigator( | ||
| 40 | + onGenerateRoute: (_) => MaterialPageRoute( | ||
| 41 | + builder: (context) => Builder( | ||
| 42 | + builder: (context) => CupertinoPageScaffold( | ||
| 43 | + navigationBar: CupertinoNavigationBar( | ||
| 44 | + leading: Container(), middle: Text('Modal Page')), | ||
| 45 | + child: SafeArea( | ||
| 46 | + bottom: false, | ||
| 47 | + child: ListView( | ||
| 48 | + shrinkWrap: true, | ||
| 49 | + controller: scrollController, | ||
| 50 | + children: ListTile.divideTiles( | ||
| 51 | + context: context, | ||
| 52 | + tiles: List.generate( | ||
| 53 | + 100, | ||
| 54 | + (index) => ListTile( | ||
| 55 | + title: Text('Item'), | ||
| 56 | + onTap: () { | ||
| 57 | + Navigator.of(context).push(MaterialPageRoute( | ||
| 58 | + builder: (context) => | ||
| 59 | + CupertinoPageScaffold( | ||
| 60 | + navigationBar: | ||
| 61 | + CupertinoNavigationBar( | ||
| 62 | + middle: Text('New Page'), | ||
| 63 | + ), | ||
| 64 | + child: Stack( | ||
| 65 | + fit: StackFit.expand, | ||
| 66 | + children: <Widget>[], | ||
| 67 | + )))); | ||
| 68 | + }, | ||
| 69 | + )), | ||
| 70 | + ).toList(), | ||
| 71 | + ), | ||
| 72 | + ), | ||
| 73 | + ), | ||
| 74 | + ), | ||
| 75 | + ), | ||
| 76 | + ), | ||
| 77 | + ), | ||
| 78 | + ); | ||
| 79 | + } | ||
| 80 | +} |
example/lib/modals/modal_fit.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class ModalFit extends StatelessWidget { | ||
| 5 | + final ScrollController scrollController; | ||
| 6 | + | ||
| 7 | + const ModalFit({Key key, this.scrollController}) : super(key: key); | ||
| 8 | + | ||
| 9 | + @override | ||
| 10 | + Widget build(BuildContext context) { | ||
| 11 | + return Material( | ||
| 12 | + child: SafeArea( | ||
| 13 | + top: false, | ||
| 14 | + child: Column( | ||
| 15 | + mainAxisSize: MainAxisSize.min, | ||
| 16 | + children: <Widget>[ | ||
| 17 | + ListTile( | ||
| 18 | + title: Text('Edit'), | ||
| 19 | + leading: Icon(Icons.edit), | ||
| 20 | + onTap: () => Navigator.of(context).pop(), | ||
| 21 | + ), | ||
| 22 | + ListTile( | ||
| 23 | + title: Text('Copy'), | ||
| 24 | + leading: Icon(Icons.content_copy), | ||
| 25 | + onTap: () => Navigator.of(context).pop(), | ||
| 26 | + ), | ||
| 27 | + ListTile( | ||
| 28 | + title: Text('Cut'), | ||
| 29 | + leading: Icon(Icons.content_cut), | ||
| 30 | + onTap: () => Navigator.of(context).pop(), | ||
| 31 | + ), | ||
| 32 | + ListTile( | ||
| 33 | + title: Text('Move'), | ||
| 34 | + leading: Icon(Icons.folder_open), | ||
| 35 | + onTap: () => Navigator.of(context).pop(), | ||
| 36 | + ), | ||
| 37 | + ListTile( | ||
| 38 | + title: Text('Delete'), | ||
| 39 | + leading: Icon(Icons.delete), | ||
| 40 | + onTap: () => Navigator.of(context).pop(), | ||
| 41 | + ) | ||
| 42 | + ], | ||
| 43 | + ), | ||
| 44 | + )); | ||
| 45 | + } | ||
| 46 | +} |
example/lib/modals/modal_inside_modal.dart
0 → 100644
| 1 | + | ||
| 2 | +import 'package:flutter/cupertino.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
| 5 | + | ||
| 6 | +import 'modal_with_scroll.dart'; | ||
| 7 | + | ||
| 8 | +class ModalInsideModal extends StatelessWidget { | ||
| 9 | + final ScrollController scrollController; | ||
| 10 | + | ||
| 11 | + const ModalInsideModal({Key key, this.scrollController}) : super(key: key); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + Widget build(BuildContext context) { | ||
| 15 | + return Material(child:CupertinoPageScaffold( | ||
| 16 | + navigationBar: CupertinoNavigationBar( | ||
| 17 | + leading: Container(), middle: Text('Modal Page')), | ||
| 18 | + child: SafeArea( | ||
| 19 | + bottom: false, | ||
| 20 | + child: ListView( | ||
| 21 | + shrinkWrap: true, | ||
| 22 | + controller: scrollController, | ||
| 23 | + physics: BouncingScrollPhysics(), | ||
| 24 | + children: ListTile.divideTiles( | ||
| 25 | + context: context, | ||
| 26 | + tiles: List.generate( | ||
| 27 | + 100, | ||
| 28 | + (index) => ListTile( | ||
| 29 | + title: Text('Item'), | ||
| 30 | + onTap: () => showCupertinoModalBottomSheet( | ||
| 31 | + expand: true, | ||
| 32 | + isDismissible: false, | ||
| 33 | + context: context, | ||
| 34 | + backgroundColor: Colors.transparent, | ||
| 35 | + builder: (context, scrollController) => | ||
| 36 | + ModalInsideModal(scrollController: scrollController), | ||
| 37 | + )), | ||
| 38 | + | ||
| 39 | + ) | ||
| 40 | + ).toList(), | ||
| 41 | + ), | ||
| 42 | + ), | ||
| 43 | + )); | ||
| 44 | + } | ||
| 45 | +} | ||
| 46 | + |
example/lib/modals/modal_simple.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | +class SimpleModal extends StatelessWidget { | ||
| 4 | + final ScrollController scrollController; | ||
| 5 | + | ||
| 6 | + const SimpleModal({Key key, this.scrollController}) : super(key: key); | ||
| 7 | + | ||
| 8 | + @override | ||
| 9 | + Widget build(BuildContext context) { | ||
| 10 | + return Material(child:CupertinoPageScaffold( | ||
| 11 | + navigationBar: CupertinoNavigationBar( | ||
| 12 | + leading: Container(), middle: Text('Modal Page')), | ||
| 13 | + child: Center(), | ||
| 14 | + )); | ||
| 15 | + } | ||
| 16 | +} |
example/lib/modals/modal_will_scope.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class ModalWillScope extends StatelessWidget { | ||
| 5 | + final ScrollController scrollController; | ||
| 6 | + | ||
| 7 | + const ModalWillScope({Key key, this.scrollController}) : super(key: key); | ||
| 8 | + | ||
| 9 | + @override | ||
| 10 | + Widget build(BuildContext context) { | ||
| 11 | + return Material(child: WillPopScope( | ||
| 12 | + onWillPop: () async { | ||
| 13 | + bool shouldClose = true; | ||
| 14 | + await showCupertinoDialog( | ||
| 15 | + context: context, | ||
| 16 | + builder: (context) => CupertinoAlertDialog( | ||
| 17 | + title: Text('Should Close?'), | ||
| 18 | + actions: <Widget>[ | ||
| 19 | + CupertinoButton( | ||
| 20 | + child: Text('Yes'), | ||
| 21 | + onPressed: () { | ||
| 22 | + shouldClose = true; | ||
| 23 | + Navigator.of(context).pop(); | ||
| 24 | + }, | ||
| 25 | + ), | ||
| 26 | + CupertinoButton( | ||
| 27 | + child: Text('No'), | ||
| 28 | + onPressed: () { | ||
| 29 | + shouldClose = false; | ||
| 30 | + Navigator.of(context).pop(); | ||
| 31 | + }, | ||
| 32 | + ), | ||
| 33 | + ], | ||
| 34 | + )); | ||
| 35 | + print('hello'); | ||
| 36 | + return shouldClose; | ||
| 37 | + }, | ||
| 38 | + child: CupertinoPageScaffold( | ||
| 39 | + navigationBar: CupertinoNavigationBar( | ||
| 40 | + leading: Container(), middle: Text('Modal Page')), | ||
| 41 | + child: Center(), | ||
| 42 | + ), | ||
| 43 | + )); | ||
| 44 | + } | ||
| 45 | +} |
example/lib/modals/modal_with_navigator.dart
0 → 100644
| 1 | + | ||
| 2 | +import 'package:flutter/cupertino.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | + | ||
| 5 | +class ModalWithNavigator extends StatelessWidget { | ||
| 6 | + final ScrollController scrollController; | ||
| 7 | + | ||
| 8 | + const ModalWithNavigator({Key key, this.scrollController}) : super(key: key); | ||
| 9 | + | ||
| 10 | + @override | ||
| 11 | + Widget build(BuildContext context) { | ||
| 12 | + return Material( child: Navigator( | ||
| 13 | + onGenerateRoute: (_) => MaterialPageRoute( | ||
| 14 | + builder: (context) => Builder( | ||
| 15 | + builder: (context) => CupertinoPageScaffold( | ||
| 16 | + navigationBar: CupertinoNavigationBar( | ||
| 17 | + leading: Container(), middle: Text('Modal Page')), | ||
| 18 | + child: SafeArea( | ||
| 19 | + bottom: false, | ||
| 20 | + child: ListView( | ||
| 21 | + shrinkWrap: true, | ||
| 22 | + controller: scrollController, | ||
| 23 | + children: ListTile.divideTiles( | ||
| 24 | + context: context, | ||
| 25 | + tiles: List.generate( | ||
| 26 | + 100, | ||
| 27 | + (index) => ListTile( | ||
| 28 | + title: Text('Item'), | ||
| 29 | + onTap: () { | ||
| 30 | + Navigator.of(context).push( | ||
| 31 | + MaterialPageRoute( | ||
| 32 | + builder: (context) => | ||
| 33 | + CupertinoPageScaffold( | ||
| 34 | + navigationBar: | ||
| 35 | + CupertinoNavigationBar( | ||
| 36 | + middle: Text( | ||
| 37 | + 'New Page'), | ||
| 38 | + ), | ||
| 39 | + child: Stack( | ||
| 40 | + fit: | ||
| 41 | + StackFit.expand, | ||
| 42 | + children: < | ||
| 43 | + Widget>[], | ||
| 44 | + )))); | ||
| 45 | + }, | ||
| 46 | + )), | ||
| 47 | + ).toList(), | ||
| 48 | + ), | ||
| 49 | + ), | ||
| 50 | + ), | ||
| 51 | + ), | ||
| 52 | + ),) | ||
| 53 | + ); | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | + |
example/lib/modals/modal_with_scroll.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class ModalWithScroll extends StatelessWidget { | ||
| 5 | + final ScrollController scrollController; | ||
| 6 | + | ||
| 7 | + const ModalWithScroll({Key key, this.scrollController}) : super(key: key); | ||
| 8 | + | ||
| 9 | + @override | ||
| 10 | + Widget build(BuildContext context) { | ||
| 11 | + return Material( | ||
| 12 | + child: CupertinoPageScaffold( | ||
| 13 | + navigationBar: CupertinoNavigationBar( | ||
| 14 | + leading: Container(), middle: Text('Modal Page')), | ||
| 15 | + child: SafeArea( | ||
| 16 | + bottom: false, | ||
| 17 | + child: ListView( | ||
| 18 | + shrinkWrap: true, | ||
| 19 | + controller: scrollController, | ||
| 20 | + children: ListTile.divideTiles( | ||
| 21 | + context: context, | ||
| 22 | + tiles: List.generate( | ||
| 23 | + 100, | ||
| 24 | + (index) => ListTile( | ||
| 25 | + title: Text('Item'), | ||
| 26 | + )), | ||
| 27 | + ).toList(), | ||
| 28 | + ), | ||
| 29 | + ), | ||
| 30 | + ), | ||
| 31 | + ); | ||
| 32 | + } | ||
| 33 | +} |
example/macos/.gitignore
0 → 100644
example/macos/Flutter/Flutter-Debug.xcconfig
0 → 100644
| 1 | +#include "ephemeral/Flutter-Generated.xcconfig" |
| 1 | +#include "ephemeral/Flutter-Generated.xcconfig" |
| 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 | + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; }; | ||
| 30 | + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
| 31 | + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; }; | ||
| 32 | + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
| 33 | +/* End PBXBuildFile section */ | ||
| 34 | + | ||
| 35 | +/* Begin PBXContainerItemProxy section */ | ||
| 36 | + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { | ||
| 37 | + isa = PBXContainerItemProxy; | ||
| 38 | + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; | ||
| 39 | + proxyType = 1; | ||
| 40 | + remoteGlobalIDString = 33CC111A2044C6BA0003C045; | ||
| 41 | + remoteInfo = FLX; | ||
| 42 | + }; | ||
| 43 | +/* End PBXContainerItemProxy section */ | ||
| 44 | + | ||
| 45 | +/* Begin PBXCopyFilesBuildPhase section */ | ||
| 46 | + 33CC110E2044A8840003C045 /* Bundle Framework */ = { | ||
| 47 | + isa = PBXCopyFilesBuildPhase; | ||
| 48 | + buildActionMask = 2147483647; | ||
| 49 | + dstPath = ""; | ||
| 50 | + dstSubfolderSpec = 10; | ||
| 51 | + files = ( | ||
| 52 | + D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */, | ||
| 53 | + 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */, | ||
| 54 | + ); | ||
| 55 | + name = "Bundle Framework"; | ||
| 56 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 57 | + }; | ||
| 58 | +/* End PBXCopyFilesBuildPhase section */ | ||
| 59 | + | ||
| 60 | +/* Begin PBXFileReference section */ | ||
| 61 | + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; | ||
| 62 | + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; | ||
| 63 | + 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 64 | + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | ||
| 65 | + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; | ||
| 66 | + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; | ||
| 67 | + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; }; | ||
| 68 | + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; }; | ||
| 69 | + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 70 | + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; }; | ||
| 71 | + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; }; | ||
| 72 | + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FlutterMacOS.framework; path = Flutter/ephemeral/FlutterMacOS.framework; sourceTree = SOURCE_ROOT; }; | ||
| 73 | + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; | ||
| 74 | + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; | ||
| 75 | + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; | ||
| 76 | + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; | ||
| 77 | + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; | ||
| 78 | + D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; }; | ||
| 79 | +/* End PBXFileReference section */ | ||
| 80 | + | ||
| 81 | +/* Begin PBXFrameworksBuildPhase section */ | ||
| 82 | + 33CC10EA2044A3C60003C045 /* Frameworks */ = { | ||
| 83 | + isa = PBXFrameworksBuildPhase; | ||
| 84 | + buildActionMask = 2147483647; | ||
| 85 | + files = ( | ||
| 86 | + D73912F022F37F9E000D13A0 /* App.framework in Frameworks */, | ||
| 87 | + 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */, | ||
| 88 | + ); | ||
| 89 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 90 | + }; | ||
| 91 | +/* End PBXFrameworksBuildPhase section */ | ||
| 92 | + | ||
| 93 | +/* Begin PBXGroup section */ | ||
| 94 | + 33BA886A226E78AF003329D5 /* Configs */ = { | ||
| 95 | + isa = PBXGroup; | ||
| 96 | + children = ( | ||
| 97 | + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, | ||
| 98 | + 9740EEB21CF90195004384FC /* Debug.xcconfig */, | ||
| 99 | + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, | ||
| 100 | + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, | ||
| 101 | + ); | ||
| 102 | + path = Configs; | ||
| 103 | + sourceTree = "<group>"; | ||
| 104 | + }; | ||
| 105 | + 33CC10E42044A3C60003C045 = { | ||
| 106 | + isa = PBXGroup; | ||
| 107 | + children = ( | ||
| 108 | + 33FAB671232836740065AC1E /* Runner */, | ||
| 109 | + 33CEB47122A05771004F2AC0 /* Flutter */, | ||
| 110 | + 33CC10EE2044A3C60003C045 /* Products */, | ||
| 111 | + D73912EC22F37F3D000D13A0 /* Frameworks */, | ||
| 112 | + ); | ||
| 113 | + sourceTree = "<group>"; | ||
| 114 | + }; | ||
| 115 | + 33CC10EE2044A3C60003C045 /* Products */ = { | ||
| 116 | + isa = PBXGroup; | ||
| 117 | + children = ( | ||
| 118 | + 33CC10ED2044A3C60003C045 /* example.app */, | ||
| 119 | + ); | ||
| 120 | + name = Products; | ||
| 121 | + sourceTree = "<group>"; | ||
| 122 | + }; | ||
| 123 | + 33CC11242044D66E0003C045 /* Resources */ = { | ||
| 124 | + isa = PBXGroup; | ||
| 125 | + children = ( | ||
| 126 | + 33CC10F22044A3C60003C045 /* Assets.xcassets */, | ||
| 127 | + 33CC10F42044A3C60003C045 /* MainMenu.xib */, | ||
| 128 | + 33CC10F72044A3C60003C045 /* Info.plist */, | ||
| 129 | + ); | ||
| 130 | + name = Resources; | ||
| 131 | + path = ..; | ||
| 132 | + sourceTree = "<group>"; | ||
| 133 | + }; | ||
| 134 | + 33CEB47122A05771004F2AC0 /* Flutter */ = { | ||
| 135 | + isa = PBXGroup; | ||
| 136 | + children = ( | ||
| 137 | + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, | ||
| 138 | + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, | ||
| 139 | + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, | ||
| 140 | + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, | ||
| 141 | + D73912EF22F37F9E000D13A0 /* App.framework */, | ||
| 142 | + 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */, | ||
| 143 | + ); | ||
| 144 | + path = Flutter; | ||
| 145 | + sourceTree = "<group>"; | ||
| 146 | + }; | ||
| 147 | + 33FAB671232836740065AC1E /* Runner */ = { | ||
| 148 | + isa = PBXGroup; | ||
| 149 | + children = ( | ||
| 150 | + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, | ||
| 151 | + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, | ||
| 152 | + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, | ||
| 153 | + 33E51914231749380026EE4D /* Release.entitlements */, | ||
| 154 | + 33CC11242044D66E0003C045 /* Resources */, | ||
| 155 | + 33BA886A226E78AF003329D5 /* Configs */, | ||
| 156 | + ); | ||
| 157 | + path = Runner; | ||
| 158 | + sourceTree = "<group>"; | ||
| 159 | + }; | ||
| 160 | + D73912EC22F37F3D000D13A0 /* Frameworks */ = { | ||
| 161 | + isa = PBXGroup; | ||
| 162 | + children = ( | ||
| 163 | + ); | ||
| 164 | + name = Frameworks; | ||
| 165 | + sourceTree = "<group>"; | ||
| 166 | + }; | ||
| 167 | +/* End PBXGroup section */ | ||
| 168 | + | ||
| 169 | +/* Begin PBXNativeTarget section */ | ||
| 170 | + 33CC10EC2044A3C60003C045 /* Runner */ = { | ||
| 171 | + isa = PBXNativeTarget; | ||
| 172 | + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; | ||
| 173 | + buildPhases = ( | ||
| 174 | + 33CC10E92044A3C60003C045 /* Sources */, | ||
| 175 | + 33CC10EA2044A3C60003C045 /* Frameworks */, | ||
| 176 | + 33CC10EB2044A3C60003C045 /* Resources */, | ||
| 177 | + 33CC110E2044A8840003C045 /* Bundle Framework */, | ||
| 178 | + 3399D490228B24CF009A79C7 /* ShellScript */, | ||
| 179 | + ); | ||
| 180 | + buildRules = ( | ||
| 181 | + ); | ||
| 182 | + dependencies = ( | ||
| 183 | + 33CC11202044C79F0003C045 /* PBXTargetDependency */, | ||
| 184 | + ); | ||
| 185 | + name = Runner; | ||
| 186 | + productName = Runner; | ||
| 187 | + productReference = 33CC10ED2044A3C60003C045 /* example.app */; | ||
| 188 | + productType = "com.apple.product-type.application"; | ||
| 189 | + }; | ||
| 190 | +/* End PBXNativeTarget section */ | ||
| 191 | + | ||
| 192 | +/* Begin PBXProject section */ | ||
| 193 | + 33CC10E52044A3C60003C045 /* Project object */ = { | ||
| 194 | + isa = PBXProject; | ||
| 195 | + attributes = { | ||
| 196 | + LastSwiftUpdateCheck = 0920; | ||
| 197 | + LastUpgradeCheck = 0930; | ||
| 198 | + ORGANIZATIONNAME = "The Flutter Authors"; | ||
| 199 | + TargetAttributes = { | ||
| 200 | + 33CC10EC2044A3C60003C045 = { | ||
| 201 | + CreatedOnToolsVersion = 9.2; | ||
| 202 | + LastSwiftMigration = 1100; | ||
| 203 | + ProvisioningStyle = Automatic; | ||
| 204 | + SystemCapabilities = { | ||
| 205 | + com.apple.Sandbox = { | ||
| 206 | + enabled = 1; | ||
| 207 | + }; | ||
| 208 | + }; | ||
| 209 | + }; | ||
| 210 | + 33CC111A2044C6BA0003C045 = { | ||
| 211 | + CreatedOnToolsVersion = 9.2; | ||
| 212 | + ProvisioningStyle = Manual; | ||
| 213 | + }; | ||
| 214 | + }; | ||
| 215 | + }; | ||
| 216 | + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; | ||
| 217 | + compatibilityVersion = "Xcode 8.0"; | ||
| 218 | + developmentRegion = en; | ||
| 219 | + hasScannedForEncodings = 0; | ||
| 220 | + knownRegions = ( | ||
| 221 | + en, | ||
| 222 | + Base, | ||
| 223 | + ); | ||
| 224 | + mainGroup = 33CC10E42044A3C60003C045; | ||
| 225 | + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; | ||
| 226 | + projectDirPath = ""; | ||
| 227 | + projectRoot = ""; | ||
| 228 | + targets = ( | ||
| 229 | + 33CC10EC2044A3C60003C045 /* Runner */, | ||
| 230 | + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, | ||
| 231 | + ); | ||
| 232 | + }; | ||
| 233 | +/* End PBXProject section */ | ||
| 234 | + | ||
| 235 | +/* Begin PBXResourcesBuildPhase section */ | ||
| 236 | + 33CC10EB2044A3C60003C045 /* Resources */ = { | ||
| 237 | + isa = PBXResourcesBuildPhase; | ||
| 238 | + buildActionMask = 2147483647; | ||
| 239 | + files = ( | ||
| 240 | + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, | ||
| 241 | + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, | ||
| 242 | + ); | ||
| 243 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 244 | + }; | ||
| 245 | +/* End PBXResourcesBuildPhase section */ | ||
| 246 | + | ||
| 247 | +/* Begin PBXShellScriptBuildPhase section */ | ||
| 248 | + 3399D490228B24CF009A79C7 /* ShellScript */ = { | ||
| 249 | + isa = PBXShellScriptBuildPhase; | ||
| 250 | + buildActionMask = 2147483647; | ||
| 251 | + files = ( | ||
| 252 | + ); | ||
| 253 | + inputFileListPaths = ( | ||
| 254 | + ); | ||
| 255 | + inputPaths = ( | ||
| 256 | + ); | ||
| 257 | + outputFileListPaths = ( | ||
| 258 | + ); | ||
| 259 | + outputPaths = ( | ||
| 260 | + ); | ||
| 261 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 262 | + shellPath = /bin/sh; | ||
| 263 | + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n"; | ||
| 264 | + }; | ||
| 265 | + 33CC111E2044C6BF0003C045 /* ShellScript */ = { | ||
| 266 | + isa = PBXShellScriptBuildPhase; | ||
| 267 | + buildActionMask = 2147483647; | ||
| 268 | + files = ( | ||
| 269 | + ); | ||
| 270 | + inputFileListPaths = ( | ||
| 271 | + Flutter/ephemeral/FlutterInputs.xcfilelist, | ||
| 272 | + ); | ||
| 273 | + inputPaths = ( | ||
| 274 | + Flutter/ephemeral/tripwire, | ||
| 275 | + ); | ||
| 276 | + outputFileListPaths = ( | ||
| 277 | + Flutter/ephemeral/FlutterOutputs.xcfilelist, | ||
| 278 | + ); | ||
| 279 | + outputPaths = ( | ||
| 280 | + ); | ||
| 281 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 282 | + shellPath = /bin/sh; | ||
| 283 | + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n"; | ||
| 284 | + }; | ||
| 285 | +/* End PBXShellScriptBuildPhase section */ | ||
| 286 | + | ||
| 287 | +/* Begin PBXSourcesBuildPhase section */ | ||
| 288 | + 33CC10E92044A3C60003C045 /* Sources */ = { | ||
| 289 | + isa = PBXSourcesBuildPhase; | ||
| 290 | + buildActionMask = 2147483647; | ||
| 291 | + files = ( | ||
| 292 | + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, | ||
| 293 | + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, | ||
| 294 | + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, | ||
| 295 | + ); | ||
| 296 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 297 | + }; | ||
| 298 | +/* End PBXSourcesBuildPhase section */ | ||
| 299 | + | ||
| 300 | +/* Begin PBXTargetDependency section */ | ||
| 301 | + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { | ||
| 302 | + isa = PBXTargetDependency; | ||
| 303 | + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; | ||
| 304 | + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; | ||
| 305 | + }; | ||
| 306 | +/* End PBXTargetDependency section */ | ||
| 307 | + | ||
| 308 | +/* Begin PBXVariantGroup section */ | ||
| 309 | + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { | ||
| 310 | + isa = PBXVariantGroup; | ||
| 311 | + children = ( | ||
| 312 | + 33CC10F52044A3C60003C045 /* Base */, | ||
| 313 | + ); | ||
| 314 | + name = MainMenu.xib; | ||
| 315 | + path = Runner; | ||
| 316 | + sourceTree = "<group>"; | ||
| 317 | + }; | ||
| 318 | +/* End PBXVariantGroup section */ | ||
| 319 | + | ||
| 320 | +/* Begin XCBuildConfiguration section */ | ||
| 321 | + 338D0CE9231458BD00FA5F75 /* Profile */ = { | ||
| 322 | + isa = XCBuildConfiguration; | ||
| 323 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 324 | + buildSettings = { | ||
| 325 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 326 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 327 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 328 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 329 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 330 | + CLANG_ENABLE_MODULES = YES; | ||
| 331 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 332 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 333 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 334 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 335 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 336 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 337 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 338 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 339 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 340 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 341 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 342 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 343 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 344 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 345 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 346 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 347 | + CODE_SIGN_IDENTITY = "-"; | ||
| 348 | + COPY_PHASE_STRIP = NO; | ||
| 349 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 350 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 351 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 352 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 353 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 354 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 355 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 356 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 357 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 358 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 359 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
| 360 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 361 | + SDKROOT = macosx; | ||
| 362 | + SWIFT_COMPILATION_MODE = wholemodule; | ||
| 363 | + SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
| 364 | + }; | ||
| 365 | + name = Profile; | ||
| 366 | + }; | ||
| 367 | + 338D0CEA231458BD00FA5F75 /* Profile */ = { | ||
| 368 | + isa = XCBuildConfiguration; | ||
| 369 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 370 | + buildSettings = { | ||
| 371 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 372 | + CLANG_ENABLE_MODULES = YES; | ||
| 373 | + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
| 374 | + CODE_SIGN_STYLE = Automatic; | ||
| 375 | + COMBINE_HIDPI_IMAGES = YES; | ||
| 376 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 377 | + "$(inherited)", | ||
| 378 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
| 379 | + ); | ||
| 380 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 381 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
| 382 | + "$(inherited)", | ||
| 383 | + "@executable_path/../Frameworks", | ||
| 384 | + ); | ||
| 385 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 386 | + SWIFT_VERSION = 5.0; | ||
| 387 | + }; | ||
| 388 | + name = Profile; | ||
| 389 | + }; | ||
| 390 | + 338D0CEB231458BD00FA5F75 /* Profile */ = { | ||
| 391 | + isa = XCBuildConfiguration; | ||
| 392 | + buildSettings = { | ||
| 393 | + CODE_SIGN_STYLE = Manual; | ||
| 394 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 395 | + }; | ||
| 396 | + name = Profile; | ||
| 397 | + }; | ||
| 398 | + 33CC10F92044A3C60003C045 /* Debug */ = { | ||
| 399 | + isa = XCBuildConfiguration; | ||
| 400 | + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||
| 401 | + buildSettings = { | ||
| 402 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 403 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 404 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 405 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 406 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 407 | + CLANG_ENABLE_MODULES = YES; | ||
| 408 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 409 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 410 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 411 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 412 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 413 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 414 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 415 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 416 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 417 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 418 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 419 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 420 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 421 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 422 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 423 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 424 | + CODE_SIGN_IDENTITY = "-"; | ||
| 425 | + COPY_PHASE_STRIP = NO; | ||
| 426 | + DEBUG_INFORMATION_FORMAT = dwarf; | ||
| 427 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 428 | + ENABLE_TESTABILITY = YES; | ||
| 429 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 430 | + GCC_DYNAMIC_NO_PIC = NO; | ||
| 431 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 432 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
| 433 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 434 | + "DEBUG=1", | ||
| 435 | + "$(inherited)", | ||
| 436 | + ); | ||
| 437 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 438 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 439 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 440 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 441 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 442 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
| 443 | + MTL_ENABLE_DEBUG_INFO = YES; | ||
| 444 | + ONLY_ACTIVE_ARCH = YES; | ||
| 445 | + SDKROOT = macosx; | ||
| 446 | + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; | ||
| 447 | + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| 448 | + }; | ||
| 449 | + name = Debug; | ||
| 450 | + }; | ||
| 451 | + 33CC10FA2044A3C60003C045 /* Release */ = { | ||
| 452 | + isa = XCBuildConfiguration; | ||
| 453 | + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 454 | + buildSettings = { | ||
| 455 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 456 | + CLANG_ANALYZER_NONNULL = YES; | ||
| 457 | + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 458 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 459 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 460 | + CLANG_ENABLE_MODULES = YES; | ||
| 461 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 462 | + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 463 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 464 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 465 | + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 466 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 467 | + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 468 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 469 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 470 | + CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 471 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 472 | + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 473 | + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 474 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 475 | + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 476 | + CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 477 | + CODE_SIGN_IDENTITY = "-"; | ||
| 478 | + COPY_PHASE_STRIP = NO; | ||
| 479 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 480 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 481 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 482 | + GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 483 | + GCC_NO_COMMON_BLOCKS = YES; | ||
| 484 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 485 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 486 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 487 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 488 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 489 | + MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
| 490 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 491 | + SDKROOT = macosx; | ||
| 492 | + SWIFT_COMPILATION_MODE = wholemodule; | ||
| 493 | + SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
| 494 | + }; | ||
| 495 | + name = Release; | ||
| 496 | + }; | ||
| 497 | + 33CC10FC2044A3C60003C045 /* Debug */ = { | ||
| 498 | + isa = XCBuildConfiguration; | ||
| 499 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 500 | + buildSettings = { | ||
| 501 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 502 | + CLANG_ENABLE_MODULES = YES; | ||
| 503 | + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
| 504 | + CODE_SIGN_STYLE = Automatic; | ||
| 505 | + COMBINE_HIDPI_IMAGES = YES; | ||
| 506 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 507 | + "$(inherited)", | ||
| 508 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
| 509 | + ); | ||
| 510 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 511 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
| 512 | + "$(inherited)", | ||
| 513 | + "@executable_path/../Frameworks", | ||
| 514 | + ); | ||
| 515 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 516 | + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| 517 | + SWIFT_VERSION = 5.0; | ||
| 518 | + }; | ||
| 519 | + name = Debug; | ||
| 520 | + }; | ||
| 521 | + 33CC10FD2044A3C60003C045 /* Release */ = { | ||
| 522 | + isa = XCBuildConfiguration; | ||
| 523 | + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 524 | + buildSettings = { | ||
| 525 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 526 | + CLANG_ENABLE_MODULES = YES; | ||
| 527 | + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; | ||
| 528 | + CODE_SIGN_STYLE = Automatic; | ||
| 529 | + COMBINE_HIDPI_IMAGES = YES; | ||
| 530 | + FRAMEWORK_SEARCH_PATHS = ( | ||
| 531 | + "$(inherited)", | ||
| 532 | + "$(PROJECT_DIR)/Flutter/ephemeral", | ||
| 533 | + ); | ||
| 534 | + INFOPLIST_FILE = Runner/Info.plist; | ||
| 535 | + LD_RUNPATH_SEARCH_PATHS = ( | ||
| 536 | + "$(inherited)", | ||
| 537 | + "@executable_path/../Frameworks", | ||
| 538 | + ); | ||
| 539 | + PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 540 | + SWIFT_VERSION = 5.0; | ||
| 541 | + }; | ||
| 542 | + name = Release; | ||
| 543 | + }; | ||
| 544 | + 33CC111C2044C6BA0003C045 /* Debug */ = { | ||
| 545 | + isa = XCBuildConfiguration; | ||
| 546 | + buildSettings = { | ||
| 547 | + CODE_SIGN_STYLE = Manual; | ||
| 548 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 549 | + }; | ||
| 550 | + name = Debug; | ||
| 551 | + }; | ||
| 552 | + 33CC111D2044C6BA0003C045 /* Release */ = { | ||
| 553 | + isa = XCBuildConfiguration; | ||
| 554 | + buildSettings = { | ||
| 555 | + CODE_SIGN_STYLE = Automatic; | ||
| 556 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 557 | + }; | ||
| 558 | + name = Release; | ||
| 559 | + }; | ||
| 560 | +/* End XCBuildConfiguration section */ | ||
| 561 | + | ||
| 562 | +/* Begin XCConfigurationList section */ | ||
| 563 | + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { | ||
| 564 | + isa = XCConfigurationList; | ||
| 565 | + buildConfigurations = ( | ||
| 566 | + 33CC10F92044A3C60003C045 /* Debug */, | ||
| 567 | + 33CC10FA2044A3C60003C045 /* Release */, | ||
| 568 | + 338D0CE9231458BD00FA5F75 /* Profile */, | ||
| 569 | + ); | ||
| 570 | + defaultConfigurationIsVisible = 0; | ||
| 571 | + defaultConfigurationName = Release; | ||
| 572 | + }; | ||
| 573 | + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { | ||
| 574 | + isa = XCConfigurationList; | ||
| 575 | + buildConfigurations = ( | ||
| 576 | + 33CC10FC2044A3C60003C045 /* Debug */, | ||
| 577 | + 33CC10FD2044A3C60003C045 /* Release */, | ||
| 578 | + 338D0CEA231458BD00FA5F75 /* Profile */, | ||
| 579 | + ); | ||
| 580 | + defaultConfigurationIsVisible = 0; | ||
| 581 | + defaultConfigurationName = Release; | ||
| 582 | + }; | ||
| 583 | + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { | ||
| 584 | + isa = XCConfigurationList; | ||
| 585 | + buildConfigurations = ( | ||
| 586 | + 33CC111C2044C6BA0003C045 /* Debug */, | ||
| 587 | + 33CC111D2044C6BA0003C045 /* Release */, | ||
| 588 | + 338D0CEB231458BD00FA5F75 /* Profile */, | ||
| 589 | + ); | ||
| 590 | + defaultConfigurationIsVisible = 0; | ||
| 591 | + defaultConfigurationName = Release; | ||
| 592 | + }; | ||
| 593 | +/* End XCConfigurationList section */ | ||
| 594 | + }; | ||
| 595 | + rootObject = 33CC10E52044A3C60003C045 /* Project object */; | ||
| 596 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<Scheme | ||
| 3 | + LastUpgradeVersion = "1000" | ||
| 4 | + version = "1.3"> | ||
| 5 | + <BuildAction | ||
| 6 | + parallelizeBuildables = "YES" | ||
| 7 | + buildImplicitDependencies = "YES"> | ||
| 8 | + <BuildActionEntries> | ||
| 9 | + <BuildActionEntry | ||
| 10 | + buildForTesting = "YES" | ||
| 11 | + buildForRunning = "YES" | ||
| 12 | + buildForProfiling = "YES" | ||
| 13 | + buildForArchiving = "YES" | ||
| 14 | + buildForAnalyzing = "YES"> | ||
| 15 | + <BuildableReference | ||
| 16 | + BuildableIdentifier = "primary" | ||
| 17 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 18 | + BuildableName = "example.app" | ||
| 19 | + BlueprintName = "Runner" | ||
| 20 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 21 | + </BuildableReference> | ||
| 22 | + </BuildActionEntry> | ||
| 23 | + </BuildActionEntries> | ||
| 24 | + </BuildAction> | ||
| 25 | + <TestAction | ||
| 26 | + buildConfiguration = "Debug" | ||
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | + <Testables> | ||
| 31 | + <TestableReference | ||
| 32 | + skipped = "NO"> | ||
| 33 | + <BuildableReference | ||
| 34 | + BuildableIdentifier = "primary" | ||
| 35 | + BlueprintIdentifier = "00380F9121DF178D00097171" | ||
| 36 | + BuildableName = "RunnerUITests.xctest" | ||
| 37 | + BlueprintName = "RunnerUITests" | ||
| 38 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 39 | + </BuildableReference> | ||
| 40 | + </TestableReference> | ||
| 41 | + </Testables> | ||
| 42 | + <MacroExpansion> | ||
| 43 | + <BuildableReference | ||
| 44 | + BuildableIdentifier = "primary" | ||
| 45 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 46 | + BuildableName = "example.app" | ||
| 47 | + BlueprintName = "Runner" | ||
| 48 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 49 | + </BuildableReference> | ||
| 50 | + </MacroExpansion> | ||
| 51 | + <AdditionalOptions> | ||
| 52 | + </AdditionalOptions> | ||
| 53 | + </TestAction> | ||
| 54 | + <LaunchAction | ||
| 55 | + buildConfiguration = "Debug" | ||
| 56 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 57 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 58 | + launchStyle = "0" | ||
| 59 | + useCustomWorkingDirectory = "NO" | ||
| 60 | + ignoresPersistentStateOnLaunch = "NO" | ||
| 61 | + debugDocumentVersioning = "YES" | ||
| 62 | + debugServiceExtension = "internal" | ||
| 63 | + allowLocationSimulation = "YES"> | ||
| 64 | + <BuildableProductRunnable | ||
| 65 | + runnableDebuggingMode = "0"> | ||
| 66 | + <BuildableReference | ||
| 67 | + BuildableIdentifier = "primary" | ||
| 68 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 69 | + BuildableName = "example.app" | ||
| 70 | + BlueprintName = "Runner" | ||
| 71 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 72 | + </BuildableReference> | ||
| 73 | + </BuildableProductRunnable> | ||
| 74 | + <AdditionalOptions> | ||
| 75 | + </AdditionalOptions> | ||
| 76 | + </LaunchAction> | ||
| 77 | + <ProfileAction | ||
| 78 | + buildConfiguration = "Release" | ||
| 79 | + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 80 | + savedToolIdentifier = "" | ||
| 81 | + useCustomWorkingDirectory = "NO" | ||
| 82 | + debugDocumentVersioning = "YES"> | ||
| 83 | + <BuildableProductRunnable | ||
| 84 | + runnableDebuggingMode = "0"> | ||
| 85 | + <BuildableReference | ||
| 86 | + BuildableIdentifier = "primary" | ||
| 87 | + BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 88 | + BuildableName = "example.app" | ||
| 89 | + BlueprintName = "Runner" | ||
| 90 | + ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 91 | + </BuildableReference> | ||
| 92 | + </BuildableProductRunnable> | ||
| 93 | + </ProfileAction> | ||
| 94 | + <AnalyzeAction | ||
| 95 | + buildConfiguration = "Debug"> | ||
| 96 | + </AnalyzeAction> | ||
| 97 | + <ArchiveAction | ||
| 98 | + buildConfiguration = "Release" | ||
| 99 | + revealArchiveInOrganizer = "YES"> | ||
| 100 | + </ArchiveAction> | ||
| 101 | +</Scheme> |
example/macos/Runner/AppDelegate.swift
0 → 100644
| 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 | +} |
45.9 KB
3.2 KB
1.4 KB
5.79 KB
1.21 KB
14.5 KB
1.83 KB
example/macos/Runner/Base.lproj/MainMenu.xib
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
| 3 | + <dependencies> | ||
| 4 | + <deployment identifier="macosx"/> | ||
| 5 | + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> | ||
| 6 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 7 | + </dependencies> | ||
| 8 | + <objects> | ||
| 9 | + <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> | ||
| 10 | + <connections> | ||
| 11 | + <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/> | ||
| 12 | + </connections> | ||
| 13 | + </customObject> | ||
| 14 | + <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
| 15 | + <customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
| 16 | + <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target"> | ||
| 17 | + <connections> | ||
| 18 | + <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/> | ||
| 19 | + <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/> | ||
| 20 | + </connections> | ||
| 21 | + </customObject> | ||
| 22 | + <customObject id="YLy-65-1bz" customClass="NSFontManager"/> | ||
| 23 | + <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> | ||
| 24 | + <items> | ||
| 25 | + <menuItem title="APP_NAME" id="1Xt-HY-uBw"> | ||
| 26 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 27 | + <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr"> | ||
| 28 | + <items> | ||
| 29 | + <menuItem title="About APP_NAME" id="5kV-Vb-QxS"> | ||
| 30 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 31 | + <connections> | ||
| 32 | + <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/> | ||
| 33 | + </connections> | ||
| 34 | + </menuItem> | ||
| 35 | + <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/> | ||
| 36 | + <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/> | ||
| 37 | + <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> | ||
| 38 | + <menuItem title="Services" id="NMo-om-nkz"> | ||
| 39 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 40 | + <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> | ||
| 41 | + </menuItem> | ||
| 42 | + <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> | ||
| 43 | + <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN"> | ||
| 44 | + <connections> | ||
| 45 | + <action selector="hide:" target="-1" id="PnN-Uc-m68"/> | ||
| 46 | + </connections> | ||
| 47 | + </menuItem> | ||
| 48 | + <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO"> | ||
| 49 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 50 | + <connections> | ||
| 51 | + <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/> | ||
| 52 | + </connections> | ||
| 53 | + </menuItem> | ||
| 54 | + <menuItem title="Show All" id="Kd2-mp-pUS"> | ||
| 55 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 56 | + <connections> | ||
| 57 | + <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/> | ||
| 58 | + </connections> | ||
| 59 | + </menuItem> | ||
| 60 | + <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> | ||
| 61 | + <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi"> | ||
| 62 | + <connections> | ||
| 63 | + <action selector="terminate:" target="-1" id="Te7-pn-YzF"/> | ||
| 64 | + </connections> | ||
| 65 | + </menuItem> | ||
| 66 | + </items> | ||
| 67 | + </menu> | ||
| 68 | + </menuItem> | ||
| 69 | + <menuItem title="Edit" id="5QF-Oa-p0T"> | ||
| 70 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 71 | + <menu key="submenu" title="Edit" id="W48-6f-4Dl"> | ||
| 72 | + <items> | ||
| 73 | + <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg"> | ||
| 74 | + <connections> | ||
| 75 | + <action selector="undo:" target="-1" id="M6e-cu-g7V"/> | ||
| 76 | + </connections> | ||
| 77 | + </menuItem> | ||
| 78 | + <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam"> | ||
| 79 | + <connections> | ||
| 80 | + <action selector="redo:" target="-1" id="oIA-Rs-6OD"/> | ||
| 81 | + </connections> | ||
| 82 | + </menuItem> | ||
| 83 | + <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/> | ||
| 84 | + <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG"> | ||
| 85 | + <connections> | ||
| 86 | + <action selector="cut:" target="-1" id="YJe-68-I9s"/> | ||
| 87 | + </connections> | ||
| 88 | + </menuItem> | ||
| 89 | + <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU"> | ||
| 90 | + <connections> | ||
| 91 | + <action selector="copy:" target="-1" id="G1f-GL-Joy"/> | ||
| 92 | + </connections> | ||
| 93 | + </menuItem> | ||
| 94 | + <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL"> | ||
| 95 | + <connections> | ||
| 96 | + <action selector="paste:" target="-1" id="UvS-8e-Qdg"/> | ||
| 97 | + </connections> | ||
| 98 | + </menuItem> | ||
| 99 | + <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk"> | ||
| 100 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 101 | + <connections> | ||
| 102 | + <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/> | ||
| 103 | + </connections> | ||
| 104 | + </menuItem> | ||
| 105 | + <menuItem title="Delete" id="pa3-QI-u2k"> | ||
| 106 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 107 | + <connections> | ||
| 108 | + <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/> | ||
| 109 | + </connections> | ||
| 110 | + </menuItem> | ||
| 111 | + <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m"> | ||
| 112 | + <connections> | ||
| 113 | + <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/> | ||
| 114 | + </connections> | ||
| 115 | + </menuItem> | ||
| 116 | + <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/> | ||
| 117 | + <menuItem title="Find" id="4EN-yA-p0u"> | ||
| 118 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 119 | + <menu key="submenu" title="Find" id="1b7-l0-nxx"> | ||
| 120 | + <items> | ||
| 121 | + <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W"> | ||
| 122 | + <connections> | ||
| 123 | + <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/> | ||
| 124 | + </connections> | ||
| 125 | + </menuItem> | ||
| 126 | + <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz"> | ||
| 127 | + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 128 | + <connections> | ||
| 129 | + <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/> | ||
| 130 | + </connections> | ||
| 131 | + </menuItem> | ||
| 132 | + <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye"> | ||
| 133 | + <connections> | ||
| 134 | + <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/> | ||
| 135 | + </connections> | ||
| 136 | + </menuItem> | ||
| 137 | + <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV"> | ||
| 138 | + <connections> | ||
| 139 | + <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/> | ||
| 140 | + </connections> | ||
| 141 | + </menuItem> | ||
| 142 | + <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt"> | ||
| 143 | + <connections> | ||
| 144 | + <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/> | ||
| 145 | + </connections> | ||
| 146 | + </menuItem> | ||
| 147 | + <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd"> | ||
| 148 | + <connections> | ||
| 149 | + <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/> | ||
| 150 | + </connections> | ||
| 151 | + </menuItem> | ||
| 152 | + </items> | ||
| 153 | + </menu> | ||
| 154 | + </menuItem> | ||
| 155 | + <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7"> | ||
| 156 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 157 | + <menu key="submenu" title="Spelling" id="3IN-sU-3Bg"> | ||
| 158 | + <items> | ||
| 159 | + <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI"> | ||
| 160 | + <connections> | ||
| 161 | + <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/> | ||
| 162 | + </connections> | ||
| 163 | + </menuItem> | ||
| 164 | + <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7"> | ||
| 165 | + <connections> | ||
| 166 | + <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/> | ||
| 167 | + </connections> | ||
| 168 | + </menuItem> | ||
| 169 | + <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/> | ||
| 170 | + <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN"> | ||
| 171 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 172 | + <connections> | ||
| 173 | + <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/> | ||
| 174 | + </connections> | ||
| 175 | + </menuItem> | ||
| 176 | + <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG"> | ||
| 177 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 178 | + <connections> | ||
| 179 | + <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/> | ||
| 180 | + </connections> | ||
| 181 | + </menuItem> | ||
| 182 | + <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v"> | ||
| 183 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 184 | + <connections> | ||
| 185 | + <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/> | ||
| 186 | + </connections> | ||
| 187 | + </menuItem> | ||
| 188 | + </items> | ||
| 189 | + </menu> | ||
| 190 | + </menuItem> | ||
| 191 | + <menuItem title="Substitutions" id="9ic-FL-obx"> | ||
| 192 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 193 | + <menu key="submenu" title="Substitutions" id="FeM-D8-WVr"> | ||
| 194 | + <items> | ||
| 195 | + <menuItem title="Show Substitutions" id="z6F-FW-3nz"> | ||
| 196 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 197 | + <connections> | ||
| 198 | + <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/> | ||
| 199 | + </connections> | ||
| 200 | + </menuItem> | ||
| 201 | + <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/> | ||
| 202 | + <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM"> | ||
| 203 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 204 | + <connections> | ||
| 205 | + <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/> | ||
| 206 | + </connections> | ||
| 207 | + </menuItem> | ||
| 208 | + <menuItem title="Smart Quotes" id="hQb-2v-fYv"> | ||
| 209 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 210 | + <connections> | ||
| 211 | + <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/> | ||
| 212 | + </connections> | ||
| 213 | + </menuItem> | ||
| 214 | + <menuItem title="Smart Dashes" id="rgM-f4-ycn"> | ||
| 215 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 216 | + <connections> | ||
| 217 | + <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/> | ||
| 218 | + </connections> | ||
| 219 | + </menuItem> | ||
| 220 | + <menuItem title="Smart Links" id="cwL-P1-jid"> | ||
| 221 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 222 | + <connections> | ||
| 223 | + <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/> | ||
| 224 | + </connections> | ||
| 225 | + </menuItem> | ||
| 226 | + <menuItem title="Data Detectors" id="tRr-pd-1PS"> | ||
| 227 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 228 | + <connections> | ||
| 229 | + <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/> | ||
| 230 | + </connections> | ||
| 231 | + </menuItem> | ||
| 232 | + <menuItem title="Text Replacement" id="HFQ-gK-NFA"> | ||
| 233 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 234 | + <connections> | ||
| 235 | + <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/> | ||
| 236 | + </connections> | ||
| 237 | + </menuItem> | ||
| 238 | + </items> | ||
| 239 | + </menu> | ||
| 240 | + </menuItem> | ||
| 241 | + <menuItem title="Transformations" id="2oI-Rn-ZJC"> | ||
| 242 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 243 | + <menu key="submenu" title="Transformations" id="c8a-y6-VQd"> | ||
| 244 | + <items> | ||
| 245 | + <menuItem title="Make Upper Case" id="vmV-6d-7jI"> | ||
| 246 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 247 | + <connections> | ||
| 248 | + <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/> | ||
| 249 | + </connections> | ||
| 250 | + </menuItem> | ||
| 251 | + <menuItem title="Make Lower Case" id="d9M-CD-aMd"> | ||
| 252 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 253 | + <connections> | ||
| 254 | + <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/> | ||
| 255 | + </connections> | ||
| 256 | + </menuItem> | ||
| 257 | + <menuItem title="Capitalize" id="UEZ-Bs-lqG"> | ||
| 258 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 259 | + <connections> | ||
| 260 | + <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/> | ||
| 261 | + </connections> | ||
| 262 | + </menuItem> | ||
| 263 | + </items> | ||
| 264 | + </menu> | ||
| 265 | + </menuItem> | ||
| 266 | + <menuItem title="Speech" id="xrE-MZ-jX0"> | ||
| 267 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 268 | + <menu key="submenu" title="Speech" id="3rS-ZA-NoH"> | ||
| 269 | + <items> | ||
| 270 | + <menuItem title="Start Speaking" id="Ynk-f8-cLZ"> | ||
| 271 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 272 | + <connections> | ||
| 273 | + <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/> | ||
| 274 | + </connections> | ||
| 275 | + </menuItem> | ||
| 276 | + <menuItem title="Stop Speaking" id="Oyz-dy-DGm"> | ||
| 277 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 278 | + <connections> | ||
| 279 | + <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/> | ||
| 280 | + </connections> | ||
| 281 | + </menuItem> | ||
| 282 | + </items> | ||
| 283 | + </menu> | ||
| 284 | + </menuItem> | ||
| 285 | + </items> | ||
| 286 | + </menu> | ||
| 287 | + </menuItem> | ||
| 288 | + <menuItem title="View" id="H8h-7b-M4v"> | ||
| 289 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 290 | + <menu key="submenu" title="View" id="HyV-fh-RgO"> | ||
| 291 | + <items> | ||
| 292 | + <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa"> | ||
| 293 | + <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> | ||
| 294 | + <connections> | ||
| 295 | + <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/> | ||
| 296 | + </connections> | ||
| 297 | + </menuItem> | ||
| 298 | + </items> | ||
| 299 | + </menu> | ||
| 300 | + </menuItem> | ||
| 301 | + <menuItem title="Window" id="aUF-d1-5bR"> | ||
| 302 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 303 | + <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo"> | ||
| 304 | + <items> | ||
| 305 | + <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV"> | ||
| 306 | + <connections> | ||
| 307 | + <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/> | ||
| 308 | + </connections> | ||
| 309 | + </menuItem> | ||
| 310 | + <menuItem title="Zoom" id="R4o-n2-Eq4"> | ||
| 311 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 312 | + <connections> | ||
| 313 | + <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/> | ||
| 314 | + </connections> | ||
| 315 | + </menuItem> | ||
| 316 | + <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/> | ||
| 317 | + <menuItem title="Bring All to Front" id="LE2-aR-0XJ"> | ||
| 318 | + <modifierMask key="keyEquivalentModifierMask"/> | ||
| 319 | + <connections> | ||
| 320 | + <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/> | ||
| 321 | + </connections> | ||
| 322 | + </menuItem> | ||
| 323 | + </items> | ||
| 324 | + </menu> | ||
| 325 | + </menuItem> | ||
| 326 | + </items> | ||
| 327 | + <point key="canvasLocation" x="142" y="-258"/> | ||
| 328 | + </menu> | ||
| 329 | + <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target"> | ||
| 330 | + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> | ||
| 331 | + <rect key="contentRect" x="335" y="390" width="800" height="600"/> | ||
| 332 | + <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/> | ||
| 333 | + <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ"> | ||
| 334 | + <rect key="frame" x="0.0" y="0.0" width="800" height="600"/> | ||
| 335 | + <autoresizingMask key="autoresizingMask"/> | ||
| 336 | + </view> | ||
| 337 | + </window> | ||
| 338 | + </objects> | ||
| 339 | +</document> |
| 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 = example | ||
| 9 | + | ||
| 10 | +// The application's bundle identifier | ||
| 11 | +PRODUCT_BUNDLE_IDENTIFIER = com.example.example | ||
| 12 | + | ||
| 13 | +// The copyright displayed in application information | ||
| 14 | +PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved. |
example/macos/Runner/Configs/Debug.xcconfig
0 → 100644
| 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 |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>com.apple.security.app-sandbox</key> | ||
| 6 | + <true/> | ||
| 7 | + <key>com.apple.security.cs.allow-jit</key> | ||
| 8 | + <true/> | ||
| 9 | + <key>com.apple.security.network.server</key> | ||
| 10 | + <true/> | ||
| 11 | +</dict> | ||
| 12 | +</plist> |
example/macos/Runner/Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | +<plist version="1.0"> | ||
| 4 | +<dict> | ||
| 5 | + <key>CFBundleDevelopmentRegion</key> | ||
| 6 | + <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
| 7 | + <key>CFBundleExecutable</key> | ||
| 8 | + <string>$(EXECUTABLE_NAME)</string> | ||
| 9 | + <key>CFBundleIconFile</key> | ||
| 10 | + <string></string> | ||
| 11 | + <key>CFBundleIdentifier</key> | ||
| 12 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 13 | + <key>CFBundleInfoDictionaryVersion</key> | ||
| 14 | + <string>6.0</string> | ||
| 15 | + <key>CFBundleName</key> | ||
| 16 | + <string>$(PRODUCT_NAME)</string> | ||
| 17 | + <key>CFBundlePackageType</key> | ||
| 18 | + <string>APPL</string> | ||
| 19 | + <key>CFBundleShortVersionString</key> | ||
| 20 | + <string>$(FLUTTER_BUILD_NAME)</string> | ||
| 21 | + <key>CFBundleVersion</key> | ||
| 22 | + <string>$(FLUTTER_BUILD_NUMBER)</string> | ||
| 23 | + <key>LSMinimumSystemVersion</key> | ||
| 24 | + <string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
| 25 | + <key>NSHumanReadableCopyright</key> | ||
| 26 | + <string>$(PRODUCT_COPYRIGHT)</string> | ||
| 27 | + <key>NSMainNibFile</key> | ||
| 28 | + <string>MainMenu</string> | ||
| 29 | + <key>NSPrincipalClass</key> | ||
| 30 | + <string>NSApplication</string> | ||
| 31 | +</dict> | ||
| 32 | +</plist> |
example/macos/Runner/MainFlutterWindow.swift
0 → 100644
| 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 | +} |
example/macos/Runner/Release.entitlements
0 → 100644
example/pubspec.lock
0 → 100644
| 1 | +# Generated by pub | ||
| 2 | +# See https://dart.dev/tools/pub/glossary#lockfile | ||
| 3 | +packages: | ||
| 4 | + archive: | ||
| 5 | + dependency: transitive | ||
| 6 | + description: | ||
| 7 | + name: archive | ||
| 8 | + url: "https://pub.dartlang.org" | ||
| 9 | + source: hosted | ||
| 10 | + version: "2.0.13" | ||
| 11 | + args: | ||
| 12 | + dependency: transitive | ||
| 13 | + description: | ||
| 14 | + name: args | ||
| 15 | + url: "https://pub.dartlang.org" | ||
| 16 | + source: hosted | ||
| 17 | + version: "1.6.0" | ||
| 18 | + async: | ||
| 19 | + dependency: transitive | ||
| 20 | + description: | ||
| 21 | + name: async | ||
| 22 | + url: "https://pub.dartlang.org" | ||
| 23 | + source: hosted | ||
| 24 | + version: "2.4.1" | ||
| 25 | + boolean_selector: | ||
| 26 | + dependency: transitive | ||
| 27 | + description: | ||
| 28 | + name: boolean_selector | ||
| 29 | + url: "https://pub.dartlang.org" | ||
| 30 | + source: hosted | ||
| 31 | + version: "2.0.0" | ||
| 32 | + charcode: | ||
| 33 | + dependency: transitive | ||
| 34 | + description: | ||
| 35 | + name: charcode | ||
| 36 | + url: "https://pub.dartlang.org" | ||
| 37 | + source: hosted | ||
| 38 | + version: "1.1.3" | ||
| 39 | + collection: | ||
| 40 | + dependency: transitive | ||
| 41 | + description: | ||
| 42 | + name: collection | ||
| 43 | + url: "https://pub.dartlang.org" | ||
| 44 | + source: hosted | ||
| 45 | + version: "1.14.12" | ||
| 46 | + convert: | ||
| 47 | + dependency: transitive | ||
| 48 | + description: | ||
| 49 | + name: convert | ||
| 50 | + url: "https://pub.dartlang.org" | ||
| 51 | + source: hosted | ||
| 52 | + version: "2.1.1" | ||
| 53 | + crypto: | ||
| 54 | + dependency: transitive | ||
| 55 | + description: | ||
| 56 | + name: crypto | ||
| 57 | + url: "https://pub.dartlang.org" | ||
| 58 | + source: hosted | ||
| 59 | + version: "2.1.4" | ||
| 60 | + cupertino_icons: | ||
| 61 | + dependency: "direct main" | ||
| 62 | + description: | ||
| 63 | + name: cupertino_icons | ||
| 64 | + url: "https://pub.dartlang.org" | ||
| 65 | + source: hosted | ||
| 66 | + version: "0.1.3" | ||
| 67 | + flutter: | ||
| 68 | + dependency: "direct main" | ||
| 69 | + description: flutter | ||
| 70 | + source: sdk | ||
| 71 | + version: "0.0.0" | ||
| 72 | + flutter_test: | ||
| 73 | + dependency: "direct dev" | ||
| 74 | + description: flutter | ||
| 75 | + source: sdk | ||
| 76 | + version: "0.0.0" | ||
| 77 | + image: | ||
| 78 | + dependency: transitive | ||
| 79 | + description: | ||
| 80 | + name: image | ||
| 81 | + url: "https://pub.dartlang.org" | ||
| 82 | + source: hosted | ||
| 83 | + version: "2.1.12" | ||
| 84 | + matcher: | ||
| 85 | + dependency: transitive | ||
| 86 | + description: | ||
| 87 | + name: matcher | ||
| 88 | + url: "https://pub.dartlang.org" | ||
| 89 | + source: hosted | ||
| 90 | + version: "0.12.6" | ||
| 91 | + meta: | ||
| 92 | + dependency: transitive | ||
| 93 | + description: | ||
| 94 | + name: meta | ||
| 95 | + url: "https://pub.dartlang.org" | ||
| 96 | + source: hosted | ||
| 97 | + version: "1.1.8" | ||
| 98 | + modal_bottom_sheet: | ||
| 99 | + dependency: "direct dev" | ||
| 100 | + description: | ||
| 101 | + path: ".." | ||
| 102 | + relative: true | ||
| 103 | + source: path | ||
| 104 | + version: "0.0.1" | ||
| 105 | + path: | ||
| 106 | + dependency: transitive | ||
| 107 | + description: | ||
| 108 | + name: path | ||
| 109 | + url: "https://pub.dartlang.org" | ||
| 110 | + source: hosted | ||
| 111 | + version: "1.6.4" | ||
| 112 | + petitparser: | ||
| 113 | + dependency: transitive | ||
| 114 | + description: | ||
| 115 | + name: petitparser | ||
| 116 | + url: "https://pub.dartlang.org" | ||
| 117 | + source: hosted | ||
| 118 | + version: "2.4.0" | ||
| 119 | + quiver: | ||
| 120 | + dependency: transitive | ||
| 121 | + description: | ||
| 122 | + name: quiver | ||
| 123 | + url: "https://pub.dartlang.org" | ||
| 124 | + source: hosted | ||
| 125 | + version: "2.1.3" | ||
| 126 | + sky_engine: | ||
| 127 | + dependency: transitive | ||
| 128 | + description: flutter | ||
| 129 | + source: sdk | ||
| 130 | + version: "0.0.99" | ||
| 131 | + source_span: | ||
| 132 | + dependency: transitive | ||
| 133 | + description: | ||
| 134 | + name: source_span | ||
| 135 | + url: "https://pub.dartlang.org" | ||
| 136 | + source: hosted | ||
| 137 | + version: "1.7.0" | ||
| 138 | + stack_trace: | ||
| 139 | + dependency: transitive | ||
| 140 | + description: | ||
| 141 | + name: stack_trace | ||
| 142 | + url: "https://pub.dartlang.org" | ||
| 143 | + source: hosted | ||
| 144 | + version: "1.9.3" | ||
| 145 | + stream_channel: | ||
| 146 | + dependency: transitive | ||
| 147 | + description: | ||
| 148 | + name: stream_channel | ||
| 149 | + url: "https://pub.dartlang.org" | ||
| 150 | + source: hosted | ||
| 151 | + version: "2.0.0" | ||
| 152 | + string_scanner: | ||
| 153 | + dependency: transitive | ||
| 154 | + description: | ||
| 155 | + name: string_scanner | ||
| 156 | + url: "https://pub.dartlang.org" | ||
| 157 | + source: hosted | ||
| 158 | + version: "1.0.5" | ||
| 159 | + term_glyph: | ||
| 160 | + dependency: transitive | ||
| 161 | + description: | ||
| 162 | + name: term_glyph | ||
| 163 | + url: "https://pub.dartlang.org" | ||
| 164 | + source: hosted | ||
| 165 | + version: "1.1.0" | ||
| 166 | + test_api: | ||
| 167 | + dependency: transitive | ||
| 168 | + description: | ||
| 169 | + name: test_api | ||
| 170 | + url: "https://pub.dartlang.org" | ||
| 171 | + source: hosted | ||
| 172 | + version: "0.2.15" | ||
| 173 | + typed_data: | ||
| 174 | + dependency: transitive | ||
| 175 | + description: | ||
| 176 | + name: typed_data | ||
| 177 | + url: "https://pub.dartlang.org" | ||
| 178 | + source: hosted | ||
| 179 | + version: "1.1.6" | ||
| 180 | + vector_math: | ||
| 181 | + dependency: transitive | ||
| 182 | + description: | ||
| 183 | + name: vector_math | ||
| 184 | + url: "https://pub.dartlang.org" | ||
| 185 | + source: hosted | ||
| 186 | + version: "2.0.8" | ||
| 187 | + xml: | ||
| 188 | + dependency: transitive | ||
| 189 | + description: | ||
| 190 | + name: xml | ||
| 191 | + url: "https://pub.dartlang.org" | ||
| 192 | + source: hosted | ||
| 193 | + version: "3.6.1" | ||
| 194 | +sdks: | ||
| 195 | + dart: ">=2.7.0 <3.0.0" |
example/pubspec.yaml
0 → 100644
| 1 | +name: example | ||
| 2 | +description: A new Flutter project. | ||
| 3 | + | ||
| 4 | +# The following defines the version and build number for your application. | ||
| 5 | +# A version number is three numbers separated by dots, like 1.2.43 | ||
| 6 | +# followed by an optional build number separated by a +. | ||
| 7 | +# Both the version and the builder number may be overridden in flutter | ||
| 8 | +# build by specifying --build-name and --build-number, respectively. | ||
| 9 | +# In Android, build-name is used as versionName while build-number used as versionCode. | ||
| 10 | +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning | ||
| 11 | +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. | ||
| 12 | +# Read more about iOS versioning at | ||
| 13 | +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | ||
| 14 | +version: 1.0.0+1 | ||
| 15 | + | ||
| 16 | +environment: | ||
| 17 | + sdk: ">=2.1.0 <3.0.0" | ||
| 18 | + | ||
| 19 | +dependencies: | ||
| 20 | + flutter: | ||
| 21 | + sdk: flutter | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + # The following adds the Cupertino Icons font to your application. | ||
| 25 | + # Use with the CupertinoIcons class for iOS style icons. | ||
| 26 | + cupertino_icons: ^0.1.3 | ||
| 27 | + | ||
| 28 | +dev_dependencies: | ||
| 29 | + flutter_test: | ||
| 30 | + sdk: flutter | ||
| 31 | + modal_bottom_sheet: | ||
| 32 | + path: '../' | ||
| 33 | + | ||
| 34 | +# For information on the generic Dart part of this file, see the | ||
| 35 | +# following page: https://dart.dev/tools/pub/pubspec | ||
| 36 | + | ||
| 37 | +# The following section is specific to Flutter. | ||
| 38 | +flutter: | ||
| 39 | + | ||
| 40 | + # The following line ensures that the Material Icons font is | ||
| 41 | + # included with your application, so that you can use the icons in | ||
| 42 | + # the material Icons class. | ||
| 43 | + uses-material-design: true | ||
| 44 | + | ||
| 45 | + # To add assets to your application, add an assets section, like this: | ||
| 46 | + # assets: | ||
| 47 | + # - images/a_dot_burr.jpeg | ||
| 48 | + # - images/a_dot_ham.jpeg | ||
| 49 | + | ||
| 50 | + # An image asset can refer to one or more resolution-specific "variants", see | ||
| 51 | + # https://flutter.dev/assets-and-images/#resolution-aware. | ||
| 52 | + | ||
| 53 | + # For details regarding adding assets from package dependencies, see | ||
| 54 | + # https://flutter.dev/assets-and-images/#from-packages | ||
| 55 | + | ||
| 56 | + # To add custom fonts to your application, add a fonts section here, | ||
| 57 | + # in this "flutter" section. Each entry in this list should have a | ||
| 58 | + # "family" key with the font family name, and a "fonts" key with a | ||
| 59 | + # list giving the asset and other descriptors for the font. For | ||
| 60 | + # example: | ||
| 61 | + # fonts: | ||
| 62 | + # - family: Schyler | ||
| 63 | + # fonts: | ||
| 64 | + # - asset: fonts/Schyler-Regular.ttf | ||
| 65 | + # - asset: fonts/Schyler-Italic.ttf | ||
| 66 | + # style: italic | ||
| 67 | + # - family: Trajan Pro | ||
| 68 | + # fonts: | ||
| 69 | + # - asset: fonts/TrajanPro.ttf | ||
| 70 | + # - asset: fonts/TrajanPro_Bold.ttf | ||
| 71 | + # weight: 700 | ||
| 72 | + # | ||
| 73 | + # For details regarding fonts from package dependencies, | ||
| 74 | + # see https://flutter.dev/custom-fonts/#from-packages |
example/test/widget_test.dart
0 → 100644
| 1 | +// This is a basic Flutter widget test. | ||
| 2 | +// | ||
| 3 | +// To perform an interaction with a widget in your test, use the WidgetTester | ||
| 4 | +// utility that Flutter provides. For example, you can send tap and scroll | ||
| 5 | +// gestures. You can also use WidgetTester to find child widgets in the widget | ||
| 6 | +// tree, read text, and verify that the values of widget properties are correct. | ||
| 7 | + | ||
| 8 | + |
example/web/favicon.png
0 → 100644
917 Bytes
example/web/icons/Icon-192.png
0 → 100644
5.17 KB
example/web/icons/Icon-512.png
0 → 100644
8.06 KB
example/web/index.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | +<head> | ||
| 4 | + <meta charset="UTF-8"> | ||
| 5 | + <meta content="IE=Edge" http-equiv="X-UA-Compatible"> | ||
| 6 | + <meta name="description" content="A new Flutter project."> | ||
| 7 | + | ||
| 8 | + <!-- iOS meta tags & icons --> | ||
| 9 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
| 10 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
| 11 | + <meta name="apple-mobile-web-app-title" content="example"> | ||
| 12 | + <link rel="apple-touch-icon" href="/icons/Icon-192.png"> | ||
| 13 | + | ||
| 14 | + <!-- Favicon --> | ||
| 15 | + <link rel="shortcut icon" type="image/png" href="/favicon.png"/> | ||
| 16 | + | ||
| 17 | + <title>example</title> | ||
| 18 | + <link rel="manifest" href="/manifest.json"> | ||
| 19 | +</head> | ||
| 20 | +<body> | ||
| 21 | + <!-- This script installs service_worker.js to provide PWA functionality to | ||
| 22 | + application. For more information, see: | ||
| 23 | + https://developers.google.com/web/fundamentals/primers/service-workers --> | ||
| 24 | + <script> | ||
| 25 | + if ('serviceWorker' in navigator) { | ||
| 26 | + window.addEventListener('load', function () { | ||
| 27 | + navigator.serviceWorker.register('/flutter_service_worker.js'); | ||
| 28 | + }); | ||
| 29 | + } | ||
| 30 | + </script> | ||
| 31 | + <script src="main.dart.js" type="application/javascript"></script> | ||
| 32 | +</body> | ||
| 33 | +</html> |
example/web/manifest.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "example", | ||
| 3 | + "short_name": "example", | ||
| 4 | + "start_url": ".", | ||
| 5 | + "display": "minimal-ui", | ||
| 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 | +} |
lib/modal_bottom_sheet.dart
0 → 100644
| 1 | + | ||
| 2 | +export 'src/bottom_sheet.dart'; | ||
| 3 | +export 'src/bottom_sheet_route.dart'; | ||
| 4 | +export 'src/material_with_modal_page_route.dart'; | ||
| 5 | +export 'src/bottom_sheets/cupertino_bottom_sheet.dart'; | ||
| 6 | +export 'src/bottom_sheets/material_bottom_sheet.dart'; | ||
| 7 | +export 'src/bottom_sheets/bar_bottom_sheet.dart'; |
lib/src/bottom_sheet.dart
0 → 100644
| 1 | +// Copyright 2014 The Flutter Authors. All rights reserved. | ||
| 2 | +// Use of this source code is governed by a BSD-style license that can be | ||
| 3 | +// found in the LICENSE file. | ||
| 4 | + | ||
| 5 | +import 'dart:async'; | ||
| 6 | +import 'dart:math'; | ||
| 7 | + | ||
| 8 | +import 'package:flutter/cupertino.dart'; | ||
| 9 | +import 'package:flutter/foundation.dart'; | ||
| 10 | +import 'package:flutter/gestures.dart'; | ||
| 11 | +import 'package:flutter/material.dart'; | ||
| 12 | +import 'package:flutter/scheduler.dart'; | ||
| 13 | +import 'package:flutter/widgets.dart'; | ||
| 14 | + | ||
| 15 | +import 'bottom_sheet_route.dart'; | ||
| 16 | + | ||
| 17 | +const Duration _bottomSheetDuration = Duration(milliseconds: 400); | ||
| 18 | +const double _minFlingVelocity = 500.0; | ||
| 19 | +const double _closeProgressThreshold = 0.5; | ||
| 20 | +const double _willPopThreshold = 0.8; | ||
| 21 | + | ||
| 22 | +typedef ScrollWidgetBuilder = Widget Function( | ||
| 23 | + BuildContext context, ScrollController controller); | ||
| 24 | + | ||
| 25 | +typedef WidgetWithChildBuilder = Widget Function( | ||
| 26 | + BuildContext context, Animation<double> animation, Widget child); | ||
| 27 | + | ||
| 28 | +/// A custom bottom sheet. | ||
| 29 | +/// | ||
| 30 | +/// The [ModalBottomSheet] widget itself is rarely used directly. Instead, prefer to | ||
| 31 | +/// create a modal bottom sheet with [showMaterialModalBottomSheet]. | ||
| 32 | +/// | ||
| 33 | +/// See also: | ||
| 34 | +/// | ||
| 35 | +/// * [showMaterialModalBottomSheet] which can be used to display a modal bottom | ||
| 36 | +/// sheet with Cupertino appareance. | ||
| 37 | +class ModalBottomSheet extends StatefulWidget { | ||
| 38 | + /// Creates a bottom sheet. | ||
| 39 | + /// | ||
| 40 | + /// Typically, bottom sheets are created implicitly by | ||
| 41 | + /// [ScaffoldState.showBottomSheet], for persistent bottom sheets, or by | ||
| 42 | + /// [showModalBottomSheet], for modal bottom sheets. | ||
| 43 | + const ModalBottomSheet({ | ||
| 44 | + Key key, | ||
| 45 | + this.animationController, | ||
| 46 | + this.enableDrag = true, | ||
| 47 | + this.containerBuilder, | ||
| 48 | + this.bounce = true, | ||
| 49 | + this.shouldClose, | ||
| 50 | + this.scrollController, | ||
| 51 | + this.expanded, | ||
| 52 | + @required this.onClosing, | ||
| 53 | + @required this.builder, | ||
| 54 | + }) : assert(enableDrag != null), | ||
| 55 | + assert(onClosing != null), | ||
| 56 | + assert(builder != null), | ||
| 57 | + super(key: key); | ||
| 58 | + | ||
| 59 | + /// The animation controller that controls the bottom sheet's entrance and | ||
| 60 | + /// exit animations. | ||
| 61 | + /// | ||
| 62 | + /// The BottomSheet widget will manipulate the position of this animation, it | ||
| 63 | + /// is not just a passive observer. | ||
| 64 | + final AnimationController animationController; | ||
| 65 | + | ||
| 66 | + /// Allows the bottom sheet to go beyond the top bound of the content, | ||
| 67 | + /// but then bounce the content back to the edge of | ||
| 68 | + /// the top bound. | ||
| 69 | + final bool bounce; | ||
| 70 | + | ||
| 71 | + final bool expanded; | ||
| 72 | + | ||
| 73 | + final WidgetWithChildBuilder containerBuilder; | ||
| 74 | + | ||
| 75 | + /// Called when the bottom sheet begins to close. | ||
| 76 | + /// | ||
| 77 | + /// A bottom sheet might be prevented from closing (e.g., by user | ||
| 78 | + /// interaction) even after this callback is called. For this reason, this | ||
| 79 | + /// callback might be call multiple times for a given bottom sheet. | ||
| 80 | + final Function() onClosing; | ||
| 81 | + | ||
| 82 | + // If shouldClose is null is ignored. | ||
| 83 | + // If returns true => The dialog closes | ||
| 84 | + // If returns false => The dialog cancels close | ||
| 85 | + // Notice that if shouldClose is not null, the dialog will go back to the | ||
| 86 | + // previous position until the function is solved | ||
| 87 | + final Future<bool> Function() shouldClose; | ||
| 88 | + | ||
| 89 | + /// A builder for the contents of the sheet. | ||
| 90 | + /// | ||
| 91 | + /// The bottom sheet will wrap the widget produced by this builder in a | ||
| 92 | + /// [Material] widget. | ||
| 93 | + final ScrollWidgetBuilder builder; | ||
| 94 | + | ||
| 95 | + /// If true, the bottom sheet can be dragged up and down and dismissed by | ||
| 96 | + /// swiping downwards. | ||
| 97 | + /// | ||
| 98 | + /// Default is true. | ||
| 99 | + final bool enableDrag; | ||
| 100 | + | ||
| 101 | + final ScrollController scrollController; | ||
| 102 | + | ||
| 103 | + @override | ||
| 104 | + _ModalBottomSheetState createState() => _ModalBottomSheetState(); | ||
| 105 | + | ||
| 106 | + /// Creates an [AnimationController] suitable for a | ||
| 107 | + /// [ModalBottomSheet.animationController]. | ||
| 108 | + /// | ||
| 109 | + /// This API available as a convenience for a Material compliant bottom sheet | ||
| 110 | + /// animation. If alternative animation durations are required, a different | ||
| 111 | + /// animation controller could be provided. | ||
| 112 | + static AnimationController createAnimationController(TickerProvider vsync) { | ||
| 113 | + return AnimationController( | ||
| 114 | + duration: _bottomSheetDuration, | ||
| 115 | + debugLabel: 'BottomSheet', | ||
| 116 | + vsync: vsync, | ||
| 117 | + ); | ||
| 118 | + } | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
| 122 | + with TickerProviderStateMixin { | ||
| 123 | + final GlobalKey _childKey = GlobalKey(debugLabel: 'BottomSheet child'); | ||
| 124 | + | ||
| 125 | + ScrollController _scrollController; | ||
| 126 | + | ||
| 127 | + AnimationController _bounceDragController; | ||
| 128 | + | ||
| 129 | + double get _childHeight { | ||
| 130 | + final RenderBox renderBox = | ||
| 131 | + _childKey.currentContext.findRenderObject() as RenderBox; | ||
| 132 | + return renderBox.size.height; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + bool get _dismissUnderway => | ||
| 136 | + widget.animationController.status == AnimationStatus.reverse; | ||
| 137 | + | ||
| 138 | + // Detect if user is dragging. | ||
| 139 | + // Used on NotificationListener to detect if ScrollNotifications are | ||
| 140 | + // before or after the user stop dragging | ||
| 141 | + bool isDragging = false; | ||
| 142 | + | ||
| 143 | + bool get hasReachedWillPopThreshold => | ||
| 144 | + widget.animationController.value < _willPopThreshold; | ||
| 145 | + | ||
| 146 | + bool get hasReachedCloseThreshold => | ||
| 147 | + widget.animationController.value < _closeProgressThreshold; | ||
| 148 | + | ||
| 149 | + void _close() { | ||
| 150 | + isDragging = false; | ||
| 151 | + widget.onClosing(); | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + void _cancelClose() { | ||
| 155 | + widget.animationController.forward(); | ||
| 156 | + _bounceDragController.reverse(); | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + bool _isCheckingShouldClose = false; | ||
| 160 | + FutureOr<bool> shouldClose() async { | ||
| 161 | + if(_isCheckingShouldClose) return false; | ||
| 162 | + if(widget.shouldClose == null) return null; | ||
| 163 | + _isCheckingShouldClose = true; | ||
| 164 | + final result = await widget.shouldClose(); | ||
| 165 | + _isCheckingShouldClose = false; | ||
| 166 | + return result; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + void _handleDragUpdate(double primaryDelta) async { | ||
| 170 | + assert(widget.enableDrag, 'Dragging is disabled'); | ||
| 171 | + | ||
| 172 | + if (_dismissUnderway) return; | ||
| 173 | + isDragging = true; | ||
| 174 | + | ||
| 175 | + final progress = primaryDelta / (_childHeight ?? primaryDelta); | ||
| 176 | + | ||
| 177 | + if (widget.shouldClose != null && hasReachedWillPopThreshold) { | ||
| 178 | + _cancelClose(); | ||
| 179 | + final canClose = await shouldClose(); | ||
| 180 | + if (canClose) { | ||
| 181 | + _close(); | ||
| 182 | + print('close'); | ||
| 183 | + return; | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + // Bounce top | ||
| 188 | + final bounce = widget.bounce == true; | ||
| 189 | + final shouldBounce = _bounceDragController.value > 0; | ||
| 190 | + final isBouncing = (widget.animationController.value - progress) > 1; | ||
| 191 | + if (bounce && (shouldBounce || isBouncing)) { | ||
| 192 | + _bounceDragController.value -= progress * 10; | ||
| 193 | + return; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + widget.animationController.value -= progress; | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + void _handleDragEnd(double velocity) async { | ||
| 200 | + assert(widget.enableDrag, 'Dragging is disabled'); | ||
| 201 | + | ||
| 202 | + if (_dismissUnderway || !isDragging) return; | ||
| 203 | + isDragging = false; | ||
| 204 | + _bounceDragController.reverse(); | ||
| 205 | + | ||
| 206 | + | ||
| 207 | + bool canClose = true; | ||
| 208 | + if (widget.shouldClose != null && hasReachedWillPopThreshold) { | ||
| 209 | + _cancelClose(); | ||
| 210 | + canClose = await shouldClose(); | ||
| 211 | + } | ||
| 212 | + if (canClose) { | ||
| 213 | + // If speed is bigger than _minFlingVelocity try to close it | ||
| 214 | + if (velocity > _minFlingVelocity) { | ||
| 215 | + _close(); | ||
| 216 | + print('close2'); | ||
| 217 | + } else if (hasReachedCloseThreshold) { | ||
| 218 | + if (widget.animationController.value > 0.0) | ||
| 219 | + widget.animationController.fling(velocity: -1.0); | ||
| 220 | + _close(); | ||
| 221 | + print('close3'); | ||
| 222 | + } else { | ||
| 223 | + _cancelClose(); | ||
| 224 | + } | ||
| 225 | + } | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + _handleScrollUpdate(ScrollNotification notification) { | ||
| 229 | + if (notification.metrics.pixels <= notification.metrics.minScrollExtent) { | ||
| 230 | + //Check if listener is same from scrollController | ||
| 231 | + if (_scrollController.position.pixels != notification.metrics.pixels) { | ||
| 232 | + return false; | ||
| 233 | + } | ||
| 234 | + DragUpdateDetails dragDetails; | ||
| 235 | + if (notification is ScrollUpdateNotification) { | ||
| 236 | + dragDetails = notification.dragDetails; | ||
| 237 | + } | ||
| 238 | + if (notification is OverscrollNotification) { | ||
| 239 | + dragDetails = notification.dragDetails; | ||
| 240 | + } | ||
| 241 | + if (dragDetails != null) { | ||
| 242 | + print('scroll'); | ||
| 243 | + _handleDragUpdate(dragDetails.primaryDelta); | ||
| 244 | + } | ||
| 245 | + // Todo: detect dragEnd during scroll so it can bottom sheet can close | ||
| 246 | + // if velocity > _minFlingVelocity | ||
| 247 | + else if (isDragging) _handleDragEnd(0); | ||
| 248 | + } | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + @override | ||
| 252 | + void initState() { | ||
| 253 | + _bounceDragController = | ||
| 254 | + AnimationController(vsync: this, duration: Duration(milliseconds: 300)); | ||
| 255 | + _scrollController = widget.scrollController ?? ScrollController(); | ||
| 256 | + // Todo: Check if we can remove scroll Controller | ||
| 257 | + super.initState(); | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + @override | ||
| 261 | + Widget build(BuildContext context) { | ||
| 262 | + final bounceAnimation = CurvedAnimation( | ||
| 263 | + parent: _bounceDragController, | ||
| 264 | + curve: Curves.easeOutSine, | ||
| 265 | + ); | ||
| 266 | + | ||
| 267 | + Widget child = widget.builder(context, _scrollController); | ||
| 268 | + | ||
| 269 | + if (widget.containerBuilder != null) | ||
| 270 | + child = widget.containerBuilder( | ||
| 271 | + context, | ||
| 272 | + widget.animationController, | ||
| 273 | + child, | ||
| 274 | + ); | ||
| 275 | + | ||
| 276 | + | ||
| 277 | + // Todo: Add curved Animation when push and pop without gesture | ||
| 278 | + final Animation<double> containerAnimation = CurvedAnimation( | ||
| 279 | + parent: widget.animationController, | ||
| 280 | + curve: Curves.easeOut, | ||
| 281 | + ); | ||
| 282 | + | ||
| 283 | + return AnimatedBuilder( | ||
| 284 | + animation: widget.animationController, | ||
| 285 | + builder: (context, _) => ClipRect( | ||
| 286 | + child: CustomSingleChildLayout( | ||
| 287 | + delegate: _ModalBottomSheetLayout( | ||
| 288 | + widget.animationController.value, | ||
| 289 | + widget.expanded), | ||
| 290 | + child: !widget.enableDrag | ||
| 291 | + ? child | ||
| 292 | + : KeyedSubtree( | ||
| 293 | + key: _childKey, | ||
| 294 | + child: AnimatedBuilder( | ||
| 295 | + animation: bounceAnimation, | ||
| 296 | + builder: (context, _) => CustomSingleChildLayout( | ||
| 297 | + delegate: _CustomBottomSheetLayout(bounceAnimation.value), | ||
| 298 | + child: GestureDetector( | ||
| 299 | + onVerticalDragUpdate: (details) => | ||
| 300 | + _handleDragUpdate(details.primaryDelta), | ||
| 301 | + onVerticalDragEnd: (details) => | ||
| 302 | + _handleDragEnd(details.primaryVelocity), | ||
| 303 | + child: NotificationListener<ScrollNotification>( | ||
| 304 | + onNotification: (ScrollNotification notification) { | ||
| 305 | + _handleScrollUpdate(notification); | ||
| 306 | + return false; | ||
| 307 | + }, | ||
| 308 | + child: child, | ||
| 309 | + ), | ||
| 310 | + ), | ||
| 311 | + ), | ||
| 312 | + ), | ||
| 313 | + ), | ||
| 314 | + ), | ||
| 315 | + ), | ||
| 316 | + ); | ||
| 317 | + } | ||
| 318 | +} | ||
| 319 | + | ||
| 320 | +class _ModalBottomSheetLayout extends SingleChildLayoutDelegate { | ||
| 321 | + _ModalBottomSheetLayout(this.progress, this.expand); | ||
| 322 | + | ||
| 323 | + final double progress; | ||
| 324 | + final bool expand; | ||
| 325 | + | ||
| 326 | + @override | ||
| 327 | + BoxConstraints getConstraintsForChild(BoxConstraints constraints) { | ||
| 328 | + return BoxConstraints( | ||
| 329 | + minWidth: constraints.maxWidth, | ||
| 330 | + maxWidth: constraints.maxWidth, | ||
| 331 | + minHeight: expand ? constraints.maxHeight : 0, | ||
| 332 | + maxHeight: expand ? constraints.maxHeight : constraints.minHeight, | ||
| 333 | + ); | ||
| 334 | + } | ||
| 335 | + | ||
| 336 | + @override | ||
| 337 | + Offset getPositionForChild(Size size, Size childSize) { | ||
| 338 | + return Offset(0.0, size.height - childSize.height * progress); | ||
| 339 | + } | ||
| 340 | + | ||
| 341 | + @override | ||
| 342 | + bool shouldRelayout(_ModalBottomSheetLayout oldDelegate) { | ||
| 343 | + return progress != oldDelegate.progress; | ||
| 344 | + } | ||
| 345 | +} | ||
| 346 | + | ||
| 347 | +class _CustomBottomSheetLayout extends SingleChildLayoutDelegate { | ||
| 348 | + _CustomBottomSheetLayout(this.progress); | ||
| 349 | + | ||
| 350 | + final double progress; | ||
| 351 | + double childHeight; | ||
| 352 | + | ||
| 353 | + @override | ||
| 354 | + BoxConstraints getConstraintsForChild(BoxConstraints constraints) { | ||
| 355 | + return BoxConstraints( | ||
| 356 | + minWidth: constraints.maxWidth, | ||
| 357 | + maxWidth: constraints.maxWidth, | ||
| 358 | + minHeight: constraints.minHeight, | ||
| 359 | + maxHeight: constraints.maxHeight + progress * 8, | ||
| 360 | + ); | ||
| 361 | + } | ||
| 362 | + | ||
| 363 | + @override | ||
| 364 | + Offset getPositionForChild(Size size, Size childSize) { | ||
| 365 | + if (this.childHeight == null) this.childHeight = childSize.height; | ||
| 366 | + | ||
| 367 | + return Offset(0.0, size.height - childSize.height); | ||
| 368 | + } | ||
| 369 | + | ||
| 370 | + @override | ||
| 371 | + bool shouldRelayout(_CustomBottomSheetLayout oldDelegate) { | ||
| 372 | + if (progress != oldDelegate.progress) { | ||
| 373 | + this.childHeight = oldDelegate.childHeight; | ||
| 374 | + return true; | ||
| 375 | + } | ||
| 376 | + return false; | ||
| 377 | + } | ||
| 378 | +} |
lib/src/bottom_sheet_route.dart
0 → 100644
| 1 | +import 'dart:async'; | ||
| 2 | + | ||
| 3 | +import 'package:flutter/cupertino.dart'; | ||
| 4 | +import 'package:flutter/foundation.dart'; | ||
| 5 | +import 'package:flutter/gestures.dart'; | ||
| 6 | +import 'package:flutter/material.dart'; | ||
| 7 | +import 'package:flutter/scheduler.dart'; | ||
| 8 | +import 'package:flutter/widgets.dart'; | ||
| 9 | + | ||
| 10 | +import '../modal_bottom_sheet.dart'; | ||
| 11 | +import 'material_with_modal_page_route.dart'; | ||
| 12 | + | ||
| 13 | +const Duration _bottomSheetDuration = Duration(milliseconds: 400); | ||
| 14 | + | ||
| 15 | +class _ModalBottomSheetLayout extends SingleChildLayoutDelegate { | ||
| 16 | + _ModalBottomSheetLayout(this.progress, this.expand); | ||
| 17 | + | ||
| 18 | + final double progress; | ||
| 19 | + final bool expand; | ||
| 20 | + | ||
| 21 | + @override | ||
| 22 | + BoxConstraints getConstraintsForChild(BoxConstraints constraints) { | ||
| 23 | + return BoxConstraints( | ||
| 24 | + minWidth: constraints.maxWidth, | ||
| 25 | + maxWidth: constraints.maxWidth, | ||
| 26 | + minHeight: expand ? constraints.maxHeight : 0, | ||
| 27 | + maxHeight: expand ? constraints.maxHeight : constraints.minHeight, | ||
| 28 | + ); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + @override | ||
| 32 | + Offset getPositionForChild(Size size, Size childSize) { | ||
| 33 | + return Offset(0.0, size.height - childSize.height * progress); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @override | ||
| 37 | + bool shouldRelayout(_ModalBottomSheetLayout oldDelegate) { | ||
| 38 | + return progress != oldDelegate.progress; | ||
| 39 | + } | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +class _ModalBottomSheet<T> extends StatefulWidget { | ||
| 43 | + const _ModalBottomSheet({ | ||
| 44 | + Key key, | ||
| 45 | + this.route, | ||
| 46 | + this.secondAnimationController, | ||
| 47 | + this.bounce = false, | ||
| 48 | + this.scrollController, | ||
| 49 | + this.expanded = false, | ||
| 50 | + this.enableDrag = true, | ||
| 51 | + }) : assert(expanded != null), | ||
| 52 | + assert(enableDrag != null), | ||
| 53 | + super(key: key); | ||
| 54 | + | ||
| 55 | + final ModalBottomSheetRoute<T> route; | ||
| 56 | + final bool expanded; | ||
| 57 | + final bool bounce; | ||
| 58 | + final bool enableDrag; | ||
| 59 | + final AnimationController secondAnimationController; | ||
| 60 | + final ScrollController scrollController; | ||
| 61 | + | ||
| 62 | + @override | ||
| 63 | + _ModalBottomSheetState<T> createState() => _ModalBottomSheetState<T>(); | ||
| 64 | +} | ||
| 65 | + | ||
| 66 | +class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | ||
| 67 | + String _getRouteLabel(MaterialLocalizations localizations) { | ||
| 68 | + switch (Theme.of(context).platform) { | ||
| 69 | + case TargetPlatform.iOS: | ||
| 70 | + case TargetPlatform.macOS: | ||
| 71 | + return ''; | ||
| 72 | + case TargetPlatform.android: | ||
| 73 | + case TargetPlatform.fuchsia: | ||
| 74 | + return localizations.dialogLabel; | ||
| 75 | + } | ||
| 76 | + return null; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + @override | ||
| 80 | + void initState() { | ||
| 81 | + widget.route.animation.addListener(updateController); | ||
| 82 | + super.initState(); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + @override | ||
| 86 | + void dispose() { | ||
| 87 | + widget.route.animation.removeListener(updateController); | ||
| 88 | + super.dispose(); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + updateController() { | ||
| 92 | + widget.secondAnimationController?.value = widget.route.animation.value; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + @override | ||
| 96 | + Widget build(BuildContext context) { | ||
| 97 | + assert(debugCheckHasMediaQuery(context)); | ||
| 98 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 99 | + final MaterialLocalizations localizations = | ||
| 100 | + MaterialLocalizations.of(context); | ||
| 101 | + final String routeLabel = _getRouteLabel(localizations); | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + | ||
| 105 | + | ||
| 106 | + return AnimatedBuilder( | ||
| 107 | + animation: widget.route._animationController, | ||
| 108 | + builder: (BuildContext context, Widget child) { | ||
| 109 | + // Disable the initial animation when accessible navigation is on so | ||
| 110 | + // that the semantics are added to the tree at the correct time. | ||
| 111 | + return Semantics( | ||
| 112 | + scopesRoute: true, | ||
| 113 | + namesRoute: true, | ||
| 114 | + label: routeLabel, | ||
| 115 | + explicitChildNodes: true, | ||
| 116 | + child: ModalBottomSheet( | ||
| 117 | + expanded: widget.route.expanded, | ||
| 118 | + containerBuilder: widget.route.containerBuilder, | ||
| 119 | + animationController: widget.route._animationController, | ||
| 120 | + shouldClose: widget.route.hasScopedWillPopCallback | ||
| 121 | + ? () async { | ||
| 122 | + final willPop = await widget.route.willPop(); | ||
| 123 | + return willPop != RoutePopDisposition.doNotPop; | ||
| 124 | + } | ||
| 125 | + : null, | ||
| 126 | + onClosing: () { | ||
| 127 | + if (widget.route.isCurrent) { | ||
| 128 | + Navigator.of(context).pop(); | ||
| 129 | + } | ||
| 130 | + }, | ||
| 131 | + builder: widget.route.builder, | ||
| 132 | + enableDrag: widget.enableDrag, | ||
| 133 | + bounce: widget.bounce, | ||
| 134 | + ), | ||
| 135 | + | ||
| 136 | + | ||
| 137 | + ); | ||
| 138 | + }, | ||
| 139 | + ); | ||
| 140 | + } | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | +class ModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
| 144 | + ModalBottomSheetRoute({ | ||
| 145 | + this.containerBuilder, | ||
| 146 | + this.builder, | ||
| 147 | + this.scrollController, | ||
| 148 | + this.barrierLabel, | ||
| 149 | + this.secondAnimationController, | ||
| 150 | + this.modalBarrierColor, | ||
| 151 | + this.isDismissible = true, | ||
| 152 | + this.enableDrag = true, | ||
| 153 | + @required this.expanded, | ||
| 154 | + this.bounce = false, | ||
| 155 | + RouteSettings settings, | ||
| 156 | + }) : assert(expanded != null), | ||
| 157 | + assert(isDismissible != null), | ||
| 158 | + assert(enableDrag != null), | ||
| 159 | + super(settings: settings); | ||
| 160 | + | ||
| 161 | + final WidgetWithChildBuilder containerBuilder; | ||
| 162 | + final ScrollWidgetBuilder builder; | ||
| 163 | + final bool expanded; | ||
| 164 | + final bool bounce; | ||
| 165 | + final Color modalBarrierColor; | ||
| 166 | + final bool isDismissible; | ||
| 167 | + final bool enableDrag; | ||
| 168 | + final ScrollController scrollController; | ||
| 169 | + | ||
| 170 | + final AnimationController secondAnimationController; | ||
| 171 | + | ||
| 172 | + @override | ||
| 173 | + Duration get transitionDuration => _bottomSheetDuration; | ||
| 174 | + | ||
| 175 | + @override | ||
| 176 | + bool get barrierDismissible => isDismissible; | ||
| 177 | + | ||
| 178 | + @override | ||
| 179 | + final String barrierLabel; | ||
| 180 | + | ||
| 181 | + @override | ||
| 182 | + Color get barrierColor => modalBarrierColor ?? Colors.black.withOpacity(0.35); | ||
| 183 | + | ||
| 184 | + AnimationController _animationController; | ||
| 185 | + | ||
| 186 | + @override | ||
| 187 | + AnimationController createAnimationController() { | ||
| 188 | + assert(_animationController == null); | ||
| 189 | + _animationController = | ||
| 190 | + ModalBottomSheet.createAnimationController(navigator.overlay); | ||
| 191 | + return _animationController; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + @override | ||
| 195 | + Widget buildPage(BuildContext context, Animation<double> animation, | ||
| 196 | + Animation<double> secondaryAnimation) { | ||
| 197 | + // By definition, the bottom sheet is aligned to the bottom of the page | ||
| 198 | + // and isn't exposed to the top padding of the MediaQuery. | ||
| 199 | + Widget bottomSheet = MediaQuery.removePadding( | ||
| 200 | + context: context, | ||
| 201 | + // removeTop: true, | ||
| 202 | + child: _ModalBottomSheet<T>( | ||
| 203 | + route: this, | ||
| 204 | + secondAnimationController: secondAnimationController, | ||
| 205 | + expanded: expanded, | ||
| 206 | + scrollController: scrollController, | ||
| 207 | + bounce: bounce, | ||
| 208 | + enableDrag: enableDrag, | ||
| 209 | + ), | ||
| 210 | + ); | ||
| 211 | + return bottomSheet; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + @override | ||
| 215 | + bool canTransitionTo(TransitionRoute<dynamic> nextRoute) => | ||
| 216 | + nextRoute is ModalBottomSheetRoute; | ||
| 217 | + | ||
| 218 | + @override | ||
| 219 | + bool canTransitionFrom(TransitionRoute<dynamic> previousRoute) => | ||
| 220 | + previousRoute is ModalBottomSheetRoute || previousRoute is PageRoute; | ||
| 221 | + | ||
| 222 | + Widget getPreviousRouteTransition( | ||
| 223 | + BuildContext context, | ||
| 224 | + Animation<double> secondAnimation, | ||
| 225 | + Widget child, | ||
| 226 | + ) { | ||
| 227 | + return child; | ||
| 228 | + } | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | +/// Shows a modal material design bottom sheet. | ||
| 232 | +Future<T> showCustomModalBottomSheet<T>( | ||
| 233 | + {@required BuildContext context, | ||
| 234 | + @required ScrollWidgetBuilder builder, | ||
| 235 | + @required WidgetWithChildBuilder containerWidget, | ||
| 236 | + Color backgroundColor, | ||
| 237 | + double elevation, | ||
| 238 | + ShapeBorder shape, | ||
| 239 | + Clip clipBehavior, | ||
| 240 | + Color barrierColor, | ||
| 241 | + bool bounce = false, | ||
| 242 | + bool expand = false, | ||
| 243 | + AnimationController secondAnimation, | ||
| 244 | + bool useRootNavigator = false, | ||
| 245 | + bool isDismissible = true, | ||
| 246 | + bool enableDrag = true, | ||
| 247 | + ScrollController scrollController}) async { | ||
| 248 | + assert(context != null); | ||
| 249 | + assert(builder != null); | ||
| 250 | + assert(containerWidget != null); | ||
| 251 | + assert(expand != null); | ||
| 252 | + assert(useRootNavigator != null); | ||
| 253 | + assert(isDismissible != null); | ||
| 254 | + assert(enableDrag != null); | ||
| 255 | + assert(debugCheckHasMediaQuery(context)); | ||
| 256 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 257 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 258 | + .push(ModalBottomSheetRoute<T>( | ||
| 259 | + builder: builder, | ||
| 260 | + bounce: bounce, | ||
| 261 | + containerBuilder: containerWidget, | ||
| 262 | + secondAnimationController: secondAnimation, | ||
| 263 | + expanded: expand, | ||
| 264 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 265 | + isDismissible: isDismissible, | ||
| 266 | + modalBarrierColor: barrierColor, | ||
| 267 | + enableDrag: enableDrag, | ||
| 268 | + )); | ||
| 269 | + return result; | ||
| 270 | +} |
lib/src/bottom_sheets/bar_bottom_sheet.dart
0 → 100644
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import 'package:flutter/material.dart'; | ||
| 5 | +import 'package:flutter/services.dart'; | ||
| 6 | + | ||
| 7 | +import '../../modal_bottom_sheet.dart'; | ||
| 8 | +import '../bottom_sheet_route.dart'; | ||
| 9 | + | ||
| 10 | +class BarBottomSheet extends StatelessWidget { | ||
| 11 | + final Widget child; | ||
| 12 | + | ||
| 13 | + const BarBottomSheet({Key key, this.child}) : super(key: key); | ||
| 14 | + @override | ||
| 15 | + Widget build(BuildContext context) { | ||
| 16 | + return AnnotatedRegion<SystemUiOverlayStyle>( | ||
| 17 | + value: SystemUiOverlayStyle.light, | ||
| 18 | + child: Column( | ||
| 19 | + mainAxisSize: MainAxisSize.min, | ||
| 20 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 21 | + children: [ | ||
| 22 | + SizedBox(height: 12), | ||
| 23 | + SafeArea( | ||
| 24 | + bottom: false, | ||
| 25 | + child: Container( | ||
| 26 | + height: 6, | ||
| 27 | + width: 40, | ||
| 28 | + decoration: BoxDecoration( | ||
| 29 | + color: Colors.white, | ||
| 30 | + borderRadius: BorderRadius.circular(6)), | ||
| 31 | + ), | ||
| 32 | + ), | ||
| 33 | + SizedBox(height: 8), | ||
| 34 | + Flexible( | ||
| 35 | + flex: 1, | ||
| 36 | + fit: FlexFit.loose, | ||
| 37 | + child: ClipRRect( | ||
| 38 | + borderRadius: BorderRadius.only( | ||
| 39 | + topLeft: Radius.circular(15), | ||
| 40 | + topRight: Radius.circular(15)), | ||
| 41 | + child: Container( | ||
| 42 | + decoration: BoxDecoration( | ||
| 43 | + color: Theme.of(context).scaffoldBackgroundColor, | ||
| 44 | + boxShadow: [ | ||
| 45 | + BoxShadow( | ||
| 46 | + blurRadius: 10, | ||
| 47 | + color: Colors.black12, | ||
| 48 | + spreadRadius: 5) | ||
| 49 | + ]), | ||
| 50 | + width: double.infinity, | ||
| 51 | + child: MediaQuery.removePadding( | ||
| 52 | + context: context, | ||
| 53 | + removeTop: true, | ||
| 54 | + child: child | ||
| 55 | + ) | ||
| 56 | + ), | ||
| 57 | + ), | ||
| 58 | + ), | ||
| 59 | + ]),); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +Future<T> showBarModalBottomSheet<T>({ | ||
| 65 | + @required BuildContext context, | ||
| 66 | + @required ScrollWidgetBuilder builder, | ||
| 67 | + Color backgroundColor, | ||
| 68 | + double elevation, | ||
| 69 | + ShapeBorder shape, | ||
| 70 | + Clip clipBehavior, | ||
| 71 | + Color barrierColor = Colors.black87, | ||
| 72 | + bool bounce = true, | ||
| 73 | + bool expand = false, | ||
| 74 | + AnimationController secondAnimation, | ||
| 75 | + bool useRootNavigator = false, | ||
| 76 | + bool isDismissible = true, | ||
| 77 | + bool enableDrag = true, | ||
| 78 | +}) async { | ||
| 79 | + assert(context != null); | ||
| 80 | + assert(builder != null); | ||
| 81 | + assert(expand != null); | ||
| 82 | + assert(useRootNavigator != null); | ||
| 83 | + assert(isDismissible != null); | ||
| 84 | + assert(enableDrag != null); | ||
| 85 | + assert(debugCheckHasMediaQuery(context)); | ||
| 86 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 87 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 88 | + .push(ModalBottomSheetRoute<T>( | ||
| 89 | + builder: builder, | ||
| 90 | + bounce: bounce, | ||
| 91 | + containerBuilder: (_, __, child) => BarBottomSheet(child: child,), | ||
| 92 | + secondAnimationController: secondAnimation, | ||
| 93 | + expanded: expand, | ||
| 94 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 95 | + isDismissible: isDismissible, | ||
| 96 | + modalBarrierColor: barrierColor, | ||
| 97 | + enableDrag: enableDrag, | ||
| 98 | + )); | ||
| 99 | + return result; | ||
| 100 | +} | ||
| 101 | + |
| 1 | +// Copyright 2014 The Flutter Authors. All rights reserved. | ||
| 2 | +// Use of this source code is governed by a BSD-style license that can be | ||
| 3 | +// found in the LICENSE file. | ||
| 4 | + | ||
| 5 | +import 'dart:async'; | ||
| 6 | + | ||
| 7 | +import 'package:flutter/cupertino.dart'; | ||
| 8 | +import 'package:flutter/foundation.dart'; | ||
| 9 | +import 'package:flutter/gestures.dart'; | ||
| 10 | +import 'package:flutter/material.dart'; | ||
| 11 | +import 'package:flutter/scheduler.dart'; | ||
| 12 | +import 'package:flutter/services.dart'; | ||
| 13 | +import 'package:flutter/widgets.dart'; | ||
| 14 | + | ||
| 15 | +import '../../modal_bottom_sheet.dart'; | ||
| 16 | +import '../bottom_sheet_route.dart'; | ||
| 17 | + | ||
| 18 | +const double _behind_widget_visible_height = 10; | ||
| 19 | + | ||
| 20 | +/// Cupertino Bottom Sheet Container | ||
| 21 | +/// | ||
| 22 | +/// Clip the child widget to rectangle with top rounded corners and adds | ||
| 23 | +/// top padding(+safe area padding). This padding [_behind_widget_visible_height] | ||
| 24 | +/// is the height that will be displayed from previous route. | ||
| 25 | +class _CupertinoBottomSheetContainer extends StatelessWidget { | ||
| 26 | + final Widget child; | ||
| 27 | + final Color backgroundColor; | ||
| 28 | + | ||
| 29 | + const _CupertinoBottomSheetContainer( | ||
| 30 | + {Key key, this.child, this.backgroundColor}) | ||
| 31 | + : super(key: key); | ||
| 32 | + | ||
| 33 | + @override | ||
| 34 | + Widget build(BuildContext context) { | ||
| 35 | + final topSafeAreaPadding = MediaQuery.of(context).padding.top; | ||
| 36 | + final topPadding = _behind_widget_visible_height + topSafeAreaPadding; | ||
| 37 | + final radius = Radius.circular(12); | ||
| 38 | + final shadow = | ||
| 39 | + BoxShadow(blurRadius: 10, color: Colors.black12, spreadRadius: 5); | ||
| 40 | + final _backgroundColor = | ||
| 41 | + backgroundColor ?? CupertinoTheme.of(context).scaffoldBackgroundColor; | ||
| 42 | + return Padding( | ||
| 43 | + padding: EdgeInsets.only(top: topPadding), | ||
| 44 | + child: ClipRRect( | ||
| 45 | + borderRadius: BorderRadius.only(topLeft: radius, topRight: radius), | ||
| 46 | + child: Container( | ||
| 47 | + decoration: | ||
| 48 | + BoxDecoration(color: _backgroundColor, boxShadow: [shadow]), | ||
| 49 | + width: double.infinity, | ||
| 50 | + child: MediaQuery.removePadding( | ||
| 51 | + context: context, | ||
| 52 | + removeTop: true, //Remove top Safe Area | ||
| 53 | + child: child, | ||
| 54 | + ), | ||
| 55 | + ), | ||
| 56 | + ), | ||
| 57 | + ); | ||
| 58 | + } | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +Future<T> showCupertinoModalBottomSheet<T>({ | ||
| 62 | + @required BuildContext context, | ||
| 63 | + @required ScrollWidgetBuilder builder, | ||
| 64 | + Color backgroundColor, | ||
| 65 | + double elevation, | ||
| 66 | + ShapeBorder shape, | ||
| 67 | + Clip clipBehavior, | ||
| 68 | + Color barrierColor, | ||
| 69 | + bool expand = false, | ||
| 70 | + AnimationController secondAnimation, | ||
| 71 | + bool useRootNavigator = false, | ||
| 72 | + bool bounce = true, | ||
| 73 | + bool isDismissible, | ||
| 74 | + bool enableDrag = true, | ||
| 75 | +}) async { | ||
| 76 | + assert(context != null); | ||
| 77 | + assert(builder != null); | ||
| 78 | + assert(expand != null); | ||
| 79 | + assert(useRootNavigator != null); | ||
| 80 | + assert(enableDrag != null); | ||
| 81 | + assert(debugCheckHasMediaQuery(context)); | ||
| 82 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 83 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 84 | + .push(CupertinoModalBottomSheetRoute<T>( | ||
| 85 | + builder: builder, | ||
| 86 | + containerBuilder: (context, _, child) => _CupertinoBottomSheetContainer( | ||
| 87 | + child: child, | ||
| 88 | + backgroundColor: backgroundColor, | ||
| 89 | + ), | ||
| 90 | + secondAnimationController: secondAnimation, | ||
| 91 | + expanded: expand, | ||
| 92 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 93 | + elevation: elevation, | ||
| 94 | + bounce: bounce, | ||
| 95 | + shape: shape, | ||
| 96 | + clipBehavior: clipBehavior, | ||
| 97 | + isDismissible: isDismissible ?? expand == false ? true : false, | ||
| 98 | + modalBarrierColor: barrierColor ?? Colors.black12, | ||
| 99 | + enableDrag: enableDrag, | ||
| 100 | + )); | ||
| 101 | + return result; | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | +class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { | ||
| 105 | + CupertinoModalBottomSheetRoute({ | ||
| 106 | + ScrollWidgetBuilder builder, | ||
| 107 | + WidgetWithChildBuilder containerBuilder, | ||
| 108 | + String barrierLabel, | ||
| 109 | + double elevation, | ||
| 110 | + ShapeBorder shape, | ||
| 111 | + Clip clipBehavior, | ||
| 112 | + AnimationController secondAnimationController, | ||
| 113 | + Color modalBarrierColor, | ||
| 114 | + bool bounce = true, | ||
| 115 | + bool isDismissible = true, | ||
| 116 | + bool enableDrag = true, | ||
| 117 | + @required bool expanded, | ||
| 118 | + RouteSettings settings, | ||
| 119 | + }) : assert(expanded != null), | ||
| 120 | + assert(isDismissible != null), | ||
| 121 | + assert(enableDrag != null), | ||
| 122 | + super( | ||
| 123 | + containerBuilder: containerBuilder, | ||
| 124 | + builder: builder, | ||
| 125 | + bounce: bounce, | ||
| 126 | + barrierLabel: barrierLabel, | ||
| 127 | + secondAnimationController: secondAnimationController, | ||
| 128 | + modalBarrierColor: modalBarrierColor, | ||
| 129 | + isDismissible: isDismissible, | ||
| 130 | + enableDrag: enableDrag, | ||
| 131 | + expanded: expanded, | ||
| 132 | + settings: settings, | ||
| 133 | + ); | ||
| 134 | + | ||
| 135 | + @override | ||
| 136 | + Widget buildTransitions( | ||
| 137 | + BuildContext context, | ||
| 138 | + Animation<double> animation, | ||
| 139 | + Animation<double> secondaryAnimation, | ||
| 140 | + Widget child, | ||
| 141 | + ) { | ||
| 142 | + final paddingTop = MediaQuery.of(context).padding.top; | ||
| 143 | + final distanceWithScale = | ||
| 144 | + (paddingTop + _behind_widget_visible_height) * 0.9; | ||
| 145 | + final offsetY = secondaryAnimation.value * (paddingTop - distanceWithScale); | ||
| 146 | + final scale = 1 - secondaryAnimation.value / 10; | ||
| 147 | + return AnimatedBuilder( | ||
| 148 | + builder: (context, child) => Transform.translate( | ||
| 149 | + offset: Offset(0, offsetY), | ||
| 150 | + child: Transform.scale( | ||
| 151 | + scale: scale, | ||
| 152 | + child: child, | ||
| 153 | + alignment: Alignment.topCenter, | ||
| 154 | + ), | ||
| 155 | + ), | ||
| 156 | + child: child, | ||
| 157 | + animation: secondaryAnimation, | ||
| 158 | + ); | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + @override | ||
| 162 | + Widget getPreviousRouteTransition(BuildContext context, | ||
| 163 | + Animation<double> secondaryAnimation, Widget child) { | ||
| 164 | + return _CupertinoModalTransition( | ||
| 165 | + secondaryAnimation: secondaryAnimation, body: child); | ||
| 166 | + } | ||
| 167 | +} | ||
| 168 | + | ||
| 169 | +class _CupertinoModalTransition extends StatelessWidget { | ||
| 170 | + final Animation<double> secondaryAnimation; | ||
| 171 | + | ||
| 172 | + final Widget body; | ||
| 173 | + | ||
| 174 | + const _CupertinoModalTransition( | ||
| 175 | + {Key key, @required this.secondaryAnimation, @required this.body}) | ||
| 176 | + : super(key: key); | ||
| 177 | + | ||
| 178 | + @override | ||
| 179 | + Widget build(BuildContext context) { | ||
| 180 | + double startRoundCorner = 0; | ||
| 181 | + final paddingTop = MediaQuery.of(context).padding.top; | ||
| 182 | + if (defaultTargetPlatform == TargetPlatform.iOS && paddingTop > 20) { | ||
| 183 | + startRoundCorner = 38.5; | ||
| 184 | + //https://kylebashour.com/posts/finding-the-real-iphone-x-corner-radius | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + final curvedAnimation = CurvedAnimation( | ||
| 188 | + parent: secondaryAnimation, | ||
| 189 | + curve: Curves.easeOut, | ||
| 190 | + ); | ||
| 191 | + | ||
| 192 | + return AnnotatedRegion<SystemUiOverlayStyle>( | ||
| 193 | + value: SystemUiOverlayStyle.light, | ||
| 194 | + child: AnimatedBuilder( | ||
| 195 | + animation: curvedAnimation, | ||
| 196 | + child: body, | ||
| 197 | + builder: (context, child) { | ||
| 198 | + Widget result = child; | ||
| 199 | + | ||
| 200 | + final progress = curvedAnimation.value; | ||
| 201 | + final yOffset = progress * paddingTop; | ||
| 202 | + final scale = 1 - progress / 10; | ||
| 203 | + final radius = progress == 0 ? 0.0 : (1 - progress) * startRoundCorner + progress * 12; | ||
| 204 | + return Stack( | ||
| 205 | + children: <Widget>[ | ||
| 206 | + Container(color: Colors.black), | ||
| 207 | + Transform.translate( | ||
| 208 | + offset: Offset(0, yOffset), | ||
| 209 | + child: Transform.scale( | ||
| 210 | + scale: scale, | ||
| 211 | + alignment: Alignment.topCenter, | ||
| 212 | + child: ClipRRect( | ||
| 213 | + borderRadius: BorderRadius.circular(radius), | ||
| 214 | + child: result), | ||
| 215 | + ), | ||
| 216 | + ) | ||
| 217 | + ], | ||
| 218 | + ); | ||
| 219 | + }, | ||
| 220 | + )); | ||
| 221 | + } | ||
| 222 | +} | ||
| 223 | + | ||
| 224 | +class _CupertinoScaffold extends InheritedWidget { | ||
| 225 | + final AnimationController animation; | ||
| 226 | + | ||
| 227 | + final Widget child; | ||
| 228 | + | ||
| 229 | + const _CupertinoScaffold({Key key, this.animation, this.child}) | ||
| 230 | + : super(key: key, child: child); | ||
| 231 | + | ||
| 232 | + @override | ||
| 233 | + bool updateShouldNotify(InheritedWidget oldWidget) { | ||
| 234 | + return false; | ||
| 235 | + } | ||
| 236 | +} | ||
| 237 | + | ||
| 238 | +// Support | ||
| 239 | +class CupertinoScaffold extends StatefulWidget { | ||
| 240 | + static _CupertinoScaffold of(BuildContext context) => | ||
| 241 | + context.dependOnInheritedWidgetOfExactType<_CupertinoScaffold>(); | ||
| 242 | + | ||
| 243 | + final Widget body; | ||
| 244 | + | ||
| 245 | + const CupertinoScaffold({Key key, this.body}) : super(key: key); | ||
| 246 | + | ||
| 247 | + @override | ||
| 248 | + State<StatefulWidget> createState() => _CupertinoScaffoldState(); | ||
| 249 | + | ||
| 250 | + static Future<T> showCupertinoModalBottomSheet<T>({ | ||
| 251 | + @required BuildContext context, | ||
| 252 | + @required ScrollWidgetBuilder builder, | ||
| 253 | + Color backgroundColor, | ||
| 254 | + Color barrierColor, | ||
| 255 | + bool expand = false, | ||
| 256 | + bool useRootNavigator = false, | ||
| 257 | + bool bounce = true, | ||
| 258 | + bool isDismissible, | ||
| 259 | + bool enableDrag = true, | ||
| 260 | + }) async { | ||
| 261 | + assert(context != null); | ||
| 262 | + assert(builder != null); | ||
| 263 | + assert(expand != null); | ||
| 264 | + assert(useRootNavigator != null); | ||
| 265 | + assert(enableDrag != null); | ||
| 266 | + assert(debugCheckHasMediaQuery(context)); | ||
| 267 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 268 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 269 | + .push(CupertinoModalBottomSheetRoute<T>( | ||
| 270 | + builder: builder, | ||
| 271 | + secondAnimationController: CupertinoScaffold.of(context).animation, | ||
| 272 | + containerBuilder: (context, _, child) => _CupertinoBottomSheetContainer( | ||
| 273 | + child: child, | ||
| 274 | + backgroundColor: backgroundColor, | ||
| 275 | + ), | ||
| 276 | + expanded: expand, | ||
| 277 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 278 | + bounce: bounce, | ||
| 279 | + isDismissible: isDismissible ?? expand == false ? true : false, | ||
| 280 | + modalBarrierColor: barrierColor ?? Colors.black12, | ||
| 281 | + enableDrag: enableDrag, | ||
| 282 | + )); | ||
| 283 | + return result; | ||
| 284 | + } | ||
| 285 | +} | ||
| 286 | + | ||
| 287 | +class _CupertinoScaffoldState extends State<CupertinoScaffold> | ||
| 288 | + with TickerProviderStateMixin { | ||
| 289 | + AnimationController animationController; | ||
| 290 | + | ||
| 291 | + SystemUiOverlayStyle lastStyle; | ||
| 292 | + | ||
| 293 | + @override | ||
| 294 | + void initState() { | ||
| 295 | + animationController = | ||
| 296 | + AnimationController(duration: Duration(milliseconds: 350), vsync: this); | ||
| 297 | + super.initState(); | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + @override | ||
| 301 | + void dispose() { | ||
| 302 | + super.dispose(); | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + @override | ||
| 306 | + Widget build(BuildContext context) { | ||
| 307 | + return _CupertinoScaffold( | ||
| 308 | + animation: animationController, | ||
| 309 | + child: _CupertinoModalTransition( | ||
| 310 | + secondaryAnimation: animationController, | ||
| 311 | + body: widget.body, | ||
| 312 | + ), | ||
| 313 | + ); | ||
| 314 | + } | ||
| 315 | +} |
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import 'package:flutter/material.dart'; | ||
| 5 | +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
| 6 | + | ||
| 7 | +/// Shows a modal material design bottom sheet. | ||
| 8 | +Future<T> showMaterialModalBottomSheet<T>({ | ||
| 9 | + @required BuildContext context, | ||
| 10 | + @required ScrollWidgetBuilder builder, | ||
| 11 | + Color backgroundColor, | ||
| 12 | + double elevation, | ||
| 13 | + ShapeBorder shape, | ||
| 14 | + Clip clipBehavior, | ||
| 15 | + Color barrierColor, | ||
| 16 | + bool bounce = false, | ||
| 17 | + bool expand = false, | ||
| 18 | + AnimationController secondAnimation, | ||
| 19 | + bool useRootNavigator = false, | ||
| 20 | + bool isDismissible = true, | ||
| 21 | + bool enableDrag = true, | ||
| 22 | +}) async { | ||
| 23 | + assert(context != null); | ||
| 24 | + assert(builder != null); | ||
| 25 | + assert(expand != null); | ||
| 26 | + assert(useRootNavigator != null); | ||
| 27 | + assert(isDismissible != null); | ||
| 28 | + assert(enableDrag != null); | ||
| 29 | + assert(debugCheckHasMediaQuery(context)); | ||
| 30 | + assert(debugCheckHasMaterialLocalizations(context)); | ||
| 31 | + final result = await Navigator.of(context, rootNavigator: useRootNavigator) | ||
| 32 | + .push(ModalBottomSheetRoute<T>( | ||
| 33 | + builder: builder, | ||
| 34 | + containerBuilder: _materialContainerBuilder( | ||
| 35 | + context, | ||
| 36 | + backgroundColor: backgroundColor, | ||
| 37 | + elevation: elevation, | ||
| 38 | + shape: shape, | ||
| 39 | + clipBehavior: clipBehavior, | ||
| 40 | + theme: Theme.of(context, shadowThemeOnly: true), | ||
| 41 | + ), | ||
| 42 | + secondAnimationController: secondAnimation, | ||
| 43 | + bounce: bounce, | ||
| 44 | + expanded: expand, | ||
| 45 | + barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 46 | + isDismissible: isDismissible, | ||
| 47 | + modalBarrierColor: barrierColor, | ||
| 48 | + enableDrag: enableDrag, | ||
| 49 | + )); | ||
| 50 | + return result; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +//Default container builder is the Material Appearance | ||
| 54 | +WidgetWithChildBuilder _materialContainerBuilder(BuildContext context, | ||
| 55 | + {Color backgroundColor, | ||
| 56 | + double elevation, | ||
| 57 | + ThemeData theme, | ||
| 58 | + Clip clipBehavior, | ||
| 59 | + ShapeBorder shape}) { | ||
| 60 | + final BottomSheetThemeData bottomSheetTheme = | ||
| 61 | + Theme.of(context).bottomSheetTheme; | ||
| 62 | + final Color color = backgroundColor ?? | ||
| 63 | + bottomSheetTheme?.modalBackgroundColor ?? | ||
| 64 | + bottomSheetTheme?.backgroundColor; | ||
| 65 | + final double _elevation = elevation ?? bottomSheetTheme.elevation ?? 0; | ||
| 66 | + final ShapeBorder _shape = shape ?? bottomSheetTheme.shape; | ||
| 67 | + final Clip _clipBehavior = | ||
| 68 | + clipBehavior ?? bottomSheetTheme.clipBehavior ?? Clip.none; | ||
| 69 | + | ||
| 70 | + final result = (context, animation, child) => Material( | ||
| 71 | + color: color, | ||
| 72 | + elevation: _elevation, | ||
| 73 | + shape: _shape, | ||
| 74 | + clipBehavior: _clipBehavior, | ||
| 75 | + child: child); | ||
| 76 | + if (theme != null) { | ||
| 77 | + return (context, animation, child) => | ||
| 78 | + Theme(data: theme, child: result(context, animation, child)); | ||
| 79 | + } else { | ||
| 80 | + return result; | ||
| 81 | + } | ||
| 82 | +} |
lib/src/material_with_modal_page_route.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/foundation.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:flutter/services.dart'; | ||
| 5 | + | ||
| 6 | +import '../modal_bottom_sheet.dart'; | ||
| 7 | +import 'bottom_sheet_route.dart'; | ||
| 8 | + | ||
| 9 | +class e extends PageRouteBuilder { | ||
| 10 | + | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
| 14 | + /// Construct a MaterialPageRoute whose contents are defined by [builder]. | ||
| 15 | + /// | ||
| 16 | + /// The values of [builder], [maintainState], and [fullScreenDialog] must not | ||
| 17 | + /// be null. | ||
| 18 | + MaterialWithModalsPageRoute({ | ||
| 19 | + @required WidgetBuilder builder, | ||
| 20 | + RouteSettings settings, | ||
| 21 | + bool maintainState = true, | ||
| 22 | + bool fullscreenDialog = false, | ||
| 23 | + }) : assert(builder != null), | ||
| 24 | + assert(maintainState != null), | ||
| 25 | + assert(fullscreenDialog != null), | ||
| 26 | + assert(opaque), | ||
| 27 | + super( | ||
| 28 | + settings: settings, | ||
| 29 | + fullscreenDialog: fullscreenDialog, | ||
| 30 | + builder: builder, | ||
| 31 | + maintainState: maintainState); | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + | ||
| 35 | + ModalBottomSheetRoute _nextModalRoute; | ||
| 36 | + | ||
| 37 | + @override | ||
| 38 | + bool canTransitionTo(TransitionRoute<dynamic> nextRoute) { | ||
| 39 | + // Don't perform outgoing animation if the next route is a fullscreen dialog. | ||
| 40 | + return (nextRoute is MaterialPageRoute && !nextRoute.fullscreenDialog) || | ||
| 41 | + (nextRoute is CupertinoPageRoute && !nextRoute.fullscreenDialog) || | ||
| 42 | + (nextRoute is MaterialWithModalsPageRoute && | ||
| 43 | + !nextRoute.fullscreenDialog) || | ||
| 44 | + (nextRoute is ModalBottomSheetRoute); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @override | ||
| 48 | + void didChangeNext(Route nextRoute) { | ||
| 49 | + if (nextRoute is ModalBottomSheetRoute) { | ||
| 50 | + this._nextModalRoute = nextRoute; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + super.didChangeNext(nextRoute); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @override | ||
| 57 | + void didPopNext(Route nextRoute) { | ||
| 58 | + super.didPopNext(nextRoute); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + @override | ||
| 62 | + bool didPop(T result) { | ||
| 63 | + _nextModalRoute = null; | ||
| 64 | + return super.didPop(result); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @override | ||
| 68 | + Widget buildTransitions(BuildContext context, Animation<double> animation, | ||
| 69 | + Animation<double> secondaryAnimation, Widget child) { | ||
| 70 | + final PageTransitionsTheme theme = Theme.of(context).pageTransitionsTheme; | ||
| 71 | + if (_nextModalRoute != null) { | ||
| 72 | + if (!secondaryAnimation.isDismissed) { | ||
| 73 | + // Avoid default transition theme to animate when a new modal view is pushed | ||
| 74 | + final fakeSecondaryAnimation = | ||
| 75 | + Tween<double>(begin: 0, end: 0).animate(secondaryAnimation); | ||
| 76 | + | ||
| 77 | + final defaultTransition = theme.buildTransitions<T>( | ||
| 78 | + this, context, animation, fakeSecondaryAnimation, child); | ||
| 79 | + return _nextModalRoute.getPreviousRouteTransition( | ||
| 80 | + context, secondaryAnimation, defaultTransition); | ||
| 81 | + } else { | ||
| 82 | + _nextModalRoute = null; | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + return theme.buildTransitions<T>( | ||
| 87 | + this, context, animation, secondaryAnimation, child); | ||
| 88 | + } | ||
| 89 | +} |
pubspec.lock
0 → 100644
| 1 | +# Generated by pub | ||
| 2 | +# See https://dart.dev/tools/pub/glossary#lockfile | ||
| 3 | +packages: | ||
| 4 | + archive: | ||
| 5 | + dependency: transitive | ||
| 6 | + description: | ||
| 7 | + name: archive | ||
| 8 | + url: "https://pub.dartlang.org" | ||
| 9 | + source: hosted | ||
| 10 | + version: "2.0.13" | ||
| 11 | + args: | ||
| 12 | + dependency: transitive | ||
| 13 | + description: | ||
| 14 | + name: args | ||
| 15 | + url: "https://pub.dartlang.org" | ||
| 16 | + source: hosted | ||
| 17 | + version: "1.6.0" | ||
| 18 | + async: | ||
| 19 | + dependency: transitive | ||
| 20 | + description: | ||
| 21 | + name: async | ||
| 22 | + url: "https://pub.dartlang.org" | ||
| 23 | + source: hosted | ||
| 24 | + version: "2.4.1" | ||
| 25 | + boolean_selector: | ||
| 26 | + dependency: transitive | ||
| 27 | + description: | ||
| 28 | + name: boolean_selector | ||
| 29 | + url: "https://pub.dartlang.org" | ||
| 30 | + source: hosted | ||
| 31 | + version: "2.0.0" | ||
| 32 | + charcode: | ||
| 33 | + dependency: transitive | ||
| 34 | + description: | ||
| 35 | + name: charcode | ||
| 36 | + url: "https://pub.dartlang.org" | ||
| 37 | + source: hosted | ||
| 38 | + version: "1.1.3" | ||
| 39 | + collection: | ||
| 40 | + dependency: transitive | ||
| 41 | + description: | ||
| 42 | + name: collection | ||
| 43 | + url: "https://pub.dartlang.org" | ||
| 44 | + source: hosted | ||
| 45 | + version: "1.14.12" | ||
| 46 | + convert: | ||
| 47 | + dependency: transitive | ||
| 48 | + description: | ||
| 49 | + name: convert | ||
| 50 | + url: "https://pub.dartlang.org" | ||
| 51 | + source: hosted | ||
| 52 | + version: "2.1.1" | ||
| 53 | + crypto: | ||
| 54 | + dependency: transitive | ||
| 55 | + description: | ||
| 56 | + name: crypto | ||
| 57 | + url: "https://pub.dartlang.org" | ||
| 58 | + source: hosted | ||
| 59 | + version: "2.1.4" | ||
| 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 | + image: | ||
| 71 | + dependency: transitive | ||
| 72 | + description: | ||
| 73 | + name: image | ||
| 74 | + url: "https://pub.dartlang.org" | ||
| 75 | + source: hosted | ||
| 76 | + version: "2.1.12" | ||
| 77 | + matcher: | ||
| 78 | + dependency: transitive | ||
| 79 | + description: | ||
| 80 | + name: matcher | ||
| 81 | + url: "https://pub.dartlang.org" | ||
| 82 | + source: hosted | ||
| 83 | + version: "0.12.6" | ||
| 84 | + meta: | ||
| 85 | + dependency: transitive | ||
| 86 | + description: | ||
| 87 | + name: meta | ||
| 88 | + url: "https://pub.dartlang.org" | ||
| 89 | + source: hosted | ||
| 90 | + version: "1.1.8" | ||
| 91 | + path: | ||
| 92 | + dependency: transitive | ||
| 93 | + description: | ||
| 94 | + name: path | ||
| 95 | + url: "https://pub.dartlang.org" | ||
| 96 | + source: hosted | ||
| 97 | + version: "1.6.4" | ||
| 98 | + petitparser: | ||
| 99 | + dependency: transitive | ||
| 100 | + description: | ||
| 101 | + name: petitparser | ||
| 102 | + url: "https://pub.dartlang.org" | ||
| 103 | + source: hosted | ||
| 104 | + version: "2.4.0" | ||
| 105 | + quiver: | ||
| 106 | + dependency: transitive | ||
| 107 | + description: | ||
| 108 | + name: quiver | ||
| 109 | + url: "https://pub.dartlang.org" | ||
| 110 | + source: hosted | ||
| 111 | + version: "2.1.3" | ||
| 112 | + sky_engine: | ||
| 113 | + dependency: transitive | ||
| 114 | + description: flutter | ||
| 115 | + source: sdk | ||
| 116 | + version: "0.0.99" | ||
| 117 | + source_span: | ||
| 118 | + dependency: transitive | ||
| 119 | + description: | ||
| 120 | + name: source_span | ||
| 121 | + url: "https://pub.dartlang.org" | ||
| 122 | + source: hosted | ||
| 123 | + version: "1.7.0" | ||
| 124 | + stack_trace: | ||
| 125 | + dependency: transitive | ||
| 126 | + description: | ||
| 127 | + name: stack_trace | ||
| 128 | + url: "https://pub.dartlang.org" | ||
| 129 | + source: hosted | ||
| 130 | + version: "1.9.3" | ||
| 131 | + stream_channel: | ||
| 132 | + dependency: transitive | ||
| 133 | + description: | ||
| 134 | + name: stream_channel | ||
| 135 | + url: "https://pub.dartlang.org" | ||
| 136 | + source: hosted | ||
| 137 | + version: "2.0.0" | ||
| 138 | + string_scanner: | ||
| 139 | + dependency: transitive | ||
| 140 | + description: | ||
| 141 | + name: string_scanner | ||
| 142 | + url: "https://pub.dartlang.org" | ||
| 143 | + source: hosted | ||
| 144 | + version: "1.0.5" | ||
| 145 | + term_glyph: | ||
| 146 | + dependency: transitive | ||
| 147 | + description: | ||
| 148 | + name: term_glyph | ||
| 149 | + url: "https://pub.dartlang.org" | ||
| 150 | + source: hosted | ||
| 151 | + version: "1.1.0" | ||
| 152 | + test_api: | ||
| 153 | + dependency: transitive | ||
| 154 | + description: | ||
| 155 | + name: test_api | ||
| 156 | + url: "https://pub.dartlang.org" | ||
| 157 | + source: hosted | ||
| 158 | + version: "0.2.15" | ||
| 159 | + typed_data: | ||
| 160 | + dependency: transitive | ||
| 161 | + description: | ||
| 162 | + name: typed_data | ||
| 163 | + url: "https://pub.dartlang.org" | ||
| 164 | + source: hosted | ||
| 165 | + version: "1.1.6" | ||
| 166 | + vector_math: | ||
| 167 | + dependency: transitive | ||
| 168 | + description: | ||
| 169 | + name: vector_math | ||
| 170 | + url: "https://pub.dartlang.org" | ||
| 171 | + source: hosted | ||
| 172 | + version: "2.0.8" | ||
| 173 | + xml: | ||
| 174 | + dependency: transitive | ||
| 175 | + description: | ||
| 176 | + name: xml | ||
| 177 | + url: "https://pub.dartlang.org" | ||
| 178 | + source: hosted | ||
| 179 | + version: "3.6.1" | ||
| 180 | +sdks: | ||
| 181 | + dart: ">=2.7.0 <3.0.0" |
pubspec.yaml
0 → 100644
| 1 | +name: modal_bottom_sheet | ||
| 2 | +description: 'Modal bottom sheets: Cupertino, Material, or build your own' | ||
| 3 | +version: 0.0.1 | ||
| 4 | +author: 'JB <git@jaimeblasco.com>' | ||
| 5 | +homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' | ||
| 6 | + | ||
| 7 | +environment: | ||
| 8 | + sdk: ">=2.7.0 <3.0.0" | ||
| 9 | + | ||
| 10 | +dependencies: | ||
| 11 | + flutter: | ||
| 12 | + sdk: flutter | ||
| 13 | + | ||
| 14 | +dev_dependencies: | ||
| 15 | + flutter_test: | ||
| 16 | + sdk: flutter | ||
| 17 | + | ||
| 18 | +# For information on the generic Dart part of this file, see the | ||
| 19 | +# following page: https://dart.dev/tools/pub/pubspec | ||
| 20 | + | ||
| 21 | +# The following section is specific to Flutter. | ||
| 22 | +flutter: | ||
| 23 | + | ||
| 24 | + # To add assets to your package, add an assets section, like this: | ||
| 25 | + # assets: | ||
| 26 | + # - images/a_dot_burr.jpeg | ||
| 27 | + # - images/a_dot_ham.jpeg | ||
| 28 | + # | ||
| 29 | + # For details regarding assets in packages, see | ||
| 30 | + # https://flutter.dev/assets-and-images/#from-packages | ||
| 31 | + # | ||
| 32 | + # An image asset can refer to one or more resolution-specific "variants", see | ||
| 33 | + # https://flutter.dev/assets-and-images/#resolution-aware. | ||
| 34 | + | ||
| 35 | + # To add custom fonts to your package, add a fonts section here, | ||
| 36 | + # in this "flutter" section. Each entry in this list should have a | ||
| 37 | + # "family" key with the font family name, and a "fonts" key with a | ||
| 38 | + # list giving the asset and other descriptors for the font. For | ||
| 39 | + # example: | ||
| 40 | + # fonts: | ||
| 41 | + # - family: Schyler | ||
| 42 | + # fonts: | ||
| 43 | + # - asset: fonts/Schyler-Regular.ttf | ||
| 44 | + # - asset: fonts/Schyler-Italic.ttf | ||
| 45 | + # style: italic | ||
| 46 | + # - family: Trajan Pro | ||
| 47 | + # fonts: | ||
| 48 | + # - asset: fonts/TrajanPro.ttf | ||
| 49 | + # - asset: fonts/TrajanPro_Bold.ttf | ||
| 50 | + # weight: 700 | ||
| 51 | + # | ||
| 52 | + # For details regarding fonts in packages, see | ||
| 53 | + # https://flutter.dev/custom-fonts/#from-packages |
-
Please register or login to post a comment