Jaime Blasco
Committed by GitHub

Merge branch 'master' into master

Showing 49 changed files with 1172 additions and 806 deletions
  1 +name: Runnable (stable)
  2 +
  3 +on:
  4 + push:
  5 + branches:
  6 + - main
  7 + - master
  8 + pull_request:
  9 + branches:
  10 + - main
  11 + - master
  12 +
  13 +jobs:
  14 + analyze:
  15 + name: Analyze on ${{ matrix.os }}
  16 + runs-on: ${{ matrix.os }}
  17 + strategy:
  18 + matrix:
  19 + os: [ ubuntu-latest ]
  20 + steps:
  21 + - uses: actions/checkout@v1
  22 + - uses: actions/setup-java@v1
  23 + with:
  24 + java-version: '11.x'
  25 + - uses: subosito/flutter-action@v2
  26 + with:
  27 + channel: 'stable'
  28 + - name: Log Dart/Flutter versions
  29 + run: |
  30 + dart --version
  31 + flutter --version
  32 + - name: Prepare dependencies
  33 + run: flutter pub get
  34 + - name: Analyse the repo
  35 + run: flutter analyze lib
  36 + - name: Run tests
  37 + run: flutter test
@@ -15,10 +15,12 @@ @@ -15,10 +15,12 @@
15 *.iws 15 *.iws
16 .idea/ 16 .idea/
17 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/ 18 +# Visual Studio Code related
  19 +.classpath
  20 +.project
  21 +.settings/
  22 +.vscode/*
  23 +
22 24
23 # Flutter/Dart/Pub related 25 # Flutter/Dart/Pub related
24 **/doc/api/ 26 **/doc/api/
@@ -74,3 +76,5 @@ build/ @@ -74,3 +76,5 @@ build/
74 !**/ios/**/default.pbxuser 76 !**/ios/**/default.pbxuser
75 !**/ios/**/default.perspectivev3 77 !**/ios/**/default.perspectivev3
76 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 78 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
  79 +
  80 +**/macos/Flutter/ephemeral/
  1 +## 2.1.0 - Flutter 3.0
  2 ++ Migrates to Flutter 3.0
  3 ++ Use PageRoute to allow Hero animations
  4 +## 2.0.1 - Small fixes
  5 ++ Fixes bug with will pop scope
  6 ++ Replaces VelocityTracker deprecated constructor
  7 ++ Add optional RouteSettings to all showModal methods
  8 +
1 ## 2.0.0-nullsafety.1 - Null Safety support 9 ## 2.0.0-nullsafety.1 - Null Safety support
2 + Fixes #119 & #113 10 + Fixes #119 & #113
3 11
@@ -26,6 +26,7 @@ Inspired by `showModalBottomSheet`, it completes with some must-need features: @@ -26,6 +26,7 @@ Inspired by `showModalBottomSheet`, it completes with some must-need features:
26 - Support for inside scrollview + dragging down to close (`showModalBottomSheet` won't work correctly with scrollviews. 26 - Support for inside scrollview + dragging down to close (`showModalBottomSheet` won't work correctly with scrollviews.
27 - Support for `WillPopScope` to prevent closing the dialog. 27 - Support for `WillPopScope` to prevent closing the dialog.
28 - Support for scroll to top when tapping status bar (iOS only) 28 - Support for scroll to top when tapping status bar (iOS only)
  29 +- Support for top SafeArea (not supported by showModalBottomSheet)
29 - Cupertino modal bottom sheet 30 - Cupertino modal bottom sheet
30 - Create custom modal bottom sheet 31 - Create custom modal bottom sheet
31 32
1 -include: package:pedantic/analysis_options.yaml  
2 -  
3 -enable-experiment:  
4 - - extension-methods  
  1 +include: package:lints/recommended.yaml
1 # This file tracks properties of this Flutter project. 1 # This file tracks properties of this Flutter project.
2 # Used by Flutter tool to assess capabilities and perform upgrades etc. 2 # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 # 3 #
4 -# This file should be version controlled and should not be manually edited. 4 +# This file should be version controlled.
5 5
6 version: 6 version:
7 - revision: 32b17974ea81619064ab60e2513c5ce044c3fef2  
8 - channel: master 7 + revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  8 + channel: stable
9 9
10 project_type: app 10 project_type: app
  11 +
  12 +# Tracks metadata for the flutter migrate command
  13 +migration:
  14 + platforms:
  15 + - platform: root
  16 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  17 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  18 + - platform: android
  19 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  20 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  21 + - platform: ios
  22 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  23 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  24 + - platform: linux
  25 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  26 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  27 + - platform: macos
  28 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  29 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  30 + - platform: web
  31 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  32 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  33 + - platform: windows
  34 + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  35 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
  36 +
  37 + # User provided section
  38 +
  39 + # List of Local paths (relative to this file) that should be
  40 + # ignored by the migrate tool.
  41 + #
  42 + # Files that are not part of the templates will be ignored by default.
  43 + unmanaged_files:
  44 + - 'lib/main.dart'
  45 + - 'ios/Runner.xcodeproj/project.pbxproj'
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
26 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 27
28 android { 28 android {
29 - compileSdkVersion 30 29 + compileSdkVersion 31
30 30
31 sourceSets { 31 sourceSets {
32 main.java.srcDirs += 'src/main/kotlin' 32 main.java.srcDirs += 'src/main/kotlin'
@@ -36,7 +36,7 @@ android { @@ -36,7 +36,7 @@ android {
36 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 applicationId "com.example.example" 37 applicationId "com.example.example"
38 minSdkVersion 16 38 minSdkVersion 16
39 - targetSdkVersion 30 39 + targetSdkVersion 31
40 versionCode flutterVersionCode.toInteger() 40 versionCode flutterVersionCode.toInteger()
41 versionName flutterVersionName 41 versionName flutterVersionName
42 } 42 }
@@ -9,7 +9,8 @@ @@ -9,7 +9,8 @@
9 android:theme="@style/LaunchTheme" 9 android:theme="@style/LaunchTheme"
10 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" 10 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
11 android:hardwareAccelerated="true" 11 android:hardwareAccelerated="true"
12 - android:windowSoftInputMode="adjustResize"> 12 + android:windowSoftInputMode="adjustResize"
  13 + android:exported="true">
13 <!-- Specifies an Android theme to apply to this Activity as soon as 14 <!-- Specifies an Android theme to apply to this Activity as soon as
14 the Android process has started. This theme is visible to the user 15 the Android process has started. This theme is visible to the user
15 while the Flutter UI initializes. After that, this theme continues 16 while the Flutter UI initializes. After that, this theme continues
1 buildscript { 1 buildscript {
2 - ext.kotlin_version = '1.3.50' 2 + ext.kotlin_version = '1.6.10'
3 repositories { 3 repositories {
4 google() 4 google()
5 jcenter() 5 jcenter()
@@ -21,6 +21,6 @@ @@ -21,6 +21,6 @@
21 <key>CFBundleVersion</key> 21 <key>CFBundleVersion</key>
22 <string>1.0</string> 22 <string>1.0</string>
23 <key>MinimumOSVersion</key> 23 <key>MinimumOSVersion</key>
24 - <string>8.0</string> 24 + <string>9.0</string>
25 </dict> 25 </dict>
26 </plist> 26 </plist>
  1 +PODS:
  2 + - Flutter (1.0.0)
  3 + - url_launcher_ios (0.0.1):
  4 + - Flutter
  5 +
  6 +DEPENDENCIES:
  7 + - Flutter (from `Flutter`)
  8 + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
  9 +
  10 +EXTERNAL SOURCES:
  11 + Flutter:
  12 + :path: Flutter
  13 + url_launcher_ios:
  14 + :path: ".symlinks/plugins/url_launcher_ios/ios"
  15 +
  16 +SPEC CHECKSUMS:
  17 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
  18 + url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
  19 +
  20 +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
  21 +
  22 +COCOAPODS: 1.11.2
@@ -3,12 +3,13 @@ @@ -3,12 +3,13 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 46; 6 + objectVersion = 50;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 10 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 11 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
  12 + 63A861FE74EE80D78677751E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9BC1675DC08B85185F5B8C /* Pods_Runner.framework */; };
12 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -31,10 +32,12 @@ @@ -31,10 +32,12 @@
31 /* Begin PBXFileReference section */ 32 /* Begin PBXFileReference section */
32 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 33 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 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
  35 + 1A6B1787D436F43E646D2FA9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
34 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 36 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>"; }; 37 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>"; }; 38 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>"; }; 39 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
  40 + 8A9BC1675DC08B85185F5B8C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
38 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; 41 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>"; }; 42 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; }; 43 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -42,6 +45,8 @@ @@ -42,6 +45,8 @@
42 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 45 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>"; }; 46 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>"; }; 47 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  48 + 9E13656F8C2A211F9F4C04EF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
  49 + C33049C8773181A0B4BCD4EE /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
45 /* End PBXFileReference section */ 50 /* End PBXFileReference section */
46 51
47 /* Begin PBXFrameworksBuildPhase section */ 52 /* Begin PBXFrameworksBuildPhase section */
@@ -49,6 +54,7 @@ @@ -49,6 +54,7 @@
49 isa = PBXFrameworksBuildPhase; 54 isa = PBXFrameworksBuildPhase;
50 buildActionMask = 2147483647; 55 buildActionMask = 2147483647;
51 files = ( 56 files = (
  57 + 63A861FE74EE80D78677751E /* Pods_Runner.framework in Frameworks */,
52 ); 58 );
53 runOnlyForDeploymentPostprocessing = 0; 59 runOnlyForDeploymentPostprocessing = 0;
54 }; 60 };
@@ -72,6 +78,8 @@ @@ -72,6 +78,8 @@
72 9740EEB11CF90186004384FC /* Flutter */, 78 9740EEB11CF90186004384FC /* Flutter */,
73 97C146F01CF9000F007C117D /* Runner */, 79 97C146F01CF9000F007C117D /* Runner */,
74 97C146EF1CF9000F007C117D /* Products */, 80 97C146EF1CF9000F007C117D /* Products */,
  81 + 9F130398C730264830D81C7A /* Pods */,
  82 + B01A076C020C44AA1586D1A9 /* Frameworks */,
75 ); 83 );
76 sourceTree = "<group>"; 84 sourceTree = "<group>";
77 }; 85 };
@@ -98,6 +106,25 @@ @@ -98,6 +106,25 @@
98 path = Runner; 106 path = Runner;
99 sourceTree = "<group>"; 107 sourceTree = "<group>";
100 }; 108 };
  109 + 9F130398C730264830D81C7A /* Pods */ = {
  110 + isa = PBXGroup;
  111 + children = (
  112 + 1A6B1787D436F43E646D2FA9 /* Pods-Runner.debug.xcconfig */,
  113 + 9E13656F8C2A211F9F4C04EF /* Pods-Runner.release.xcconfig */,
  114 + C33049C8773181A0B4BCD4EE /* Pods-Runner.profile.xcconfig */,
  115 + );
  116 + name = Pods;
  117 + path = Pods;
  118 + sourceTree = "<group>";
  119 + };
  120 + B01A076C020C44AA1586D1A9 /* Frameworks */ = {
  121 + isa = PBXGroup;
  122 + children = (
  123 + 8A9BC1675DC08B85185F5B8C /* Pods_Runner.framework */,
  124 + );
  125 + name = Frameworks;
  126 + sourceTree = "<group>";
  127 + };
101 /* End PBXGroup section */ 128 /* End PBXGroup section */
102 129
103 /* Begin PBXNativeTarget section */ 130 /* Begin PBXNativeTarget section */
@@ -105,12 +132,14 @@ @@ -105,12 +132,14 @@
105 isa = PBXNativeTarget; 132 isa = PBXNativeTarget;
106 buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 133 buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 buildPhases = ( 134 buildPhases = (
  135 + CA1F95A1D6DE6081F36C77B1 /* [CP] Check Pods Manifest.lock */,
108 9740EEB61CF901F6004384FC /* Run Script */, 136 9740EEB61CF901F6004384FC /* Run Script */,
109 97C146EA1CF9000F007C117D /* Sources */, 137 97C146EA1CF9000F007C117D /* Sources */,
110 97C146EB1CF9000F007C117D /* Frameworks */, 138 97C146EB1CF9000F007C117D /* Frameworks */,
111 97C146EC1CF9000F007C117D /* Resources */, 139 97C146EC1CF9000F007C117D /* Resources */,
112 9705A1C41CF9048500538489 /* Embed Frameworks */, 140 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 141 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
  142 + AD44E91CFF7319FD809D60C7 /* [CP] Embed Pods Frameworks */,
114 ); 143 );
115 buildRules = ( 144 buildRules = (
116 ); 145 );
@@ -127,7 +156,7 @@ @@ -127,7 +156,7 @@
127 97C146E61CF9000F007C117D /* Project object */ = { 156 97C146E61CF9000F007C117D /* Project object */ = {
128 isa = PBXProject; 157 isa = PBXProject;
129 attributes = { 158 attributes = {
130 - LastUpgradeCheck = 1020; 159 + LastUpgradeCheck = 1300;
131 ORGANIZATIONNAME = ""; 160 ORGANIZATIONNAME = "";
132 TargetAttributes = { 161 TargetAttributes = {
133 97C146ED1CF9000F007C117D = { 162 97C146ED1CF9000F007C117D = {
@@ -197,6 +226,45 @@ @@ -197,6 +226,45 @@
197 shellPath = /bin/sh; 226 shellPath = /bin/sh;
198 shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 227 shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 }; 228 };
  229 + AD44E91CFF7319FD809D60C7 /* [CP] Embed Pods Frameworks */ = {
  230 + isa = PBXShellScriptBuildPhase;
  231 + buildActionMask = 2147483647;
  232 + files = (
  233 + );
  234 + inputFileListPaths = (
  235 + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
  236 + );
  237 + name = "[CP] Embed Pods Frameworks";
  238 + outputFileListPaths = (
  239 + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
  240 + );
  241 + runOnlyForDeploymentPostprocessing = 0;
  242 + shellPath = /bin/sh;
  243 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
  244 + showEnvVarsInLog = 0;
  245 + };
  246 + CA1F95A1D6DE6081F36C77B1 /* [CP] Check Pods Manifest.lock */ = {
  247 + isa = PBXShellScriptBuildPhase;
  248 + buildActionMask = 2147483647;
  249 + files = (
  250 + );
  251 + inputFileListPaths = (
  252 + );
  253 + inputPaths = (
  254 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  255 + "${PODS_ROOT}/Manifest.lock",
  256 + );
  257 + name = "[CP] Check Pods Manifest.lock";
  258 + outputFileListPaths = (
  259 + );
  260 + outputPaths = (
  261 + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
  262 + );
  263 + runOnlyForDeploymentPostprocessing = 0;
  264 + shellPath = /bin/sh;
  265 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  266 + showEnvVarsInLog = 0;
  267 + };
200 /* End PBXShellScriptBuildPhase section */ 268 /* End PBXShellScriptBuildPhase section */
201 269
202 /* Begin PBXSourcesBuildPhase section */ 270 /* Begin PBXSourcesBuildPhase section */
@@ -290,7 +358,10 @@ @@ -290,7 +358,10 @@
290 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 358 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 ENABLE_BITCODE = NO; 359 ENABLE_BITCODE = NO;
292 INFOPLIST_FILE = Runner/Info.plist; 360 INFOPLIST_FILE = Runner/Info.plist;
293 - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 361 + LD_RUNPATH_SEARCH_PATHS = (
  362 + "$(inherited)",
  363 + "@executable_path/Frameworks",
  364 + );
294 PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 365 PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
295 PRODUCT_NAME = "$(TARGET_NAME)"; 366 PRODUCT_NAME = "$(TARGET_NAME)";
296 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 367 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -414,7 +485,10 @@ @@ -414,7 +485,10 @@
414 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 485 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
415 ENABLE_BITCODE = NO; 486 ENABLE_BITCODE = NO;
416 INFOPLIST_FILE = Runner/Info.plist; 487 INFOPLIST_FILE = Runner/Info.plist;
417 - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 488 + LD_RUNPATH_SEARCH_PATHS = (
  489 + "$(inherited)",
  490 + "@executable_path/Frameworks",
  491 + );
418 PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 492 PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
419 PRODUCT_NAME = "$(TARGET_NAME)"; 493 PRODUCT_NAME = "$(TARGET_NAME)";
420 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 494 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -433,7 +507,10 @@ @@ -433,7 +507,10 @@
433 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 507 CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
434 ENABLE_BITCODE = NO; 508 ENABLE_BITCODE = NO;
435 INFOPLIST_FILE = Runner/Info.plist; 509 INFOPLIST_FILE = Runner/Info.plist;
436 - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 510 + LD_RUNPATH_SEARCH_PATHS = (
  511 + "$(inherited)",
  512 + "@executable_path/Frameworks",
  513 + );
437 PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 514 PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
438 PRODUCT_NAME = "$(TARGET_NAME)"; 515 PRODUCT_NAME = "$(TARGET_NAME)";
439 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 516 SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
2 <Workspace 2 <Workspace
3 version = "1.0"> 3 version = "1.0">
4 <FileRef 4 <FileRef
5 - location = "group:Runner.xcodeproj"> 5 + location = "self:">
6 </FileRef> 6 </FileRef>
7 </Workspace> 7 </Workspace>
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <Scheme 2 <Scheme
3 - LastUpgradeVersion = "1020" 3 + LastUpgradeVersion = "1300"
4 version = "1.3"> 4 version = "1.3">
5 <BuildAction 5 <BuildAction
6 parallelizeBuildables = "YES" 6 parallelizeBuildables = "YES"
@@ -4,4 +4,7 @@ @@ -4,4 +4,7 @@
4 <FileRef 4 <FileRef
5 location = "group:Runner.xcodeproj"> 5 location = "group:Runner.xcodeproj">
6 </FileRef> 6 </FileRef>
  7 + <FileRef
  8 + location = "group:Pods/Pods.xcodeproj">
  9 + </FileRef>
7 </Workspace> 10 </Workspace>
@@ -7,38 +7,60 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; @@ -7,38 +7,60 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
7 class CupertinoSharePage extends StatelessWidget { 7 class CupertinoSharePage extends StatelessWidget {
8 @override 8 @override
9 Widget build(BuildContext context) { 9 Widget build(BuildContext context) {
10 - return Scaffold(  
11 - appBar: appBar(context),  
12 - body: CupertinoPageScaffold(  
13 - child: Center(  
14 - child: Hero(  
15 - tag: 'image',  
16 - child: Image.asset('assets/demo_image.jpeg'),  
17 - )),  
18 - ),  
19 - bottomNavigationBar: bottomAppBar(context));  
20 - } 10 + final baseTextStyle = CupertinoTheme.of(context).textTheme.textStyle;
21 11
22 - PreferredSizeWidget appBar(BuildContext context) {  
23 - return CupertinoNavigationBar(  
24 - middle: Column(  
25 - children: <Widget>[  
26 - Text('New York', style: TextStyle(fontWeight: FontWeight.normal)),  
27 - Text('1 February 11:45',  
28 - style: TextStyle(fontWeight: FontWeight.normal, fontSize: 12))  
29 - ],  
30 - ),  
31 - trailing: Text(  
32 - 'Edit',  
33 - style: TextStyle(  
34 - color: CupertinoTheme.of(context).primaryColor, 12 + return CupertinoPageScaffold(
  13 + backgroundColor: CupertinoTheme.of(context).scaffoldBackgroundColor,
  14 + navigationBar: CupertinoNavigationBar(
  15 + backgroundColor: CupertinoTheme.of(context).barBackgroundColor,
  16 + middle: Column(
  17 + children: <Widget>[
  18 + Text(
  19 + 'New York',
  20 + style: baseTextStyle,
  21 + ),
  22 + Text(
  23 + '1 February 11:45',
  24 + style: baseTextStyle.copyWith(
  25 + fontWeight: FontWeight.normal,
  26 + fontSize: 12,
  27 + ),
  28 + ),
  29 + ],
  30 + ),
  31 + trailing: CupertinoButton(
  32 + child: Text('Edit'),
  33 + padding: EdgeInsets.zero,
  34 + onPressed: () {},
35 ), 35 ),
36 ), 36 ),
  37 + child: Column(
  38 + children: [
  39 + Expanded(
  40 + child: Center(
  41 + child: Hero(
  42 + tag: 'image',
  43 + child: Image.asset('assets/demo_image.jpeg'),
  44 + ),
  45 + ),
  46 + ),
  47 + bottomAppBar(context),
  48 + ],
  49 + ),
37 ); 50 );
38 } 51 }
39 52
40 Widget bottomAppBar(BuildContext context) { 53 Widget bottomAppBar(BuildContext context) {
41 - return BottomAppBar( 54 + return Container(
  55 + decoration: BoxDecoration(
  56 + border: Border(
  57 + top: BorderSide(
  58 + width: 0.5,
  59 + color: CupertinoColors.separator.resolveFrom(context),
  60 + ),
  61 + ),
  62 + color: CupertinoTheme.of(context).barBackgroundColor,
  63 + ),
42 child: Row( 64 child: Row(
43 mainAxisAlignment: MainAxisAlignment.spaceBetween, 65 mainAxisAlignment: MainAxisAlignment.spaceBetween,
44 children: <Widget>[ 66 children: <Widget>[
@@ -76,181 +98,250 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -76,181 +98,250 @@ class PhotoShareBottomSheet extends StatelessWidget {
76 @override 98 @override
77 Widget build(BuildContext context) { 99 Widget build(BuildContext context) {
78 return BackdropFilter( 100 return BackdropFilter(
79 - filter: ImageFilter.blur(sigmaX: 12, sigmaY: 12),  
80 - child: Material(  
81 - color: Colors.transparent,  
82 - child: Scaffold(  
83 - backgroundColor: CupertinoTheme.of(context)  
84 - .scaffoldBackgroundColor  
85 - .withOpacity(0.95),  
86 - extendBodyBehindAppBar: true,  
87 - appBar: appBar(context),  
88 - body: CustomScrollView(  
89 - physics: ClampingScrollPhysics(),  
90 - controller: ModalScrollController.of(context),  
91 - slivers: <Widget>[  
92 - SliverSafeArea(  
93 - bottom: false,  
94 - sliver: SliverToBoxAdapter(  
95 - child: Container(  
96 - height: 318,  
97 - child: ListView(  
98 - padding: EdgeInsets.all(12).copyWith(  
99 - right:  
100 - MediaQuery.of(context).size.width / 2 - 100),  
101 - reverse: true,  
102 - scrollDirection: Axis.horizontal,  
103 - physics: PageScrollPhysics(),  
104 - children: <Widget>[  
105 - Padding(  
106 - padding: EdgeInsets.symmetric(horizontal: 6),  
107 - child: ClipRRect(  
108 - borderRadius: BorderRadius.circular(12),  
109 - child: Hero(  
110 - tag: 'image',  
111 - child:  
112 - Image.asset('assets/demo_image.jpeg'),  
113 - ))),  
114 - Padding(  
115 - padding: EdgeInsets.symmetric(horizontal: 6),  
116 - child: ClipRRect(  
117 - borderRadius: BorderRadius.circular(12),  
118 - child: Image.asset('assets/demo_image.jpeg'),  
119 - )),  
120 - Padding(  
121 - padding: EdgeInsets.symmetric(horizontal: 6),  
122 - child: ClipRRect(  
123 - borderRadius: BorderRadius.circular(12),  
124 - child: Image.asset('assets/demo_image.jpeg'),  
125 - )),  
126 - ], 101 + filter: ImageFilter.blur(sigmaX: 12, sigmaY: 12),
  102 + child: Material(
  103 + color: Colors.transparent,
  104 + child: Scaffold(
  105 + backgroundColor: CupertinoTheme.of(context).scaffoldBackgroundColor,
  106 + extendBodyBehindAppBar: true,
  107 + appBar: appBar(context),
  108 + body: CustomScrollView(
  109 + physics: ClampingScrollPhysics(),
  110 + controller: ModalScrollController.of(context),
  111 + slivers: <Widget>[
  112 + SliverSafeArea(
  113 + bottom: false,
  114 + sliver: SliverToBoxAdapter(
  115 + child: Container(
  116 + height: 318,
  117 + child: ListView(
  118 + padding: EdgeInsets.all(12).copyWith(
  119 + right: MediaQuery.of(context).size.width / 2 - 100),
  120 + reverse: true,
  121 + scrollDirection: Axis.horizontal,
  122 + physics: PageScrollPhysics(),
  123 + children: <Widget>[
  124 + Padding(
  125 + padding: EdgeInsets.symmetric(horizontal: 6),
  126 + child: ClipRRect(
  127 + borderRadius: BorderRadius.circular(12),
  128 + child: Hero(
  129 + tag: 'image',
  130 + child: Image.asset('assets/demo_image.jpeg'),
  131 + ),
  132 + ),
127 ), 133 ),
128 - ), 134 + Padding(
  135 + padding: EdgeInsets.symmetric(horizontal: 6),
  136 + child: ClipRRect(
  137 + borderRadius: BorderRadius.circular(12),
  138 + child: Image.asset('assets/demo_image.jpeg'),
  139 + ),
  140 + ),
  141 + Padding(
  142 + padding: EdgeInsets.symmetric(horizontal: 6),
  143 + child: ClipRRect(
  144 + borderRadius: BorderRadius.circular(12),
  145 + child: Image.asset('assets/demo_image.jpeg'),
  146 + ),
  147 + ),
  148 + ],
129 ), 149 ),
130 ), 150 ),
131 - SliverToBoxAdapter(  
132 - child: Divider(height: 1),  
133 - ),  
134 - sliverContactsSection(context),  
135 - SliverToBoxAdapter(  
136 - child: Divider(height: 1),  
137 - ),  
138 - SliverToBoxAdapter(  
139 - child: Container(  
140 - height: 120,  
141 - padding: EdgeInsets.only(top: 12),  
142 - child: ListView.builder(  
143 - padding: EdgeInsets.all(10),  
144 - scrollDirection: Axis.horizontal,  
145 - itemBuilder: (context, index) {  
146 - final app = apps[index];  
147 - return Container(  
148 - width: 72,  
149 - margin: EdgeInsets.symmetric(horizontal: 4),  
150 - child: Column(  
151 - children: <Widget>[  
152 - if(app.imageUrl != null)  
153 - Material(  
154 - child: ClipRRect(  
155 - child: Container(  
156 - height: 60,  
157 - width: 60,  
158 - decoration: BoxDecoration(  
159 - image: DecorationImage(  
160 - image: AssetImage(app.imageUrl!),  
161 - fit: BoxFit.cover),  
162 - color: Colors.white,  
163 - borderRadius:  
164 - BorderRadius.circular(15)),  
165 - ),  
166 - ),  
167 - shape: RoundedRectangleBorder( 151 + ),
  152 + ),
  153 + SliverToBoxAdapter(
  154 + child: Divider(height: 1),
  155 + ),
  156 + sliverContactsSection(context),
  157 + SliverToBoxAdapter(
  158 + child: Divider(height: 1),
  159 + ),
  160 + SliverToBoxAdapter(
  161 + child: Container(
  162 + height: 120,
  163 + padding: EdgeInsets.only(top: 12),
  164 + child: ListView.builder(
  165 + padding: EdgeInsets.all(10),
  166 + scrollDirection: Axis.horizontal,
  167 + itemBuilder: (context, index) {
  168 + final app = apps[index];
  169 + return Container(
  170 + width: 72,
  171 + margin: EdgeInsets.symmetric(horizontal: 4),
  172 + child: Column(
  173 + children: <Widget>[
  174 + if (app.imageUrl != null)
  175 + Material(
  176 + child: ClipRRect(
  177 + child: Container(
  178 + height: 60,
  179 + width: 60,
  180 + decoration: BoxDecoration(
  181 + image: DecorationImage(
  182 + image: AssetImage(app.imageUrl!),
  183 + fit: BoxFit.cover),
  184 + color: Colors.white,
168 borderRadius: 185 borderRadius:
169 BorderRadius.circular(15)), 186 BorderRadius.circular(15)),
170 - elevation: 12,  
171 - shadowColor: Colors.black12,  
172 ), 187 ),
173 - SizedBox(height: 8),  
174 - Text(  
175 - app.title,  
176 - maxLines: 2,  
177 - textAlign: TextAlign.center,  
178 - style: TextStyle(fontSize: 11),  
179 - )  
180 - ],  
181 - ));  
182 - },  
183 - itemCount: apps.length, 188 + ),
  189 + shape: RoundedRectangleBorder(
  190 + borderRadius: BorderRadius.circular(15),
  191 + ),
  192 + elevation: 12,
  193 + shadowColor: Colors.black12,
  194 + ),
  195 + SizedBox(height: 8),
  196 + Text(
  197 + app.title,
  198 + maxLines: 2,
  199 + textAlign: TextAlign.center,
  200 + style: TextStyle(fontSize: 11),
  201 + )
  202 + ],
  203 + ),
  204 + );
  205 + },
  206 + itemCount: apps.length,
  207 + ),
  208 + ),
  209 + ),
  210 + SliverPadding(
  211 + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6),
  212 + sliver: SliverList(
  213 + delegate: SliverChildListDelegate.fixed(
  214 + List<Widget>.from(
  215 + actions.map(
  216 + (action) => Container(
  217 + padding: EdgeInsets.symmetric(
  218 + vertical: 16, horizontal: 16),
  219 + child: Text(
  220 + action.title,
  221 + style:
  222 + CupertinoTheme.of(context).textTheme.textStyle,
  223 + ),
  224 + decoration: BoxDecoration(
  225 + borderRadius: BorderRadius.circular(8),
  226 + color: CupertinoColors
  227 + .tertiarySystemGroupedBackground
  228 + .resolveFrom(context),
  229 + ),
  230 + ),
  231 + ),
  232 + ).addItemInBetween(
  233 + Container(
  234 + width: double.infinity,
  235 + height: 1,
  236 + color: CupertinoColors.separator.resolveFrom(context),
184 ), 237 ),
185 ), 238 ),
186 ), 239 ),
187 - SliverPadding(  
188 - padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6),  
189 - sliver: SliverList(  
190 - delegate: SliverChildListDelegate.fixed(  
191 - List<Widget>.from(actions.map(  
192 - (action) => Container(  
193 - padding: EdgeInsets.symmetric(  
194 - vertical: 16, horizontal: 16),  
195 - child: Text(  
196 - action.title,  
197 - style: CupertinoTheme.of(context)  
198 - .textTheme  
199 - .textStyle,  
200 - )),  
201 - )).addItemInBetween(Divider(  
202 - height: 1,  
203 - ))),  
204 - )),  
205 -  
206 - SliverPadding(  
207 - padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6),  
208 - sliver: SliverList(  
209 - delegate: SliverChildListDelegate.fixed(  
210 - List<Widget>.from(actions1.map(  
211 - (action) => Container(  
212 - padding: EdgeInsets.symmetric(  
213 - vertical: 16, horizontal: 16),  
214 - child: Text(  
215 - action.title,  
216 - style: CupertinoTheme.of(context)  
217 - .textTheme  
218 - .textStyle,  
219 - )),  
220 - )).addItemInBetween(Divider(  
221 - height: 1,  
222 - ))),  
223 - ) 240 + ),
  241 + ),
  242 + SliverPadding(
  243 + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6),
  244 + sliver: SliverList(
  245 + delegate: SliverChildListDelegate.fixed(
  246 + List<Widget>.from(
  247 + actions1.map(
  248 + (action) => Container(
  249 + padding: EdgeInsets.symmetric(
  250 + vertical: 16, horizontal: 16),
  251 + child: Text(
  252 + action.title,
  253 + style:
  254 + CupertinoTheme.of(context).textTheme.textStyle,
  255 + ),
  256 + decoration: BoxDecoration(
  257 + borderRadius: BorderRadius.only(
  258 + topLeft: action == actions1.first
  259 + ? Radius.circular(8)
  260 + : Radius.zero,
  261 + topRight: action == actions1.first
  262 + ? Radius.circular(8)
  263 + : Radius.zero,
  264 + bottomLeft: action == actions1.last
  265 + ? Radius.circular(8)
  266 + : Radius.zero,
  267 + bottomRight: action == actions1.last
  268 + ? Radius.circular(8)
  269 + : Radius.zero,
  270 + ),
  271 + color: CupertinoColors
  272 + .tertiarySystemGroupedBackground
  273 + .resolveFrom(context),
  274 + ),
  275 + ),
  276 + ),
  277 + ).addItemInBetween(
  278 + Container(
  279 + width: double.infinity,
  280 + height: 1,
  281 + color: CupertinoColors.separator.resolveFrom(context),
  282 + ),
  283 + ),
224 ), 284 ),
225 - SliverPadding(  
226 - padding: EdgeInsets.symmetric(horizontal: 18, vertical: 4),  
227 - sliver: SliverList(  
228 - delegate: SliverChildListDelegate.fixed(  
229 - List<Widget>.from(actions2.map(  
230 - (action) => Container(  
231 - padding: EdgeInsets.symmetric(  
232 - vertical: 16, horizontal: 16),  
233 - child: Text(  
234 - action.title,  
235 - style: CupertinoTheme.of(context)  
236 - .textTheme  
237 - .textStyle,  
238 - )),  
239 - )).addItemInBetween(Divider(  
240 - height: 1,  
241 - ))),  
242 - ) 285 + ),
  286 + ),
  287 + SliverPadding(
  288 + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 4),
  289 + sliver: SliverList(
  290 + delegate: SliverChildListDelegate.fixed(
  291 + List<Widget>.from(
  292 + actions2.map(
  293 + (action) => Container(
  294 + padding: EdgeInsets.symmetric(
  295 + vertical: 16, horizontal: 16),
  296 + child: Text(
  297 + action.title,
  298 + style:
  299 + CupertinoTheme.of(context).textTheme.textStyle,
  300 + ),
  301 + decoration: BoxDecoration(
  302 + borderRadius: BorderRadius.only(
  303 + topLeft: action == actions2.first
  304 + ? Radius.circular(8)
  305 + : Radius.zero,
  306 + topRight: action == actions2.first
  307 + ? Radius.circular(8)
  308 + : Radius.zero,
  309 + bottomLeft: action == actions2.last
  310 + ? Radius.circular(8)
  311 + : Radius.zero,
  312 + bottomRight: action == actions2.last
  313 + ? Radius.circular(8)
  314 + : Radius.zero,
  315 + ),
  316 + color: CupertinoColors
  317 + .tertiarySystemGroupedBackground
  318 + .resolveFrom(context),
  319 + ),
  320 + ),
  321 + ),
  322 + ).addItemInBetween(
  323 + Container(
  324 + width: double.infinity,
  325 + height: 1,
  326 + color: CupertinoColors.separator.resolveFrom(context),
  327 + ),
  328 + ),
243 ), 329 ),
244 - SliverSafeArea(  
245 - top: false,  
246 - sliver: SliverPadding(  
247 - padding: EdgeInsets.only(  
248 - bottom: 20,  
249 - )),  
250 - )  
251 - ], 330 + ),
252 ), 331 ),
253 - ))); 332 + SliverSafeArea(
  333 + top: false,
  334 + sliver: SliverPadding(
  335 + padding: EdgeInsets.only(
  336 + bottom: 20,
  337 + ),
  338 + ),
  339 + )
  340 + ],
  341 + ),
  342 + ),
  343 + ),
  344 + );
254 } 345 }
255 346
256 Widget sliverContactsSection(BuildContext context) { 347 Widget sliverContactsSection(BuildContext context) {
@@ -268,19 +359,19 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -268,19 +359,19 @@ class PhotoShareBottomSheet extends StatelessWidget {
268 margin: EdgeInsets.symmetric(horizontal: 4), 359 margin: EdgeInsets.symmetric(horizontal: 4),
269 child: Column( 360 child: Column(
270 children: <Widget>[ 361 children: <Widget>[
271 - if(person.imageUrl != null)  
272 - Material(  
273 - child: CircleAvatar(  
274 - backgroundImage: AssetImage(  
275 - person.imageUrl!, 362 + if (person.imageUrl != null)
  363 + Material(
  364 + child: CircleAvatar(
  365 + backgroundImage: AssetImage(
  366 + person.imageUrl!,
  367 + ),
  368 + radius: 30,
  369 + backgroundColor: Colors.white,
276 ), 370 ),
277 - radius: 30,  
278 - backgroundColor: Colors.white, 371 + shape: CircleBorder(),
  372 + elevation: 12,
  373 + shadowColor: Colors.black12,
279 ), 374 ),
280 - shape: CircleBorder(),  
281 - elevation: 12,  
282 - shadowColor: Colors.black12,  
283 - ),  
284 SizedBox(height: 8), 375 SizedBox(height: 8),
285 Text( 376 Text(
286 person.title, 377 person.title,
@@ -316,28 +407,29 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -316,28 +407,29 @@ class PhotoShareBottomSheet extends StatelessWidget {
316 children: <Widget>[ 407 children: <Widget>[
317 SizedBox(width: 18), 408 SizedBox(width: 18),
318 ClipRRect( 409 ClipRRect(
319 - borderRadius: BorderRadius.circular(4),  
320 - child: Image.asset(  
321 - 'assets/demo_image.jpeg',  
322 - fit: BoxFit.cover,  
323 - height: 40,  
324 - width: 40,  
325 - )), 410 + borderRadius: BorderRadius.circular(4),
  411 + child: Image.asset(
  412 + 'assets/demo_image.jpeg',
  413 + fit: BoxFit.cover,
  414 + height: 40,
  415 + width: 40,
  416 + ),
  417 + ),
326 SizedBox(width: 12), 418 SizedBox(width: 12),
327 Expanded( 419 Expanded(
328 - child: Column(  
329 - mainAxisAlignment: MainAxisAlignment.center,  
330 - crossAxisAlignment: CrossAxisAlignment.stretch,  
331 - children: <Widget>[  
332 - Text(  
333 - '1 Photo selected',  
334 - style: CupertinoTheme.of(context)  
335 - .textTheme  
336 - .textStyle  
337 - .copyWith(fontWeight: FontWeight.w600),  
338 - ),  
339 - SizedBox(height: 4),  
340 - Row( 420 + child: Column(
  421 + mainAxisAlignment: MainAxisAlignment.center,
  422 + crossAxisAlignment: CrossAxisAlignment.stretch,
  423 + children: <Widget>[
  424 + Text(
  425 + '1 Photo selected',
  426 + style: CupertinoTheme.of(context)
  427 + .textTheme
  428 + .textStyle
  429 + .copyWith(fontWeight: FontWeight.w600),
  430 + ),
  431 + SizedBox(height: 4),
  432 + Row(
341 crossAxisAlignment: CrossAxisAlignment.baseline, 433 crossAxisAlignment: CrossAxisAlignment.baseline,
342 textBaseline: TextBaseline.alphabetic, 434 textBaseline: TextBaseline.alphabetic,
343 children: <Widget>[ 435 children: <Widget>[
@@ -347,8 +439,9 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -347,8 +439,9 @@ class PhotoShareBottomSheet extends StatelessWidget {
347 .textTheme 439 .textTheme
348 .actionTextStyle 440 .actionTextStyle
349 .copyWith( 441 .copyWith(
350 - fontSize: 14,  
351 - fontWeight: FontWeight.normal), 442 + fontSize: 14,
  443 + fontWeight: FontWeight.normal,
  444 + ),
352 ), 445 ),
353 SizedBox(width: 2), 446 SizedBox(width: 2),
354 Icon( 447 Icon(
@@ -357,9 +450,11 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -357,9 +450,11 @@ class PhotoShareBottomSheet extends StatelessWidget {
357 color: 450 color:
358 CupertinoTheme.of(context).primaryColor, 451 CupertinoTheme.of(context).primaryColor,
359 ) 452 )
360 - ]),  
361 - ],  
362 - )), 453 + ],
  454 + ),
  455 + ],
  456 + ),
  457 + ),
363 GestureDetector( 458 GestureDetector(
364 onTap: () => Navigator.of(context).pop(), 459 onTap: () => Navigator.of(context).pop(),
365 child: Align( 460 child: Align(
@@ -368,13 +463,15 @@ class PhotoShareBottomSheet extends StatelessWidget { @@ -368,13 +463,15 @@ class PhotoShareBottomSheet extends StatelessWidget {
368 margin: EdgeInsets.only(top: 14), 463 margin: EdgeInsets.only(top: 14),
369 padding: EdgeInsets.all(4), 464 padding: EdgeInsets.all(4),
370 decoration: BoxDecoration( 465 decoration: BoxDecoration(
371 - color: Colors.black.withOpacity(0.1), 466 + color: CupertinoColors.secondarySystemFill
  467 + .resolveFrom(context),
372 shape: BoxShape.circle, 468 shape: BoxShape.circle,
373 ), 469 ),
374 child: Icon( 470 child: Icon(
375 Icons.close, 471 Icons.close,
376 size: 24, 472 size: 24,
377 - color: Colors.black54, 473 + color: CupertinoColors.systemFill
  474 + .resolveFrom(context),
378 ), 475 ),
379 ), 476 ),
380 ), 477 ),
@@ -24,9 +24,16 @@ class MyApp extends StatelessWidget { @@ -24,9 +24,16 @@ class MyApp extends StatelessWidget {
24 Widget build(BuildContext context) { 24 Widget build(BuildContext context) {
25 return MaterialApp( 25 return MaterialApp(
26 theme: ThemeData(platform: TargetPlatform.iOS), 26 theme: ThemeData(platform: TargetPlatform.iOS),
  27 + darkTheme: ThemeData.dark().copyWith(platform: TargetPlatform.iOS),
27 title: 'BottomSheet Modals', 28 title: 'BottomSheet Modals',
28 builder: (context, Widget? child) => WebFrame( 29 builder: (context, Widget? child) => WebFrame(
29 - child: child!, 30 + child: CupertinoTheme(
  31 + data: CupertinoThemeData(
  32 + brightness: Theme.of(context).brightness,
  33 + scaffoldBackgroundColor: CupertinoColors.systemBackground,
  34 + ),
  35 + child: child!,
  36 + ),
30 ), 37 ),
31 onGenerateRoute: (RouteSettings settings) { 38 onGenerateRoute: (RouteSettings settings) {
32 switch (settings.name) { 39 switch (settings.name) {
@@ -36,47 +43,48 @@ class MyApp extends StatelessWidget { @@ -36,47 +43,48 @@ class MyApp extends StatelessWidget {
36 settings: settings); 43 settings: settings);
37 } 44 }
38 return MaterialPageRoute( 45 return MaterialPageRoute(
39 - builder: (context) => Scaffold(  
40 - body: CupertinoScaffold(  
41 - body: Builder(  
42 - builder: (context) => CupertinoPageScaffold(  
43 - backgroundColor: Colors.white,  
44 - navigationBar: CupertinoNavigationBar(  
45 - transitionBetweenRoutes: false,  
46 - middle: Text('Normal Navigation Presentation'),  
47 - trailing: GestureDetector(  
48 - child: Icon(Icons.arrow_upward),  
49 - onTap: () => CupertinoScaffold  
50 - .showCupertinoModalBottomSheet(  
51 - expand: true,  
52 - context: context,  
53 - backgroundColor: Colors.transparent,  
54 - builder: (context) => Stack(  
55 - children: <Widget>[  
56 - ModalWithScroll(),  
57 - Positioned(  
58 - height: 40,  
59 - left: 40,  
60 - right: 40,  
61 - bottom: 20,  
62 - child: MaterialButton(  
63 - onPressed: () => Navigator.of(  
64 - context)  
65 - .popUntil((route) =>  
66 - route.settings.name == '/'),  
67 - child: Text('Pop back home'),  
68 - ),  
69 - )  
70 - ],  
71 - ),  
72 - )), 46 + builder: (context) => Scaffold(
  47 + body: CupertinoScaffold(
  48 + body: Builder(
  49 + builder: (context) => CupertinoPageScaffold(
  50 + navigationBar: CupertinoNavigationBar(
  51 + transitionBetweenRoutes: false,
  52 + middle: Text('Normal Navigation Presentation'),
  53 + trailing: GestureDetector(
  54 + child: Icon(Icons.arrow_upward),
  55 + onTap: () =>
  56 + CupertinoScaffold.showCupertinoModalBottomSheet(
  57 + expand: true,
  58 + context: context,
  59 + backgroundColor: Colors.transparent,
  60 + builder: (context) => Stack(
  61 + children: <Widget>[
  62 + ModalWithScroll(),
  63 + Positioned(
  64 + height: 40,
  65 + left: 40,
  66 + right: 40,
  67 + bottom: 20,
  68 + child: MaterialButton(
  69 + onPressed: () => Navigator.of(context).popUntil(
  70 + (route) => route.settings.name == '/'),
  71 + child: Text('Pop back home'),
  72 + ),
  73 + )
  74 + ],
73 ), 75 ),
74 - child: Center(child: Container()),  
75 ), 76 ),
76 ), 77 ),
77 ), 78 ),
  79 + child: Center(
  80 + child: Container(),
  81 + ),
78 ), 82 ),
79 - settings: settings); 83 + ),
  84 + ),
  85 + ),
  86 + settings: settings,
  87 + );
80 }, 88 },
81 debugShowCheckedModeBanner: false, 89 debugShowCheckedModeBanner: false,
82 ); 90 );
@@ -98,7 +106,6 @@ class _MyHomePageState extends State<MyHomePage> { @@ -98,7 +106,6 @@ class _MyHomePageState extends State<MyHomePage> {
98 return Material( 106 return Material(
99 child: Scaffold( 107 child: Scaffold(
100 body: CupertinoPageScaffold( 108 body: CupertinoPageScaffold(
101 - backgroundColor: Colors.white,  
102 navigationBar: CupertinoNavigationBar( 109 navigationBar: CupertinoNavigationBar(
103 transitionBetweenRoutes: false, 110 transitionBetweenRoutes: false,
104 middle: Text('iOS13 Modal Presentation'), 111 middle: Text('iOS13 Modal Presentation'),
@@ -123,43 +130,48 @@ class _MyHomePageState extends State<MyHomePage> { @@ -123,43 +130,48 @@ class _MyHomePageState extends State<MyHomePage> {
123 builder: (context) => CupertinoSharePage()))), 130 builder: (context) => CupertinoSharePage()))),
124 section('STYLES'), 131 section('STYLES'),
125 ListTile( 132 ListTile(
126 - title: Text('Material fit'),  
127 - onTap: () => showMaterialModalBottomSheet(  
128 - expand: false,  
129 - context: context,  
130 - backgroundColor: Colors.transparent,  
131 - builder: (context) => ModalFit(),  
132 - )), 133 + title: Text('Material fit'),
  134 + onTap: () => showMaterialModalBottomSheet(
  135 + expand: false,
  136 + context: context,
  137 + backgroundColor: Colors.transparent,
  138 + builder: (context) => ModalFit(),
  139 + ),
  140 + ),
133 ListTile( 141 ListTile(
134 - title: Text('Bar Modal'),  
135 - onTap: () => showBarModalBottomSheet(  
136 - expand: true,  
137 - context: context,  
138 - backgroundColor: Colors.transparent,  
139 - builder: (context) => ModalInsideModal(),  
140 - )), 142 + title: Text('Bar Modal'),
  143 + onTap: () => showBarModalBottomSheet(
  144 + expand: true,
  145 + context: context,
  146 + backgroundColor: Colors.transparent,
  147 + builder: (context) => ModalInsideModal(),
  148 + ),
  149 + ),
141 ListTile( 150 ListTile(
142 - title: Text('Avatar Modal'),  
143 - onTap: () => showAvatarModalBottomSheet(  
144 - expand: true,  
145 - context: context,  
146 - backgroundColor: Colors.transparent,  
147 - builder: (context) => ModalInsideModal(),  
148 - )), 151 + title: Text('Avatar Modal'),
  152 + onTap: () => showAvatarModalBottomSheet(
  153 + expand: true,
  154 + context: context,
  155 + backgroundColor: Colors.transparent,
  156 + builder: (context) => ModalInsideModal(),
  157 + ),
  158 + ),
149 ListTile( 159 ListTile(
150 - title: Text('Float Modal'),  
151 - onTap: () => showFloatingModalBottomSheet(  
152 - context: context,  
153 - builder: (context) => ModalFit(),  
154 - )), 160 + title: Text('Float Modal'),
  161 + onTap: () => showFloatingModalBottomSheet(
  162 + context: context,
  163 + builder: (context) => ModalFit(),
  164 + ),
  165 + ),
155 ListTile( 166 ListTile(
156 - title: Text('Cupertino Modal fit'),  
157 - onTap: () => showCupertinoModalBottomSheet(  
158 - expand: false,  
159 - context: context,  
160 - backgroundColor: Colors.transparent,  
161 - builder: (context) => ModalFit(),  
162 - )), 167 + title: Text('Cupertino Modal fit'),
  168 + onTap: () => showCupertinoModalBottomSheet(
  169 + expand: false,
  170 + context: context,
  171 + backgroundColor: Colors.transparent,
  172 + builder: (context) => ModalFit(),
  173 + ),
  174 + ),
163 section('COMPLEX CASES'), 175 section('COMPLEX CASES'),
164 ListTile( 176 ListTile(
165 title: Text('Cupertino Small Modal forced to expand'), 177 title: Text('Cupertino Small Modal forced to expand'),
@@ -170,22 +182,23 @@ class _MyHomePageState extends State<MyHomePage> { @@ -170,22 +182,23 @@ class _MyHomePageState extends State<MyHomePage> {
170 builder: (context) => ModalFit(), 182 builder: (context) => ModalFit(),
171 )), 183 )),
172 ListTile( 184 ListTile(
173 - title: Text('Reverse list'),  
174 - onTap: () => showBarModalBottomSheet(  
175 - expand: true,  
176 - context: context,  
177 - backgroundColor: Colors.transparent,  
178 - builder: (context) =>  
179 - ModalInsideModal(reverse: true),  
180 - )), 185 + title: Text('Reverse list'),
  186 + onTap: () => showBarModalBottomSheet(
  187 + expand: true,
  188 + context: context,
  189 + backgroundColor: Colors.transparent,
  190 + builder: (context) => ModalInsideModal(reverse: true),
  191 + ),
  192 + ),
181 ListTile( 193 ListTile(
182 - title: Text('Cupertino Modal inside modal'),  
183 - onTap: () => showCupertinoModalBottomSheet(  
184 - expand: true,  
185 - context: context,  
186 - backgroundColor: Colors.transparent,  
187 - builder: (context) => ModalInsideModal(),  
188 - )), 194 + title: Text('Cupertino Modal inside modal'),
  195 + onTap: () => showCupertinoModalBottomSheet(
  196 + expand: true,
  197 + context: context,
  198 + backgroundColor: Colors.transparent,
  199 + builder: (context) => ModalInsideModal(),
  200 + ),
  201 + ),
189 ListTile( 202 ListTile(
190 title: Text('Cupertino Modal with inside navigation'), 203 title: Text('Cupertino Modal with inside navigation'),
191 onTap: () => showCupertinoModalBottomSheet( 204 onTap: () => showCupertinoModalBottomSheet(
@@ -195,36 +208,40 @@ class _MyHomePageState extends State<MyHomePage> { @@ -195,36 +208,40 @@ class _MyHomePageState extends State<MyHomePage> {
195 builder: (context) => ModalWithNavigator(), 208 builder: (context) => ModalWithNavigator(),
196 )), 209 )),
197 ListTile( 210 ListTile(
198 - title:  
199 - Text('Cupertino Navigator + Scroll + WillPopScope'),  
200 - onTap: () => showCupertinoModalBottomSheet(  
201 - expand: true,  
202 - context: context,  
203 - backgroundColor: Colors.transparent,  
204 - builder: (context) => ComplexModal(),  
205 - )), 211 + title:
  212 + Text('Cupertino Navigator + Scroll + WillPopScope'),
  213 + onTap: () => showCupertinoModalBottomSheet(
  214 + expand: true,
  215 + context: context,
  216 + backgroundColor: Colors.transparent,
  217 + builder: (context) => ComplexModal(),
  218 + ),
  219 + ),
206 ListTile( 220 ListTile(
207 - title: Text('Modal with WillPopScope'),  
208 - onTap: () => showCupertinoModalBottomSheet(  
209 - expand: true,  
210 - context: context,  
211 - backgroundColor: Colors.transparent,  
212 - builder: (context) => ModalWillScope(),  
213 - )), 221 + title: Text('Modal with WillPopScope'),
  222 + onTap: () => showCupertinoModalBottomSheet(
  223 + expand: true,
  224 + context: context,
  225 + backgroundColor: Colors.transparent,
  226 + builder: (context) => ModalWillScope(),
  227 + ),
  228 + ),
214 ListTile( 229 ListTile(
215 - title: Text('Modal with Nested Scroll'),  
216 - onTap: () => showCupertinoModalBottomSheet(  
217 - expand: true,  
218 - context: context,  
219 - builder: (context) => NestedScrollModal(),  
220 - )), 230 + title: Text('Modal with Nested Scroll'),
  231 + onTap: () => showCupertinoModalBottomSheet(
  232 + expand: true,
  233 + context: context,
  234 + builder: (context) => NestedScrollModal(),
  235 + ),
  236 + ),
221 ListTile( 237 ListTile(
222 - title: Text('Modal with PageView'),  
223 - onTap: () => showBarModalBottomSheet(  
224 - expand: true,  
225 - context: context,  
226 - builder: (context) => ModalWithPageView(),  
227 - )), 238 + title: Text('Modal with PageView'),
  239 + onTap: () => showBarModalBottomSheet(
  240 + expand: true,
  241 + context: context,
  242 + builder: (context) => ModalWithPageView(),
  243 + ),
  244 + ),
228 SizedBox( 245 SizedBox(
229 height: 60, 246 height: 60,
230 ) 247 )
@@ -240,10 +257,11 @@ class _MyHomePageState extends State<MyHomePage> { @@ -240,10 +257,11 @@ class _MyHomePageState extends State<MyHomePage> {
240 257
241 Widget section(String title) { 258 Widget section(String title) {
242 return Padding( 259 return Padding(
243 - padding: EdgeInsets.fromLTRB(16, 20, 16, 8),  
244 - child: Text(  
245 - title,  
246 - style: Theme.of(context).textTheme.caption,  
247 - )); 260 + padding: EdgeInsets.fromLTRB(16, 20, 16, 8),
  261 + child: Text(
  262 + title,
  263 + style: Theme.of(context).textTheme.caption,
  264 + ),
  265 + );
248 } 266 }
249 } 267 }
@@ -2,67 +2,78 @@ import 'dart:math'; @@ -2,67 +2,78 @@ import 'dart:math';
2 2
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
4 import 'package:flutter/services.dart'; 4 import 'package:flutter/services.dart';
5 -import 'package:flutter/widgets.dart';  
6 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; 5 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
7 6
8 class AvatarBottomSheet extends StatelessWidget { 7 class AvatarBottomSheet extends StatelessWidget {
9 final Widget child; 8 final Widget child;
10 final Animation<double> animation; 9 final Animation<double> animation;
  10 + final SystemUiOverlayStyle? overlayStyle;
11 11
12 - const AvatarBottomSheet({Key? key, required this.child, required this.animation}) 12 + const AvatarBottomSheet(
  13 + {Key? key,
  14 + required this.child,
  15 + required this.animation,
  16 + this.overlayStyle})
13 : super(key: key); 17 : super(key: key);
14 18
15 @override 19 @override
16 Widget build(BuildContext context) { 20 Widget build(BuildContext context) {
17 return AnnotatedRegion<SystemUiOverlayStyle>( 21 return AnnotatedRegion<SystemUiOverlayStyle>(
18 - value: SystemUiOverlayStyle.light, 22 + value: overlayStyle ?? SystemUiOverlayStyle.light,
19 child: Column( 23 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,  
32 - opacity: max(0, animation.value * 2 - 1))),  
33 - child: Row(  
34 - children: <Widget>[  
35 - SizedBox(width: 20),  
36 - CircleAvatar(  
37 - child: Text('JB'),  
38 - radius: 32,  
39 - ),  
40 - ], 24 + mainAxisSize: MainAxisSize.min,
  25 + crossAxisAlignment: CrossAxisAlignment.start,
  26 + children: [
  27 + SizedBox(height: 12),
  28 + SafeArea(
  29 + bottom: false,
  30 + child: AnimatedBuilder(
  31 + animation: animation,
  32 + builder: (context, child) => Transform.translate(
  33 + offset: Offset(0, (1 - animation.value) * 100),
  34 + child: Opacity(
  35 + child: child, opacity: max(0, animation.value * 2 - 1))),
  36 + child: Row(
  37 + children: <Widget>[
  38 + SizedBox(width: 20),
  39 + CircleAvatar(
  40 + child: Text(
  41 + 'JB',
  42 + style: TextStyle(color: Colors.black),
  43 + ),
  44 + radius: 32,
  45 + backgroundColor: Colors.blueAccent,
41 ), 46 ),
42 - )),  
43 - SizedBox(height: 12),  
44 - Flexible(  
45 - flex: 1,  
46 - fit: FlexFit.loose,  
47 - child: ClipRRect(  
48 - borderRadius: BorderRadius.only(  
49 - topLeft: Radius.circular(15),  
50 - topRight: Radius.circular(15)),  
51 - child: Container(  
52 - decoration: BoxDecoration(  
53 - color: Theme.of(context).scaffoldBackgroundColor,  
54 - boxShadow: [  
55 - BoxShadow(  
56 - blurRadius: 10,  
57 - color: Colors.black12,  
58 - spreadRadius: 5)  
59 - ]),  
60 - width: double.infinity,  
61 - child: MediaQuery.removePadding(  
62 - context: context, removeTop: true, child: child)), 47 + ],
63 ), 48 ),
64 ), 49 ),
65 - ]), 50 + ),
  51 + SizedBox(height: 12),
  52 + Flexible(
  53 + flex: 1,
  54 + fit: FlexFit.loose,
  55 + child: ClipRRect(
  56 + borderRadius: BorderRadius.only(
  57 + topLeft: Radius.circular(15), topRight: Radius.circular(15)),
  58 + child: Container(
  59 + decoration: BoxDecoration(
  60 + color: Theme.of(context).scaffoldBackgroundColor,
  61 + boxShadow: [
  62 + BoxShadow(
  63 + blurRadius: 10,
  64 + color: Colors.black12,
  65 + spreadRadius: 5,
  66 + ),
  67 + ],
  68 + ),
  69 + width: double.infinity,
  70 + child: MediaQuery.removePadding(
  71 + context: context, removeTop: true, child: child),
  72 + ),
  73 + ),
  74 + ),
  75 + ],
  76 + ),
66 ); 77 );
67 } 78 }
68 } 79 }
@@ -82,13 +93,8 @@ Future<T?> showAvatarModalBottomSheet<T>({ @@ -82,13 +93,8 @@ Future<T?> showAvatarModalBottomSheet<T>({
82 bool isDismissible = true, 93 bool isDismissible = true,
83 bool enableDrag = true, 94 bool enableDrag = true,
84 Duration? duration, 95 Duration? duration,
  96 + SystemUiOverlayStyle? overlayStyle,
85 }) async { 97 }) async {
86 - assert(context != null);  
87 - assert(builder != null);  
88 - assert(expand != null);  
89 - assert(useRootNavigator != null);  
90 - assert(isDismissible != null);  
91 - assert(enableDrag != null);  
92 assert(debugCheckHasMediaQuery(context)); 98 assert(debugCheckHasMediaQuery(context));
93 assert(debugCheckHasMaterialLocalizations(context)); 99 assert(debugCheckHasMaterialLocalizations(context));
94 final result = await Navigator.of(context, rootNavigator: useRootNavigator) 100 final result = await Navigator.of(context, rootNavigator: useRootNavigator)
@@ -97,6 +103,7 @@ Future<T?> showAvatarModalBottomSheet<T>({ @@ -97,6 +103,7 @@ Future<T?> showAvatarModalBottomSheet<T>({
97 containerBuilder: (_, animation, child) => AvatarBottomSheet( 103 containerBuilder: (_, animation, child) => AvatarBottomSheet(
98 child: child, 104 child: child,
99 animation: animation, 105 animation: animation,
  106 + overlayStyle: overlayStyle,
100 ), 107 ),
101 bounce: bounce, 108 bounce: bounce,
102 secondAnimationController: secondAnimation, 109 secondAnimationController: secondAnimation,
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 -import 'package:flutter/widgets.dart';  
3 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; 2 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
4 3
5 class FloatingModal extends StatelessWidget { 4 class FloatingModal extends StatelessWidget {
1 -import 'package:flutter/cupertino.dart';  
2 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
3 2
4 class ModalFit extends StatelessWidget { 3 class ModalFit extends StatelessWidget {
@@ -2,8 +2,6 @@ import 'package:flutter/cupertino.dart'; @@ -2,8 +2,6 @@ import 'package:flutter/cupertino.dart';
2 import 'package:flutter/material.dart'; 2 import 'package:flutter/material.dart';
3 3
4 class SimpleModal extends StatelessWidget { 4 class SimpleModal extends StatelessWidget {
5 -  
6 -  
7 const SimpleModal({Key? key}) : super(key: key); 5 const SimpleModal({Key? key}) : super(key: key);
8 6
9 @override 7 @override
1 -import 'package:flutter/cupertino.dart';  
2 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
3 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; 2 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
4 3
1 import 'package:flutter/cupertino.dart'; 1 import 'package:flutter/cupertino.dart';
2 import 'package:flutter/foundation.dart'; 2 import 'package:flutter/foundation.dart';
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
4 -import 'package:flutter/rendering.dart';  
5 -import 'package:url_launcher/url_launcher.dart'; 4 +import 'package:url_launcher/url_launcher_string.dart';
6 5
7 class WebFrame extends StatelessWidget { 6 class WebFrame extends StatelessWidget {
8 final Widget child; 7 final Widget child;
@@ -134,14 +133,14 @@ class WebFrame extends StatelessWidget { @@ -134,14 +133,14 @@ class WebFrame extends StatelessWidget {
134 Row( 133 Row(
135 children: <Widget>[ 134 children: <Widget>[
136 InkWell( 135 InkWell(
137 - onTap: () => launch( 136 + onTap: () => launchUrlString(
138 'https://pub.dev/packages/modal_bottom_sheet'), 137 'https://pub.dev/packages/modal_bottom_sheet'),
139 child: Image.asset('assets/flutter.png', 138 child: Image.asset('assets/flutter.png',
140 height: 60), 139 height: 60),
141 ), 140 ),
142 Spacer(), 141 Spacer(),
143 InkWell( 142 InkWell(
144 - onTap: () => launch( 143 + onTap: () => launchUrlString(
145 'https://github.com/jamesblasco/modal_bottom_sheet'), 144 'https://github.com/jamesblasco/modal_bottom_sheet'),
146 child: Image.asset('assets/github.png', 145 child: Image.asset('assets/github.png',
147 height: 60), 146 height: 60),
@@ -3,4 +3,5 @@ @@ -3,4 +3,5 @@
3 **/Pods/ 3 **/Pods/
4 4
5 # Xcode-related 5 # Xcode-related
  6 +**/dgph
6 **/xcuserdata/ 7 **/xcuserdata/
1 -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 1 +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 #include "ephemeral/Flutter-Generated.xcconfig" 2 #include "ephemeral/Flutter-Generated.xcconfig"
1 -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 1 +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 #include "ephemeral/Flutter-Generated.xcconfig" 2 #include "ephemeral/Flutter-Generated.xcconfig"
@@ -9,74 +9,32 @@ project 'Runner', { @@ -9,74 +9,32 @@ project 'Runner', {
9 'Release' => :release, 9 'Release' => :release,
10 } 10 }
11 11
12 -def parse_KV_file(file, separator='=')  
13 - file_abs_path = File.expand_path(file)  
14 - if !File.exists? file_abs_path  
15 - return []; 12 +def flutter_root
  13 + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
  14 + unless File.exist?(generated_xcode_build_settings_path)
  15 + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 end 16 end
17 - pods_ary = []  
18 - skip_line_start_symbols = ["#", "/"]  
19 - File.foreach(file_abs_path) { |line|  
20 - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }  
21 - plugin = line.split(pattern=separator)  
22 - if plugin.length == 2  
23 - podname = plugin[0].strip()  
24 - path = plugin[1].strip()  
25 - podpath = File.expand_path("#{path}", file_abs_path)  
26 - pods_ary.push({:name => podname, :path => podpath});  
27 - else  
28 - puts "Invalid plugin specification: #{line}"  
29 - end  
30 - }  
31 - return pods_ary  
32 -end  
33 17
34 -def pubspec_supports_macos(file)  
35 - file_abs_path = File.expand_path(file)  
36 - if !File.exists? file_abs_path  
37 - return false; 18 + File.foreach(generated_xcode_build_settings_path) do |line|
  19 + matches = line.match(/FLUTTER_ROOT\=(.*)/)
  20 + return matches[1].strip if matches
38 end 21 end
39 - File.foreach(file_abs_path) { |line|  
40 - return true if line =~ /^\s*macos:/  
41 - }  
42 - return false 22 + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
43 end 23 end
44 24
  25 +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  26 +
  27 +flutter_macos_podfile_setup
  28 +
45 target 'Runner' do 29 target 'Runner' do
46 use_frameworks! 30 use_frameworks!
47 use_modular_headers! 31 use_modular_headers!
48 32
49 - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock  
50 - # referring to absolute paths on developers' machines.  
51 - ephemeral_dir = File.join('Flutter', 'ephemeral')  
52 - symlink_dir = File.join(ephemeral_dir, '.symlinks')  
53 - symlink_plugins_dir = File.join(symlink_dir, 'plugins')  
54 - system("rm -rf #{symlink_dir}")  
55 - system("mkdir -p #{symlink_plugins_dir}") 33 + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
  34 +end
56 35
57 - # Flutter Pods  
58 - generated_xcconfig = parse_KV_file(File.join(ephemeral_dir, 'Flutter-Generated.xcconfig'))  
59 - if generated_xcconfig.empty?  
60 - puts "Flutter-Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 36 +post_install do |installer|
  37 + installer.pods_project.targets.each do |target|
  38 + flutter_additional_macos_build_settings(target)
61 end 39 end
62 - generated_xcconfig.map { |p|  
63 - if p[:name] == 'FLUTTER_FRAMEWORK_DIR'  
64 - symlink = File.join(symlink_dir, 'flutter')  
65 - File.symlink(File.dirname(p[:path]), symlink)  
66 - pod 'FlutterMacOS', :path => File.join(symlink, File.basename(p[:path]))  
67 - end  
68 - }  
69 -  
70 - # Plugin Pods  
71 - plugin_pods = parse_KV_file('../.flutter-plugins')  
72 - plugin_pods.map { |p|  
73 - symlink = File.join(symlink_plugins_dir, p[:name])  
74 - File.symlink(p[:path], symlink)  
75 - if pubspec_supports_macos(File.join(symlink, 'pubspec.yaml'))  
76 - pod p[:name], :path => File.join(symlink, 'macos')  
77 - end  
78 - }  
79 end 40 end
80 -  
81 -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.  
82 -install! 'cocoapods', :disable_input_output_paths => true  
1 PODS: 1 PODS:
2 - FlutterMacOS (1.0.0) 2 - FlutterMacOS (1.0.0)
3 - - url_launcher (0.0.1)  
4 - url_launcher_macos (0.0.1): 3 - url_launcher_macos (0.0.1):
5 - FlutterMacOS 4 - FlutterMacOS
6 5
7 DEPENDENCIES: 6 DEPENDENCIES:
8 - - FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64`)  
9 - - url_launcher (from `Flutter/ephemeral/.symlinks/plugins/url_launcher/macos`) 7 + - FlutterMacOS (from `Flutter/ephemeral`)
10 - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) 8 - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
11 9
12 EXTERNAL SOURCES: 10 EXTERNAL SOURCES:
13 FlutterMacOS: 11 FlutterMacOS:
14 - :path: Flutter/ephemeral/.symlinks/flutter/darwin-x64  
15 - url_launcher:  
16 - :path: Flutter/ephemeral/.symlinks/plugins/url_launcher/macos 12 + :path: Flutter/ephemeral
17 url_launcher_macos: 13 url_launcher_macos:
18 :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos 14 :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
19 15
20 SPEC CHECKSUMS: 16 SPEC CHECKSUMS:
21 - FlutterMacOS: 15bea8a44d2fa024068daa0140371c020b4b6ff9  
22 - url_launcher: af78307ef9bafff91273b34f1c6c0c86a0004fd7  
23 - url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4 17 + FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
  18 + url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
24 19
25 -PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7 20 +PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
26 21
27 -COCOAPODS: 1.8.4 22 +COCOAPODS: 1.11.3
@@ -21,16 +21,12 @@ @@ -21,16 +21,12 @@
21 /* End PBXAggregateTarget section */ 21 /* End PBXAggregateTarget section */
22 22
23 /* Begin PBXBuildFile section */ 23 /* Begin PBXBuildFile section */
24 - 07F1EEFF1D7280028D8E0815 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6785DE70E6CF5A12A3672D00 /* Pods_Runner.framework */; }; 24 + 1970F9138D50BB4FA70EFAB1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C342A6A03A2212612EE55C57 /* Pods_Runner.framework */; };
25 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 25 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
26 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 26 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
27 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 27 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
28 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 28 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
29 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 29 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
30 - 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; };  
31 - 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
32 - D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; };  
33 - D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
34 /* End PBXBuildFile section */ 30 /* End PBXBuildFile section */
35 31
36 /* Begin PBXContainerItemProxy section */ 32 /* Begin PBXContainerItemProxy section */
@@ -50,8 +46,6 @@ @@ -50,8 +46,6 @@
50 dstPath = ""; 46 dstPath = "";
51 dstSubfolderSpec = 10; 47 dstSubfolderSpec = 10;
52 files = ( 48 files = (
53 - D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */,  
54 - 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */,  
55 ); 49 );
56 name = "Bundle Framework"; 50 name = "Bundle Framework";
57 runOnlyForDeploymentPostprocessing = 0; 51 runOnlyForDeploymentPostprocessing = 0;
@@ -59,8 +53,7 @@ @@ -59,8 +53,7 @@
59 /* End PBXCopyFilesBuildPhase section */ 53 /* End PBXCopyFilesBuildPhase section */
60 54
61 /* Begin PBXFileReference section */ 55 /* Begin PBXFileReference section */
62 - 123E850BF31901C0A1B9EDF9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };  
63 - 12CD678DD42B59A87A0100ED /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; 56 + 21A9B680A8F580B6657C3224 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
64 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; 57 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
65 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; 58 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
66 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 59 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -72,15 +65,14 @@ @@ -72,15 +65,14 @@
72 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; }; 65 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
73 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; }; 66 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
74 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; }; 67 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
75 - 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FlutterMacOS.framework; path = Flutter/ephemeral/FlutterMacOS.framework; sourceTree = SOURCE_ROOT; };  
76 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; 68 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
77 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; 69 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
78 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; 70 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
79 - 6785DE70E6CF5A12A3672D00 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71 + 52EF924579156A50BB44ED07 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
  72 + 6D64897DFD0D50397DFFAB46 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
80 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; 73 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
81 - 956A1C59D4E7DF8845616D84 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };  
82 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; 74 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
83 - D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; }; 75 + C342A6A03A2212612EE55C57 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
84 /* End PBXFileReference section */ 76 /* End PBXFileReference section */
85 77
86 /* Begin PBXFrameworksBuildPhase section */ 78 /* Begin PBXFrameworksBuildPhase section */
@@ -88,9 +80,7 @@ @@ -88,9 +80,7 @@
88 isa = PBXFrameworksBuildPhase; 80 isa = PBXFrameworksBuildPhase;
89 buildActionMask = 2147483647; 81 buildActionMask = 2147483647;
90 files = ( 82 files = (
91 - D73912F022F37F9E000D13A0 /* App.framework in Frameworks */,  
92 - 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */,  
93 - 07F1EEFF1D7280028D8E0815 /* Pods_Runner.framework in Frameworks */, 83 + 1970F9138D50BB4FA70EFAB1 /* Pods_Runner.framework in Frameworks */,
94 ); 84 );
95 runOnlyForDeploymentPostprocessing = 0; 85 runOnlyForDeploymentPostprocessing = 0;
96 }; 86 };
@@ -115,7 +105,7 @@ @@ -115,7 +105,7 @@
115 33CEB47122A05771004F2AC0 /* Flutter */, 105 33CEB47122A05771004F2AC0 /* Flutter */,
116 33CC10EE2044A3C60003C045 /* Products */, 106 33CC10EE2044A3C60003C045 /* Products */,
117 D73912EC22F37F3D000D13A0 /* Frameworks */, 107 D73912EC22F37F3D000D13A0 /* Frameworks */,
118 - A1F7D023EEA811516CAA2CF1 /* Pods */, 108 + C8485E5DEEEF4104132F0555 /* Pods */,
119 ); 109 );
120 sourceTree = "<group>"; 110 sourceTree = "<group>";
121 }; 111 };
@@ -145,8 +135,6 @@ @@ -145,8 +135,6 @@
145 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, 135 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
146 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, 136 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
147 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, 137 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
148 - D73912EF22F37F9E000D13A0 /* App.framework */,  
149 - 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */,  
150 ); 138 );
151 path = Flutter; 139 path = Flutter;
152 sourceTree = "<group>"; 140 sourceTree = "<group>";
@@ -164,12 +152,12 @@ @@ -164,12 +152,12 @@
164 path = Runner; 152 path = Runner;
165 sourceTree = "<group>"; 153 sourceTree = "<group>";
166 }; 154 };
167 - A1F7D023EEA811516CAA2CF1 /* Pods */ = { 155 + C8485E5DEEEF4104132F0555 /* Pods */ = {
168 isa = PBXGroup; 156 isa = PBXGroup;
169 children = ( 157 children = (
170 - 12CD678DD42B59A87A0100ED /* Pods-Runner.debug.xcconfig */,  
171 - 123E850BF31901C0A1B9EDF9 /* Pods-Runner.release.xcconfig */,  
172 - 956A1C59D4E7DF8845616D84 /* Pods-Runner.profile.xcconfig */, 158 + 21A9B680A8F580B6657C3224 /* Pods-Runner.debug.xcconfig */,
  159 + 52EF924579156A50BB44ED07 /* Pods-Runner.release.xcconfig */,
  160 + 6D64897DFD0D50397DFFAB46 /* Pods-Runner.profile.xcconfig */,
173 ); 161 );
174 name = Pods; 162 name = Pods;
175 path = Pods; 163 path = Pods;
@@ -178,7 +166,7 @@ @@ -178,7 +166,7 @@
178 D73912EC22F37F3D000D13A0 /* Frameworks */ = { 166 D73912EC22F37F3D000D13A0 /* Frameworks */ = {
179 isa = PBXGroup; 167 isa = PBXGroup;
180 children = ( 168 children = (
181 - 6785DE70E6CF5A12A3672D00 /* Pods_Runner.framework */, 169 + C342A6A03A2212612EE55C57 /* Pods_Runner.framework */,
182 ); 170 );
183 name = Frameworks; 171 name = Frameworks;
184 sourceTree = "<group>"; 172 sourceTree = "<group>";
@@ -190,13 +178,13 @@ @@ -190,13 +178,13 @@
190 isa = PBXNativeTarget; 178 isa = PBXNativeTarget;
191 buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; 179 buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
192 buildPhases = ( 180 buildPhases = (
193 - 39807FAAEE6C2A7DC7608117 /* [CP] Check Pods Manifest.lock */, 181 + 127622FF3DE570FE561F179A /* [CP] Check Pods Manifest.lock */,
194 33CC10E92044A3C60003C045 /* Sources */, 182 33CC10E92044A3C60003C045 /* Sources */,
195 33CC10EA2044A3C60003C045 /* Frameworks */, 183 33CC10EA2044A3C60003C045 /* Frameworks */,
196 33CC10EB2044A3C60003C045 /* Resources */, 184 33CC10EB2044A3C60003C045 /* Resources */,
197 33CC110E2044A8840003C045 /* Bundle Framework */, 185 33CC110E2044A8840003C045 /* Bundle Framework */,
198 3399D490228B24CF009A79C7 /* ShellScript */, 186 3399D490228B24CF009A79C7 /* ShellScript */,
199 - A477A0AC3B4E8DBC8C9DA73C /* [CP] Embed Pods Frameworks */, 187 + C0A6425075547B9067F49078 /* [CP] Embed Pods Frameworks */,
200 ); 188 );
201 buildRules = ( 189 buildRules = (
202 ); 190 );
@@ -215,7 +203,7 @@ @@ -215,7 +203,7 @@
215 isa = PBXProject; 203 isa = PBXProject;
216 attributes = { 204 attributes = {
217 LastSwiftUpdateCheck = 0920; 205 LastSwiftUpdateCheck = 0920;
218 - LastUpgradeCheck = 0930; 206 + LastUpgradeCheck = 1300;
219 ORGANIZATIONNAME = ""; 207 ORGANIZATIONNAME = "";
220 TargetAttributes = { 208 TargetAttributes = {
221 33CC10EC2044A3C60003C045 = { 209 33CC10EC2044A3C60003C045 = {
@@ -266,7 +254,7 @@ @@ -266,7 +254,7 @@
266 /* End PBXResourcesBuildPhase section */ 254 /* End PBXResourcesBuildPhase section */
267 255
268 /* Begin PBXShellScriptBuildPhase section */ 256 /* Begin PBXShellScriptBuildPhase section */
269 - 3399D490228B24CF009A79C7 /* ShellScript */ = { 257 + 127622FF3DE570FE561F179A /* [CP] Check Pods Manifest.lock */ = {
270 isa = PBXShellScriptBuildPhase; 258 isa = PBXShellScriptBuildPhase;
271 buildActionMask = 2147483647; 259 buildActionMask = 2147483647;
272 files = ( 260 files = (
@@ -274,66 +262,68 @@ @@ -274,66 +262,68 @@
274 inputFileListPaths = ( 262 inputFileListPaths = (
275 ); 263 );
276 inputPaths = ( 264 inputPaths = (
  265 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  266 + "${PODS_ROOT}/Manifest.lock",
277 ); 267 );
  268 + name = "[CP] Check Pods Manifest.lock";
278 outputFileListPaths = ( 269 outputFileListPaths = (
279 ); 270 );
280 outputPaths = ( 271 outputPaths = (
  272 + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
281 ); 273 );
282 runOnlyForDeploymentPostprocessing = 0; 274 runOnlyForDeploymentPostprocessing = 0;
283 shellPath = /bin/sh; 275 shellPath = /bin/sh;
284 - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n"; 276 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  277 + showEnvVarsInLog = 0;
285 }; 278 };
286 - 33CC111E2044C6BF0003C045 /* ShellScript */ = { 279 + 3399D490228B24CF009A79C7 /* ShellScript */ = {
287 isa = PBXShellScriptBuildPhase; 280 isa = PBXShellScriptBuildPhase;
288 buildActionMask = 2147483647; 281 buildActionMask = 2147483647;
289 files = ( 282 files = (
290 ); 283 );
291 inputFileListPaths = ( 284 inputFileListPaths = (
292 - Flutter/ephemeral/FlutterInputs.xcfilelist,  
293 ); 285 );
294 inputPaths = ( 286 inputPaths = (
295 - Flutter/ephemeral/tripwire,  
296 ); 287 );
297 outputFileListPaths = ( 288 outputFileListPaths = (
298 - Flutter/ephemeral/FlutterOutputs.xcfilelist,  
299 ); 289 );
300 outputPaths = ( 290 outputPaths = (
301 ); 291 );
302 runOnlyForDeploymentPostprocessing = 0; 292 runOnlyForDeploymentPostprocessing = 0;
303 shellPath = /bin/sh; 293 shellPath = /bin/sh;
304 - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; 294 + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
305 }; 295 };
306 - 39807FAAEE6C2A7DC7608117 /* [CP] Check Pods Manifest.lock */ = { 296 + 33CC111E2044C6BF0003C045 /* ShellScript */ = {
307 isa = PBXShellScriptBuildPhase; 297 isa = PBXShellScriptBuildPhase;
308 buildActionMask = 2147483647; 298 buildActionMask = 2147483647;
309 files = ( 299 files = (
310 ); 300 );
311 inputFileListPaths = ( 301 inputFileListPaths = (
  302 + Flutter/ephemeral/FlutterInputs.xcfilelist,
312 ); 303 );
313 inputPaths = ( 304 inputPaths = (
314 - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",  
315 - "${PODS_ROOT}/Manifest.lock", 305 + Flutter/ephemeral/tripwire,
316 ); 306 );
317 - name = "[CP] Check Pods Manifest.lock";  
318 outputFileListPaths = ( 307 outputFileListPaths = (
  308 + Flutter/ephemeral/FlutterOutputs.xcfilelist,
319 ); 309 );
320 outputPaths = ( 310 outputPaths = (
321 - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",  
322 ); 311 );
323 runOnlyForDeploymentPostprocessing = 0; 312 runOnlyForDeploymentPostprocessing = 0;
324 shellPath = /bin/sh; 313 shellPath = /bin/sh;
325 - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";  
326 - showEnvVarsInLog = 0; 314 + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
327 }; 315 };
328 - A477A0AC3B4E8DBC8C9DA73C /* [CP] Embed Pods Frameworks */ = { 316 + C0A6425075547B9067F49078 /* [CP] Embed Pods Frameworks */ = {
329 isa = PBXShellScriptBuildPhase; 317 isa = PBXShellScriptBuildPhase;
330 buildActionMask = 2147483647; 318 buildActionMask = 2147483647;
331 files = ( 319 files = (
332 ); 320 );
333 inputFileListPaths = ( 321 inputFileListPaths = (
  322 + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
334 ); 323 );
335 name = "[CP] Embed Pods Frameworks"; 324 name = "[CP] Embed Pods Frameworks";
336 outputFileListPaths = ( 325 outputFileListPaths = (
  326 + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
337 ); 327 );
338 runOnlyForDeploymentPostprocessing = 0; 328 runOnlyForDeploymentPostprocessing = 0;
339 shellPath = /bin/sh; 329 shellPath = /bin/sh;
@@ -431,10 +421,6 @@ @@ -431,10 +421,6 @@
431 CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; 421 CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
432 CODE_SIGN_STYLE = Automatic; 422 CODE_SIGN_STYLE = Automatic;
433 COMBINE_HIDPI_IMAGES = YES; 423 COMBINE_HIDPI_IMAGES = YES;
434 - FRAMEWORK_SEARCH_PATHS = (  
435 - "$(inherited)",  
436 - "$(PROJECT_DIR)/Flutter/ephemeral",  
437 - );  
438 INFOPLIST_FILE = Runner/Info.plist; 424 INFOPLIST_FILE = Runner/Info.plist;
439 LD_RUNPATH_SEARCH_PATHS = ( 425 LD_RUNPATH_SEARCH_PATHS = (
440 "$(inherited)", 426 "$(inherited)",
@@ -561,10 +547,6 @@ @@ -561,10 +547,6 @@
561 CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; 547 CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
562 CODE_SIGN_STYLE = Automatic; 548 CODE_SIGN_STYLE = Automatic;
563 COMBINE_HIDPI_IMAGES = YES; 549 COMBINE_HIDPI_IMAGES = YES;
564 - FRAMEWORK_SEARCH_PATHS = (  
565 - "$(inherited)",  
566 - "$(PROJECT_DIR)/Flutter/ephemeral",  
567 - );  
568 INFOPLIST_FILE = Runner/Info.plist; 550 INFOPLIST_FILE = Runner/Info.plist;
569 LD_RUNPATH_SEARCH_PATHS = ( 551 LD_RUNPATH_SEARCH_PATHS = (
570 "$(inherited)", 552 "$(inherited)",
@@ -585,10 +567,6 @@ @@ -585,10 +567,6 @@
585 CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; 567 CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
586 CODE_SIGN_STYLE = Automatic; 568 CODE_SIGN_STYLE = Automatic;
587 COMBINE_HIDPI_IMAGES = YES; 569 COMBINE_HIDPI_IMAGES = YES;
588 - FRAMEWORK_SEARCH_PATHS = (  
589 - "$(inherited)",  
590 - "$(PROJECT_DIR)/Flutter/ephemeral",  
591 - );  
592 INFOPLIST_FILE = Runner/Info.plist; 570 INFOPLIST_FILE = Runner/Info.plist;
593 LD_RUNPATH_SEARCH_PATHS = ( 571 LD_RUNPATH_SEARCH_PATHS = (
594 "$(inherited)", 572 "$(inherited)",
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <Scheme 2 <Scheme
3 - LastUpgradeVersion = "1000" 3 + LastUpgradeVersion = "1300"
4 version = "1.3"> 4 version = "1.3">
5 <BuildAction 5 <BuildAction
6 parallelizeBuildables = "YES" 6 parallelizeBuildables = "YES"
@@ -36,8 +36,8 @@ @@ -36,8 +36,8 @@
36 ReferencedContainer = "container:Runner.xcodeproj"> 36 ReferencedContainer = "container:Runner.xcodeproj">
37 </BuildableReference> 37 </BuildableReference>
38 </MacroExpansion> 38 </MacroExpansion>
39 - <AdditionalOptions>  
40 - </AdditionalOptions> 39 + <Testables>
  40 + </Testables>
41 </TestAction> 41 </TestAction>
42 <LaunchAction 42 <LaunchAction
43 buildConfiguration = "Debug" 43 buildConfiguration = "Debug"
@@ -59,8 +59,6 @@ @@ -59,8 +59,6 @@
59 ReferencedContainer = "container:Runner.xcodeproj"> 59 ReferencedContainer = "container:Runner.xcodeproj">
60 </BuildableReference> 60 </BuildableReference>
61 </BuildableProductRunnable> 61 </BuildableProductRunnable>
62 - <AdditionalOptions>  
63 - </AdditionalOptions>  
64 </LaunchAction> 62 </LaunchAction>
65 <ProfileAction 63 <ProfileAction
66 buildConfiguration = "Profile" 64 buildConfiguration = "Profile"
@@ -323,6 +323,10 @@ @@ -323,6 +323,10 @@
323 </items> 323 </items>
324 </menu> 324 </menu>
325 </menuItem> 325 </menuItem>
  326 + <menuItem title="Help" id="EPT-qC-fAb">
  327 + <modifierMask key="keyEquivalentModifierMask"/>
  328 + <menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
  329 + </menuItem>
326 </items> 330 </items>
327 <point key="canvasLocation" x="142" y="-258"/> 331 <point key="canvasLocation" x="142" y="-258"/>
328 </menu> 332 </menu>
@@ -11,4 +11,4 @@ PRODUCT_NAME = example @@ -11,4 +11,4 @@ PRODUCT_NAME = example
11 PRODUCT_BUNDLE_IDENTIFIER = com.example.example 11 PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 12
13 // The copyright displayed in application information 13 // The copyright displayed in application information
14 -PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 14 +PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
@@ -7,56 +7,56 @@ packages: @@ -7,56 +7,56 @@ packages:
7 name: async 7 name: async
8 url: "https://pub.dartlang.org" 8 url: "https://pub.dartlang.org"
9 source: hosted 9 source: hosted
10 - version: "2.5.0-nullsafety.3" 10 + version: "2.8.2"
11 boolean_selector: 11 boolean_selector:
12 dependency: transitive 12 dependency: transitive
13 description: 13 description:
14 name: boolean_selector 14 name: boolean_selector
15 url: "https://pub.dartlang.org" 15 url: "https://pub.dartlang.org"
16 source: hosted 16 source: hosted
17 - version: "2.1.0-nullsafety.3" 17 + version: "2.1.0"
18 characters: 18 characters:
19 dependency: transitive 19 dependency: transitive
20 description: 20 description:
21 name: characters 21 name: characters
22 url: "https://pub.dartlang.org" 22 url: "https://pub.dartlang.org"
23 source: hosted 23 source: hosted
24 - version: "1.1.0-nullsafety.5" 24 + version: "1.2.0"
25 charcode: 25 charcode:
26 dependency: transitive 26 dependency: transitive
27 description: 27 description:
28 name: charcode 28 name: charcode
29 url: "https://pub.dartlang.org" 29 url: "https://pub.dartlang.org"
30 source: hosted 30 source: hosted
31 - version: "1.2.0-nullsafety.3" 31 + version: "1.3.1"
32 clock: 32 clock:
33 dependency: transitive 33 dependency: transitive
34 description: 34 description:
35 name: clock 35 name: clock
36 url: "https://pub.dartlang.org" 36 url: "https://pub.dartlang.org"
37 source: hosted 37 source: hosted
38 - version: "1.1.0-nullsafety.3" 38 + version: "1.1.0"
39 collection: 39 collection:
40 dependency: transitive 40 dependency: transitive
41 description: 41 description:
42 name: collection 42 name: collection
43 url: "https://pub.dartlang.org" 43 url: "https://pub.dartlang.org"
44 source: hosted 44 source: hosted
45 - version: "1.15.0-nullsafety.5" 45 + version: "1.16.0"
46 cupertino_icons: 46 cupertino_icons:
47 dependency: "direct main" 47 dependency: "direct main"
48 description: 48 description:
49 name: cupertino_icons 49 name: cupertino_icons
50 url: "https://pub.dartlang.org" 50 url: "https://pub.dartlang.org"
51 source: hosted 51 source: hosted
52 - version: "0.1.3" 52 + version: "1.0.5"
53 fake_async: 53 fake_async:
54 dependency: transitive 54 dependency: transitive
55 description: 55 description:
56 name: fake_async 56 name: fake_async
57 url: "https://pub.dartlang.org" 57 url: "https://pub.dartlang.org"
58 source: hosted 58 source: hosted
59 - version: "1.2.0-nullsafety.3" 59 + version: "1.3.0"
60 flutter: 60 flutter:
61 dependency: "direct main" 61 dependency: "direct main"
62 description: flutter 62 description: flutter
@@ -67,41 +67,60 @@ packages: @@ -67,41 +67,60 @@ packages:
67 description: flutter 67 description: flutter
68 source: sdk 68 source: sdk
69 version: "0.0.0" 69 version: "0.0.0"
  70 + flutter_web_plugins:
  71 + dependency: transitive
  72 + description: flutter
  73 + source: sdk
  74 + version: "0.0.0"
  75 + js:
  76 + dependency: transitive
  77 + description:
  78 + name: js
  79 + url: "https://pub.dartlang.org"
  80 + source: hosted
  81 + version: "0.6.4"
70 matcher: 82 matcher:
71 dependency: transitive 83 dependency: transitive
72 description: 84 description:
73 name: matcher 85 name: matcher
74 url: "https://pub.dartlang.org" 86 url: "https://pub.dartlang.org"
75 source: hosted 87 source: hosted
76 - version: "0.12.10-nullsafety.3" 88 + version: "0.12.11"
  89 + material_color_utilities:
  90 + dependency: transitive
  91 + description:
  92 + name: material_color_utilities
  93 + url: "https://pub.dartlang.org"
  94 + source: hosted
  95 + version: "0.1.4"
77 meta: 96 meta:
78 dependency: transitive 97 dependency: transitive
79 description: 98 description:
80 name: meta 99 name: meta
81 url: "https://pub.dartlang.org" 100 url: "https://pub.dartlang.org"
82 source: hosted 101 source: hosted
83 - version: "1.3.0-nullsafety.6" 102 + version: "1.7.0"
84 modal_bottom_sheet: 103 modal_bottom_sheet:
85 dependency: "direct main" 104 dependency: "direct main"
86 description: 105 description:
87 path: ".." 106 path: ".."
88 relative: true 107 relative: true
89 source: path 108 source: path
90 - version: "2.0.0-nullsafety.1" 109 + version: "2.1.0"
91 path: 110 path:
92 dependency: transitive 111 dependency: transitive
93 description: 112 description:
94 name: path 113 name: path
95 url: "https://pub.dartlang.org" 114 url: "https://pub.dartlang.org"
96 source: hosted 115 source: hosted
97 - version: "1.8.0-nullsafety.3" 116 + version: "1.8.1"
98 plugin_platform_interface: 117 plugin_platform_interface:
99 dependency: transitive 118 dependency: transitive
100 description: 119 description:
101 name: plugin_platform_interface 120 name: plugin_platform_interface
102 url: "https://pub.dartlang.org" 121 url: "https://pub.dartlang.org"
103 source: hosted 122 source: hosted
104 - version: "1.1.0-nullsafety.1" 123 + version: "2.1.2"
105 sky_engine: 124 sky_engine:
106 dependency: transitive 125 dependency: transitive
107 description: flutter 126 description: flutter
@@ -113,91 +132,105 @@ packages: @@ -113,91 +132,105 @@ packages:
113 name: source_span 132 name: source_span
114 url: "https://pub.dartlang.org" 133 url: "https://pub.dartlang.org"
115 source: hosted 134 source: hosted
116 - version: "1.8.0-nullsafety.4" 135 + version: "1.8.2"
117 stack_trace: 136 stack_trace:
118 dependency: transitive 137 dependency: transitive
119 description: 138 description:
120 name: stack_trace 139 name: stack_trace
121 url: "https://pub.dartlang.org" 140 url: "https://pub.dartlang.org"
122 source: hosted 141 source: hosted
123 - version: "1.10.0-nullsafety.6" 142 + version: "1.10.0"
124 stream_channel: 143 stream_channel:
125 dependency: transitive 144 dependency: transitive
126 description: 145 description:
127 name: stream_channel 146 name: stream_channel
128 url: "https://pub.dartlang.org" 147 url: "https://pub.dartlang.org"
129 source: hosted 148 source: hosted
130 - version: "2.1.0-nullsafety.3" 149 + version: "2.1.0"
131 string_scanner: 150 string_scanner:
132 dependency: transitive 151 dependency: transitive
133 description: 152 description:
134 name: string_scanner 153 name: string_scanner
135 url: "https://pub.dartlang.org" 154 url: "https://pub.dartlang.org"
136 source: hosted 155 source: hosted
137 - version: "1.1.0-nullsafety.3" 156 + version: "1.1.0"
138 term_glyph: 157 term_glyph:
139 dependency: transitive 158 dependency: transitive
140 description: 159 description:
141 name: term_glyph 160 name: term_glyph
142 url: "https://pub.dartlang.org" 161 url: "https://pub.dartlang.org"
143 source: hosted 162 source: hosted
144 - version: "1.2.0-nullsafety.3" 163 + version: "1.2.0"
145 test_api: 164 test_api:
146 dependency: transitive 165 dependency: transitive
147 description: 166 description:
148 name: test_api 167 name: test_api
149 url: "https://pub.dartlang.org" 168 url: "https://pub.dartlang.org"
150 source: hosted 169 source: hosted
151 - version: "0.2.19-nullsafety.6"  
152 - typed_data: 170 + version: "0.4.9"
  171 + url_launcher:
  172 + dependency: "direct main"
  173 + description:
  174 + name: url_launcher
  175 + url: "https://pub.dartlang.org"
  176 + source: hosted
  177 + version: "6.1.5"
  178 + url_launcher_android:
153 dependency: transitive 179 dependency: transitive
154 description: 180 description:
155 - name: typed_data 181 + name: url_launcher_android
156 url: "https://pub.dartlang.org" 182 url: "https://pub.dartlang.org"
157 source: hosted 183 source: hosted
158 - version: "1.3.0-nullsafety.5"  
159 - url_launcher:  
160 - dependency: "direct main" 184 + version: "6.0.17"
  185 + url_launcher_ios:
  186 + dependency: transitive
161 description: 187 description:
162 - name: url_launcher 188 + name: url_launcher_ios
163 url: "https://pub.dartlang.org" 189 url: "https://pub.dartlang.org"
164 source: hosted 190 source: hosted
165 - version: "6.0.0-nullsafety.1" 191 + version: "6.0.17"
166 url_launcher_linux: 192 url_launcher_linux:
167 dependency: transitive 193 dependency: transitive
168 description: 194 description:
169 name: url_launcher_linux 195 name: url_launcher_linux
170 url: "https://pub.dartlang.org" 196 url: "https://pub.dartlang.org"
171 source: hosted 197 source: hosted
172 - version: "0.1.0-nullsafety.1" 198 + version: "3.0.1"
173 url_launcher_macos: 199 url_launcher_macos:
174 dependency: transitive 200 dependency: transitive
175 description: 201 description:
176 name: url_launcher_macos 202 name: url_launcher_macos
177 url: "https://pub.dartlang.org" 203 url: "https://pub.dartlang.org"
178 source: hosted 204 source: hosted
179 - version: "0.1.0-nullsafety.1" 205 + version: "3.0.1"
180 url_launcher_platform_interface: 206 url_launcher_platform_interface:
181 dependency: transitive 207 dependency: transitive
182 description: 208 description:
183 name: url_launcher_platform_interface 209 name: url_launcher_platform_interface
184 url: "https://pub.dartlang.org" 210 url: "https://pub.dartlang.org"
185 source: hosted 211 source: hosted
186 - version: "2.0.0-nullsafety.1" 212 + version: "2.1.0"
  213 + url_launcher_web:
  214 + dependency: transitive
  215 + description:
  216 + name: url_launcher_web
  217 + url: "https://pub.dartlang.org"
  218 + source: hosted
  219 + version: "2.0.13"
187 url_launcher_windows: 220 url_launcher_windows:
188 dependency: transitive 221 dependency: transitive
189 description: 222 description:
190 name: url_launcher_windows 223 name: url_launcher_windows
191 url: "https://pub.dartlang.org" 224 url: "https://pub.dartlang.org"
192 source: hosted 225 source: hosted
193 - version: "0.1.0-nullsafety.1" 226 + version: "3.0.1"
194 vector_math: 227 vector_math:
195 dependency: transitive 228 dependency: transitive
196 description: 229 description:
197 name: vector_math 230 name: vector_math
198 url: "https://pub.dartlang.org" 231 url: "https://pub.dartlang.org"
199 source: hosted 232 source: hosted
200 - version: "2.1.0-nullsafety.5" 233 + version: "2.1.2"
201 sdks: 234 sdks:
202 - dart: ">=2.12.0-29.10.beta <3.0.0"  
203 - flutter: ">=1.12.13+hotfix.5 <2.0.0" 235 + dart: ">=2.17.0 <3.0.0"
  236 + flutter: ">=3.0.0"
@@ -14,19 +14,17 @@ publish_to: none @@ -14,19 +14,17 @@ publish_to: none
14 version: 1.0.0+1 14 version: 1.0.0+1
15 15
16 environment: 16 environment:
17 - sdk: ">=2.12.0-29.10.beta <3.0.0" 17 + flutter: ">=3.0.0"
  18 + sdk: '>=2.17.0 <3.0.0'
  19 +
18 20
19 dependencies: 21 dependencies:
  22 + cupertino_icons: ^1.0.5
20 flutter: 23 flutter:
21 sdk: flutter 24 sdk: flutter
22 - url_launcher: 6.0.0-nullsafety.1  
23 modal_bottom_sheet: 25 modal_bottom_sheet:
24 path: '../' 26 path: '../'
25 -  
26 -  
27 - # The following adds the Cupertino Icons font to your application.  
28 - # Use with the CupertinoIcons class for iOS style icons.  
29 - cupertino_icons: ^0.1.3 27 + url_launcher: ^6.1.5
30 28
31 dev_dependencies: 29 dev_dependencies:
32 flutter_test: 30 flutter_test:
@@ -3,12 +3,8 @@ @@ -3,12 +3,8 @@
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 -import 'package:flutter/cupertino.dart';  
7 -import 'package:flutter/foundation.dart';  
8 import 'package:flutter/gestures.dart'; 6 import 'package:flutter/gestures.dart';
9 import 'package:flutter/material.dart'; 7 import 'package:flutter/material.dart';
10 -import 'package:flutter/scheduler.dart';  
11 -import 'package:flutter/widgets.dart';  
12 import 'package:modal_bottom_sheet/src/utils/scroll_to_top_status_bar.dart'; 8 import 'package:modal_bottom_sheet/src/utils/scroll_to_top_status_bar.dart';
13 9
14 import 'package:modal_bottom_sheet/src/utils/bottom_sheet_suspended_curve.dart'; 10 import 'package:modal_bottom_sheet/src/utils/bottom_sheet_suspended_curve.dart';
@@ -49,10 +45,7 @@ class ModalBottomSheet extends StatefulWidget { @@ -49,10 +45,7 @@ class ModalBottomSheet extends StatefulWidget {
49 required this.expanded, 45 required this.expanded,
50 required this.onClosing, 46 required this.onClosing,
51 required this.child, 47 required this.child,
52 - }) : assert(enableDrag != null),  
53 - assert(onClosing != null),  
54 - assert(child != null),  
55 - super(key: key); 48 + }) : super(key: key);
56 49
57 /// The closeProgressThreshold parameter 50 /// The closeProgressThreshold parameter
58 /// specifies when the bottom sheet will be dismissed when user drags it. 51 /// specifies when the bottom sheet will be dismissed when user drags it.
@@ -108,7 +101,7 @@ class ModalBottomSheet extends StatefulWidget { @@ -108,7 +101,7 @@ class ModalBottomSheet extends StatefulWidget {
108 final ScrollController scrollController; 101 final ScrollController scrollController;
109 102
110 @override 103 @override
111 - _ModalBottomSheetState createState() => _ModalBottomSheetState(); 104 + ModalBottomSheetState createState() => ModalBottomSheetState();
112 105
113 /// Creates an [AnimationController] suitable for a 106 /// Creates an [AnimationController] suitable for a
114 /// [ModalBottomSheet.animationController]. 107 /// [ModalBottomSheet.animationController].
@@ -128,7 +121,7 @@ class ModalBottomSheet extends StatefulWidget { @@ -128,7 +121,7 @@ class ModalBottomSheet extends StatefulWidget {
128 } 121 }
129 } 122 }
130 123
131 -class _ModalBottomSheetState extends State<ModalBottomSheet> 124 +class ModalBottomSheetState extends State<ModalBottomSheet>
132 with TickerProviderStateMixin { 125 with TickerProviderStateMixin {
133 final GlobalKey _childKey = GlobalKey(debugLabel: 'BottomSheet child'); 126 final GlobalKey _childKey = GlobalKey(debugLabel: 'BottomSheet child');
134 127
@@ -231,24 +224,27 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> @@ -231,24 +224,27 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
231 // ignore: unawaited_futures 224 // ignore: unawaited_futures
232 _bounceDragController.reverse(); 225 _bounceDragController.reverse();
233 226
234 - var canClose = true;  
235 - if (widget.shouldClose != null && hasReachedWillPopThreshold) {  
236 - _cancelClose();  
237 - canClose = await shouldClose();  
238 - }  
239 - if (canClose) {  
240 - // If speed is bigger than _minFlingVelocity try to close it  
241 - if (velocity > _minFlingVelocity) {  
242 - _close();  
243 - } else if (hasReachedCloseThreshold) {  
244 - if (widget.animationController.value > 0.0) {  
245 - // ignore: unawaited_futures  
246 - widget.animationController.fling(velocity: -1.0); 227 + Future<void> tryClose() async {
  228 + if (widget.shouldClose != null) {
  229 + _cancelClose();
  230 + bool canClose = await shouldClose();
  231 + if (canClose) {
  232 + _close();
247 } 233 }
248 - _close();  
249 } else { 234 } else {
250 - _cancelClose(); 235 + _close();
  236 + }
  237 + }
  238 +
  239 + // If speed is bigger than _minFlingVelocity try to close it
  240 + if (velocity > _minFlingVelocity) {
  241 + tryClose();
  242 + } else if (hasReachedCloseThreshold) {
  243 + if (widget.animationController.value > 0.0) {
  244 + // ignore: unawaited_futures
  245 + widget.animationController.fling(velocity: -1.0);
251 } 246 }
  247 + tryClose();
252 } else { 248 } else {
253 _cancelClose(); 249 _cancelClose();
254 } 250 }
@@ -302,9 +298,8 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> @@ -302,9 +298,8 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
302 298
303 // Otherwise the calculate the velocity with a VelocityTracker 299 // Otherwise the calculate the velocity with a VelocityTracker
304 if (_velocityTracker == null) { 300 if (_velocityTracker == null) {
305 - //final pointerKind = defaultPointerDeviceKind(context);  
306 - // ignore: deprecated_member_use  
307 - _velocityTracker = VelocityTracker(); 301 + final pointerKind = defaultPointerDeviceKind(context);
  302 + _velocityTracker = VelocityTracker.withKind(pointerKind);
308 _startTime = DateTime.now(); 303 _startTime = DateTime.now();
309 } 304 }
310 305
@@ -493,5 +488,4 @@ PointerDeviceKind defaultPointerDeviceKind(BuildContext context) { @@ -493,5 +488,4 @@ PointerDeviceKind defaultPointerDeviceKind(BuildContext context) {
493 case TargetPlatform.fuchsia: 488 case TargetPlatform.fuchsia:
494 return PointerDeviceKind.unknown; 489 return PointerDeviceKind.unknown;
495 } 490 }
496 - return PointerDeviceKind.unknown;  
497 } 491 }
1 import 'dart:async'; 1 import 'dart:async';
2 2
3 -import 'package:flutter/cupertino.dart';  
4 -import 'package:flutter/foundation.dart';  
5 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
6 -import 'package:modal_bottom_sheet/src/utils/modal_scroll_controller.dart';  
7 4
8 import '../modal_bottom_sheet.dart'; 5 import '../modal_bottom_sheet.dart';
9 6
@@ -19,9 +16,7 @@ class _ModalBottomSheet<T> extends StatefulWidget { @@ -19,9 +16,7 @@ class _ModalBottomSheet<T> extends StatefulWidget {
19 this.expanded = false, 16 this.expanded = false,
20 this.enableDrag = true, 17 this.enableDrag = true,
21 this.animationCurve, 18 this.animationCurve,
22 - }) : assert(expanded != null),  
23 - assert(enableDrag != null),  
24 - super(key: key); 19 + }) : super(key: key);
25 20
26 final double? closeProgressThreshold; 21 final double? closeProgressThreshold;
27 final ModalBottomSheetRoute<T> route; 22 final ModalBottomSheetRoute<T> route;
@@ -127,7 +122,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { @@ -127,7 +122,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
127 } 122 }
128 } 123 }
129 124
130 -class ModalBottomSheetRoute<T> extends PopupRoute<T> { 125 +class ModalBottomSheetRoute<T> extends PageRoute<T> {
131 ModalBottomSheetRoute({ 126 ModalBottomSheetRoute({
132 this.closeProgressThreshold, 127 this.closeProgressThreshold,
133 this.containerBuilder, 128 this.containerBuilder,
@@ -143,10 +138,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { @@ -143,10 +138,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
143 this.animationCurve, 138 this.animationCurve,
144 this.duration, 139 this.duration,
145 RouteSettings? settings, 140 RouteSettings? settings,
146 - }) : assert(expanded != null),  
147 - assert(isDismissible != null),  
148 - assert(enableDrag != null),  
149 - super(settings: settings); 141 + }) : super(settings: settings);
150 142
151 final double? closeProgressThreshold; 143 final double? closeProgressThreshold;
152 final WidgetWithChildBuilder? containerBuilder; 144 final WidgetWithChildBuilder? containerBuilder;
@@ -170,6 +162,12 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { @@ -170,6 +162,12 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
170 bool get barrierDismissible => isDismissible; 162 bool get barrierDismissible => isDismissible;
171 163
172 @override 164 @override
  165 + bool get maintainState => true; // keep in memory when not active (#252)
  166 +
  167 + @override
  168 + bool get opaque => false; //transparency
  169 +
  170 + @override
173 final String? barrierLabel; 171 final String? barrierLabel;
174 172
175 @override 173 @override
@@ -245,14 +243,8 @@ Future<T?> showCustomModalBottomSheet<T>({ @@ -245,14 +243,8 @@ Future<T?> showCustomModalBottomSheet<T>({
245 bool isDismissible = true, 243 bool isDismissible = true,
246 bool enableDrag = true, 244 bool enableDrag = true,
247 Duration? duration, 245 Duration? duration,
  246 + RouteSettings? settings,
248 }) async { 247 }) async {
249 - assert(context != null);  
250 - assert(builder != null);  
251 - assert(containerWidget != null);  
252 - assert(expand != null);  
253 - assert(useRootNavigator != null);  
254 - assert(isDismissible != null);  
255 - assert(enableDrag != null);  
256 assert(debugCheckHasMediaQuery(context)); 248 assert(debugCheckHasMediaQuery(context));
257 assert(debugCheckHasMaterialLocalizations(context)); 249 assert(debugCheckHasMaterialLocalizations(context));
258 final hasMaterialLocalizations = 250 final hasMaterialLocalizations =
@@ -275,6 +267,7 @@ Future<T?> showCustomModalBottomSheet<T>({ @@ -275,6 +267,7 @@ Future<T?> showCustomModalBottomSheet<T>({
275 enableDrag: enableDrag, 267 enableDrag: enableDrag,
276 animationCurve: animationCurve, 268 animationCurve: animationCurve,
277 duration: duration, 269 duration: duration,
  270 + settings: settings,
278 )); 271 ));
279 return result; 272 return result;
280 } 273 }
@@ -6,14 +6,16 @@ import 'package:flutter/services.dart'; @@ -6,14 +6,16 @@ import 'package:flutter/services.dart';
6 import '../../modal_bottom_sheet.dart'; 6 import '../../modal_bottom_sheet.dart';
7 import '../bottom_sheet_route.dart'; 7 import '../bottom_sheet_route.dart';
8 8
9 -const Radius _default_bar_top_radius = Radius.circular(15); 9 +const Radius kDefaultBarTopRadius = Radius.circular(15);
10 10
11 class BarBottomSheet extends StatelessWidget { 11 class BarBottomSheet extends StatelessWidget {
12 final Widget child; 12 final Widget child;
13 final Widget? control; 13 final Widget? control;
14 final Clip? clipBehavior; 14 final Clip? clipBehavior;
  15 + final Color? backgroundColor;
15 final double? elevation; 16 final double? elevation;
16 final ShapeBorder? shape; 17 final ShapeBorder? shape;
  18 + final SystemUiOverlayStyle? overlayStyle;
17 19
18 const BarBottomSheet({ 20 const BarBottomSheet({
19 Key? key, 21 Key? key,
@@ -21,13 +23,15 @@ class BarBottomSheet extends StatelessWidget { @@ -21,13 +23,15 @@ class BarBottomSheet extends StatelessWidget {
21 this.control, 23 this.control,
22 this.clipBehavior, 24 this.clipBehavior,
23 this.shape, 25 this.shape,
  26 + this.backgroundColor,
24 this.elevation, 27 this.elevation,
  28 + this.overlayStyle,
25 }) : super(key: key); 29 }) : super(key: key);
26 30
27 @override 31 @override
28 Widget build(BuildContext context) { 32 Widget build(BuildContext context) {
29 return AnnotatedRegion<SystemUiOverlayStyle>( 33 return AnnotatedRegion<SystemUiOverlayStyle>(
30 - value: SystemUiOverlayStyle.light, 34 + value: overlayStyle ?? SystemUiOverlayStyle.light,
31 child: Column( 35 child: Column(
32 mainAxisSize: MainAxisSize.min, 36 mainAxisSize: MainAxisSize.min,
33 crossAxisAlignment: CrossAxisAlignment.center, 37 crossAxisAlignment: CrossAxisAlignment.center,
@@ -53,10 +57,11 @@ class BarBottomSheet extends StatelessWidget { @@ -53,10 +57,11 @@ class BarBottomSheet extends StatelessWidget {
53 RoundedRectangleBorder( 57 RoundedRectangleBorder(
54 side: BorderSide(), 58 side: BorderSide(),
55 borderRadius: BorderRadius.only( 59 borderRadius: BorderRadius.only(
56 - topLeft: _default_bar_top_radius,  
57 - topRight: _default_bar_top_radius), 60 + topLeft: kDefaultBarTopRadius,
  61 + topRight: kDefaultBarTopRadius),
58 ), 62 ),
59 clipBehavior: clipBehavior ?? Clip.hardEdge, 63 clipBehavior: clipBehavior ?? Clip.hardEdge,
  64 + color: backgroundColor ?? Colors.white,
60 elevation: elevation ?? 2, 65 elevation: elevation ?? 2,
61 child: SizedBox( 66 child: SizedBox(
62 width: double.infinity, 67 width: double.infinity,
@@ -88,13 +93,9 @@ Future<T?> showBarModalBottomSheet<T>({ @@ -88,13 +93,9 @@ Future<T?> showBarModalBottomSheet<T>({
88 bool enableDrag = true, 93 bool enableDrag = true,
89 Widget? topControl, 94 Widget? topControl,
90 Duration? duration, 95 Duration? duration,
  96 + RouteSettings? settings,
  97 + SystemUiOverlayStyle? overlayStyle,
91 }) async { 98 }) async {
92 - assert(context != null);  
93 - assert(builder != null);  
94 - assert(expand != null);  
95 - assert(useRootNavigator != null);  
96 - assert(isDismissible != null);  
97 - assert(enableDrag != null);  
98 assert(debugCheckHasMediaQuery(context)); 99 assert(debugCheckHasMediaQuery(context));
99 assert(debugCheckHasMaterialLocalizations(context)); 100 assert(debugCheckHasMaterialLocalizations(context));
100 final result = await Navigator.of(context, rootNavigator: useRootNavigator) 101 final result = await Navigator.of(context, rootNavigator: useRootNavigator)
@@ -107,7 +108,9 @@ Future<T?> showBarModalBottomSheet<T>({ @@ -107,7 +108,9 @@ Future<T?> showBarModalBottomSheet<T>({
107 control: topControl, 108 control: topControl,
108 clipBehavior: clipBehavior, 109 clipBehavior: clipBehavior,
109 shape: shape, 110 shape: shape,
  111 + backgroundColor: backgroundColor,
110 elevation: elevation, 112 elevation: elevation,
  113 + overlayStyle: overlayStyle,
111 ), 114 ),
112 secondAnimationController: secondAnimation, 115 secondAnimationController: secondAnimation,
113 expanded: expand, 116 expanded: expand,
@@ -117,6 +120,7 @@ Future<T?> showBarModalBottomSheet<T>({ @@ -117,6 +120,7 @@ Future<T?> showBarModalBottomSheet<T>({
117 enableDrag: enableDrag, 120 enableDrag: enableDrag,
118 animationCurve: animationCurve, 121 animationCurve: animationCurve,
119 duration: duration, 122 duration: duration,
  123 + settings: settings,
120 )); 124 ));
121 return result; 125 return result;
122 } 126 }
@@ -5,8 +5,6 @@ @@ -5,8 +5,6 @@
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:flutter/cupertino.dart' show CupertinoTheme, CupertinoApp; 7 import 'package:flutter/cupertino.dart' show CupertinoTheme, CupertinoApp;
8 -import 'package:flutter/foundation.dart';  
9 -import 'package:flutter/gestures.dart';  
10 import 'package:flutter/material.dart' 8 import 'package:flutter/material.dart'
11 show 9 show
12 Colors, 10 Colors,
@@ -17,12 +15,12 @@ import 'package:flutter/services.dart'; @@ -17,12 +15,12 @@ import 'package:flutter/services.dart';
17 import 'package:flutter/widgets.dart'; 15 import 'package:flutter/widgets.dart';
18 16
19 import '../../modal_bottom_sheet.dart'; 17 import '../../modal_bottom_sheet.dart';
20 -import '../bottom_sheet_route.dart';  
21 18
22 const double _kPreviousPageVisibleOffset = 10; 19 const double _kPreviousPageVisibleOffset = 10;
23 20
24 const Radius _kDefaultTopRadius = Radius.circular(12); 21 const Radius _kDefaultTopRadius = Radius.circular(12);
25 -const BoxShadow _kDefaultBoxShadow = BoxShadow(blurRadius: 10, color: Colors.black12, spreadRadius: 5); 22 +const BoxShadow _kDefaultBoxShadow =
  23 + BoxShadow(blurRadius: 10, color: Colors.black12, spreadRadius: 5);
26 24
27 /// Cupertino Bottom Sheet Container 25 /// Cupertino Bottom Sheet Container
28 /// 26 ///
@@ -43,23 +41,22 @@ class _CupertinoBottomSheetContainer extends StatelessWidget { @@ -43,23 +41,22 @@ class _CupertinoBottomSheetContainer extends StatelessWidget {
43 this.shadow, 41 this.shadow,
44 }) : super(key: key); 42 }) : super(key: key);
45 43
46 -  
47 @override 44 @override
48 Widget build(BuildContext context) { 45 Widget build(BuildContext context) {
49 final topSafeAreaPadding = MediaQuery.of(context).padding.top; 46 final topSafeAreaPadding = MediaQuery.of(context).padding.top;
50 final topPadding = _kPreviousPageVisibleOffset + topSafeAreaPadding; 47 final topPadding = _kPreviousPageVisibleOffset + topSafeAreaPadding;
51 48
52 - final _shadow = shadow ?? _kDefaultBoxShadow;  
53 - BoxShadow(blurRadius: 10, color: Colors.black12, spreadRadius: 5);  
54 - final _backgroundColor =  
55 - backgroundColor ?? CupertinoTheme.of(context).scaffoldBackgroundColor; 49 + final shadow = this.shadow ?? _kDefaultBoxShadow;
  50 + BoxShadow(blurRadius: 10, color: Colors.black12, spreadRadius: 5);
  51 + final backgroundColor = this.backgroundColor ??
  52 + CupertinoTheme.of(context).scaffoldBackgroundColor;
56 return Padding( 53 return Padding(
57 padding: EdgeInsets.only(top: topPadding), 54 padding: EdgeInsets.only(top: topPadding),
58 child: ClipRRect( 55 child: ClipRRect(
59 borderRadius: BorderRadius.vertical(top: topRadius), 56 borderRadius: BorderRadius.vertical(top: topRadius),
60 child: Container( 57 child: Container(
61 decoration: 58 decoration:
62 - BoxDecoration(color: _backgroundColor, boxShadow: [_shadow]), 59 + BoxDecoration(color: backgroundColor, boxShadow: [shadow]),
63 width: double.infinity, 60 width: double.infinity,
64 child: MediaQuery.removePadding( 61 child: MediaQuery.removePadding(
65 context: context, 62 context: context,
@@ -94,12 +91,8 @@ Future<T?> showCupertinoModalBottomSheet<T>({ @@ -94,12 +91,8 @@ Future<T?> showCupertinoModalBottomSheet<T>({
94 RouteSettings? settings, 91 RouteSettings? settings,
95 Color? transitionBackgroundColor, 92 Color? transitionBackgroundColor,
96 BoxShadow? shadow, 93 BoxShadow? shadow,
  94 + SystemUiOverlayStyle? overlayStyle,
97 }) async { 95 }) async {
98 - assert(context != null);  
99 - assert(builder != null);  
100 - assert(expand != null);  
101 - assert(useRootNavigator != null);  
102 - assert(enableDrag != null);  
103 assert(debugCheckHasMediaQuery(context)); 96 assert(debugCheckHasMediaQuery(context));
104 final hasMaterialLocalizations = 97 final hasMaterialLocalizations =
105 Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) != 98 Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) !=
@@ -134,7 +127,8 @@ Future<T?> showCupertinoModalBottomSheet<T>({ @@ -134,7 +127,8 @@ Future<T?> showCupertinoModalBottomSheet<T>({
134 previousRouteAnimationCurve: previousRouteAnimationCurve, 127 previousRouteAnimationCurve: previousRouteAnimationCurve,
135 duration: duration, 128 duration: duration,
136 settings: settings, 129 settings: settings,
137 - transitionBackgroundColor: transitionBackgroundColor ?? Colors.black), 130 + transitionBackgroundColor: transitionBackgroundColor ?? Colors.black,
  131 + overlayStyle: overlayStyle),
138 ); 132 );
139 return result; 133 return result;
140 } 134 }
@@ -144,12 +138,12 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { @@ -144,12 +138,12 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> {
144 138
145 final Curve? previousRouteAnimationCurve; 139 final Curve? previousRouteAnimationCurve;
146 140
147 -  
148 final BoxShadow? boxShadow; 141 final BoxShadow? boxShadow;
149 142
150 // Background color behind all routes 143 // Background color behind all routes
151 // Black by default 144 // Black by default
152 final Color? transitionBackgroundColor; 145 final Color? transitionBackgroundColor;
  146 + final SystemUiOverlayStyle? overlayStyle;
153 147
154 CupertinoModalBottomSheetRoute({ 148 CupertinoModalBottomSheetRoute({
155 required WidgetBuilder builder, 149 required WidgetBuilder builder,
@@ -173,10 +167,8 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { @@ -173,10 +167,8 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> {
173 this.transitionBackgroundColor, 167 this.transitionBackgroundColor,
174 this.topRadius = _kDefaultTopRadius, 168 this.topRadius = _kDefaultTopRadius,
175 this.previousRouteAnimationCurve, 169 this.previousRouteAnimationCurve,
176 - }) : assert(expanded != null),  
177 - assert(isDismissible != null),  
178 - assert(enableDrag != null),  
179 - super( 170 + this.overlayStyle,
  171 + }) : super(
180 closeProgressThreshold: closeProgressThreshold, 172 closeProgressThreshold: closeProgressThreshold,
181 scrollController: scrollController, 173 scrollController: scrollController,
182 containerBuilder: containerBuilder, 174 containerBuilder: containerBuilder,
@@ -201,8 +193,7 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { @@ -201,8 +193,7 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> {
201 Widget child, 193 Widget child,
202 ) { 194 ) {
203 final paddingTop = MediaQuery.of(context).padding.top; 195 final paddingTop = MediaQuery.of(context).padding.top;
204 - final distanceWithScale =  
205 - (paddingTop + _kPreviousPageVisibleOffset) * 0.9; 196 + final distanceWithScale = (paddingTop + _kPreviousPageVisibleOffset) * 0.9;
206 final offsetY = secondaryAnimation.value * (paddingTop - distanceWithScale); 197 final offsetY = secondaryAnimation.value * (paddingTop - distanceWithScale);
207 final scale = 1 - secondaryAnimation.value / 10; 198 final scale = 1 - secondaryAnimation.value / 10;
208 return AnimatedBuilder( 199 return AnimatedBuilder(
@@ -220,14 +211,15 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { @@ -220,14 +211,15 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> {
220 } 211 }
221 212
222 @override 213 @override
223 - Widget getPreviousRouteTransition(BuildContext context,  
224 - Animation<double> secondaryAnimation, Widget child) { 214 + Widget getPreviousRouteTransition(
  215 + BuildContext context, Animation<double> secondAnimation, Widget child) {
225 return _CupertinoModalTransition( 216 return _CupertinoModalTransition(
226 - secondaryAnimation: secondaryAnimation, 217 + secondaryAnimation: secondAnimation,
227 body: child, 218 body: child,
228 animationCurve: previousRouteAnimationCurve, 219 animationCurve: previousRouteAnimationCurve,
229 topRadius: topRadius, 220 topRadius: topRadius,
230 backgroundColor: transitionBackgroundColor ?? Colors.black, 221 backgroundColor: transitionBackgroundColor ?? Colors.black,
  222 + overlayStyle: overlayStyle,
231 ); 223 );
232 } 224 }
233 } 225 }
@@ -237,7 +229,7 @@ class _CupertinoModalTransition extends StatelessWidget { @@ -237,7 +229,7 @@ class _CupertinoModalTransition extends StatelessWidget {
237 final Radius topRadius; 229 final Radius topRadius;
238 final Curve? animationCurve; 230 final Curve? animationCurve;
239 final Color backgroundColor; 231 final Color backgroundColor;
240 - final BoxShadow? boxShadow; 232 + final SystemUiOverlayStyle? overlayStyle;
241 233
242 final Widget body; 234 final Widget body;
243 235
@@ -248,7 +240,7 @@ class _CupertinoModalTransition extends StatelessWidget { @@ -248,7 +240,7 @@ class _CupertinoModalTransition extends StatelessWidget {
248 required this.topRadius, 240 required this.topRadius,
249 this.backgroundColor = Colors.black, 241 this.backgroundColor = Colors.black,
250 this.animationCurve, 242 this.animationCurve,
251 - this.boxShadow, 243 + this.overlayStyle,
252 }) : super(key: key); 244 }) : super(key: key);
253 245
254 @override 246 @override
@@ -266,7 +258,7 @@ class _CupertinoModalTransition extends StatelessWidget { @@ -266,7 +258,7 @@ class _CupertinoModalTransition extends StatelessWidget {
266 ); 258 );
267 259
268 return AnnotatedRegion<SystemUiOverlayStyle>( 260 return AnnotatedRegion<SystemUiOverlayStyle>(
269 - value: SystemUiOverlayStyle.light, 261 + value: overlayStyle ?? SystemUiOverlayStyle.light,
270 child: AnimatedBuilder( 262 child: AnimatedBuilder(
271 animation: curvedAnimation, 263 animation: curvedAnimation,
272 child: body, 264 child: body,
@@ -298,20 +290,16 @@ class _CupertinoModalTransition extends StatelessWidget { @@ -298,20 +290,16 @@ class _CupertinoModalTransition extends StatelessWidget {
298 } 290 }
299 } 291 }
300 292
301 -class _CupertinoScaffold extends InheritedWidget { 293 +class CupertinoScaffoldInheirted extends InheritedWidget {
302 final AnimationController? animation; 294 final AnimationController? animation;
303 295
304 final Radius? topRadius; 296 final Radius? topRadius;
305 297
306 - @override  
307 - final Widget child;  
308 -  
309 - const _CupertinoScaffold({  
310 - Key? key, 298 + const CupertinoScaffoldInheirted({
311 this.animation, 299 this.animation,
312 - required this.child, 300 + required super.child,
313 this.topRadius, 301 this.topRadius,
314 - }) : super(key: key, child: child); 302 + }) : super();
315 303
316 @override 304 @override
317 bool updateShouldNotify(InheritedWidget oldWidget) { 305 bool updateShouldNotify(InheritedWidget oldWidget) {
@@ -321,18 +309,20 @@ class _CupertinoScaffold extends InheritedWidget { @@ -321,18 +309,20 @@ class _CupertinoScaffold extends InheritedWidget {
321 309
322 // Support 310 // Support
323 class CupertinoScaffold extends StatefulWidget { 311 class CupertinoScaffold extends StatefulWidget {
324 - static _CupertinoScaffold? of(BuildContext context) =>  
325 - context.dependOnInheritedWidgetOfExactType<_CupertinoScaffold>(); 312 + static CupertinoScaffoldInheirted? of(BuildContext context) =>
  313 + context.dependOnInheritedWidgetOfExactType<CupertinoScaffoldInheirted>();
326 314
327 final Widget body; 315 final Widget body;
328 final Radius topRadius; 316 final Radius topRadius;
329 final Color transitionBackgroundColor; 317 final Color transitionBackgroundColor;
  318 + final SystemUiOverlayStyle? overlayStyle;
330 319
331 const CupertinoScaffold({ 320 const CupertinoScaffold({
332 Key? key, 321 Key? key,
333 required this.body, 322 required this.body,
334 this.topRadius = _kDefaultTopRadius, 323 this.topRadius = _kDefaultTopRadius,
335 this.transitionBackgroundColor = Colors.black, 324 this.transitionBackgroundColor = Colors.black,
  325 + this.overlayStyle,
336 }) : super(key: key); 326 }) : super(key: key);
337 327
338 @override 328 @override
@@ -354,12 +344,8 @@ class CupertinoScaffold extends StatefulWidget { @@ -354,12 +344,8 @@ class CupertinoScaffold extends StatefulWidget {
354 Duration? duration, 344 Duration? duration,
355 RouteSettings? settings, 345 RouteSettings? settings,
356 BoxShadow? shadow, 346 BoxShadow? shadow,
  347 + SystemUiOverlayStyle? overlayStyle,
357 }) async { 348 }) async {
358 - assert(context != null);  
359 - assert(builder != null);  
360 - assert(expand != null);  
361 - assert(useRootNavigator != null);  
362 - assert(enableDrag != null);  
363 assert(debugCheckHasMediaQuery(context)); 349 assert(debugCheckHasMediaQuery(context));
364 final isCupertinoApp = 350 final isCupertinoApp =
365 context.findAncestorWidgetOfExactType<CupertinoApp>() != null; 351 context.findAncestorWidgetOfExactType<CupertinoApp>() != null;
@@ -391,6 +377,7 @@ class CupertinoScaffold extends StatefulWidget { @@ -391,6 +377,7 @@ class CupertinoScaffold extends StatefulWidget {
391 previousRouteAnimationCurve: previousRouteAnimationCurve, 377 previousRouteAnimationCurve: previousRouteAnimationCurve,
392 duration: duration, 378 duration: duration,
393 settings: settings, 379 settings: settings,
  380 + overlayStyle: overlayStyle,
394 )); 381 ));
395 return result; 382 return result;
396 } 383 }
@@ -400,8 +387,6 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold> @@ -400,8 +387,6 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold>
400 with TickerProviderStateMixin { 387 with TickerProviderStateMixin {
401 late AnimationController animationController; 388 late AnimationController animationController;
402 389
403 - SystemUiOverlayStyle? lastStyle;  
404 -  
405 @override 390 @override
406 void initState() { 391 void initState() {
407 animationController = 392 animationController =
@@ -416,7 +401,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold> @@ -416,7 +401,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold>
416 401
417 @override 402 @override
418 Widget build(BuildContext context) { 403 Widget build(BuildContext context) {
419 - return _CupertinoScaffold( 404 + return CupertinoScaffoldInheirted(
420 animation: animationController, 405 animation: animationController,
421 topRadius: widget.topRadius, 406 topRadius: widget.topRadius,
422 child: _CupertinoModalTransition( 407 child: _CupertinoModalTransition(
@@ -424,6 +409,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold> @@ -424,6 +409,7 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold>
424 body: widget.body, 409 body: widget.body,
425 topRadius: widget.topRadius, 410 topRadius: widget.topRadius,
426 backgroundColor: widget.transitionBackgroundColor, 411 backgroundColor: widget.transitionBackgroundColor,
  412 + overlayStyle: widget.overlayStyle,
427 ), 413 ),
428 ); 414 );
429 } 415 }
@@ -20,13 +20,8 @@ Future<T?> showMaterialModalBottomSheet<T>({ @@ -20,13 +20,8 @@ Future<T?> showMaterialModalBottomSheet<T>({
20 bool isDismissible = true, 20 bool isDismissible = true,
21 bool enableDrag = true, 21 bool enableDrag = true,
22 Duration? duration, 22 Duration? duration,
  23 + RouteSettings? settings,
23 }) async { 24 }) async {
24 - assert(context != null);  
25 - assert(builder != null);  
26 - assert(expand != null);  
27 - assert(useRootNavigator != null);  
28 - assert(isDismissible != null);  
29 - assert(enableDrag != null);  
30 assert(debugCheckHasMediaQuery(context)); 25 assert(debugCheckHasMediaQuery(context));
31 assert(debugCheckHasMaterialLocalizations(context)); 26 assert(debugCheckHasMaterialLocalizations(context));
32 final result = await Navigator.of(context, rootNavigator: useRootNavigator) 27 final result = await Navigator.of(context, rootNavigator: useRootNavigator)
@@ -50,6 +45,7 @@ Future<T?> showMaterialModalBottomSheet<T>({ @@ -50,6 +45,7 @@ Future<T?> showMaterialModalBottomSheet<T>({
50 enableDrag: enableDrag, 45 enableDrag: enableDrag,
51 animationCurve: animationCurve, 46 animationCurve: animationCurve,
52 duration: duration, 47 duration: duration,
  48 + settings: settings,
53 )); 49 ));
54 return result; 50 return result;
55 } 51 }
@@ -65,17 +61,18 @@ WidgetWithChildBuilder _materialContainerBuilder(BuildContext context, @@ -65,17 +61,18 @@ WidgetWithChildBuilder _materialContainerBuilder(BuildContext context,
65 final color = backgroundColor ?? 61 final color = backgroundColor ??
66 bottomSheetTheme.modalBackgroundColor ?? 62 bottomSheetTheme.modalBackgroundColor ??
67 bottomSheetTheme.backgroundColor; 63 bottomSheetTheme.backgroundColor;
68 - final _elevation = elevation ?? bottomSheetTheme.elevation ?? 0.0;  
69 - final _shape = shape ?? bottomSheetTheme.shape;  
70 - final _clipBehavior = 64 + final effectiveElevation = elevation ?? bottomSheetTheme.elevation ?? 0.0;
  65 + final effectiveShape = shape ?? bottomSheetTheme.shape;
  66 + final effectiveClipBehavior =
71 clipBehavior ?? bottomSheetTheme.clipBehavior ?? Clip.none; 67 clipBehavior ?? bottomSheetTheme.clipBehavior ?? Clip.none;
72 68
73 - final result = (context, animation, child) => Material(  
74 - color: color,  
75 - elevation: _elevation,  
76 - shape: _shape,  
77 - clipBehavior: _clipBehavior,  
78 - child: child); 69 + Widget result(context, animation, child) => Material(
  70 + color: color,
  71 + elevation: effectiveElevation,
  72 + shape: effectiveShape,
  73 + clipBehavior: effectiveClipBehavior,
  74 + child: child,
  75 + );
79 if (theme != null) { 76 if (theme != null) {
80 return (context, animation, child) => 77 return (context, animation, child) =>
81 Theme(data: theme, child: result(context, animation, child)); 78 Theme(data: theme, child: result(context, animation, child));
1 import 'package:flutter/cupertino.dart'; 1 import 'package:flutter/cupertino.dart';
2 -import 'package:flutter/foundation.dart';  
3 import 'package:flutter/material.dart'; 2 import 'package:flutter/material.dart';
4 3
5 import '../modal_bottom_sheet.dart'; 4 import '../modal_bottom_sheet.dart';
@@ -15,10 +14,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { @@ -15,10 +14,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> {
15 RouteSettings? settings, 14 RouteSettings? settings,
16 bool maintainState = true, 15 bool maintainState = true,
17 bool fullscreenDialog = false, 16 bool fullscreenDialog = false,
18 - }) : assert(builder != null),  
19 - assert(maintainState != null),  
20 - assert(fullscreenDialog != null),  
21 - super( 17 + }) : super(
22 settings: settings, 18 settings: settings,
23 fullscreenDialog: fullscreenDialog, 19 fullscreenDialog: fullscreenDialog,
24 builder: builder, 20 builder: builder,
@@ -30,8 +30,7 @@ class BottomSheetSuspendedCurve extends Curve { @@ -30,8 +30,7 @@ class BottomSheetSuspendedCurve extends Curve {
30 const BottomSheetSuspendedCurve( 30 const BottomSheetSuspendedCurve(
31 this.startingPoint, { 31 this.startingPoint, {
32 this.curve = Curves.easeOutCubic, 32 this.curve = Curves.easeOutCubic,
33 - }) : assert(startingPoint != null),  
34 - assert(curve != null); 33 + });
35 34
36 /// The progress value at which [curve] should begin. 35 /// The progress value at which [curve] should begin.
37 /// 36 ///
@@ -16,8 +16,7 @@ class ModalScrollController extends InheritedWidget { @@ -16,8 +16,7 @@ class ModalScrollController extends InheritedWidget {
16 Key? key, 16 Key? key,
17 required this.controller, 17 required this.controller,
18 required Widget child, 18 required Widget child,
19 - }) : assert(controller != null),  
20 - super( 19 + }) : super(
21 key: key, 20 key: key,
22 child: PrimaryScrollController( 21 child: PrimaryScrollController(
23 controller: controller, 22 controller: controller,
@@ -15,10 +15,10 @@ class ScrollToTopStatusBarHandler extends StatefulWidget { @@ -15,10 +15,10 @@ class ScrollToTopStatusBarHandler extends StatefulWidget {
15 }) : super(key: key); 15 }) : super(key: key);
16 16
17 @override 17 @override
18 - _ScrollToTopStatusBarState createState() => _ScrollToTopStatusBarState(); 18 + ScrollToTopStatusBarState createState() => ScrollToTopStatusBarState();
19 } 19 }
20 20
21 -class _ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> { 21 +class ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> {
22 @override 22 @override
23 void initState() { 23 void initState() {
24 super.initState(); 24 super.initState();
@@ -50,7 +50,7 @@ class _ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> { @@ -50,7 +50,7 @@ class _ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> {
50 50
51 void _handleStatusBarTap(BuildContext context) { 51 void _handleStatusBarTap(BuildContext context) {
52 final controller = widget.scrollController; 52 final controller = widget.scrollController;
53 - if (controller != null && controller.hasClients) { 53 + if (controller.hasClients) {
54 controller.animateTo( 54 controller.animateTo(
55 0.0, 55 0.0,
56 duration: const Duration(milliseconds: 300), 56 duration: const Duration(milliseconds: 300),
@@ -7,49 +7,49 @@ packages: @@ -7,49 +7,49 @@ packages:
7 name: async 7 name: async
8 url: "https://pub.dartlang.org" 8 url: "https://pub.dartlang.org"
9 source: hosted 9 source: hosted
10 - version: "2.5.0-nullsafety.3" 10 + version: "2.8.2"
11 boolean_selector: 11 boolean_selector:
12 dependency: transitive 12 dependency: transitive
13 description: 13 description:
14 name: boolean_selector 14 name: boolean_selector
15 url: "https://pub.dartlang.org" 15 url: "https://pub.dartlang.org"
16 source: hosted 16 source: hosted
17 - version: "2.1.0-nullsafety.3" 17 + version: "2.1.0"
18 characters: 18 characters:
19 dependency: transitive 19 dependency: transitive
20 description: 20 description:
21 name: characters 21 name: characters
22 url: "https://pub.dartlang.org" 22 url: "https://pub.dartlang.org"
23 source: hosted 23 source: hosted
24 - version: "1.1.0-nullsafety.5" 24 + version: "1.2.0"
25 charcode: 25 charcode:
26 dependency: transitive 26 dependency: transitive
27 description: 27 description:
28 name: charcode 28 name: charcode
29 url: "https://pub.dartlang.org" 29 url: "https://pub.dartlang.org"
30 source: hosted 30 source: hosted
31 - version: "1.2.0-nullsafety.3" 31 + version: "1.3.1"
32 clock: 32 clock:
33 dependency: transitive 33 dependency: transitive
34 description: 34 description:
35 name: clock 35 name: clock
36 url: "https://pub.dartlang.org" 36 url: "https://pub.dartlang.org"
37 source: hosted 37 source: hosted
38 - version: "1.1.0-nullsafety.3" 38 + version: "1.1.0"
39 collection: 39 collection:
40 dependency: transitive 40 dependency: transitive
41 description: 41 description:
42 name: collection 42 name: collection
43 url: "https://pub.dartlang.org" 43 url: "https://pub.dartlang.org"
44 source: hosted 44 source: hosted
45 - version: "1.15.0-nullsafety.5" 45 + version: "1.16.0"
46 fake_async: 46 fake_async:
47 dependency: transitive 47 dependency: transitive
48 description: 48 description:
49 name: fake_async 49 name: fake_async
50 url: "https://pub.dartlang.org" 50 url: "https://pub.dartlang.org"
51 source: hosted 51 source: hosted
52 - version: "1.2.0-nullsafety.3" 52 + version: "1.3.0"
53 flutter: 53 flutter:
54 dependency: "direct main" 54 dependency: "direct main"
55 description: flutter 55 description: flutter
@@ -60,34 +60,41 @@ packages: @@ -60,34 +60,41 @@ packages:
60 description: flutter 60 description: flutter
61 source: sdk 61 source: sdk
62 version: "0.0.0" 62 version: "0.0.0"
  63 + lints:
  64 + dependency: "direct dev"
  65 + description:
  66 + name: lints
  67 + url: "https://pub.dartlang.org"
  68 + source: hosted
  69 + version: "2.0.0"
63 matcher: 70 matcher:
64 dependency: transitive 71 dependency: transitive
65 description: 72 description:
66 name: matcher 73 name: matcher
67 url: "https://pub.dartlang.org" 74 url: "https://pub.dartlang.org"
68 source: hosted 75 source: hosted
69 - version: "0.12.10-nullsafety.3" 76 + version: "0.12.11"
  77 + material_color_utilities:
  78 + dependency: transitive
  79 + description:
  80 + name: material_color_utilities
  81 + url: "https://pub.dartlang.org"
  82 + source: hosted
  83 + version: "0.1.4"
70 meta: 84 meta:
71 dependency: transitive 85 dependency: transitive
72 description: 86 description:
73 name: meta 87 name: meta
74 url: "https://pub.dartlang.org" 88 url: "https://pub.dartlang.org"
75 source: hosted 89 source: hosted
76 - version: "1.3.0-nullsafety.6" 90 + version: "1.7.0"
77 path: 91 path:
78 dependency: transitive 92 dependency: transitive
79 description: 93 description:
80 name: path 94 name: path
81 url: "https://pub.dartlang.org" 95 url: "https://pub.dartlang.org"
82 source: hosted 96 source: hosted
83 - version: "1.8.0-nullsafety.3"  
84 - pedantic:  
85 - dependency: "direct dev"  
86 - description:  
87 - name: pedantic  
88 - url: "https://pub.dartlang.org"  
89 - source: hosted  
90 - version: "1.10.0-nullsafety.3" 97 + version: "1.8.1"
91 sky_engine: 98 sky_engine:
92 dependency: transitive 99 dependency: transitive
93 description: flutter 100 description: flutter
@@ -99,56 +106,49 @@ packages: @@ -99,56 +106,49 @@ packages:
99 name: source_span 106 name: source_span
100 url: "https://pub.dartlang.org" 107 url: "https://pub.dartlang.org"
101 source: hosted 108 source: hosted
102 - version: "1.8.0-nullsafety.4" 109 + version: "1.8.2"
103 stack_trace: 110 stack_trace:
104 dependency: transitive 111 dependency: transitive
105 description: 112 description:
106 name: stack_trace 113 name: stack_trace
107 url: "https://pub.dartlang.org" 114 url: "https://pub.dartlang.org"
108 source: hosted 115 source: hosted
109 - version: "1.10.0-nullsafety.6" 116 + version: "1.10.0"
110 stream_channel: 117 stream_channel:
111 dependency: transitive 118 dependency: transitive
112 description: 119 description:
113 name: stream_channel 120 name: stream_channel
114 url: "https://pub.dartlang.org" 121 url: "https://pub.dartlang.org"
115 source: hosted 122 source: hosted
116 - version: "2.1.0-nullsafety.3" 123 + version: "2.1.0"
117 string_scanner: 124 string_scanner:
118 dependency: transitive 125 dependency: transitive
119 description: 126 description:
120 name: string_scanner 127 name: string_scanner
121 url: "https://pub.dartlang.org" 128 url: "https://pub.dartlang.org"
122 source: hosted 129 source: hosted
123 - version: "1.1.0-nullsafety.3" 130 + version: "1.1.0"
124 term_glyph: 131 term_glyph:
125 dependency: transitive 132 dependency: transitive
126 description: 133 description:
127 name: term_glyph 134 name: term_glyph
128 url: "https://pub.dartlang.org" 135 url: "https://pub.dartlang.org"
129 source: hosted 136 source: hosted
130 - version: "1.2.0-nullsafety.3" 137 + version: "1.2.0"
131 test_api: 138 test_api:
132 dependency: transitive 139 dependency: transitive
133 description: 140 description:
134 name: test_api 141 name: test_api
135 url: "https://pub.dartlang.org" 142 url: "https://pub.dartlang.org"
136 source: hosted 143 source: hosted
137 - version: "0.2.19-nullsafety.6"  
138 - typed_data:  
139 - dependency: transitive  
140 - description:  
141 - name: typed_data  
142 - url: "https://pub.dartlang.org"  
143 - source: hosted  
144 - version: "1.3.0-nullsafety.5" 144 + version: "0.4.9"
145 vector_math: 145 vector_math:
146 dependency: transitive 146 dependency: transitive
147 description: 147 description:
148 name: vector_math 148 name: vector_math
149 url: "https://pub.dartlang.org" 149 url: "https://pub.dartlang.org"
150 source: hosted 150 source: hosted
151 - version: "2.1.0-nullsafety.5" 151 + version: "2.1.2"
152 sdks: 152 sdks:
153 - dart: ">=2.12.0-29.10.beta <3.0.0"  
154 - flutter: ">=1.12.0 <2.0.0" 153 + dart: ">=2.17.0 <3.0.0"
  154 + flutter: ">=3.0.0"
1 name: modal_bottom_sheet 1 name: modal_bottom_sheet
2 description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' 2 description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style'
3 -version: 2.0.0-nullsafety.1 3 +version: 2.1.0
4 homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' 4 homepage: 'https://github.com/jamesblasco/modal_bottom_sheet'
5 5
6 environment: 6 environment:
7 - sdk: ">=2.12.0-29.10.beta <3.0.0"  
8 - flutter: ">=1.12.0 <2.0.0" 7 + sdk: ">=2.17.0 <3.0.0"
  8 + flutter: ">=3.0.0"
9 9
10 dependencies: 10 dependencies:
11 flutter: 11 flutter:
@@ -14,41 +14,4 @@ dependencies: @@ -14,41 +14,4 @@ dependencies:
14 dev_dependencies: 14 dev_dependencies:
15 flutter_test: 15 flutter_test:
16 sdk: flutter 16 sdk: flutter
17 - pedantic: 1.10.0-nullsafety.3  
18 -  
19 -# For information on the generic Dart part of this file, see the  
20 -# following page: https://dart.dev/tools/pub/pubspec  
21 -  
22 -# The following section is specific to Flutter.  
23 -flutter:  
24 -  
25 - # To add assets to your package, add an assets section, like this:  
26 - # assets:  
27 - # - images/a_dot_burr.jpeg  
28 - # - images/a_dot_ham.jpeg  
29 - #  
30 - # For details regarding assets in packages, see  
31 - # https://flutter.dev/assets-and-images/#from-packages  
32 - #  
33 - # An image asset can refer to one or more resolution-specific "variants", see  
34 - # https://flutter.dev/assets-and-images/#resolution-aware.  
35 -  
36 - # To add custom fonts to your package, add a fonts section here,  
37 - # in this "flutter" section. Each entry in this list should have a  
38 - # "family" key with the font family name, and a "fonts" key with a  
39 - # list giving the asset and other descriptors for the font. For  
40 - # example:  
41 - # fonts:  
42 - # - family: Schyler  
43 - # fonts:  
44 - # - asset: fonts/Schyler-Regular.ttf  
45 - # - asset: fonts/Schyler-Italic.ttf  
46 - # style: italic  
47 - # - family: Trajan Pro  
48 - # fonts:  
49 - # - asset: fonts/TrajanPro.ttf  
50 - # - asset: fonts/TrajanPro_Bold.ttf  
51 - # weight: 700  
52 - #  
53 - # For details regarding fonts in packages, see  
54 - # https://flutter.dev/custom-fonts/#from-packages 17 + lints: ^2.0.0
  1 +import 'package:flutter/cupertino.dart';
  2 +import 'package:flutter/material.dart';
1 import 'package:flutter_test/flutter_test.dart'; 3 import 'package:flutter_test/flutter_test.dart';
  4 +import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
2 5
3 void main() { 6 void main() {
4 - test('adds one to input values', () {}); 7 + group(
  8 + 'Route.mainState are well-controlled by `mainState`',
  9 + () {
  10 + Future<void> testInitStateAndDispose(
  11 + WidgetTester tester,
  12 + Future<void> Function(BuildContext context, WidgetBuilder builder)
  13 + onPressed,
  14 + ) async {
  15 + int initState = 0, dispose = 0;
  16 + await _pumpWidget(
  17 + tester: tester,
  18 + onPressed: (context) => onPressed(
  19 + context,
  20 + (_) => _TestWidget(
  21 + onInitState: () => initState++,
  22 + onDispose: () => dispose++,
  23 + ),
  24 + ),
  25 + );
  26 + expect(initState, 0);
  27 + await tester.tap(_textButtonWithText('Press me'));
  28 + await tester.pumpAndSettle();
  29 + expect(initState, 1);
  30 + expect(dispose, 0);
  31 + await tester.tap(_textButtonWithText('TestWidget push'));
  32 + await tester.pumpAndSettle();
  33 + expect(initState, 1);
  34 + expect(dispose, 0);
  35 + await tester.tap(_textButtonWithText('TestWidget pushed pop'));
  36 + await tester.pumpAndSettle();
  37 + expect(initState, 1);
  38 + expect(dispose, 0);
  39 + await tester.tap(_textButtonWithText('TestWidget pop'));
  40 + await tester.pumpAndSettle();
  41 + expect(initState, 1);
  42 + expect(dispose, 1);
  43 + }
  44 +
  45 + testWidgets('with showCupertinoModalBottomSheet', (tester) {
  46 + return testInitStateAndDispose(
  47 + tester,
  48 + (context, builder) => showCupertinoModalBottomSheet(
  49 + context: context,
  50 + builder: builder,
  51 + ),
  52 + );
  53 + });
  54 + testWidgets('with showMaterialModalBottomSheet', (tester) {
  55 + return testInitStateAndDispose(
  56 + tester,
  57 + (context, builder) => showMaterialModalBottomSheet(
  58 + context: context,
  59 + builder: builder,
  60 + ),
  61 + );
  62 + });
  63 + },
  64 + );
  65 +}
  66 +
  67 +Future<void> _pumpWidget({
  68 + required WidgetTester tester,
  69 + required void Function(BuildContext context) onPressed,
  70 +}) {
  71 + return tester.pumpWidget(
  72 + MaterialApp(
  73 + home: Builder(
  74 + builder: (context) => Scaffold(
  75 + body: Center(
  76 + child: TextButton(
  77 + onPressed: () => onPressed(context),
  78 + child: Text('Press me'),
  79 + ),
  80 + ),
  81 + ),
  82 + ),
  83 + ),
  84 + );
  85 +}
  86 +
  87 +Finder _textButtonWithText(String text) {
  88 + return find.widgetWithText(TextButton, text);
  89 +}
  90 +
  91 +class _TestWidget extends StatefulWidget {
  92 + const _TestWidget({
  93 + Key? key,
  94 + this.onInitState,
  95 + this.onDispose,
  96 + }) : super(key: key);
  97 +
  98 + final VoidCallback? onInitState;
  99 + final VoidCallback? onDispose;
  100 +
  101 + @override
  102 + State<_TestWidget> createState() => _TestWidgetState();
  103 +}
  104 +
  105 +class _TestWidgetState extends State<_TestWidget> {
  106 + @override
  107 + void initState() {
  108 + super.initState();
  109 + widget.onInitState?.call();
  110 + }
  111 +
  112 + @override
  113 + void dispose() {
  114 + widget.onDispose?.call();
  115 + super.dispose();
  116 + }
  117 +
  118 + @override
  119 + Widget build(BuildContext context) {
  120 + return Scaffold(
  121 + body: Column(
  122 + mainAxisAlignment: MainAxisAlignment.center,
  123 + children: [
  124 + TextButton(
  125 + onPressed: () => Navigator.of(context).push(
  126 + defaultPageRoute(
  127 + targetPlatform: Theme.of(context).platform,
  128 + builder: (context) => Scaffold(
  129 + body: Center(
  130 + child: TextButton(
  131 + onPressed: () => Navigator.of(context).pop(),
  132 + child: Text('TestWidget pushed pop'),
  133 + ),
  134 + ),
  135 + ),
  136 + ),
  137 + ),
  138 + child: Text('TestWidget push'),
  139 + ),
  140 + TextButton(
  141 + onPressed: () => Navigator.of(context).pop(),
  142 + child: Text('TestWidget pop'),
  143 + ),
  144 + ],
  145 + ),
  146 + );
  147 + }
  148 +}
  149 +
  150 +PageRoute<T> defaultPageRoute<T>({
  151 + required TargetPlatform targetPlatform,
  152 + required WidgetBuilder builder,
  153 + RouteSettings? settings,
  154 + bool maintainState = true,
  155 + bool fullscreenDialog = false,
  156 +}) {
  157 + switch (targetPlatform) {
  158 + case TargetPlatform.iOS:
  159 + case TargetPlatform.macOS:
  160 + return CupertinoPageRoute<T>(
  161 + builder: builder,
  162 + settings: settings,
  163 + maintainState: maintainState,
  164 + fullscreenDialog: fullscreenDialog,
  165 + );
  166 + default:
  167 + return MaterialPageRoute<T>(
  168 + builder: builder,
  169 + settings: settings,
  170 + maintainState: maintainState,
  171 + fullscreenDialog: fullscreenDialog,
  172 + );
  173 + }
5 } 174 }