Showing
54 changed files
with
467 additions
and
998 deletions
@@ -5,3 +5,7 @@ gradle-wrapper.jar | @@ -5,3 +5,7 @@ gradle-wrapper.jar | ||
5 | /gradlew.bat | 5 | /gradlew.bat |
6 | /local.properties | 6 | /local.properties |
7 | GeneratedPluginRegistrant.java | 7 | GeneratedPluginRegistrant.java |
8 | + | ||
9 | +# Remember to never publicly share your keystore. | ||
10 | +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app | ||
11 | +key.properties |
@@ -26,21 +26,17 @@ apply plugin: 'kotlin-android' | @@ -26,21 +26,17 @@ 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 28 | 29 | + compileSdkVersion 30 |
30 | 30 | ||
31 | sourceSets { | 31 | sourceSets { |
32 | main.java.srcDirs += 'src/main/kotlin' | 32 | main.java.srcDirs += 'src/main/kotlin' |
33 | } | 33 | } |
34 | 34 | ||
35 | - lintOptions { | ||
36 | - disable 'InvalidPackage' | ||
37 | - } | ||
38 | - | ||
39 | defaultConfig { | 35 | defaultConfig { |
40 | // 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). |
41 | applicationId "com.example.example" | 37 | applicationId "com.example.example" |
42 | minSdkVersion 16 | 38 | minSdkVersion 16 |
43 | - targetSdkVersion 28 | 39 | + targetSdkVersion 30 |
44 | versionCode flutterVersionCode.toInteger() | 40 | versionCode flutterVersionCode.toInteger() |
45 | versionName flutterVersionName | 41 | versionName flutterVersionName |
46 | } | 42 | } |
1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
2 | package="com.example.example"> | 2 | package="com.example.example"> |
3 | - <!-- io.flutter.app.FlutterApplication is an android.app.Application that | ||
4 | - calls FlutterMain.startInitialization(this); in its onCreate method. | ||
5 | - In most cases you can leave this as-is, but you if you want to provide | ||
6 | - additional functionality it is fine to subclass or reimplement | ||
7 | - FlutterApplication and put your custom class here. --> | ||
8 | <application | 3 | <application |
9 | - android:name="io.flutter.app.FlutterApplication" | ||
10 | android:label="example" | 4 | android:label="example" |
11 | android:icon="@mipmap/ic_launcher"> | 5 | android:icon="@mipmap/ic_launcher"> |
12 | <activity | 6 | <activity |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<!-- Modify this file to customize your launch splash screen --> | ||
3 | +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
4 | + <item android:drawable="?android:colorBackground" /> | ||
5 | + | ||
6 | + <!-- You can insert your own image assets here --> | ||
7 | + <!-- <item> | ||
8 | + <bitmap | ||
9 | + android:gravity="center" | ||
10 | + android:src="@mipmap/launch_image" /> | ||
11 | + </item> --> | ||
12 | +</layer-list> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<resources> | ||
3 | + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> | ||
4 | + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
5 | + <!-- Show a splash screen on the activity. Automatically removed when | ||
6 | + Flutter draws its first frame --> | ||
7 | + <item name="android:windowBackground">@drawable/launch_background</item> | ||
8 | + </style> | ||
9 | + <!-- Theme applied to the Android Window as soon as the process has started. | ||
10 | + This theme determines the color of the Android Window while your | ||
11 | + Flutter UI initializes, as well as behind your Flutter UI while its | ||
12 | + running. | ||
13 | + | ||
14 | + This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
15 | + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
16 | + <item name="android:windowBackground">?android:colorBackground</item> | ||
17 | + </style> | ||
18 | +</resources> |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <resources> | 2 | <resources> |
3 | - <!-- Theme applied to the Android Window while the process is starting --> | ||
4 | - <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | 3 | + <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> |
4 | + <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> | ||
5 | <!-- Show a splash screen on the activity. Automatically removed when | 5 | <!-- Show a splash screen on the activity. Automatically removed when |
6 | Flutter draws its first frame --> | 6 | Flutter draws its first frame --> |
7 | <item name="android:windowBackground">@drawable/launch_background</item> | 7 | <item name="android:windowBackground">@drawable/launch_background</item> |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | running. | 12 | running. |
13 | 13 | ||
14 | This Theme is only used starting with V2 of Flutter's Android embedding. --> | 14 | This Theme is only used starting with V2 of Flutter's Android embedding. --> |
15 | - <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
16 | - <item name="android:windowBackground">@android:color/white</item> | 15 | + <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> |
16 | + <item name="android:windowBackground">?android:colorBackground</item> | ||
17 | </style> | 17 | </style> |
18 | </resources> | 18 | </resources> |
@@ -6,7 +6,7 @@ buildscript { | @@ -6,7 +6,7 @@ buildscript { | ||
6 | } | 6 | } |
7 | 7 | ||
8 | dependencies { | 8 | dependencies { |
9 | - classpath 'com.android.tools.build:gradle:3.5.0' | 9 | + classpath 'com.android.tools.build:gradle:4.1.0' |
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
11 | } | 11 | } |
12 | } | 12 | } |
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME | @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME | ||
3 | distributionPath=wrapper/dists | 3 | distributionPath=wrapper/dists |
4 | zipStoreBase=GRADLE_USER_HOME | 4 | zipStoreBase=GRADLE_USER_HOME |
5 | zipStorePath=wrapper/dists | 5 | zipStorePath=wrapper/dists |
6 | -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip | 6 | +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip |
1 | include ':app' | 1 | include ':app' |
2 | 2 | ||
3 | -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() | 3 | +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") |
4 | +def properties = new Properties() | ||
4 | 5 | ||
5 | -def plugins = new Properties() | ||
6 | -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') | ||
7 | -if (pluginsFile.exists()) { | ||
8 | - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } | ||
9 | -} | 6 | +assert localPropertiesFile.exists() |
7 | +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } | ||
10 | 8 | ||
11 | -plugins.each { name, path -> | ||
12 | - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() | ||
13 | - include ":$name" | ||
14 | - project(":$name").projectDir = pluginDirectory | ||
15 | -} | 9 | +def flutterSdkPath = properties.getProperty("flutter.sdk") |
10 | +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
11 | +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <plist version="1.0"> | 3 | <plist version="1.0"> |
4 | <dict> | 4 | <dict> |
5 | <key>CFBundleDevelopmentRegion</key> | 5 | <key>CFBundleDevelopmentRegion</key> |
6 | - <string>$(DEVELOPMENT_LANGUAGE)</string> | 6 | + <string>en</string> |
7 | <key>CFBundleExecutable</key> | 7 | <key>CFBundleExecutable</key> |
8 | <string>App</string> | 8 | <string>App</string> |
9 | <key>CFBundleIdentifier</key> | 9 | <key>CFBundleIdentifier</key> |
@@ -10,81 +10,32 @@ project 'Runner', { | @@ -10,81 +10,32 @@ project 'Runner', { | ||
10 | 'Release' => :release, | 10 | 'Release' => :release, |
11 | } | 11 | } |
12 | 12 | ||
13 | -def parse_KV_file(file, separator='=') | ||
14 | - file_abs_path = File.expand_path(file) | ||
15 | - if !File.exists? file_abs_path | ||
16 | - return []; | ||
17 | - end | ||
18 | - generated_key_values = {} | ||
19 | - skip_line_start_symbols = ["#", "/"] | ||
20 | - File.foreach(file_abs_path) do |line| | ||
21 | - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } | ||
22 | - plugin = line.split(pattern=separator) | ||
23 | - if plugin.length == 2 | ||
24 | - podname = plugin[0].strip() | ||
25 | - path = plugin[1].strip() | ||
26 | - podpath = File.expand_path("#{path}", file_abs_path) | ||
27 | - generated_key_values[podname] = podpath | ||
28 | - else | ||
29 | - puts "Invalid plugin specification: #{line}" | 13 | +def flutter_root |
14 | + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
15 | + unless File.exist?(generated_xcode_build_settings_path) | ||
16 | + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
30 | end | 17 | end |
18 | + | ||
19 | + File.foreach(generated_xcode_build_settings_path) do |line| | ||
20 | + matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
21 | + return matches[1].strip if matches | ||
31 | end | 22 | end |
32 | - generated_key_values | 23 | + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" |
33 | end | 24 | end |
34 | 25 | ||
26 | +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
27 | + | ||
28 | +flutter_ios_podfile_setup | ||
29 | + | ||
35 | target 'Runner' do | 30 | target 'Runner' do |
36 | use_frameworks! | 31 | use_frameworks! |
37 | use_modular_headers! | 32 | use_modular_headers! |
38 | 33 | ||
39 | - # Flutter Pod | ||
40 | - | ||
41 | - copied_flutter_dir = File.join(__dir__, 'Flutter') | ||
42 | - copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') | ||
43 | - copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') | ||
44 | - unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) | ||
45 | - # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. | ||
46 | - # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. | ||
47 | - # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. | ||
48 | - | ||
49 | - generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') | ||
50 | - unless File.exist?(generated_xcode_build_settings_path) | ||
51 | - raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
52 | - end | ||
53 | - generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) | ||
54 | - cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; | ||
55 | - | ||
56 | - unless File.exist?(copied_framework_path) | ||
57 | - FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) | ||
58 | - end | ||
59 | - unless File.exist?(copied_podspec_path) | ||
60 | - FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) | ||
61 | - end | ||
62 | - end | ||
63 | - | ||
64 | - # Keep pod path relative so it can be checked into Podfile.lock. | ||
65 | - pod 'Flutter', :path => 'Flutter' | ||
66 | - | ||
67 | - # Plugin Pods | ||
68 | - | ||
69 | - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock | ||
70 | - # referring to absolute paths on developers' machines. | ||
71 | - system('rm -rf .symlinks') | ||
72 | - system('mkdir -p .symlinks/plugins') | ||
73 | - plugin_pods = parse_KV_file('../.flutter-plugins') | ||
74 | - plugin_pods.each do |name, path| | ||
75 | - symlink = File.join('.symlinks', 'plugins', name) | ||
76 | - File.symlink(path, symlink) | ||
77 | - pod name, :path => File.join(symlink, 'ios') | ||
78 | - end | 34 | + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) |
79 | end | 35 | end |
80 | 36 | ||
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 | ||
83 | - | ||
84 | post_install do |installer| | 37 | post_install do |installer| |
85 | installer.pods_project.targets.each do |target| | 38 | installer.pods_project.targets.each do |target| |
86 | - target.build_configurations.each do |config| | ||
87 | - config.build_settings['ENABLE_BITCODE'] = 'NO' | ||
88 | - end | 39 | + flutter_additional_ios_build_settings(target) |
89 | end | 40 | end |
90 | end | 41 | end |
example/ios/Podfile.lock
deleted
100644 → 0
1 | -PODS: | ||
2 | - - Flutter (1.0.0) | ||
3 | - - url_launcher (0.0.1): | ||
4 | - - Flutter | ||
5 | - - url_launcher_macos (0.0.1): | ||
6 | - - Flutter | ||
7 | - - url_launcher_web (0.0.1): | ||
8 | - - Flutter | ||
9 | - | ||
10 | -DEPENDENCIES: | ||
11 | - - Flutter (from `Flutter`) | ||
12 | - - url_launcher (from `.symlinks/plugins/url_launcher/ios`) | ||
13 | - - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) | ||
14 | - - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) | ||
15 | - | ||
16 | -EXTERNAL SOURCES: | ||
17 | - Flutter: | ||
18 | - :path: Flutter | ||
19 | - url_launcher: | ||
20 | - :path: ".symlinks/plugins/url_launcher/ios" | ||
21 | - url_launcher_macos: | ||
22 | - :path: ".symlinks/plugins/url_launcher_macos/ios" | ||
23 | - url_launcher_web: | ||
24 | - :path: ".symlinks/plugins/url_launcher_web/ios" | ||
25 | - | ||
26 | -SPEC CHECKSUMS: | ||
27 | - Flutter: 0e3d915762c693b495b44d77113d4970485de6ec | ||
28 | - url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 | ||
29 | - url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 | ||
30 | - url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c | ||
31 | - | ||
32 | -PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 | ||
33 | - | ||
34 | -COCOAPODS: 1.8.4 |
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
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 | - 212D1E304840672EFB9BFFA7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D52A2E75CF34C7E6DC549F4 /* Pods_Runner.framework */; }; | ||
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; |
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; | 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; |
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; | 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; |
@@ -32,12 +31,10 @@ | @@ -32,12 +31,10 @@ | ||
32 | /* Begin PBXFileReference section */ | 31 | /* Begin PBXFileReference section */ |
33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; | 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; |
34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; |
35 | - 248080BB287D735D5E630360 /* 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>"; }; | ||
36 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; |
37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; | 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; |
38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; |
40 | - 8D52A2E75CF34C7E6DC549F4 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; | 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; |
42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; | 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; |
43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; | 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
@@ -45,8 +42,6 @@ | @@ -45,8 +42,6 @@ | ||
45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
48 | - B3E04C271E591BD1327CA5FF /* 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 | - BAB1D322E537D55B4325D2C3 /* 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>"; }; | ||
50 | /* End PBXFileReference section */ | 45 | /* End PBXFileReference section */ |
51 | 46 | ||
52 | /* Begin PBXFrameworksBuildPhase section */ | 47 | /* Begin PBXFrameworksBuildPhase section */ |
@@ -54,24 +49,12 @@ | @@ -54,24 +49,12 @@ | ||
54 | isa = PBXFrameworksBuildPhase; | 49 | isa = PBXFrameworksBuildPhase; |
55 | buildActionMask = 2147483647; | 50 | buildActionMask = 2147483647; |
56 | files = ( | 51 | files = ( |
57 | - 212D1E304840672EFB9BFFA7 /* Pods_Runner.framework in Frameworks */, | ||
58 | ); | 52 | ); |
59 | runOnlyForDeploymentPostprocessing = 0; | 53 | runOnlyForDeploymentPostprocessing = 0; |
60 | }; | 54 | }; |
61 | /* End PBXFrameworksBuildPhase section */ | 55 | /* End PBXFrameworksBuildPhase section */ |
62 | 56 | ||
63 | /* Begin PBXGroup section */ | 57 | /* Begin PBXGroup section */ |
64 | - 7FA2A098790C5377E18FABC1 /* Pods */ = { | ||
65 | - isa = PBXGroup; | ||
66 | - children = ( | ||
67 | - BAB1D322E537D55B4325D2C3 /* Pods-Runner.debug.xcconfig */, | ||
68 | - B3E04C271E591BD1327CA5FF /* Pods-Runner.release.xcconfig */, | ||
69 | - 248080BB287D735D5E630360 /* Pods-Runner.profile.xcconfig */, | ||
70 | - ); | ||
71 | - name = Pods; | ||
72 | - path = Pods; | ||
73 | - sourceTree = "<group>"; | ||
74 | - }; | ||
75 | 9740EEB11CF90186004384FC /* Flutter */ = { | 58 | 9740EEB11CF90186004384FC /* Flutter */ = { |
76 | isa = PBXGroup; | 59 | isa = PBXGroup; |
77 | children = ( | 60 | children = ( |
@@ -89,8 +72,6 @@ | @@ -89,8 +72,6 @@ | ||
89 | 9740EEB11CF90186004384FC /* Flutter */, | 72 | 9740EEB11CF90186004384FC /* Flutter */, |
90 | 97C146F01CF9000F007C117D /* Runner */, | 73 | 97C146F01CF9000F007C117D /* Runner */, |
91 | 97C146EF1CF9000F007C117D /* Products */, | 74 | 97C146EF1CF9000F007C117D /* Products */, |
92 | - 7FA2A098790C5377E18FABC1 /* Pods */, | ||
93 | - 9D90B19A7E12B9186516773E /* Frameworks */, | ||
94 | ); | 75 | ); |
95 | sourceTree = "<group>"; | 76 | sourceTree = "<group>"; |
96 | }; | 77 | }; |
@@ -109,7 +90,6 @@ | @@ -109,7 +90,6 @@ | ||
109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, | 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, |
110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, | 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, |
111 | 97C147021CF9000F007C117D /* Info.plist */, | 92 | 97C147021CF9000F007C117D /* Info.plist */, |
112 | - 97C146F11CF9000F007C117D /* Supporting Files */, | ||
113 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, | 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, |
114 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, | 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, |
115 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, | 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, |
@@ -118,21 +98,6 @@ | @@ -118,21 +98,6 @@ | ||
118 | path = Runner; | 98 | path = Runner; |
119 | sourceTree = "<group>"; | 99 | sourceTree = "<group>"; |
120 | }; | 100 | }; |
121 | - 97C146F11CF9000F007C117D /* Supporting Files */ = { | ||
122 | - isa = PBXGroup; | ||
123 | - children = ( | ||
124 | - ); | ||
125 | - name = "Supporting Files"; | ||
126 | - sourceTree = "<group>"; | ||
127 | - }; | ||
128 | - 9D90B19A7E12B9186516773E /* Frameworks */ = { | ||
129 | - isa = PBXGroup; | ||
130 | - children = ( | ||
131 | - 8D52A2E75CF34C7E6DC549F4 /* Pods_Runner.framework */, | ||
132 | - ); | ||
133 | - name = Frameworks; | ||
134 | - sourceTree = "<group>"; | ||
135 | - }; | ||
136 | /* End PBXGroup section */ | 101 | /* End PBXGroup section */ |
137 | 102 | ||
138 | /* Begin PBXNativeTarget section */ | 103 | /* Begin PBXNativeTarget section */ |
@@ -140,14 +105,12 @@ | @@ -140,14 +105,12 @@ | ||
140 | isa = PBXNativeTarget; | 105 | isa = PBXNativeTarget; |
141 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; |
142 | buildPhases = ( | 107 | buildPhases = ( |
143 | - 00BBBB875F21B7EBEF944E13 /* [CP] Check Pods Manifest.lock */, | ||
144 | 9740EEB61CF901F6004384FC /* Run Script */, | 108 | 9740EEB61CF901F6004384FC /* Run Script */, |
145 | 97C146EA1CF9000F007C117D /* Sources */, | 109 | 97C146EA1CF9000F007C117D /* Sources */, |
146 | 97C146EB1CF9000F007C117D /* Frameworks */, | 110 | 97C146EB1CF9000F007C117D /* Frameworks */, |
147 | 97C146EC1CF9000F007C117D /* Resources */, | 111 | 97C146EC1CF9000F007C117D /* Resources */, |
148 | 9705A1C41CF9048500538489 /* Embed Frameworks */, | 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, |
149 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, | 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, |
150 | - 87338F8232AE1406F5B9308C /* [CP] Embed Pods Frameworks */, | ||
151 | ); | 114 | ); |
152 | buildRules = ( | 115 | buildRules = ( |
153 | ); | 116 | ); |
@@ -165,7 +128,7 @@ | @@ -165,7 +128,7 @@ | ||
165 | isa = PBXProject; | 128 | isa = PBXProject; |
166 | attributes = { | 129 | attributes = { |
167 | LastUpgradeCheck = 1020; | 130 | LastUpgradeCheck = 1020; |
168 | - ORGANIZATIONNAME = "The Chromium Authors"; | 131 | + ORGANIZATIONNAME = ""; |
169 | TargetAttributes = { | 132 | TargetAttributes = { |
170 | 97C146ED1CF9000F007C117D = { | 133 | 97C146ED1CF9000F007C117D = { |
171 | CreatedOnToolsVersion = 7.3.1; | 134 | CreatedOnToolsVersion = 7.3.1; |
@@ -174,7 +137,7 @@ | @@ -174,7 +137,7 @@ | ||
174 | }; | 137 | }; |
175 | }; | 138 | }; |
176 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; | 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; |
177 | - compatibilityVersion = "Xcode 3.2"; | 140 | + compatibilityVersion = "Xcode 9.3"; |
178 | developmentRegion = en; | 141 | developmentRegion = en; |
179 | hasScannedForEncodings = 0; | 142 | hasScannedForEncodings = 0; |
180 | knownRegions = ( | 143 | knownRegions = ( |
@@ -206,28 +169,6 @@ | @@ -206,28 +169,6 @@ | ||
206 | /* End PBXResourcesBuildPhase section */ | 169 | /* End PBXResourcesBuildPhase section */ |
207 | 170 | ||
208 | /* Begin PBXShellScriptBuildPhase section */ | 171 | /* Begin PBXShellScriptBuildPhase section */ |
209 | - 00BBBB875F21B7EBEF944E13 /* [CP] Check Pods Manifest.lock */ = { | ||
210 | - isa = PBXShellScriptBuildPhase; | ||
211 | - buildActionMask = 2147483647; | ||
212 | - files = ( | ||
213 | - ); | ||
214 | - inputFileListPaths = ( | ||
215 | - ); | ||
216 | - inputPaths = ( | ||
217 | - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
218 | - "${PODS_ROOT}/Manifest.lock", | ||
219 | - ); | ||
220 | - name = "[CP] Check Pods Manifest.lock"; | ||
221 | - outputFileListPaths = ( | ||
222 | - ); | ||
223 | - outputPaths = ( | ||
224 | - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | ||
225 | - ); | ||
226 | - runOnlyForDeploymentPostprocessing = 0; | ||
227 | - shellPath = /bin/sh; | ||
228 | - 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"; | ||
229 | - showEnvVarsInLog = 0; | ||
230 | - }; | ||
231 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { |
232 | isa = PBXShellScriptBuildPhase; | 173 | isa = PBXShellScriptBuildPhase; |
233 | buildActionMask = 2147483647; | 174 | buildActionMask = 2147483647; |
@@ -242,21 +183,6 @@ | @@ -242,21 +183,6 @@ | ||
242 | shellPath = /bin/sh; | 183 | shellPath = /bin/sh; |
243 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; | 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; |
244 | }; | 185 | }; |
245 | - 87338F8232AE1406F5B9308C /* [CP] Embed Pods Frameworks */ = { | ||
246 | - isa = PBXShellScriptBuildPhase; | ||
247 | - buildActionMask = 2147483647; | ||
248 | - files = ( | ||
249 | - ); | ||
250 | - inputPaths = ( | ||
251 | - ); | ||
252 | - name = "[CP] Embed Pods Frameworks"; | ||
253 | - outputPaths = ( | ||
254 | - ); | ||
255 | - runOnlyForDeploymentPostprocessing = 0; | ||
256 | - shellPath = /bin/sh; | ||
257 | - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | ||
258 | - showEnvVarsInLog = 0; | ||
259 | - }; | ||
260 | 9740EEB61CF901F6004384FC /* Run Script */ = { | 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { |
261 | isa = PBXShellScriptBuildPhase; | 187 | isa = PBXShellScriptBuildPhase; |
262 | buildActionMask = 2147483647; | 188 | buildActionMask = 2147483647; |
@@ -307,7 +233,6 @@ | @@ -307,7 +233,6 @@ | ||
307 | /* Begin XCBuildConfiguration section */ | 233 | /* Begin XCBuildConfiguration section */ |
308 | 249021D3217E4FDB00AE95B9 /* Profile */ = { | 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { |
309 | isa = XCBuildConfiguration; | 235 | isa = XCBuildConfiguration; |
310 | - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
311 | buildSettings = { | 236 | buildSettings = { |
312 | ALWAYS_SEARCH_USER_PATHS = NO; | 237 | ALWAYS_SEARCH_USER_PATHS = NO; |
313 | CLANG_ANALYZER_NONNULL = YES; | 238 | CLANG_ANALYZER_NONNULL = YES; |
@@ -347,7 +272,7 @@ | @@ -347,7 +272,7 @@ | ||
347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
348 | GCC_WARN_UNUSED_FUNCTION = YES; | 273 | GCC_WARN_UNUSED_FUNCTION = YES; |
349 | GCC_WARN_UNUSED_VARIABLE = YES; | 274 | GCC_WARN_UNUSED_VARIABLE = YES; |
350 | - IPHONEOS_DEPLOYMENT_TARGET = 8.0; | 275 | + IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
351 | MTL_ENABLE_DEBUG_INFO = NO; | 276 | MTL_ENABLE_DEBUG_INFO = NO; |
352 | SDKROOT = iphoneos; | 277 | SDKROOT = iphoneos; |
353 | SUPPORTED_PLATFORMS = iphoneos; | 278 | SUPPORTED_PLATFORMS = iphoneos; |
@@ -364,16 +289,8 @@ | @@ -364,16 +289,8 @@ | ||
364 | CLANG_ENABLE_MODULES = YES; | 289 | CLANG_ENABLE_MODULES = YES; |
365 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
366 | ENABLE_BITCODE = NO; | 291 | ENABLE_BITCODE = NO; |
367 | - FRAMEWORK_SEARCH_PATHS = ( | ||
368 | - "$(inherited)", | ||
369 | - "$(PROJECT_DIR)/Flutter", | ||
370 | - ); | ||
371 | INFOPLIST_FILE = Runner/Info.plist; | 292 | INFOPLIST_FILE = Runner/Info.plist; |
372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
373 | - LIBRARY_SEARCH_PATHS = ( | ||
374 | - "$(inherited)", | ||
375 | - "$(PROJECT_DIR)/Flutter", | ||
376 | - ); | ||
377 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; |
378 | PRODUCT_NAME = "$(TARGET_NAME)"; | 295 | PRODUCT_NAME = "$(TARGET_NAME)"; |
379 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
@@ -384,7 +301,6 @@ | @@ -384,7 +301,6 @@ | ||
384 | }; | 301 | }; |
385 | 97C147031CF9000F007C117D /* Debug */ = { | 302 | 97C147031CF9000F007C117D /* Debug */ = { |
386 | isa = XCBuildConfiguration; | 303 | isa = XCBuildConfiguration; |
387 | - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||
388 | buildSettings = { | 304 | buildSettings = { |
389 | ALWAYS_SEARCH_USER_PATHS = NO; | 305 | ALWAYS_SEARCH_USER_PATHS = NO; |
390 | CLANG_ANALYZER_NONNULL = YES; | 306 | CLANG_ANALYZER_NONNULL = YES; |
@@ -430,7 +346,7 @@ | @@ -430,7 +346,7 @@ | ||
430 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
431 | GCC_WARN_UNUSED_FUNCTION = YES; | 347 | GCC_WARN_UNUSED_FUNCTION = YES; |
432 | GCC_WARN_UNUSED_VARIABLE = YES; | 348 | GCC_WARN_UNUSED_VARIABLE = YES; |
433 | - IPHONEOS_DEPLOYMENT_TARGET = 8.0; | 349 | + IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
434 | MTL_ENABLE_DEBUG_INFO = YES; | 350 | MTL_ENABLE_DEBUG_INFO = YES; |
435 | ONLY_ACTIVE_ARCH = YES; | 351 | ONLY_ACTIVE_ARCH = YES; |
436 | SDKROOT = iphoneos; | 352 | SDKROOT = iphoneos; |
@@ -440,7 +356,6 @@ | @@ -440,7 +356,6 @@ | ||
440 | }; | 356 | }; |
441 | 97C147041CF9000F007C117D /* Release */ = { | 357 | 97C147041CF9000F007C117D /* Release */ = { |
442 | isa = XCBuildConfiguration; | 358 | isa = XCBuildConfiguration; |
443 | - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
444 | buildSettings = { | 359 | buildSettings = { |
445 | ALWAYS_SEARCH_USER_PATHS = NO; | 360 | ALWAYS_SEARCH_USER_PATHS = NO; |
446 | CLANG_ANALYZER_NONNULL = YES; | 361 | CLANG_ANALYZER_NONNULL = YES; |
@@ -480,7 +395,7 @@ | @@ -480,7 +395,7 @@ | ||
480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
481 | GCC_WARN_UNUSED_FUNCTION = YES; | 396 | GCC_WARN_UNUSED_FUNCTION = YES; |
482 | GCC_WARN_UNUSED_VARIABLE = YES; | 397 | GCC_WARN_UNUSED_VARIABLE = YES; |
483 | - IPHONEOS_DEPLOYMENT_TARGET = 8.0; | 398 | + IPHONEOS_DEPLOYMENT_TARGET = 9.0; |
484 | MTL_ENABLE_DEBUG_INFO = NO; | 399 | MTL_ENABLE_DEBUG_INFO = NO; |
485 | SDKROOT = iphoneos; | 400 | SDKROOT = iphoneos; |
486 | SUPPORTED_PLATFORMS = iphoneos; | 401 | SUPPORTED_PLATFORMS = iphoneos; |
@@ -498,16 +413,8 @@ | @@ -498,16 +413,8 @@ | ||
498 | CLANG_ENABLE_MODULES = YES; | 413 | CLANG_ENABLE_MODULES = YES; |
499 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
500 | ENABLE_BITCODE = NO; | 415 | ENABLE_BITCODE = NO; |
501 | - FRAMEWORK_SEARCH_PATHS = ( | ||
502 | - "$(inherited)", | ||
503 | - "$(PROJECT_DIR)/Flutter", | ||
504 | - ); | ||
505 | INFOPLIST_FILE = Runner/Info.plist; | 416 | INFOPLIST_FILE = Runner/Info.plist; |
506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
507 | - LIBRARY_SEARCH_PATHS = ( | ||
508 | - "$(inherited)", | ||
509 | - "$(PROJECT_DIR)/Flutter", | ||
510 | - ); | ||
511 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; |
512 | PRODUCT_NAME = "$(TARGET_NAME)"; | 419 | PRODUCT_NAME = "$(TARGET_NAME)"; |
513 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
@@ -525,16 +432,8 @@ | @@ -525,16 +432,8 @@ | ||
525 | CLANG_ENABLE_MODULES = YES; | 432 | CLANG_ENABLE_MODULES = YES; |
526 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; |
527 | ENABLE_BITCODE = NO; | 434 | ENABLE_BITCODE = NO; |
528 | - FRAMEWORK_SEARCH_PATHS = ( | ||
529 | - "$(inherited)", | ||
530 | - "$(PROJECT_DIR)/Flutter", | ||
531 | - ); | ||
532 | INFOPLIST_FILE = Runner/Info.plist; | 435 | INFOPLIST_FILE = Runner/Info.plist; |
533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; | 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
534 | - LIBRARY_SEARCH_PATHS = ( | ||
535 | - "$(inherited)", | ||
536 | - "$(PROJECT_DIR)/Flutter", | ||
537 | - ); | ||
538 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; | 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; |
539 | PRODUCT_NAME = "$(TARGET_NAME)"; | 438 | PRODUCT_NAME = "$(TARGET_NAME)"; |
540 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
1 | import 'dart:ui'; | 1 | import 'dart:ui'; |
2 | 2 | ||
3 | -import 'package:example/examples/sliver_container.dart'; | ||
4 | import 'package:flutter/cupertino.dart'; | 3 | import 'package:flutter/cupertino.dart'; |
5 | import 'package:flutter/material.dart'; | 4 | import 'package:flutter/material.dart'; |
6 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 5 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
@@ -72,7 +71,7 @@ class CupertinoSharePage extends StatelessWidget { | @@ -72,7 +71,7 @@ class CupertinoSharePage extends StatelessWidget { | ||
72 | } | 71 | } |
73 | 72 | ||
74 | class PhotoShareBottomSheet extends StatelessWidget { | 73 | class PhotoShareBottomSheet extends StatelessWidget { |
75 | - const PhotoShareBottomSheet({Key key}) : super(key: key); | 74 | + const PhotoShareBottomSheet({Key? key}) : super(key: key); |
76 | 75 | ||
77 | @override | 76 | @override |
78 | Widget build(BuildContext context) { | 77 | Widget build(BuildContext context) { |
@@ -150,6 +149,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -150,6 +149,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
150 | margin: EdgeInsets.symmetric(horizontal: 4), | 149 | margin: EdgeInsets.symmetric(horizontal: 4), |
151 | child: Column( | 150 | child: Column( |
152 | children: <Widget>[ | 151 | children: <Widget>[ |
152 | + if(app.imageUrl != null) | ||
153 | Material( | 153 | Material( |
154 | child: ClipRRect( | 154 | child: ClipRRect( |
155 | child: Container( | 155 | child: Container( |
@@ -157,7 +157,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -157,7 +157,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
157 | width: 60, | 157 | width: 60, |
158 | decoration: BoxDecoration( | 158 | decoration: BoxDecoration( |
159 | image: DecorationImage( | 159 | image: DecorationImage( |
160 | - image: AssetImage(app.imageUrl), | 160 | + image: AssetImage(app.imageUrl!), |
161 | fit: BoxFit.cover), | 161 | fit: BoxFit.cover), |
162 | color: Colors.white, | 162 | color: Colors.white, |
163 | borderRadius: | 163 | borderRadius: |
@@ -186,10 +186,6 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -186,10 +186,6 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
186 | ), | 186 | ), |
187 | SliverPadding( | 187 | SliverPadding( |
188 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), | 188 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), |
189 | - sliver: SliverContainer( | ||
190 | - decoration: BoxDecoration( | ||
191 | - color: Colors.white, | ||
192 | - borderRadius: BorderRadius.circular(12)), | ||
193 | sliver: SliverList( | 189 | sliver: SliverList( |
194 | delegate: SliverChildListDelegate.fixed( | 190 | delegate: SliverChildListDelegate.fixed( |
195 | List<Widget>.from(actions.map( | 191 | List<Widget>.from(actions.map( |
@@ -206,13 +202,9 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -206,13 +202,9 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
206 | height: 1, | 202 | height: 1, |
207 | ))), | 203 | ))), |
208 | )), | 204 | )), |
209 | - ), | 205 | + |
210 | SliverPadding( | 206 | SliverPadding( |
211 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), | 207 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 6), |
212 | - sliver: SliverContainer( | ||
213 | - decoration: BoxDecoration( | ||
214 | - color: Colors.white, | ||
215 | - borderRadius: BorderRadius.circular(12)), | ||
216 | sliver: SliverList( | 208 | sliver: SliverList( |
217 | delegate: SliverChildListDelegate.fixed( | 209 | delegate: SliverChildListDelegate.fixed( |
218 | List<Widget>.from(actions1.map( | 210 | List<Widget>.from(actions1.map( |
@@ -228,14 +220,10 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -228,14 +220,10 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
228 | )).addItemInBetween(Divider( | 220 | )).addItemInBetween(Divider( |
229 | height: 1, | 221 | height: 1, |
230 | ))), | 222 | ))), |
231 | - )), | 223 | + ) |
232 | ), | 224 | ), |
233 | SliverPadding( | 225 | SliverPadding( |
234 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 4), | 226 | padding: EdgeInsets.symmetric(horizontal: 18, vertical: 4), |
235 | - sliver: SliverContainer( | ||
236 | - decoration: BoxDecoration( | ||
237 | - color: Colors.white, | ||
238 | - borderRadius: BorderRadius.circular(12)), | ||
239 | sliver: SliverList( | 227 | sliver: SliverList( |
240 | delegate: SliverChildListDelegate.fixed( | 228 | delegate: SliverChildListDelegate.fixed( |
241 | List<Widget>.from(actions2.map( | 229 | List<Widget>.from(actions2.map( |
@@ -251,7 +239,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -251,7 +239,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
251 | )).addItemInBetween(Divider( | 239 | )).addItemInBetween(Divider( |
252 | height: 1, | 240 | height: 1, |
253 | ))), | 241 | ))), |
254 | - )), | 242 | + ) |
255 | ), | 243 | ), |
256 | SliverSafeArea( | 244 | SliverSafeArea( |
257 | top: false, | 245 | top: false, |
@@ -280,10 +268,11 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -280,10 +268,11 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
280 | margin: EdgeInsets.symmetric(horizontal: 4), | 268 | margin: EdgeInsets.symmetric(horizontal: 4), |
281 | child: Column( | 269 | child: Column( |
282 | children: <Widget>[ | 270 | children: <Widget>[ |
271 | + if(person.imageUrl != null) | ||
283 | Material( | 272 | Material( |
284 | child: CircleAvatar( | 273 | child: CircleAvatar( |
285 | backgroundImage: AssetImage( | 274 | backgroundImage: AssetImage( |
286 | - person.imageUrl, | 275 | + person.imageUrl!, |
287 | ), | 276 | ), |
288 | radius: 30, | 277 | radius: 30, |
289 | backgroundColor: Colors.white, | 278 | backgroundColor: Colors.white, |
@@ -406,7 +395,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -406,7 +395,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
406 | 395 | ||
407 | class Item { | 396 | class Item { |
408 | final String title; | 397 | final String title; |
409 | - final String imageUrl; | 398 | + final String? imageUrl; |
410 | 399 | ||
411 | Item(this.title, this.imageUrl); | 400 | Item(this.title, this.imageUrl); |
412 | } | 401 | } |
@@ -453,10 +442,9 @@ final actions2 = [ | @@ -453,10 +442,9 @@ final actions2 = [ | ||
453 | ]; | 442 | ]; |
454 | 443 | ||
455 | extension ListUtils<T> on List<T> { | 444 | extension ListUtils<T> on List<T> { |
456 | - List<T> addItemInBetween<T>(T item) => this.length == 0 | 445 | + List<T> addItemInBetween<A extends T>(A item) => this.length == 0 |
457 | ? this | 446 | ? this |
458 | - : (this.fold([], (r, element) => [...r, element as T, item]) | ||
459 | - ..removeLast()); | 447 | + : (this.fold([], (r, element) => [...r, element, item])..removeLast()); |
460 | } | 448 | } |
461 | 449 | ||
462 | class SimpleSliverDelegate extends SliverPersistentHeaderDelegate { | 450 | class SimpleSliverDelegate extends SliverPersistentHeaderDelegate { |
@@ -464,8 +452,8 @@ class SimpleSliverDelegate extends SliverPersistentHeaderDelegate { | @@ -464,8 +452,8 @@ class SimpleSliverDelegate extends SliverPersistentHeaderDelegate { | ||
464 | final double height; | 452 | final double height; |
465 | 453 | ||
466 | SimpleSliverDelegate({ | 454 | SimpleSliverDelegate({ |
467 | - this.child, | ||
468 | - this.height, | 455 | + required this.child, |
456 | + required this.height, | ||
469 | }); | 457 | }); |
470 | 458 | ||
471 | @override | 459 | @override |
1 | -import 'package:flutter/rendering.dart'; | ||
2 | -import 'package:flutter/widgets.dart'; | ||
3 | - | ||
4 | -@immutable | ||
5 | -class SliverContainer extends RenderObjectWidget { | ||
6 | - SliverContainer( | ||
7 | - {Key key, | ||
8 | - this.padding = EdgeInsets.zero, | ||
9 | - this.margin = EdgeInsets.zero, | ||
10 | - this.borderRadius, | ||
11 | - this.decoration, | ||
12 | - this.foregroundDecoration, | ||
13 | - this.sliver}) | ||
14 | - : super(key: key); | ||
15 | - | ||
16 | - final EdgeInsets margin; | ||
17 | - | ||
18 | - final BorderRadius borderRadius; | ||
19 | - final EdgeInsets padding; | ||
20 | - final Decoration decoration; | ||
21 | - final Decoration foregroundDecoration; | ||
22 | - final Widget sliver; | ||
23 | - | ||
24 | - Widget get child => SliverPadding(padding: padding + margin, sliver: sliver); | ||
25 | - | ||
26 | - Container get backgroundDecorationBox => Container(decoration: decoration); | ||
27 | - | ||
28 | - Container get foregroundDecorationBox => | ||
29 | - Container(decoration: foregroundDecoration); | ||
30 | - | ||
31 | - @override | ||
32 | - _RenderSliverGroup createRenderObject(BuildContext context) { | ||
33 | - return _RenderSliverGroup( | ||
34 | - margin: this.margin, borderRadius: this.borderRadius, padding: padding); | ||
35 | - } | ||
36 | - | ||
37 | - @override | ||
38 | - _SliverGroupElement createElement() => _SliverGroupElement(this); | ||
39 | - | ||
40 | - @override | ||
41 | - void updateRenderObject( | ||
42 | - BuildContext context, _RenderSliverGroup renderObject) { | ||
43 | - renderObject | ||
44 | - ..margin = margin | ||
45 | - ..padding = padding | ||
46 | - ..borderRadius = borderRadius; | ||
47 | - } | ||
48 | -} | ||
49 | - | ||
50 | -class _SliverGroupElement extends RenderObjectElement { | ||
51 | - _SliverGroupElement(SliverContainer widget) : super(widget); | ||
52 | - | ||
53 | - Element _backgroundDecoration; | ||
54 | - Element _foregroundDecoration; | ||
55 | - Element _sliver; | ||
56 | - | ||
57 | - @override | ||
58 | - SliverContainer get widget => super.widget; | ||
59 | - | ||
60 | - @override | ||
61 | - void visitChildren(ElementVisitor visitor) { | ||
62 | - if (_backgroundDecoration != null) visitor(_backgroundDecoration); | ||
63 | - if (_foregroundDecoration != null) visitor(_foregroundDecoration); | ||
64 | - if (_sliver != null) visitor(_sliver); | ||
65 | - } | ||
66 | - | ||
67 | - @override | ||
68 | - void forgetChild(Element child) { | ||
69 | - if (child == _backgroundDecoration) _backgroundDecoration = null; | ||
70 | - if (child == _foregroundDecoration) _foregroundDecoration = null; | ||
71 | - if (child == _sliver) _sliver = null; | ||
72 | - super.forgetChild(child); | ||
73 | - } | ||
74 | - | ||
75 | - @override | ||
76 | - void mount(Element parent, newSlot) { | ||
77 | - super.mount(parent, newSlot); | ||
78 | - _backgroundDecoration = | ||
79 | - updateChild(_backgroundDecoration, widget.backgroundDecorationBox, 0); | ||
80 | - _foregroundDecoration = | ||
81 | - updateChild(_foregroundDecoration, widget.foregroundDecorationBox, 1); | ||
82 | - _sliver = updateChild(_sliver, widget.child, 2); | ||
83 | - } | ||
84 | - | ||
85 | - @override | ||
86 | - void update(RenderObjectWidget newWidget) { | ||
87 | - super.update(newWidget); | ||
88 | - assert(widget == newWidget); | ||
89 | - _backgroundDecoration = | ||
90 | - updateChild(_backgroundDecoration, widget.backgroundDecorationBox, 0); | ||
91 | - _foregroundDecoration = | ||
92 | - updateChild(_foregroundDecoration, widget.foregroundDecorationBox, 1); | ||
93 | - _sliver = updateChild(_sliver, widget.child, 2); | ||
94 | - } | ||
95 | - | ||
96 | - @override | ||
97 | - void insertChildRenderObject(RenderObject child, int slot) { | ||
98 | - final _RenderSliverGroup renderObject = this.renderObject; | ||
99 | - if (slot == 0) renderObject.decoration = child; | ||
100 | - if (slot == 1) renderObject.foregroundDecoration = child; | ||
101 | - if (slot == 2) renderObject.child = child; | ||
102 | - assert(renderObject == this.renderObject); | ||
103 | - } | ||
104 | - | ||
105 | - @override | ||
106 | - void moveChildRenderObject(RenderObject child, slot) { | ||
107 | - assert(false); | ||
108 | - } | ||
109 | - | ||
110 | - @override | ||
111 | - void removeChildRenderObject(RenderObject child) { | ||
112 | - final _RenderSliverGroup renderObject = this.renderObject; | ||
113 | - if (renderObject.decoration == child) renderObject.decoration = null; | ||
114 | - if (renderObject.foregroundDecoration == child) | ||
115 | - renderObject.foregroundDecoration = null; | ||
116 | - if (renderObject.child == child) renderObject.child = null; | ||
117 | - assert(renderObject == this.renderObject); | ||
118 | - } | ||
119 | -} | ||
120 | - | ||
121 | -class _RenderSliverGroup extends RenderSliver with RenderSliverHelpers { | ||
122 | - _RenderSliverGroup( | ||
123 | - {EdgeInsetsGeometry margin, | ||
124 | - EdgeInsetsGeometry padding, | ||
125 | - BorderRadius borderRadius, | ||
126 | - RenderBox decoration, | ||
127 | - RenderBox foregroundDecoration, | ||
128 | - RenderSliver child}) { | ||
129 | - this.margin = margin; | ||
130 | - this.padding = padding; | ||
131 | - this.borderRadius = borderRadius; | ||
132 | - this.foregroundDecoration = foregroundDecoration; | ||
133 | - this.decoration = decoration; | ||
134 | - this.child = child; | ||
135 | - } | ||
136 | - | ||
137 | - RRect _clipRRect; | ||
138 | - | ||
139 | - EdgeInsetsGeometry get padding => _padding; | ||
140 | - EdgeInsetsGeometry _padding; | ||
141 | - | ||
142 | - set padding(EdgeInsetsGeometry value) { | ||
143 | - assert(value != null); | ||
144 | - assert(value.isNonNegative); | ||
145 | - if (_padding == value) return; | ||
146 | - _padding = value; | ||
147 | - markNeedsLayout(); | ||
148 | - } | ||
149 | - | ||
150 | - EdgeInsetsGeometry get margin => _margin; | ||
151 | - EdgeInsetsGeometry _margin; | ||
152 | - | ||
153 | - set margin(EdgeInsetsGeometry value) { | ||
154 | - assert(value != null); | ||
155 | - assert(value.isNonNegative); | ||
156 | - if (_margin == value) return; | ||
157 | - _margin = value; | ||
158 | - markNeedsLayout(); | ||
159 | - } | ||
160 | - | ||
161 | - BorderRadiusGeometry get borderRadius => _borderRadius; | ||
162 | - BorderRadiusGeometry _borderRadius; | ||
163 | - | ||
164 | - set borderRadius(BorderRadiusGeometry value) { | ||
165 | - if (value == _borderRadius) return; | ||
166 | - _borderRadius = value; | ||
167 | - markNeedsPaint(); | ||
168 | - } | ||
169 | - | ||
170 | - RenderBox get decoration => _decoration; | ||
171 | - RenderBox _decoration; | ||
172 | - | ||
173 | - set decoration(RenderBox value) { | ||
174 | - if (_decoration != null) dropChild(_decoration); | ||
175 | - _decoration = value; | ||
176 | - if (_decoration != null) adoptChild(_decoration); | ||
177 | - } | ||
178 | - | ||
179 | - RenderBox get foregroundDecoration => _foregroundDecoration; | ||
180 | - RenderBox _foregroundDecoration; | ||
181 | - | ||
182 | - set foregroundDecoration(RenderBox value) { | ||
183 | - if (_foregroundDecoration != null) dropChild(_foregroundDecoration); | ||
184 | - _foregroundDecoration = value; | ||
185 | - if (_foregroundDecoration != null) adoptChild(_foregroundDecoration); | ||
186 | - } | ||
187 | - | ||
188 | - RenderSliver get child => _child; | ||
189 | - RenderSliver _child; | ||
190 | - | ||
191 | - set child(RenderSliver value) { | ||
192 | - if (_child != null) dropChild(_child); | ||
193 | - _child = value; | ||
194 | - if (_child != null) adoptChild(_child); | ||
195 | - } | ||
196 | - | ||
197 | - @override | ||
198 | - void setupParentData(RenderObject child) { | ||
199 | - if (child.parentData is! SliverPhysicalParentData) | ||
200 | - child.parentData = new SliverPhysicalParentData(); | ||
201 | - } | ||
202 | - | ||
203 | - @override | ||
204 | - void attach(PipelineOwner owner) { | ||
205 | - super.attach(owner); | ||
206 | - if (_decoration != null) _decoration.attach(owner); | ||
207 | - if (_child != null) _child.attach(owner); | ||
208 | - if (_foregroundDecoration != null) _foregroundDecoration.attach(owner); | ||
209 | - } | ||
210 | - | ||
211 | - @override | ||
212 | - void detach() { | ||
213 | - super.detach(); | ||
214 | - if (_decoration != null) _decoration.detach(); | ||
215 | - if (_child != null) _child.detach(); | ||
216 | - if (_foregroundDecoration != null) _foregroundDecoration.detach(); | ||
217 | - } | ||
218 | - | ||
219 | - @override | ||
220 | - void redepthChildren() { | ||
221 | - if (_decoration != null) redepthChild(_decoration); | ||
222 | - if (_child != null) redepthChild(_child); | ||
223 | - if (_foregroundDecoration != null) redepthChild(_foregroundDecoration); | ||
224 | - } | ||
225 | - | ||
226 | - @override | ||
227 | - void visitChildren(RenderObjectVisitor visitor) { | ||
228 | - if (_decoration != null) visitor(_decoration); | ||
229 | - if (_child != null) visitor(_child); | ||
230 | - if (_foregroundDecoration != null) visitor(_foregroundDecoration); | ||
231 | - } | ||
232 | - | ||
233 | - @override | ||
234 | - List<DiagnosticsNode> debugDescribeChildren() { | ||
235 | - List<DiagnosticsNode> result = <DiagnosticsNode>[]; | ||
236 | - if (decoration != null) { | ||
237 | - result.add(decoration.toDiagnosticsNode(name: 'decoration')); | ||
238 | - } | ||
239 | - if (foregroundDecoration != null) { | ||
240 | - result.add(foregroundDecoration.toDiagnosticsNode( | ||
241 | - name: 'foreground_decoration')); | ||
242 | - } | ||
243 | - if (child != null) { | ||
244 | - result.add(child.toDiagnosticsNode(name: 'child')); | ||
245 | - } | ||
246 | - return result; | ||
247 | - } | ||
248 | - | ||
249 | - @override | ||
250 | - bool hitTestChildren(HitTestResult result, | ||
251 | - {double mainAxisPosition, double crossAxisPosition}) { | ||
252 | - assert(geometry.hitTestExtent > 0.0); | ||
253 | - return child.hitTest(result, | ||
254 | - mainAxisPosition: mainAxisPosition, | ||
255 | - crossAxisPosition: crossAxisPosition); | ||
256 | - } | ||
257 | - | ||
258 | - @override | ||
259 | - void performLayout() { | ||
260 | - if (child == null) { | ||
261 | - geometry = SliverGeometry(); | ||
262 | - return; | ||
263 | - } | ||
264 | - // child not null | ||
265 | - AxisDirection axisDirection = applyGrowthDirectionToAxisDirection( | ||
266 | - constraints.axisDirection, constraints.growthDirection); | ||
267 | - // layout sliver | ||
268 | - child.layout(constraints, parentUsesSize: true); | ||
269 | - final SliverGeometry childLayoutGeometry = child.geometry; | ||
270 | - geometry = childLayoutGeometry; | ||
271 | - | ||
272 | - // layout decoration with child size + margin | ||
273 | - //Todo: Support rtl | ||
274 | - EdgeInsets margin = this.margin.resolve(TextDirection.ltr); | ||
275 | - final maxExtent = childLayoutGeometry.maxPaintExtent - margin.horizontal; | ||
276 | - final crossAxisExtent = constraints.crossAxisExtent - margin.vertical; | ||
277 | - if (decoration != null) { | ||
278 | - decoration.layout( | ||
279 | - constraints.asBoxConstraints( | ||
280 | - maxExtent: maxExtent, crossAxisExtent: crossAxisExtent), | ||
281 | - parentUsesSize: true); | ||
282 | - } | ||
283 | - if (foregroundDecoration != null) { | ||
284 | - foregroundDecoration.layout( | ||
285 | - constraints.asBoxConstraints( | ||
286 | - maxExtent: maxExtent, crossAxisExtent: crossAxisExtent), | ||
287 | - parentUsesSize: true); | ||
288 | - } | ||
289 | - // compute decoration offset | ||
290 | - | ||
291 | - final SliverPhysicalParentData headerParentData = decoration.parentData; | ||
292 | - final SliverPhysicalParentData foregroundParentData = | ||
293 | - foregroundDecoration.parentData; | ||
294 | - double scrollOffset = -constraints.scrollOffset; | ||
295 | - Offset offset; | ||
296 | - switch (axisDirection) { | ||
297 | - case AxisDirection.up: | ||
298 | - offset = Offset(0.0, geometry.paintExtent); | ||
299 | - break; | ||
300 | - case AxisDirection.down: | ||
301 | - offset = Offset(0, scrollOffset); | ||
302 | - break; | ||
303 | - case AxisDirection.left: | ||
304 | - offset = Offset(geometry.paintExtent, 0.0); | ||
305 | - break; | ||
306 | - case AxisDirection.right: | ||
307 | - offset = Offset.zero; | ||
308 | - break; | ||
309 | - } | ||
310 | - offset += Offset(margin.left, margin.top); | ||
311 | - headerParentData.paintOffset = offset; | ||
312 | - foregroundParentData.paintOffset = offset; | ||
313 | - | ||
314 | - //compute child clip | ||
315 | - if (this.borderRadius != null) { | ||
316 | - BorderRadius borderRadius = this.borderRadius.resolve(TextDirection.ltr); | ||
317 | - _clipRRect = borderRadius.toRRect(Rect.fromLTRB( | ||
318 | - 0, 0, constraints.crossAxisExtent, geometry.maxPaintExtent)); | ||
319 | - double offSetY = scrollOffset; | ||
320 | - _clipRRect = _clipRRect.shift(Offset(0, offSetY)); | ||
321 | - } | ||
322 | - } | ||
323 | - | ||
324 | - @override | ||
325 | - void applyPaintTransform(RenderObject child, Matrix4 transform) { | ||
326 | - assert(child != null); | ||
327 | - final SliverPhysicalParentData childParentData = child.parentData; | ||
328 | - childParentData.applyPaintTransform(transform); | ||
329 | - } | ||
330 | - | ||
331 | - @override | ||
332 | - void paint(PaintingContext context, Offset offset) { | ||
333 | - if (geometry.visible) { | ||
334 | - // paint decoration | ||
335 | - if (decoration != null) { | ||
336 | - final SliverPhysicalParentData childParentData = decoration.parentData; | ||
337 | - context.paintChild(decoration, offset + childParentData.paintOffset); | ||
338 | - } | ||
339 | - // paint child | ||
340 | - if (child != null && child.geometry.visible) { | ||
341 | - final SliverPhysicalParentData childParentData = child.parentData; | ||
342 | - final PaintingContextCallback painter = | ||
343 | - (PaintingContext context, Offset offset) { | ||
344 | - context.paintChild(child, offset); | ||
345 | - }; | ||
346 | - if (_clipRRect != null && _clipRRect != RRect.zero) { | ||
347 | - context.pushClipRRect( | ||
348 | - needsCompositing, | ||
349 | - offset + childParentData.paintOffset, | ||
350 | - _clipRRect.outerRect, | ||
351 | - _clipRRect, | ||
352 | - painter, | ||
353 | - ); | ||
354 | - } else { | ||
355 | - painter(context, offset + childParentData.paintOffset); | ||
356 | - } | ||
357 | - } | ||
358 | - if (foregroundDecoration != null) { | ||
359 | - final SliverPhysicalParentData childParentData = | ||
360 | - foregroundDecoration.parentData; | ||
361 | - context.paintChild( | ||
362 | - foregroundDecoration, offset + childParentData.paintOffset); | ||
363 | - } | ||
364 | - } | ||
365 | - } | ||
366 | -} |
@@ -25,8 +25,8 @@ class MyApp extends StatelessWidget { | @@ -25,8 +25,8 @@ class MyApp extends StatelessWidget { | ||
25 | return MaterialApp( | 25 | return MaterialApp( |
26 | theme: ThemeData(platform: TargetPlatform.iOS), | 26 | theme: ThemeData(platform: TargetPlatform.iOS), |
27 | title: 'BottomSheet Modals', | 27 | title: 'BottomSheet Modals', |
28 | - builder: (context, child) => WebFrame( | ||
29 | - child: child, | 28 | + builder: (context, Widget? child) => WebFrame( |
29 | + child: child!, | ||
30 | ), | 30 | ), |
31 | onGenerateRoute: (RouteSettings settings) { | 31 | onGenerateRoute: (RouteSettings settings) { |
32 | switch (settings.name) { | 32 | switch (settings.name) { |
@@ -84,7 +84,7 @@ class MyApp extends StatelessWidget { | @@ -84,7 +84,7 @@ class MyApp extends StatelessWidget { | ||
84 | } | 84 | } |
85 | 85 | ||
86 | class MyHomePage extends StatefulWidget { | 86 | class MyHomePage extends StatefulWidget { |
87 | - MyHomePage({Key key, this.title}) : super(key: key); | 87 | + MyHomePage({Key? key, required this.title}) : super(key: key); |
88 | 88 | ||
89 | final String title; | 89 | final String title; |
90 | 90 |
@@ -9,7 +9,7 @@ class AvatarBottomSheet extends StatelessWidget { | @@ -9,7 +9,7 @@ class AvatarBottomSheet extends StatelessWidget { | ||
9 | final Widget child; | 9 | final Widget child; |
10 | final Animation<double> animation; | 10 | final Animation<double> animation; |
11 | 11 | ||
12 | - const AvatarBottomSheet({Key key, this.child, this.animation}) | 12 | + const AvatarBottomSheet({Key? key, required this.child, required this.animation}) |
13 | : super(key: key); | 13 | : super(key: key); |
14 | 14 | ||
15 | @override | 15 | @override |
@@ -67,21 +67,21 @@ class AvatarBottomSheet extends StatelessWidget { | @@ -67,21 +67,21 @@ class AvatarBottomSheet extends StatelessWidget { | ||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | -Future<T> showAvatarModalBottomSheet<T>({ | ||
71 | - @required BuildContext context, | ||
72 | - @required WidgetBuilder builder, | ||
73 | - Color backgroundColor, | ||
74 | - double elevation, | ||
75 | - ShapeBorder shape, | ||
76 | - Clip clipBehavior, | 70 | +Future<T?> showAvatarModalBottomSheet<T>({ |
71 | + required BuildContext context, | ||
72 | + required WidgetBuilder builder, | ||
73 | + Color? backgroundColor, | ||
74 | + double? elevation, | ||
75 | + ShapeBorder? shape, | ||
76 | + Clip? clipBehavior, | ||
77 | Color barrierColor = Colors.black87, | 77 | Color barrierColor = Colors.black87, |
78 | bool bounce = true, | 78 | bool bounce = true, |
79 | bool expand = false, | 79 | bool expand = false, |
80 | - AnimationController secondAnimation, | 80 | + AnimationController? secondAnimation, |
81 | bool useRootNavigator = false, | 81 | bool useRootNavigator = false, |
82 | bool isDismissible = true, | 82 | bool isDismissible = true, |
83 | bool enableDrag = true, | 83 | bool enableDrag = true, |
84 | - Duration duration, | 84 | + Duration? duration, |
85 | }) async { | 85 | }) async { |
86 | assert(context != null); | 86 | assert(context != null); |
87 | assert(builder != null); | 87 | assert(builder != null); |
@@ -4,9 +4,9 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | @@ -4,9 +4,9 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
4 | 4 | ||
5 | class FloatingModal extends StatelessWidget { | 5 | class FloatingModal extends StatelessWidget { |
6 | final Widget child; | 6 | final Widget child; |
7 | - final Color backgroundColor; | 7 | + final Color? backgroundColor; |
8 | 8 | ||
9 | - const FloatingModal({Key key, this.child, this.backgroundColor}) | 9 | + const FloatingModal({Key? key, required this.child, this.backgroundColor}) |
10 | : super(key: key); | 10 | : super(key: key); |
11 | 11 | ||
12 | @override | 12 | @override |
@@ -26,9 +26,9 @@ class FloatingModal extends StatelessWidget { | @@ -26,9 +26,9 @@ class FloatingModal extends StatelessWidget { | ||
26 | } | 26 | } |
27 | 27 | ||
28 | Future<T> showFloatingModalBottomSheet<T>({ | 28 | Future<T> showFloatingModalBottomSheet<T>({ |
29 | - @required BuildContext context, | ||
30 | - @required WidgetBuilder builder, | ||
31 | - Color backgroundColor, | 29 | + required BuildContext context, |
30 | + required WidgetBuilder builder, | ||
31 | + Color? backgroundColor, | ||
32 | }) async { | 32 | }) async { |
33 | final result = await showCustomModalBottomSheet( | 33 | final result = await showCustomModalBottomSheet( |
34 | context: context, | 34 | context: context, |
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | ||
3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
4 | 4 | ||
5 | class ComplexModal extends StatelessWidget { | 5 | class ComplexModal extends StatelessWidget { |
6 | - const ComplexModal({Key key}) : super(key: key); | 6 | + const ComplexModal({Key? key}) : super(key: key); |
7 | 7 | ||
8 | @override | 8 | @override |
9 | Widget build(BuildContext context) { | 9 | Widget build(BuildContext context) { |
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; | ||
2 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
3 | 3 | ||
4 | class ModalFit extends StatelessWidget { | 4 | class ModalFit extends StatelessWidget { |
5 | - const ModalFit({Key key}) : super(key: key); | 5 | + const ModalFit({Key? key}) : super(key: key); |
6 | 6 | ||
7 | @override | 7 | @override |
8 | Widget build(BuildContext context) { | 8 | Widget build(BuildContext context) { |
@@ -5,7 +5,7 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | @@ -5,7 +5,7 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
5 | class ModalInsideModal extends StatelessWidget { | 5 | class ModalInsideModal extends StatelessWidget { |
6 | final bool reverse; | 6 | final bool reverse; |
7 | 7 | ||
8 | - const ModalInsideModal({Key key, this.reverse = false}) : super(key: key); | 8 | + const ModalInsideModal({Key? key, this.reverse = false}) : super(key: key); |
9 | 9 | ||
10 | @override | 10 | @override |
11 | Widget build(BuildContext context) { | 11 | Widget build(BuildContext context) { |
@@ -2,9 +2,9 @@ import 'package:flutter/cupertino.dart'; | @@ -2,9 +2,9 @@ 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 | - final ScrollController scrollController; | ||
6 | 5 | ||
7 | - const SimpleModal({Key key, this.scrollController}) : super(key: key); | 6 | + |
7 | + const SimpleModal({Key? key}) : super(key: key); | ||
8 | 8 | ||
9 | @override | 9 | @override |
10 | Widget build(BuildContext context) { | 10 | Widget build(BuildContext context) { |
@@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; | ||
2 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
3 | 3 | ||
4 | class ModalWillScope extends StatelessWidget { | 4 | class ModalWillScope extends StatelessWidget { |
5 | - const ModalWillScope({Key key}) : super(key: key); | 5 | + const ModalWillScope({Key? key}) : super(key: key); |
6 | 6 | ||
7 | @override | 7 | @override |
8 | Widget build(BuildContext context) { | 8 | Widget build(BuildContext context) { |
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | ||
3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
4 | 4 | ||
5 | class ModalWithNavigator extends StatelessWidget { | 5 | class ModalWithNavigator extends StatelessWidget { |
6 | - const ModalWithNavigator({Key key}) : super(key: key); | 6 | + const ModalWithNavigator({Key? key}) : super(key: key); |
7 | 7 | ||
8 | @override | 8 | @override |
9 | Widget build(BuildContext rootContext) { | 9 | Widget build(BuildContext rootContext) { |
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | ||
3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
4 | 4 | ||
5 | class NestedScrollModal extends StatelessWidget { | 5 | class NestedScrollModal extends StatelessWidget { |
6 | - const NestedScrollModal({Key key}) : super(key: key); | 6 | + const NestedScrollModal({Key? key}) : super(key: key); |
7 | 7 | ||
8 | @override | 8 | @override |
9 | Widget build(BuildContext context) { | 9 | Widget build(BuildContext context) { |
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; | ||
2 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 2 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
3 | 3 | ||
4 | class ModalWithPageView extends StatelessWidget { | 4 | class ModalWithPageView extends StatelessWidget { |
5 | - const ModalWithPageView({Key key}) : super(key: key); | 5 | + const ModalWithPageView({Key? key}) : super(key: key); |
6 | 6 | ||
7 | @override | 7 | @override |
8 | Widget build(BuildContext context) { | 8 | Widget build(BuildContext context) { |
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; | ||
3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | 3 | import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; |
4 | 4 | ||
5 | class ModalWithScroll extends StatelessWidget { | 5 | class ModalWithScroll extends StatelessWidget { |
6 | - const ModalWithScroll({Key key}) : super(key: key); | 6 | + const ModalWithScroll({Key? key}) : super(key: key); |
7 | 7 | ||
8 | @override | 8 | @override |
9 | Widget build(BuildContext context) { | 9 | Widget build(BuildContext context) { |
@@ -7,7 +7,7 @@ import 'package:url_launcher/url_launcher.dart'; | @@ -7,7 +7,7 @@ import 'package:url_launcher/url_launcher.dart'; | ||
7 | class WebFrame extends StatelessWidget { | 7 | class WebFrame extends StatelessWidget { |
8 | final Widget child; | 8 | final Widget child; |
9 | 9 | ||
10 | - const WebFrame({Key key, this.child}) : super(key: key); | 10 | + const WebFrame({Key? key, required this.child}) : super(key: key); |
11 | 11 | ||
12 | @override | 12 | @override |
13 | Widget build(BuildContext context) { | 13 | Widget build(BuildContext context) { |
@@ -21,6 +21,7 @@ | @@ -21,6 +21,7 @@ | ||
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 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; | 25 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; |
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; | 26 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; |
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; | 27 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; |
@@ -28,7 +29,6 @@ | @@ -28,7 +29,6 @@ | ||
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; | 29 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; |
29 | 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; }; | 30 | 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; }; |
30 | 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | 31 | 33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
31 | - 7750D706F7F4EF7A4673CFC3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F36D136272EAF3C8E9406E8 /* Pods_Runner.framework */; }; | ||
32 | D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; }; | 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, ); }; }; | 33 | D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
34 | /* End PBXBuildFile section */ | 34 | /* End PBXBuildFile section */ |
@@ -59,8 +59,8 @@ | @@ -59,8 +59,8 @@ | ||
59 | /* End PBXCopyFilesBuildPhase section */ | 59 | /* End PBXCopyFilesBuildPhase section */ |
60 | 60 | ||
61 | /* Begin PBXFileReference section */ | 61 | /* Begin PBXFileReference section */ |
62 | - 1601E62CD620826356A7224C /* 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>"; }; | ||
63 | - 31540D3B1454E3935C2255AE /* 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>"; }; | 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>"; }; | ||
64 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; | 64 | 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>"; }; | 65 | 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; }; | 66 | 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
@@ -76,9 +76,9 @@ | @@ -76,9 +76,9 @@ | ||
76 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; | 76 | 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>"; }; | 77 | 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>"; }; | 78 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; |
79 | - 6F36D136272EAF3C8E9406E8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | 79 | + 6785DE70E6CF5A12A3672D00 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; | 80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; |
81 | - 8C45A9FE6302E0520D92F872 /* 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>"; }; | 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>"; }; | 82 | 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; }; | 83 | D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; }; |
84 | /* End PBXFileReference section */ | 84 | /* End PBXFileReference section */ |
@@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
90 | files = ( | 90 | files = ( |
91 | D73912F022F37F9E000D13A0 /* App.framework in Frameworks */, | 91 | D73912F022F37F9E000D13A0 /* App.framework in Frameworks */, |
92 | 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */, | 92 | 33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */, |
93 | - 7750D706F7F4EF7A4673CFC3 /* Pods_Runner.framework in Frameworks */, | 93 | + 07F1EEFF1D7280028D8E0815 /* Pods_Runner.framework in Frameworks */, |
94 | ); | 94 | ); |
95 | runOnlyForDeploymentPostprocessing = 0; | 95 | runOnlyForDeploymentPostprocessing = 0; |
96 | }; | 96 | }; |
@@ -115,7 +115,7 @@ | @@ -115,7 +115,7 @@ | ||
115 | 33CEB47122A05771004F2AC0 /* Flutter */, | 115 | 33CEB47122A05771004F2AC0 /* Flutter */, |
116 | 33CC10EE2044A3C60003C045 /* Products */, | 116 | 33CC10EE2044A3C60003C045 /* Products */, |
117 | D73912EC22F37F3D000D13A0 /* Frameworks */, | 117 | D73912EC22F37F3D000D13A0 /* Frameworks */, |
118 | - 9350091802CFC393284BD46E /* Pods */, | 118 | + A1F7D023EEA811516CAA2CF1 /* Pods */, |
119 | ); | 119 | ); |
120 | sourceTree = "<group>"; | 120 | sourceTree = "<group>"; |
121 | }; | 121 | }; |
@@ -164,12 +164,12 @@ | @@ -164,12 +164,12 @@ | ||
164 | path = Runner; | 164 | path = Runner; |
165 | sourceTree = "<group>"; | 165 | sourceTree = "<group>"; |
166 | }; | 166 | }; |
167 | - 9350091802CFC393284BD46E /* Pods */ = { | 167 | + A1F7D023EEA811516CAA2CF1 /* Pods */ = { |
168 | isa = PBXGroup; | 168 | isa = PBXGroup; |
169 | children = ( | 169 | children = ( |
170 | - 1601E62CD620826356A7224C /* Pods-Runner.debug.xcconfig */, | ||
171 | - 8C45A9FE6302E0520D92F872 /* Pods-Runner.release.xcconfig */, | ||
172 | - 31540D3B1454E3935C2255AE /* Pods-Runner.profile.xcconfig */, | 170 | + 12CD678DD42B59A87A0100ED /* Pods-Runner.debug.xcconfig */, |
171 | + 123E850BF31901C0A1B9EDF9 /* Pods-Runner.release.xcconfig */, | ||
172 | + 956A1C59D4E7DF8845616D84 /* Pods-Runner.profile.xcconfig */, | ||
173 | ); | 173 | ); |
174 | name = Pods; | 174 | name = Pods; |
175 | path = Pods; | 175 | path = Pods; |
@@ -178,7 +178,7 @@ | @@ -178,7 +178,7 @@ | ||
178 | D73912EC22F37F3D000D13A0 /* Frameworks */ = { | 178 | D73912EC22F37F3D000D13A0 /* Frameworks */ = { |
179 | isa = PBXGroup; | 179 | isa = PBXGroup; |
180 | children = ( | 180 | children = ( |
181 | - 6F36D136272EAF3C8E9406E8 /* Pods_Runner.framework */, | 181 | + 6785DE70E6CF5A12A3672D00 /* Pods_Runner.framework */, |
182 | ); | 182 | ); |
183 | name = Frameworks; | 183 | name = Frameworks; |
184 | sourceTree = "<group>"; | 184 | sourceTree = "<group>"; |
@@ -190,13 +190,13 @@ | @@ -190,13 +190,13 @@ | ||
190 | isa = PBXNativeTarget; | 190 | isa = PBXNativeTarget; |
191 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; | 191 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; |
192 | buildPhases = ( | 192 | buildPhases = ( |
193 | - 84BD7313E5046A1EFFEE4684 /* [CP] Check Pods Manifest.lock */, | 193 | + 39807FAAEE6C2A7DC7608117 /* [CP] Check Pods Manifest.lock */, |
194 | 33CC10E92044A3C60003C045 /* Sources */, | 194 | 33CC10E92044A3C60003C045 /* Sources */, |
195 | 33CC10EA2044A3C60003C045 /* Frameworks */, | 195 | 33CC10EA2044A3C60003C045 /* Frameworks */, |
196 | 33CC10EB2044A3C60003C045 /* Resources */, | 196 | 33CC10EB2044A3C60003C045 /* Resources */, |
197 | 33CC110E2044A8840003C045 /* Bundle Framework */, | 197 | 33CC110E2044A8840003C045 /* Bundle Framework */, |
198 | 3399D490228B24CF009A79C7 /* ShellScript */, | 198 | 3399D490228B24CF009A79C7 /* ShellScript */, |
199 | - 3F31035F17BB50E98F3B6DB3 /* [CP] Embed Pods Frameworks */, | 199 | + A477A0AC3B4E8DBC8C9DA73C /* [CP] Embed Pods Frameworks */, |
200 | ); | 200 | ); |
201 | buildRules = ( | 201 | buildRules = ( |
202 | ); | 202 | ); |
@@ -216,7 +216,7 @@ | @@ -216,7 +216,7 @@ | ||
216 | attributes = { | 216 | attributes = { |
217 | LastSwiftUpdateCheck = 0920; | 217 | LastSwiftUpdateCheck = 0920; |
218 | LastUpgradeCheck = 0930; | 218 | LastUpgradeCheck = 0930; |
219 | - ORGANIZATIONNAME = "The Flutter Authors"; | 219 | + ORGANIZATIONNAME = ""; |
220 | TargetAttributes = { | 220 | TargetAttributes = { |
221 | 33CC10EC2044A3C60003C045 = { | 221 | 33CC10EC2044A3C60003C045 = { |
222 | CreatedOnToolsVersion = 9.2; | 222 | CreatedOnToolsVersion = 9.2; |
@@ -235,7 +235,7 @@ | @@ -235,7 +235,7 @@ | ||
235 | }; | 235 | }; |
236 | }; | 236 | }; |
237 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; | 237 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; |
238 | - compatibilityVersion = "Xcode 8.0"; | 238 | + compatibilityVersion = "Xcode 9.3"; |
239 | developmentRegion = en; | 239 | developmentRegion = en; |
240 | hasScannedForEncodings = 0; | 240 | hasScannedForEncodings = 0; |
241 | knownRegions = ( | 241 | knownRegions = ( |
@@ -301,43 +301,43 @@ | @@ -301,43 +301,43 @@ | ||
301 | ); | 301 | ); |
302 | runOnlyForDeploymentPostprocessing = 0; | 302 | runOnlyForDeploymentPostprocessing = 0; |
303 | shellPath = /bin/sh; | 303 | shellPath = /bin/sh; |
304 | - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n"; | 304 | + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; |
305 | }; | 305 | }; |
306 | - 3F31035F17BB50E98F3B6DB3 /* [CP] Embed Pods Frameworks */ = { | 306 | + 39807FAAEE6C2A7DC7608117 /* [CP] Check Pods Manifest.lock */ = { |
307 | isa = PBXShellScriptBuildPhase; | 307 | isa = PBXShellScriptBuildPhase; |
308 | buildActionMask = 2147483647; | 308 | buildActionMask = 2147483647; |
309 | files = ( | 309 | files = ( |
310 | ); | 310 | ); |
311 | inputFileListPaths = ( | 311 | inputFileListPaths = ( |
312 | ); | 312 | ); |
313 | - name = "[CP] Embed Pods Frameworks"; | 313 | + inputPaths = ( |
314 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
315 | + "${PODS_ROOT}/Manifest.lock", | ||
316 | + ); | ||
317 | + name = "[CP] Check Pods Manifest.lock"; | ||
314 | outputFileListPaths = ( | 318 | outputFileListPaths = ( |
315 | ); | 319 | ); |
320 | + outputPaths = ( | ||
321 | + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | ||
322 | + ); | ||
316 | runOnlyForDeploymentPostprocessing = 0; | 323 | runOnlyForDeploymentPostprocessing = 0; |
317 | shellPath = /bin/sh; | 324 | shellPath = /bin/sh; |
318 | - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | 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"; |
319 | showEnvVarsInLog = 0; | 326 | showEnvVarsInLog = 0; |
320 | }; | 327 | }; |
321 | - 84BD7313E5046A1EFFEE4684 /* [CP] Check Pods Manifest.lock */ = { | 328 | + A477A0AC3B4E8DBC8C9DA73C /* [CP] Embed Pods Frameworks */ = { |
322 | isa = PBXShellScriptBuildPhase; | 329 | isa = PBXShellScriptBuildPhase; |
323 | buildActionMask = 2147483647; | 330 | buildActionMask = 2147483647; |
324 | files = ( | 331 | files = ( |
325 | ); | 332 | ); |
326 | inputFileListPaths = ( | 333 | inputFileListPaths = ( |
327 | ); | 334 | ); |
328 | - inputPaths = ( | ||
329 | - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
330 | - "${PODS_ROOT}/Manifest.lock", | ||
331 | - ); | ||
332 | - name = "[CP] Check Pods Manifest.lock"; | 335 | + name = "[CP] Embed Pods Frameworks"; |
333 | outputFileListPaths = ( | 336 | outputFileListPaths = ( |
334 | ); | 337 | ); |
335 | - outputPaths = ( | ||
336 | - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | ||
337 | - ); | ||
338 | runOnlyForDeploymentPostprocessing = 0; | 338 | runOnlyForDeploymentPostprocessing = 0; |
339 | shellPath = /bin/sh; | 339 | shellPath = /bin/sh; |
340 | - 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"; | 340 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; |
341 | showEnvVarsInLog = 0; | 341 | showEnvVarsInLog = 0; |
342 | }; | 342 | }; |
343 | /* End PBXShellScriptBuildPhase section */ | 343 | /* End PBXShellScriptBuildPhase section */ |
@@ -27,18 +27,6 @@ | @@ -27,18 +27,6 @@ | ||
27 | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | 27 | selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
28 | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | 28 | selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
29 | shouldUseLaunchSchemeArgsEnv = "YES"> | 29 | shouldUseLaunchSchemeArgsEnv = "YES"> |
30 | - <Testables> | ||
31 | - <TestableReference | ||
32 | - skipped = "NO"> | ||
33 | - <BuildableReference | ||
34 | - BuildableIdentifier = "primary" | ||
35 | - BlueprintIdentifier = "00380F9121DF178D00097171" | ||
36 | - BuildableName = "RunnerUITests.xctest" | ||
37 | - BlueprintName = "RunnerUITests" | ||
38 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
39 | - </BuildableReference> | ||
40 | - </TestableReference> | ||
41 | - </Testables> | ||
42 | <MacroExpansion> | 30 | <MacroExpansion> |
43 | <BuildableReference | 31 | <BuildableReference |
44 | BuildableIdentifier = "primary" | 32 | BuildableIdentifier = "primary" |
@@ -75,7 +63,7 @@ | @@ -75,7 +63,7 @@ | ||
75 | </AdditionalOptions> | 63 | </AdditionalOptions> |
76 | </LaunchAction> | 64 | </LaunchAction> |
77 | <ProfileAction | 65 | <ProfileAction |
78 | - buildConfiguration = "Release" | 66 | + buildConfiguration = "Profile" |
79 | shouldUseLaunchSchemeArgsEnv = "YES" | 67 | shouldUseLaunchSchemeArgsEnv = "YES" |
80 | savedToolIdentifier = "" | 68 | savedToolIdentifier = "" |
81 | useCustomWorkingDirectory = "NO" | 69 | useCustomWorkingDirectory = "NO" |
@@ -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 © 2020 com.example. All rights reserved. | 14 | +PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. |
@@ -7,42 +7,42 @@ packages: | @@ -7,42 +7,42 @@ 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.2" | 10 | + version: "2.5.0-nullsafety.3" |
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.2" | 17 | + version: "2.1.0-nullsafety.3" |
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.4" | 24 | + version: "1.1.0-nullsafety.5" |
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.2" | 31 | + version: "1.2.0-nullsafety.3" |
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.2" | 38 | + version: "1.1.0-nullsafety.3" |
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.4" | 45 | + version: "1.15.0-nullsafety.5" |
46 | cupertino_icons: | 46 | cupertino_icons: |
47 | dependency: "direct main" | 47 | dependency: "direct main" |
48 | description: | 48 | description: |
@@ -56,7 +56,7 @@ packages: | @@ -56,7 +56,7 @@ packages: | ||
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.2" | 59 | + version: "1.2.0-nullsafety.3" |
60 | flutter: | 60 | flutter: |
61 | dependency: "direct main" | 61 | dependency: "direct main" |
62 | description: flutter | 62 | description: flutter |
@@ -67,53 +67,41 @@ packages: | @@ -67,53 +67,41 @@ 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.3-nullsafety.2" | ||
82 | matcher: | 70 | matcher: |
83 | dependency: transitive | 71 | dependency: transitive |
84 | description: | 72 | description: |
85 | name: matcher | 73 | name: matcher |
86 | url: "https://pub.dartlang.org" | 74 | url: "https://pub.dartlang.org" |
87 | source: hosted | 75 | source: hosted |
88 | - version: "0.12.10-nullsafety.2" | 76 | + version: "0.12.10-nullsafety.3" |
89 | meta: | 77 | meta: |
90 | dependency: transitive | 78 | dependency: transitive |
91 | description: | 79 | description: |
92 | name: meta | 80 | name: meta |
93 | url: "https://pub.dartlang.org" | 81 | url: "https://pub.dartlang.org" |
94 | source: hosted | 82 | source: hosted |
95 | - version: "1.3.0-nullsafety.5" | 83 | + version: "1.3.0-nullsafety.6" |
96 | modal_bottom_sheet: | 84 | modal_bottom_sheet: |
97 | dependency: "direct main" | 85 | dependency: "direct main" |
98 | description: | 86 | description: |
99 | path: ".." | 87 | path: ".." |
100 | relative: true | 88 | relative: true |
101 | source: path | 89 | source: path |
102 | - version: "1.0.0" | 90 | + version: "1.0.0+1" |
103 | path: | 91 | path: |
104 | dependency: transitive | 92 | dependency: transitive |
105 | description: | 93 | description: |
106 | name: path | 94 | name: path |
107 | url: "https://pub.dartlang.org" | 95 | url: "https://pub.dartlang.org" |
108 | source: hosted | 96 | source: hosted |
109 | - version: "1.8.0-nullsafety.2" | 97 | + version: "1.8.0-nullsafety.3" |
110 | plugin_platform_interface: | 98 | plugin_platform_interface: |
111 | dependency: transitive | 99 | dependency: transitive |
112 | description: | 100 | description: |
113 | name: plugin_platform_interface | 101 | name: plugin_platform_interface |
114 | url: "https://pub.dartlang.org" | 102 | url: "https://pub.dartlang.org" |
115 | source: hosted | 103 | source: hosted |
116 | - version: "1.0.3" | 104 | + version: "1.1.0-nullsafety.1" |
117 | sky_engine: | 105 | sky_engine: |
118 | dependency: transitive | 106 | dependency: transitive |
119 | description: flutter | 107 | description: flutter |
@@ -125,98 +113,91 @@ packages: | @@ -125,98 +113,91 @@ packages: | ||
125 | name: source_span | 113 | name: source_span |
126 | url: "https://pub.dartlang.org" | 114 | url: "https://pub.dartlang.org" |
127 | source: hosted | 115 | source: hosted |
128 | - version: "1.8.0-nullsafety.3" | 116 | + version: "1.8.0-nullsafety.4" |
129 | stack_trace: | 117 | stack_trace: |
130 | dependency: transitive | 118 | dependency: transitive |
131 | description: | 119 | description: |
132 | name: stack_trace | 120 | name: stack_trace |
133 | url: "https://pub.dartlang.org" | 121 | url: "https://pub.dartlang.org" |
134 | source: hosted | 122 | source: hosted |
135 | - version: "1.10.0-nullsafety.5" | 123 | + version: "1.10.0-nullsafety.6" |
136 | stream_channel: | 124 | stream_channel: |
137 | dependency: transitive | 125 | dependency: transitive |
138 | description: | 126 | description: |
139 | name: stream_channel | 127 | name: stream_channel |
140 | url: "https://pub.dartlang.org" | 128 | url: "https://pub.dartlang.org" |
141 | source: hosted | 129 | source: hosted |
142 | - version: "2.1.0-nullsafety.2" | 130 | + version: "2.1.0-nullsafety.3" |
143 | string_scanner: | 131 | string_scanner: |
144 | dependency: transitive | 132 | dependency: transitive |
145 | description: | 133 | description: |
146 | name: string_scanner | 134 | name: string_scanner |
147 | url: "https://pub.dartlang.org" | 135 | url: "https://pub.dartlang.org" |
148 | source: hosted | 136 | source: hosted |
149 | - version: "1.1.0-nullsafety.2" | 137 | + version: "1.1.0-nullsafety.3" |
150 | term_glyph: | 138 | term_glyph: |
151 | dependency: transitive | 139 | dependency: transitive |
152 | description: | 140 | description: |
153 | name: term_glyph | 141 | name: term_glyph |
154 | url: "https://pub.dartlang.org" | 142 | url: "https://pub.dartlang.org" |
155 | source: hosted | 143 | source: hosted |
156 | - version: "1.2.0-nullsafety.2" | 144 | + version: "1.2.0-nullsafety.3" |
157 | test_api: | 145 | test_api: |
158 | dependency: transitive | 146 | dependency: transitive |
159 | description: | 147 | description: |
160 | name: test_api | 148 | name: test_api |
161 | url: "https://pub.dartlang.org" | 149 | url: "https://pub.dartlang.org" |
162 | source: hosted | 150 | source: hosted |
163 | - version: "0.2.19-nullsafety.4" | 151 | + version: "0.2.19-nullsafety.6" |
164 | typed_data: | 152 | typed_data: |
165 | dependency: transitive | 153 | dependency: transitive |
166 | description: | 154 | description: |
167 | name: typed_data | 155 | name: typed_data |
168 | url: "https://pub.dartlang.org" | 156 | url: "https://pub.dartlang.org" |
169 | source: hosted | 157 | source: hosted |
170 | - version: "1.3.0-nullsafety.4" | 158 | + version: "1.3.0-nullsafety.5" |
171 | url_launcher: | 159 | url_launcher: |
172 | dependency: "direct main" | 160 | dependency: "direct main" |
173 | description: | 161 | description: |
174 | name: url_launcher | 162 | name: url_launcher |
175 | url: "https://pub.dartlang.org" | 163 | url: "https://pub.dartlang.org" |
176 | source: hosted | 164 | source: hosted |
177 | - version: "5.7.10" | 165 | + version: "6.0.0-nullsafety.1" |
178 | url_launcher_linux: | 166 | url_launcher_linux: |
179 | dependency: transitive | 167 | dependency: transitive |
180 | description: | 168 | description: |
181 | name: url_launcher_linux | 169 | name: url_launcher_linux |
182 | url: "https://pub.dartlang.org" | 170 | url: "https://pub.dartlang.org" |
183 | source: hosted | 171 | source: hosted |
184 | - version: "0.0.1+4" | 172 | + version: "0.1.0-nullsafety.1" |
185 | url_launcher_macos: | 173 | url_launcher_macos: |
186 | dependency: transitive | 174 | dependency: transitive |
187 | description: | 175 | description: |
188 | name: url_launcher_macos | 176 | name: url_launcher_macos |
189 | url: "https://pub.dartlang.org" | 177 | url: "https://pub.dartlang.org" |
190 | source: hosted | 178 | source: hosted |
191 | - version: "0.0.1+9" | 179 | + version: "0.1.0-nullsafety.1" |
192 | url_launcher_platform_interface: | 180 | url_launcher_platform_interface: |
193 | dependency: transitive | 181 | dependency: transitive |
194 | description: | 182 | description: |
195 | name: url_launcher_platform_interface | 183 | name: url_launcher_platform_interface |
196 | url: "https://pub.dartlang.org" | 184 | url: "https://pub.dartlang.org" |
197 | source: hosted | 185 | source: hosted |
198 | - version: "1.0.9" | ||
199 | - url_launcher_web: | ||
200 | - dependency: transitive | ||
201 | - description: | ||
202 | - name: url_launcher_web | ||
203 | - url: "https://pub.dartlang.org" | ||
204 | - source: hosted | ||
205 | - version: "0.1.5+1" | 186 | + version: "2.0.0-nullsafety.1" |
206 | url_launcher_windows: | 187 | url_launcher_windows: |
207 | dependency: transitive | 188 | dependency: transitive |
208 | description: | 189 | description: |
209 | name: url_launcher_windows | 190 | name: url_launcher_windows |
210 | url: "https://pub.dartlang.org" | 191 | url: "https://pub.dartlang.org" |
211 | source: hosted | 192 | source: hosted |
212 | - version: "0.0.1+3" | 193 | + version: "0.1.0-nullsafety.1" |
213 | vector_math: | 194 | vector_math: |
214 | dependency: transitive | 195 | dependency: transitive |
215 | description: | 196 | description: |
216 | name: vector_math | 197 | name: vector_math |
217 | url: "https://pub.dartlang.org" | 198 | url: "https://pub.dartlang.org" |
218 | source: hosted | 199 | source: hosted |
219 | - version: "2.1.0-nullsafety.4" | 200 | + version: "2.1.0-nullsafety.5" |
220 | sdks: | 201 | sdks: |
221 | - dart: ">=2.11.0-0.0 <2.12.0" | ||
222 | - flutter: ">=1.22.0 <2.0.0" | 202 | + dart: ">=2.12.0-29.10.beta <3.0.0" |
203 | + flutter: ">=1.12.13+hotfix.5 <2.0.0" |
@@ -14,12 +14,12 @@ description: A new Flutter project. | @@ -14,12 +14,12 @@ description: A new Flutter project. | ||
14 | version: 1.0.0+1 | 14 | version: 1.0.0+1 |
15 | 15 | ||
16 | environment: | 16 | environment: |
17 | - sdk: ">=2.7.0 <3.0.0" | 17 | + sdk: ">=2.12.0-29.10.beta <3.0.0" |
18 | 18 | ||
19 | dependencies: | 19 | dependencies: |
20 | flutter: | 20 | flutter: |
21 | sdk: flutter | 21 | sdk: flutter |
22 | - url_launcher: ^5.4.2 | 22 | + url_launcher: 6.0.0-nullsafety.1 |
23 | modal_bottom_sheet: | 23 | modal_bottom_sheet: |
24 | path: '../' | 24 | path: '../' |
25 | 25 |
example/web/icons/image.png
deleted
100644 → 0

609 KB
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | - <meta charset="UTF-8"> | ||
5 | - <meta content="IE=Edge" http-equiv="X-UA-Compatible"> | ||
6 | - <!-- Primary Meta Tags --> | ||
7 | - <title>Flutter Modal Bottom Sheets</title> | ||
8 | - <meta name="title" content="Flutter Modal Bottom Sheets"> | ||
9 | - <meta name="description" content="Build advanced modals. Cupertino, material or create your own"> | 4 | + <!-- |
5 | + If you are serving your web app in a path other than the root, change the | ||
6 | + href value below to reflect the base path you are serving from. | ||
7 | + | ||
8 | + The path provided below has to start and end with a slash "/" in order for | ||
9 | + it to work correctly. | ||
10 | 10 | ||
11 | - <!-- Open Graph / Facebook --> | ||
12 | - <meta property="og:type" content="website"> | ||
13 | - <meta property="og:url" content="https://jamesblasco.github.io/modal_bottom_sheet/"> | ||
14 | - <meta property="og:title" content="Flutter Modal Bottom Sheets"> | ||
15 | - <meta property="og:description" content="Build advanced modals. Cupertino, material or create your own"> | ||
16 | - <meta property="og:image" content="https://jamesblasco.github.io/modal_bottom_sheet/icons/image.png"> | 11 | + Fore more details: |
12 | + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base | ||
13 | + --> | ||
14 | + <base href="/"> | ||
17 | 15 | ||
18 | - <!-- Twitter --> | ||
19 | - <meta property="twitter:card" content="summary_large_image"> | ||
20 | - <meta property="twitter:url" content="https://jamesblasco.github.io/modal_bottom_sheet/"> | ||
21 | - <meta property="twitter:title" content="Flutter Modal Bottom Sheets"> | ||
22 | - <meta property="twitter:description" content="Build advanced modals. Cupertino, material or create your own"> | ||
23 | - <meta property="og:image" content="https://jamesblasco.github.io/modal_bottom_sheet/icons/image.png"> | 16 | + <meta charset="UTF-8"> |
17 | + <meta content="IE=Edge" http-equiv="X-UA-Compatible"> | ||
18 | + <meta name="description" content="A new Flutter project."> | ||
24 | 19 | ||
25 | <!-- iOS meta tags & icons --> | 20 | <!-- iOS meta tags & icons --> |
26 | <meta name="apple-mobile-web-app-capable" content="yes"> | 21 | <meta name="apple-mobile-web-app-capable" content="yes"> |
27 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> | 22 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
28 | <meta name="apple-mobile-web-app-title" content="example"> | 23 | <meta name="apple-mobile-web-app-title" content="example"> |
29 | - <link rel="apple-touch-icon" href="/icons/Icon-192.png"> | 24 | + <link rel="apple-touch-icon" href="icons/Icon-192.png"> |
30 | 25 | ||
31 | <!-- Favicon --> | 26 | <!-- Favicon --> |
32 | - <link rel="shortcut icon" type="image/png" href="/favicon.png"/> | 27 | + <link rel="icon" type="image/png" href="favicon.png"/> |
33 | 28 | ||
34 | - <link rel="manifest" href="/manifest.json"> | 29 | + <title>example</title> |
30 | + <link rel="manifest" href="manifest.json"> | ||
35 | </head> | 31 | </head> |
36 | <body> | 32 | <body> |
37 | <!-- This script installs service_worker.js to provide PWA functionality to | 33 | <!-- This script installs service_worker.js to provide PWA functionality to |
@@ -39,10 +35,8 @@ | @@ -39,10 +35,8 @@ | ||
39 | https://developers.google.com/web/fundamentals/primers/service-workers --> | 35 | https://developers.google.com/web/fundamentals/primers/service-workers --> |
40 | <script> | 36 | <script> |
41 | if ('serviceWorker' in navigator) { | 37 | if ('serviceWorker' in navigator) { |
42 | - window.addEventListener('load', function () { | ||
43 | - navigator.serviceWorker.register('flutter_service_worker.js', { | ||
44 | - scope: './' | ||
45 | - }); | 38 | + window.addEventListener('flutter-first-frame', function () { |
39 | + navigator.serviceWorker.register('flutter_service_worker.js'); | ||
46 | }); | 40 | }); |
47 | } | 41 | } |
48 | </script> | 42 | </script> |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | "name": "example", | 2 | "name": "example", |
3 | "short_name": "example", | 3 | "short_name": "example", |
4 | "start_url": ".", | 4 | "start_url": ".", |
5 | - "display": "minimal-ui", | 5 | + "display": "standalone", |
6 | "background_color": "#0175C2", | 6 | "background_color": "#0175C2", |
7 | "theme_color": "#0175C2", | 7 | "theme_color": "#0175C2", |
8 | "description": "A new Flutter project.", | 8 | "description": "A new Flutter project.", |
@@ -37,18 +37,18 @@ typedef WidgetWithChildBuilder = Widget Function( | @@ -37,18 +37,18 @@ typedef WidgetWithChildBuilder = Widget Function( | ||
37 | class ModalBottomSheet extends StatefulWidget { | 37 | class ModalBottomSheet extends StatefulWidget { |
38 | /// Creates a bottom sheet. | 38 | /// Creates a bottom sheet. |
39 | const ModalBottomSheet({ | 39 | const ModalBottomSheet({ |
40 | - Key key, | 40 | + Key? key, |
41 | this.closeProgressThreshold, | 41 | this.closeProgressThreshold, |
42 | - this.animationController, | 42 | + required this.animationController, |
43 | this.animationCurve, | 43 | this.animationCurve, |
44 | this.enableDrag = true, | 44 | this.enableDrag = true, |
45 | this.containerBuilder, | 45 | this.containerBuilder, |
46 | this.bounce = true, | 46 | this.bounce = true, |
47 | this.shouldClose, | 47 | this.shouldClose, |
48 | - this.scrollController, | ||
49 | - this.expanded, | ||
50 | - @required this.onClosing, | ||
51 | - @required this.child, | 48 | + required this.scrollController, |
49 | + required this.expanded, | ||
50 | + required this.onClosing, | ||
51 | + required this.child, | ||
52 | }) : assert(enableDrag != null), | 52 | }) : assert(enableDrag != null), |
53 | assert(onClosing != null), | 53 | assert(onClosing != null), |
54 | assert(child != null), | 54 | assert(child != null), |
@@ -56,7 +56,7 @@ class ModalBottomSheet extends StatefulWidget { | @@ -56,7 +56,7 @@ class ModalBottomSheet extends StatefulWidget { | ||
56 | 56 | ||
57 | /// The closeProgressThreshold parameter | 57 | /// The closeProgressThreshold parameter |
58 | /// specifies when the bottom sheet will be dismissed when user drags it. | 58 | /// specifies when the bottom sheet will be dismissed when user drags it. |
59 | - final double closeProgressThreshold; | 59 | + final double? closeProgressThreshold; |
60 | 60 | ||
61 | /// The animation controller that controls the bottom sheet's entrance and | 61 | /// The animation controller that controls the bottom sheet's entrance and |
62 | /// exit animations. | 62 | /// exit animations. |
@@ -68,7 +68,7 @@ class ModalBottomSheet extends StatefulWidget { | @@ -68,7 +68,7 @@ class ModalBottomSheet extends StatefulWidget { | ||
68 | /// The curve used by the animation showing and dismissing the bottom sheet. | 68 | /// The curve used by the animation showing and dismissing the bottom sheet. |
69 | /// | 69 | /// |
70 | /// If no curve is provided it falls back to `decelerateEasing`. | 70 | /// If no curve is provided it falls back to `decelerateEasing`. |
71 | - final Curve animationCurve; | 71 | + final Curve? animationCurve; |
72 | 72 | ||
73 | /// Allows the bottom sheet to go beyond the top bound of the content, | 73 | /// Allows the bottom sheet to go beyond the top bound of the content, |
74 | /// but then bounce the content back to the edge of | 74 | /// but then bounce the content back to the edge of |
@@ -79,7 +79,7 @@ class ModalBottomSheet extends StatefulWidget { | @@ -79,7 +79,7 @@ class ModalBottomSheet extends StatefulWidget { | ||
79 | // or if false it will fit to the content of the widget | 79 | // or if false it will fit to the content of the widget |
80 | final bool expanded; | 80 | final bool expanded; |
81 | 81 | ||
82 | - final WidgetWithChildBuilder containerBuilder; | 82 | + final WidgetWithChildBuilder? containerBuilder; |
83 | 83 | ||
84 | /// Called when the bottom sheet begins to close. | 84 | /// Called when the bottom sheet begins to close. |
85 | /// | 85 | /// |
@@ -93,7 +93,7 @@ class ModalBottomSheet extends StatefulWidget { | @@ -93,7 +93,7 @@ class ModalBottomSheet extends StatefulWidget { | ||
93 | // If returns false => The dialog cancels close | 93 | // If returns false => The dialog cancels close |
94 | // Notice that if shouldClose is not null, the dialog will go back to the | 94 | // Notice that if shouldClose is not null, the dialog will go back to the |
95 | // previous position until the function is solved | 95 | // previous position until the function is solved |
96 | - final Future<bool> Function() shouldClose; | 96 | + final Future<bool> Function()? shouldClose; |
97 | 97 | ||
98 | /// A builder for the contents of the sheet. | 98 | /// A builder for the contents of the sheet. |
99 | /// | 99 | /// |
@@ -118,7 +118,7 @@ class ModalBottomSheet extends StatefulWidget { | @@ -118,7 +118,7 @@ class ModalBottomSheet extends StatefulWidget { | ||
118 | /// animation controller could be provided. | 118 | /// animation controller could be provided. |
119 | static AnimationController createAnimationController( | 119 | static AnimationController createAnimationController( |
120 | TickerProvider vsync, { | 120 | TickerProvider vsync, { |
121 | - Duration duration, | 121 | + Duration? duration, |
122 | }) { | 122 | }) { |
123 | return AnimationController( | 123 | return AnimationController( |
124 | duration: duration ?? _bottomSheetDuration, | 124 | duration: duration ?? _bottomSheetDuration, |
@@ -134,10 +134,11 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -134,10 +134,11 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
134 | 134 | ||
135 | ScrollController get _scrollController => widget.scrollController; | 135 | ScrollController get _scrollController => widget.scrollController; |
136 | 136 | ||
137 | - AnimationController _bounceDragController; | 137 | + late AnimationController _bounceDragController; |
138 | 138 | ||
139 | - double get _childHeight { | ||
140 | - final renderBox = _childKey.currentContext.findRenderObject() as RenderBox; | 139 | + double? get _childHeight { |
140 | + final childContext = _childKey.currentContext; | ||
141 | + final renderBox = childContext?.findRenderObject() as RenderBox; | ||
141 | return renderBox.size.height; | 142 | return renderBox.size.height; |
142 | } | 143 | } |
143 | 144 | ||
@@ -176,14 +177,14 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -176,14 +177,14 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
176 | 177 | ||
177 | FutureOr<bool> shouldClose() async { | 178 | FutureOr<bool> shouldClose() async { |
178 | if (_isCheckingShouldClose) return false; | 179 | if (_isCheckingShouldClose) return false; |
179 | - if (widget.shouldClose == null) return null; | 180 | + if (widget.shouldClose == null) return false; |
180 | _isCheckingShouldClose = true; | 181 | _isCheckingShouldClose = true; |
181 | - final result = await widget.shouldClose(); | 182 | + final result = await widget.shouldClose?.call(); |
182 | _isCheckingShouldClose = false; | 183 | _isCheckingShouldClose = false; |
183 | - return result; | 184 | + return result ?? false; |
184 | } | 185 | } |
185 | 186 | ||
186 | - ParametricCurve<double> animationCurve; | 187 | + ParametricCurve<double> animationCurve = Curves.linear; |
187 | 188 | ||
188 | void _handleDragUpdate(double primaryDelta) async { | 189 | void _handleDragUpdate(double primaryDelta) async { |
189 | animationCurve = Curves.linear; | 190 | animationCurve = Curves.linear; |
@@ -230,7 +231,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -230,7 +231,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
230 | // ignore: unawaited_futures | 231 | // ignore: unawaited_futures |
231 | _bounceDragController.reverse(); | 232 | _bounceDragController.reverse(); |
232 | 233 | ||
233 | - var canClose = true; | 234 | + bool canClose = true; |
234 | if (widget.shouldClose != null && hasReachedWillPopThreshold) { | 235 | if (widget.shouldClose != null && hasReachedWillPopThreshold) { |
235 | _cancelClose(); | 236 | _cancelClose(); |
236 | canClose = await shouldClose(); | 237 | canClose = await shouldClose(); |
@@ -257,10 +258,11 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -257,10 +258,11 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
257 | // we can not know the DragDownDetails and therefore the end velocity. | 258 | // we can not know the DragDownDetails and therefore the end velocity. |
258 | // VelocityTracker it is used to calculate the end velocity of the scroll | 259 | // VelocityTracker it is used to calculate the end velocity of the scroll |
259 | // when user is trying to close the modal by dragging | 260 | // when user is trying to close the modal by dragging |
260 | - VelocityTracker _velocityTracker; | ||
261 | - DateTime _startTime; | 261 | + VelocityTracker? _velocityTracker; |
262 | + DateTime? _startTime; | ||
262 | 263 | ||
263 | void _handleScrollUpdate(ScrollNotification notification) { | 264 | void _handleScrollUpdate(ScrollNotification notification) { |
265 | + assert(notification.context != null); | ||
264 | //Check if scrollController is used | 266 | //Check if scrollController is used |
265 | if (!_scrollController.hasClients) return; | 267 | if (!_scrollController.hasClients) return; |
266 | //Check if there is more than 1 attached ScrollController e.g. swiping page in PageView | 268 | //Check if there is more than 1 attached ScrollController e.g. swiping page in PageView |
@@ -268,7 +270,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -268,7 +270,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
268 | if (_scrollController.positions.length > 1) return; | 270 | if (_scrollController.positions.length > 1) return; |
269 | 271 | ||
270 | if (_scrollController != | 272 | if (_scrollController != |
271 | - Scrollable.of(notification.context).widget.controller) return; | 273 | + Scrollable.of(notification.context!)!.widget.controller) return; |
272 | 274 | ||
273 | final scrollPosition = _scrollController.position; | 275 | final scrollPosition = _scrollController.position; |
274 | 276 | ||
@@ -284,13 +286,15 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -284,13 +286,15 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
284 | // while Bouncing Scroll Physics or other physics that Overflow don't return a drag end info | 286 | // while Bouncing Scroll Physics or other physics that Overflow don't return a drag end info |
285 | 287 | ||
286 | // We use the velocity from DragEndDetail in case it is available | 288 | // We use the velocity from DragEndDetail in case it is available |
287 | - if (notification is ScrollEndNotification && | ||
288 | - notification.dragDetails != null) { | ||
289 | - _handleDragEnd(notification.dragDetails.primaryVelocity); | 289 | + if (notification is ScrollEndNotification) { |
290 | + final dragDetails = notification.dragDetails; | ||
291 | + if (dragDetails != null) { | ||
292 | + _handleDragEnd(dragDetails.primaryVelocity ?? 0); | ||
290 | _velocityTracker = null; | 293 | _velocityTracker = null; |
291 | _startTime = null; | 294 | _startTime = null; |
292 | return; | 295 | return; |
293 | } | 296 | } |
297 | + } | ||
294 | 298 | ||
295 | // Otherwise the calculate the velocity with a VelocityTracker | 299 | // Otherwise the calculate the velocity with a VelocityTracker |
296 | if (_velocityTracker == null) { | 300 | if (_velocityTracker == null) { |
@@ -299,19 +303,24 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -299,19 +303,24 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
299 | _velocityTracker = VelocityTracker(); | 303 | _velocityTracker = VelocityTracker(); |
300 | _startTime = DateTime.now(); | 304 | _startTime = DateTime.now(); |
301 | } | 305 | } |
302 | - DragUpdateDetails dragDetails; | 306 | + |
307 | + DragUpdateDetails? dragDetails; | ||
303 | if (notification is ScrollUpdateNotification) { | 308 | if (notification is ScrollUpdateNotification) { |
304 | dragDetails = notification.dragDetails; | 309 | dragDetails = notification.dragDetails; |
305 | } | 310 | } |
306 | if (notification is OverscrollNotification) { | 311 | if (notification is OverscrollNotification) { |
307 | dragDetails = notification.dragDetails; | 312 | dragDetails = notification.dragDetails; |
308 | } | 313 | } |
314 | + assert(_velocityTracker != null); | ||
315 | + assert(_startTime != null); | ||
316 | + final startTime = _startTime!; | ||
317 | + final velocityTracker = _velocityTracker!; | ||
309 | if (dragDetails != null) { | 318 | if (dragDetails != null) { |
310 | - final duration = _startTime.difference(DateTime.now()); | ||
311 | - _velocityTracker.addPosition(duration, Offset(0, offset)); | 319 | + final duration = startTime.difference(DateTime.now()); |
320 | + velocityTracker.addPosition(duration, Offset(0, offset)); | ||
312 | _handleDragUpdate(dragDetails.delta.dy); | 321 | _handleDragUpdate(dragDetails.delta.dy); |
313 | } else if (isDragging) { | 322 | } else if (isDragging) { |
314 | - final velocity = _velocityTracker.getVelocity().pixelsPerSecond.dy; | 323 | + final velocity = velocityTracker.getVelocity().pixelsPerSecond.dy; |
315 | _velocityTracker = null; | 324 | _velocityTracker = null; |
316 | _startTime = null; | 325 | _startTime = null; |
317 | _handleDragEnd(velocity); | 326 | _handleDragEnd(velocity); |
@@ -319,8 +328,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -319,8 +328,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
319 | } | 328 | } |
320 | } | 329 | } |
321 | 330 | ||
322 | - ParametricCurve<double> get _defaultCurve => | ||
323 | - widget.animationCurve ?? _modalBottomSheetCurve; | 331 | + Curve get _defaultCurve => widget.animationCurve ?? _modalBottomSheetCurve; |
324 | 332 | ||
325 | @override | 333 | @override |
326 | void initState() { | 334 | void initState() { |
@@ -341,7 +349,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -341,7 +349,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
341 | 349 | ||
342 | var child = widget.child; | 350 | var child = widget.child; |
343 | if (widget.containerBuilder != null) { | 351 | if (widget.containerBuilder != null) { |
344 | - child = widget.containerBuilder( | 352 | + child = widget.containerBuilder!( |
345 | context, | 353 | context, |
346 | widget.animationController, | 354 | widget.animationController, |
347 | child, | 355 | child, |
@@ -352,7 +360,8 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -352,7 +360,8 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
352 | 360 | ||
353 | child = AnimatedBuilder( | 361 | child = AnimatedBuilder( |
354 | animation: widget.animationController, | 362 | animation: widget.animationController, |
355 | - builder: (context, child) { | 363 | + builder: (context, Widget? child) { |
364 | + assert(child != null); | ||
356 | final animationValue = animationCurve.transform( | 365 | final animationValue = animationCurve.transform( |
357 | mediaQuery.accessibleNavigation | 366 | mediaQuery.accessibleNavigation |
358 | ? 1.0 | 367 | ? 1.0 |
@@ -371,14 +380,14 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -371,14 +380,14 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
371 | _handleDragUpdate(details.delta.dy); | 380 | _handleDragUpdate(details.delta.dy); |
372 | }, | 381 | }, |
373 | onVerticalDragEnd: (details) { | 382 | onVerticalDragEnd: (details) { |
374 | - _handleDragEnd(details.primaryVelocity); | 383 | + _handleDragEnd(details.primaryVelocity ?? 0); |
375 | }, | 384 | }, |
376 | child: NotificationListener<ScrollNotification>( | 385 | child: NotificationListener<ScrollNotification>( |
377 | onNotification: (ScrollNotification notification) { | 386 | onNotification: (ScrollNotification notification) { |
378 | _handleScrollUpdate(notification); | 387 | _handleScrollUpdate(notification); |
379 | return false; | 388 | return false; |
380 | }, | 389 | }, |
381 | - child: child, | 390 | + child: child!, |
382 | ), | 391 | ), |
383 | ), | 392 | ), |
384 | ), | 393 | ), |
@@ -435,7 +444,7 @@ class _CustomBottomSheetLayout extends SingleChildLayoutDelegate { | @@ -435,7 +444,7 @@ class _CustomBottomSheetLayout extends SingleChildLayoutDelegate { | ||
435 | _CustomBottomSheetLayout(this.progress); | 444 | _CustomBottomSheetLayout(this.progress); |
436 | 445 | ||
437 | final double progress; | 446 | final double progress; |
438 | - double childHeight; | 447 | + double? childHeight; |
439 | 448 | ||
440 | @override | 449 | @override |
441 | BoxConstraints getConstraintsForChild(BoxConstraints constraints) { | 450 | BoxConstraints getConstraintsForChild(BoxConstraints constraints) { |
@@ -468,7 +477,7 @@ class _CustomBottomSheetLayout extends SingleChildLayoutDelegate { | @@ -468,7 +477,7 @@ class _CustomBottomSheetLayout extends SingleChildLayoutDelegate { | ||
468 | // Used with VelocityTracker | 477 | // Used with VelocityTracker |
469 | // https://github.com/flutter/flutter/pull/64267#issuecomment-694196304 | 478 | // https://github.com/flutter/flutter/pull/64267#issuecomment-694196304 |
470 | PointerDeviceKind defaultPointerDeviceKind(BuildContext context) { | 479 | PointerDeviceKind defaultPointerDeviceKind(BuildContext context) { |
471 | - final platform = Theme.of(context)?.platform ?? defaultTargetPlatform; | 480 | + final platform = Theme.of(context).platform; // ?? defaultTargetPlatform; |
472 | switch (platform) { | 481 | switch (platform) { |
473 | case TargetPlatform.iOS: | 482 | case TargetPlatform.iOS: |
474 | case TargetPlatform.android: | 483 | case TargetPlatform.android: |
@@ -11,9 +11,9 @@ const Duration _bottomSheetDuration = Duration(milliseconds: 400); | @@ -11,9 +11,9 @@ const Duration _bottomSheetDuration = Duration(milliseconds: 400); | ||
11 | 11 | ||
12 | class _ModalBottomSheet<T> extends StatefulWidget { | 12 | class _ModalBottomSheet<T> extends StatefulWidget { |
13 | const _ModalBottomSheet({ | 13 | const _ModalBottomSheet({ |
14 | - Key key, | 14 | + Key? key, |
15 | this.closeProgressThreshold, | 15 | this.closeProgressThreshold, |
16 | - this.route, | 16 | + required this.route, |
17 | this.secondAnimationController, | 17 | this.secondAnimationController, |
18 | this.bounce = false, | 18 | this.bounce = false, |
19 | this.expanded = false, | 19 | this.expanded = false, |
@@ -23,13 +23,13 @@ class _ModalBottomSheet<T> extends StatefulWidget { | @@ -23,13 +23,13 @@ class _ModalBottomSheet<T> extends StatefulWidget { | ||
23 | assert(enableDrag != null), | 23 | assert(enableDrag != null), |
24 | super(key: key); | 24 | super(key: key); |
25 | 25 | ||
26 | - final double closeProgressThreshold; | 26 | + final double? closeProgressThreshold; |
27 | final ModalBottomSheetRoute<T> route; | 27 | final ModalBottomSheetRoute<T> route; |
28 | final bool expanded; | 28 | final bool expanded; |
29 | final bool bounce; | 29 | final bool bounce; |
30 | final bool enableDrag; | 30 | final bool enableDrag; |
31 | - final AnimationController secondAnimationController; | ||
32 | - final Curve animationCurve; | 31 | + final AnimationController? secondAnimationController; |
32 | + final Curve? animationCurve; | ||
33 | 33 | ||
34 | @override | 34 | @override |
35 | _ModalBottomSheetState<T> createState() => _ModalBottomSheetState<T>(); | 35 | _ModalBottomSheetState<T> createState() => _ModalBottomSheetState<T>(); |
@@ -37,7 +37,7 @@ class _ModalBottomSheet<T> extends StatefulWidget { | @@ -37,7 +37,7 @@ class _ModalBottomSheet<T> extends StatefulWidget { | ||
37 | 37 | ||
38 | class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | 38 | class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { |
39 | String _getRouteLabel() { | 39 | String _getRouteLabel() { |
40 | - final platform = Theme.of(context)?.platform ?? defaultTargetPlatform; | 40 | + final platform = Theme.of(context).platform; //?? defaultTargetPlatform; |
41 | switch (platform) { | 41 | switch (platform) { |
42 | case TargetPlatform.iOS: | 42 | case TargetPlatform.iOS: |
43 | case TargetPlatform.linux: | 43 | case TargetPlatform.linux: |
@@ -52,39 +52,43 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | @@ -52,39 +52,43 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | ||
52 | return DefaultMaterialLocalizations().dialogLabel; | 52 | return DefaultMaterialLocalizations().dialogLabel; |
53 | } | 53 | } |
54 | } | 54 | } |
55 | - return null; | ||
56 | } | 55 | } |
57 | 56 | ||
58 | - ScrollController _scrollController; | 57 | + ScrollController? _scrollController; |
59 | 58 | ||
60 | @override | 59 | @override |
61 | void initState() { | 60 | void initState() { |
62 | - widget.route.animation.addListener(updateController); | 61 | + widget.route.animation?.addListener(updateController); |
63 | super.initState(); | 62 | super.initState(); |
64 | } | 63 | } |
65 | 64 | ||
66 | @override | 65 | @override |
67 | void dispose() { | 66 | void dispose() { |
68 | - widget.route.animation.removeListener(updateController); | 67 | + widget.route.animation?.removeListener(updateController); |
69 | _scrollController?.dispose(); | 68 | _scrollController?.dispose(); |
70 | super.dispose(); | 69 | super.dispose(); |
71 | } | 70 | } |
72 | 71 | ||
73 | void updateController() { | 72 | void updateController() { |
74 | - widget.secondAnimationController?.value = widget.route.animation.value; | 73 | + final animation = widget.route.animation; |
74 | + if (animation != null) { | ||
75 | + widget.secondAnimationController?.value = animation.value; | ||
76 | + } | ||
75 | } | 77 | } |
76 | 78 | ||
77 | @override | 79 | @override |
78 | Widget build(BuildContext context) { | 80 | Widget build(BuildContext context) { |
79 | assert(debugCheckHasMediaQuery(context)); | 81 | assert(debugCheckHasMediaQuery(context)); |
82 | + assert(widget.route._animationController != null); | ||
80 | final scrollController = PrimaryScrollController.of(context) ?? | 83 | final scrollController = PrimaryScrollController.of(context) ?? |
81 | (_scrollController ??= ScrollController()); | 84 | (_scrollController ??= ScrollController()); |
82 | return ModalScrollController( | 85 | return ModalScrollController( |
83 | controller: scrollController, | 86 | controller: scrollController, |
84 | child: Builder( | 87 | child: Builder( |
85 | builder: (context) => AnimatedBuilder( | 88 | builder: (context) => AnimatedBuilder( |
86 | - animation: widget.route._animationController, | ||
87 | - builder: (BuildContext context, Widget child) { | 89 | + animation: widget.route._animationController!, |
90 | + builder: (BuildContext context, final Widget? child) { | ||
91 | + assert(child != null); | ||
88 | // Disable the initial animation when accessible navigation is on so | 92 | // Disable the initial animation when accessible navigation is on so |
89 | // that the semantics are added to the tree at the correct time. | 93 | // that the semantics are added to the tree at the correct time. |
90 | return Semantics( | 94 | return Semantics( |
@@ -95,7 +99,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | @@ -95,7 +99,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | ||
95 | child: ModalBottomSheet( | 99 | child: ModalBottomSheet( |
96 | expanded: widget.route.expanded, | 100 | expanded: widget.route.expanded, |
97 | containerBuilder: widget.route.containerBuilder, | 101 | containerBuilder: widget.route.containerBuilder, |
98 | - animationController: widget.route._animationController, | 102 | + animationController: widget.route._animationController!, |
99 | shouldClose: widget.route._hasScopedWillPopCallback | 103 | shouldClose: widget.route._hasScopedWillPopCallback |
100 | ? () async { | 104 | ? () async { |
101 | final willPop = await widget.route.willPop(); | 105 | final willPop = await widget.route.willPop(); |
@@ -107,7 +111,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | @@ -107,7 +111,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> { | ||
107 | Navigator.of(context).pop(); | 111 | Navigator.of(context).pop(); |
108 | } | 112 | } |
109 | }, | 113 | }, |
110 | - child: child, | 114 | + child: child!, |
111 | enableDrag: widget.enableDrag, | 115 | enableDrag: widget.enableDrag, |
112 | bounce: widget.bounce, | 116 | bounce: widget.bounce, |
113 | scrollController: scrollController, | 117 | scrollController: scrollController, |
@@ -126,37 +130,37 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -126,37 +130,37 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
126 | ModalBottomSheetRoute({ | 130 | ModalBottomSheetRoute({ |
127 | this.closeProgressThreshold, | 131 | this.closeProgressThreshold, |
128 | this.containerBuilder, | 132 | this.containerBuilder, |
129 | - this.builder, | 133 | + required this.builder, |
130 | this.scrollController, | 134 | this.scrollController, |
131 | this.barrierLabel, | 135 | this.barrierLabel, |
132 | this.secondAnimationController, | 136 | this.secondAnimationController, |
133 | this.modalBarrierColor, | 137 | this.modalBarrierColor, |
134 | this.isDismissible = true, | 138 | this.isDismissible = true, |
135 | this.enableDrag = true, | 139 | this.enableDrag = true, |
136 | - @required this.expanded, | 140 | + required this.expanded, |
137 | this.bounce = false, | 141 | this.bounce = false, |
138 | this.animationCurve, | 142 | this.animationCurve, |
139 | this.duration, | 143 | this.duration, |
140 | - RouteSettings settings, | 144 | + RouteSettings? settings, |
141 | }) : assert(expanded != null), | 145 | }) : assert(expanded != null), |
142 | assert(isDismissible != null), | 146 | assert(isDismissible != null), |
143 | assert(enableDrag != null), | 147 | assert(enableDrag != null), |
144 | super(settings: settings); | 148 | super(settings: settings); |
145 | 149 | ||
146 | - final double closeProgressThreshold; | ||
147 | - final WidgetWithChildBuilder containerBuilder; | 150 | + final double? closeProgressThreshold; |
151 | + final WidgetWithChildBuilder? containerBuilder; | ||
148 | final WidgetBuilder builder; | 152 | final WidgetBuilder builder; |
149 | final bool expanded; | 153 | final bool expanded; |
150 | final bool bounce; | 154 | final bool bounce; |
151 | - final Color modalBarrierColor; | 155 | + final Color? modalBarrierColor; |
152 | final bool isDismissible; | 156 | final bool isDismissible; |
153 | final bool enableDrag; | 157 | final bool enableDrag; |
154 | - final ScrollController scrollController; | 158 | + final ScrollController? scrollController; |
155 | 159 | ||
156 | - final Duration duration; | 160 | + final Duration? duration; |
157 | 161 | ||
158 | - final AnimationController secondAnimationController; | ||
159 | - final Curve animationCurve; | 162 | + final AnimationController? secondAnimationController; |
163 | + final Curve? animationCurve; | ||
160 | 164 | ||
161 | @override | 165 | @override |
162 | Duration get transitionDuration => duration ?? _bottomSheetDuration; | 166 | Duration get transitionDuration => duration ?? _bottomSheetDuration; |
@@ -165,21 +169,21 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -165,21 +169,21 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
165 | bool get barrierDismissible => isDismissible; | 169 | bool get barrierDismissible => isDismissible; |
166 | 170 | ||
167 | @override | 171 | @override |
168 | - final String barrierLabel; | 172 | + final String? barrierLabel; |
169 | 173 | ||
170 | @override | 174 | @override |
171 | Color get barrierColor => modalBarrierColor ?? Colors.black.withOpacity(0.35); | 175 | Color get barrierColor => modalBarrierColor ?? Colors.black.withOpacity(0.35); |
172 | 176 | ||
173 | - AnimationController _animationController; | 177 | + AnimationController? _animationController; |
174 | 178 | ||
175 | @override | 179 | @override |
176 | AnimationController createAnimationController() { | 180 | AnimationController createAnimationController() { |
177 | assert(_animationController == null); | 181 | assert(_animationController == null); |
178 | _animationController = ModalBottomSheet.createAnimationController( | 182 | _animationController = ModalBottomSheet.createAnimationController( |
179 | - navigator.overlay, | ||
180 | - duration: duration, | 183 | + navigator!.overlay!, |
184 | + duration: transitionDuration, | ||
181 | ); | 185 | ); |
182 | - return _animationController; | 186 | + return _animationController!; |
183 | } | 187 | } |
184 | 188 | ||
185 | bool get _hasScopedWillPopCallback => hasScopedWillPopCallback; | 189 | bool get _hasScopedWillPopCallback => hasScopedWillPopCallback; |
@@ -223,23 +227,23 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | @@ -223,23 +227,23 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { | ||
223 | } | 227 | } |
224 | 228 | ||
225 | /// Shows a modal material design bottom sheet. | 229 | /// Shows a modal material design bottom sheet. |
226 | -Future<T> showCustomModalBottomSheet<T>({ | ||
227 | - @required BuildContext context, | ||
228 | - @required WidgetBuilder builder, | ||
229 | - @required WidgetWithChildBuilder containerWidget, | ||
230 | - Color backgroundColor, | ||
231 | - double elevation, | ||
232 | - ShapeBorder shape, | ||
233 | - Clip clipBehavior, | ||
234 | - Color barrierColor, | 230 | +Future<T?> showCustomModalBottomSheet<T>({ |
231 | + required BuildContext context, | ||
232 | + required WidgetBuilder builder, | ||
233 | + required WidgetWithChildBuilder containerWidget, | ||
234 | + Color? backgroundColor, | ||
235 | + double? elevation, | ||
236 | + ShapeBorder? shape, | ||
237 | + Clip? clipBehavior, | ||
238 | + Color? barrierColor, | ||
235 | bool bounce = false, | 239 | bool bounce = false, |
236 | bool expand = false, | 240 | bool expand = false, |
237 | - AnimationController secondAnimation, | ||
238 | - Curve animationCurve, | 241 | + AnimationController? secondAnimation, |
242 | + Curve? animationCurve, | ||
239 | bool useRootNavigator = false, | 243 | bool useRootNavigator = false, |
240 | bool isDismissible = true, | 244 | bool isDismissible = true, |
241 | bool enableDrag = true, | 245 | bool enableDrag = true, |
242 | - Duration duration, | 246 | + Duration? duration, |
243 | }) async { | 247 | }) async { |
244 | assert(context != null); | 248 | assert(context != null); |
245 | assert(builder != null); | 249 | assert(builder != null); |
@@ -10,19 +10,19 @@ const Radius _default_bar_top_radius = Radius.circular(15); | @@ -10,19 +10,19 @@ const Radius _default_bar_top_radius = 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; | ||
14 | - final Clip clipBehavior; | ||
15 | - final double elevation; | ||
16 | - final ShapeBorder shape; | 13 | + final Widget? control; |
14 | + final Clip? clipBehavior; | ||
15 | + final double? elevation; | ||
16 | + final ShapeBorder? shape; | ||
17 | 17 | ||
18 | - const BarBottomSheet( | ||
19 | - {Key key, | ||
20 | - this.child, | 18 | + const BarBottomSheet({ |
19 | + Key? key, | ||
20 | + required this.child, | ||
21 | this.control, | 21 | this.control, |
22 | this.clipBehavior, | 22 | this.clipBehavior, |
23 | this.shape, | 23 | this.shape, |
24 | - this.elevation}) | ||
25 | - : super(key: key); | 24 | + this.elevation, |
25 | + }) : super(key: key); | ||
26 | 26 | ||
27 | @override | 27 | @override |
28 | Widget build(BuildContext context) { | 28 | Widget build(BuildContext context) { |
@@ -70,24 +70,24 @@ class BarBottomSheet extends StatelessWidget { | @@ -70,24 +70,24 @@ class BarBottomSheet extends StatelessWidget { | ||
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | -Future<T> showBarModalBottomSheet<T>({ | ||
74 | - @required BuildContext context, | ||
75 | - @required WidgetBuilder builder, | ||
76 | - Color backgroundColor, | ||
77 | - double elevation, | ||
78 | - ShapeBorder shape, | ||
79 | - double closeProgressThreshold, | ||
80 | - Clip clipBehavior, | 73 | +Future<T?> showBarModalBottomSheet<T>({ |
74 | + required BuildContext context, | ||
75 | + required WidgetBuilder builder, | ||
76 | + Color? backgroundColor, | ||
77 | + double? elevation, | ||
78 | + ShapeBorder? shape, | ||
79 | + double? closeProgressThreshold, | ||
80 | + Clip? clipBehavior, | ||
81 | Color barrierColor = Colors.black87, | 81 | Color barrierColor = Colors.black87, |
82 | bool bounce = true, | 82 | bool bounce = true, |
83 | bool expand = false, | 83 | bool expand = false, |
84 | - AnimationController secondAnimation, | ||
85 | - Curve animationCurve, | 84 | + AnimationController? secondAnimation, |
85 | + Curve? animationCurve, | ||
86 | bool useRootNavigator = false, | 86 | bool useRootNavigator = false, |
87 | bool isDismissible = true, | 87 | bool isDismissible = true, |
88 | bool enableDrag = true, | 88 | bool enableDrag = true, |
89 | - Widget topControl, | ||
90 | - Duration duration, | 89 | + Widget? topControl, |
90 | + Duration? duration, | ||
91 | }) async { | 91 | }) async { |
92 | assert(context != null); | 92 | assert(context != null); |
93 | assert(builder != null); | 93 | assert(builder != null); |
@@ -30,12 +30,15 @@ const Radius _default_top_radius = Radius.circular(12); | @@ -30,12 +30,15 @@ const Radius _default_top_radius = Radius.circular(12); | ||
30 | /// is the height that will be displayed from previous route. | 30 | /// is the height that will be displayed from previous route. |
31 | class _CupertinoBottomSheetContainer extends StatelessWidget { | 31 | class _CupertinoBottomSheetContainer extends StatelessWidget { |
32 | final Widget child; | 32 | final Widget child; |
33 | - final Color backgroundColor; | 33 | + final Color? backgroundColor; |
34 | final Radius topRadius; | 34 | final Radius topRadius; |
35 | 35 | ||
36 | - const _CupertinoBottomSheetContainer( | ||
37 | - {Key key, this.child, this.backgroundColor, @required this.topRadius}) | ||
38 | - : super(key: key); | 36 | + const _CupertinoBottomSheetContainer({ |
37 | + Key? key, | ||
38 | + required this.child, | ||
39 | + this.backgroundColor, | ||
40 | + required this.topRadius, | ||
41 | + }) : super(key: key); | ||
39 | 42 | ||
40 | @override | 43 | @override |
41 | Widget build(BuildContext context) { | 44 | Widget build(BuildContext context) { |
@@ -65,27 +68,27 @@ class _CupertinoBottomSheetContainer extends StatelessWidget { | @@ -65,27 +68,27 @@ class _CupertinoBottomSheetContainer extends StatelessWidget { | ||
65 | } | 68 | } |
66 | } | 69 | } |
67 | 70 | ||
68 | -Future<T> showCupertinoModalBottomSheet<T>({ | ||
69 | - @required BuildContext context, | ||
70 | - @required WidgetBuilder builder, | ||
71 | - Color backgroundColor, | ||
72 | - double elevation, | ||
73 | - double closeProgressThreshold, | ||
74 | - ShapeBorder shape, | ||
75 | - Clip clipBehavior, | ||
76 | - Color barrierColor, | 71 | +Future<T?> showCupertinoModalBottomSheet<T>({ |
72 | + required BuildContext context, | ||
73 | + required WidgetBuilder builder, | ||
74 | + Color? backgroundColor, | ||
75 | + double? elevation, | ||
76 | + double? closeProgressThreshold, | ||
77 | + ShapeBorder? shape, | ||
78 | + Clip? clipBehavior, | ||
79 | + Color? barrierColor, | ||
77 | bool expand = false, | 80 | bool expand = false, |
78 | - AnimationController secondAnimation, | ||
79 | - Curve animationCurve, | ||
80 | - Curve previousRouteAnimationCurve, | 81 | + AnimationController? secondAnimation, |
82 | + Curve? animationCurve, | ||
83 | + Curve? previousRouteAnimationCurve, | ||
81 | bool useRootNavigator = false, | 84 | bool useRootNavigator = false, |
82 | bool bounce = true, | 85 | bool bounce = true, |
83 | - bool isDismissible, | 86 | + bool? isDismissible, |
84 | bool enableDrag = true, | 87 | bool enableDrag = true, |
85 | Radius topRadius = _default_top_radius, | 88 | Radius topRadius = _default_top_radius, |
86 | - Duration duration, | ||
87 | - RouteSettings settings, | ||
88 | - Color transitionBackgroundColor, | 89 | + Duration? duration, |
90 | + RouteSettings? settings, | ||
91 | + Color? transitionBackgroundColor, | ||
89 | }) async { | 92 | }) async { |
90 | assert(context != null); | 93 | assert(context != null); |
91 | assert(builder != null); | 94 | assert(builder != null); |
@@ -132,30 +135,30 @@ Future<T> showCupertinoModalBottomSheet<T>({ | @@ -132,30 +135,30 @@ Future<T> showCupertinoModalBottomSheet<T>({ | ||
132 | 135 | ||
133 | class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { | 136 | class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { |
134 | final Radius topRadius; | 137 | final Radius topRadius; |
135 | - final Curve previousRouteAnimationCurve; | 138 | + final Curve? previousRouteAnimationCurve; |
136 | 139 | ||
137 | // Background color behind all routes | 140 | // Background color behind all routes |
138 | // Black by default | 141 | // Black by default |
139 | - final Color transitionBackgroundColor; | 142 | + final Color? transitionBackgroundColor; |
140 | 143 | ||
141 | CupertinoModalBottomSheetRoute({ | 144 | CupertinoModalBottomSheetRoute({ |
142 | - WidgetBuilder builder, | ||
143 | - WidgetWithChildBuilder containerBuilder, | ||
144 | - double closeProgressThreshold, | ||
145 | - String barrierLabel, | ||
146 | - double elevation, | ||
147 | - ShapeBorder shape, | ||
148 | - Clip clipBehavior, | ||
149 | - AnimationController secondAnimationController, | ||
150 | - Curve animationCurve, | ||
151 | - Color modalBarrierColor, | 145 | + required WidgetBuilder builder, |
146 | + WidgetWithChildBuilder? containerBuilder, | ||
147 | + double? closeProgressThreshold, | ||
148 | + String? barrierLabel, | ||
149 | + double? elevation, | ||
150 | + ShapeBorder? shape, | ||
151 | + Clip? clipBehavior, | ||
152 | + AnimationController? secondAnimationController, | ||
153 | + Curve? animationCurve, | ||
154 | + Color? modalBarrierColor, | ||
152 | bool bounce = true, | 155 | bool bounce = true, |
153 | bool isDismissible = true, | 156 | bool isDismissible = true, |
154 | bool enableDrag = true, | 157 | bool enableDrag = true, |
155 | - @required bool expanded, | ||
156 | - Duration duration, | ||
157 | - RouteSettings settings, | ||
158 | - ScrollController scrollController, | 158 | + required bool expanded, |
159 | + Duration? duration, | ||
160 | + RouteSettings? settings, | ||
161 | + ScrollController? scrollController, | ||
159 | this.transitionBackgroundColor, | 162 | this.transitionBackgroundColor, |
160 | this.topRadius = _default_top_radius, | 163 | this.topRadius = _default_top_radius, |
161 | this.previousRouteAnimationCurve, | 164 | this.previousRouteAnimationCurve, |
@@ -221,16 +224,16 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { | @@ -221,16 +224,16 @@ class CupertinoModalBottomSheetRoute<T> extends ModalBottomSheetRoute<T> { | ||
221 | class _CupertinoModalTransition extends StatelessWidget { | 224 | class _CupertinoModalTransition extends StatelessWidget { |
222 | final Animation<double> secondaryAnimation; | 225 | final Animation<double> secondaryAnimation; |
223 | final Radius topRadius; | 226 | final Radius topRadius; |
224 | - final Curve animationCurve; | 227 | + final Curve? animationCurve; |
225 | final Color backgroundColor; | 228 | final Color backgroundColor; |
226 | 229 | ||
227 | final Widget body; | 230 | final Widget body; |
228 | 231 | ||
229 | const _CupertinoModalTransition({ | 232 | const _CupertinoModalTransition({ |
230 | - Key key, | ||
231 | - @required this.secondaryAnimation, | ||
232 | - @required this.body, | ||
233 | - @required this.topRadius, | 233 | + Key? key, |
234 | + required this.secondaryAnimation, | ||
235 | + required this.body, | ||
236 | + required this.topRadius, | ||
234 | this.backgroundColor = Colors.black, | 237 | this.backgroundColor = Colors.black, |
235 | this.animationCurve, | 238 | this.animationCurve, |
236 | }) : super(key: key); | 239 | }) : super(key: key); |
@@ -283,16 +286,19 @@ class _CupertinoModalTransition extends StatelessWidget { | @@ -283,16 +286,19 @@ class _CupertinoModalTransition extends StatelessWidget { | ||
283 | } | 286 | } |
284 | 287 | ||
285 | class _CupertinoScaffold extends InheritedWidget { | 288 | class _CupertinoScaffold extends InheritedWidget { |
286 | - final AnimationController animation; | 289 | + final AnimationController? animation; |
287 | 290 | ||
288 | - final Radius topRadius; | 291 | + final Radius? topRadius; |
289 | 292 | ||
290 | @override | 293 | @override |
291 | final Widget child; | 294 | final Widget child; |
292 | 295 | ||
293 | - const _CupertinoScaffold( | ||
294 | - {Key key, this.animation, this.child, this.topRadius}) | ||
295 | - : super(key: key, child: child); | 296 | + const _CupertinoScaffold({ |
297 | + Key? key, | ||
298 | + this.animation, | ||
299 | + required this.child, | ||
300 | + this.topRadius, | ||
301 | + }) : super(key: key, child: child); | ||
296 | 302 | ||
297 | @override | 303 | @override |
298 | bool updateShouldNotify(InheritedWidget oldWidget) { | 304 | bool updateShouldNotify(InheritedWidget oldWidget) { |
@@ -302,7 +308,7 @@ class _CupertinoScaffold extends InheritedWidget { | @@ -302,7 +308,7 @@ class _CupertinoScaffold extends InheritedWidget { | ||
302 | 308 | ||
303 | // Support | 309 | // Support |
304 | class CupertinoScaffold extends StatefulWidget { | 310 | class CupertinoScaffold extends StatefulWidget { |
305 | - static _CupertinoScaffold of(BuildContext context) => | 311 | + static _CupertinoScaffold? of(BuildContext context) => |
306 | context.dependOnInheritedWidgetOfExactType<_CupertinoScaffold>(); | 312 | context.dependOnInheritedWidgetOfExactType<_CupertinoScaffold>(); |
307 | 313 | ||
308 | final Widget body; | 314 | final Widget body; |
@@ -310,8 +316,8 @@ class CupertinoScaffold extends StatefulWidget { | @@ -310,8 +316,8 @@ class CupertinoScaffold extends StatefulWidget { | ||
310 | final Color transitionBackgroundColor; | 316 | final Color transitionBackgroundColor; |
311 | 317 | ||
312 | const CupertinoScaffold({ | 318 | const CupertinoScaffold({ |
313 | - Key key, | ||
314 | - this.body, | 319 | + Key? key, |
320 | + required this.body, | ||
315 | this.topRadius = _default_top_radius, | 321 | this.topRadius = _default_top_radius, |
316 | this.transitionBackgroundColor = Colors.black, | 322 | this.transitionBackgroundColor = Colors.black, |
317 | }) : super(key: key); | 323 | }) : super(key: key); |
@@ -319,21 +325,21 @@ class CupertinoScaffold extends StatefulWidget { | @@ -319,21 +325,21 @@ class CupertinoScaffold extends StatefulWidget { | ||
319 | @override | 325 | @override |
320 | State<StatefulWidget> createState() => _CupertinoScaffoldState(); | 326 | State<StatefulWidget> createState() => _CupertinoScaffoldState(); |
321 | 327 | ||
322 | - static Future<T> showCupertinoModalBottomSheet<T>({ | ||
323 | - @required BuildContext context, | ||
324 | - double closeProgressThreshold, | ||
325 | - @required WidgetBuilder builder, | ||
326 | - Curve animationCurve, | ||
327 | - Curve previousRouteAnimationCurve, | ||
328 | - Color backgroundColor, | ||
329 | - Color barrierColor, | 328 | + static Future<T?> showCupertinoModalBottomSheet<T>({ |
329 | + required BuildContext context, | ||
330 | + double? closeProgressThreshold, | ||
331 | + required WidgetBuilder builder, | ||
332 | + Curve? animationCurve, | ||
333 | + Curve? previousRouteAnimationCurve, | ||
334 | + Color? backgroundColor, | ||
335 | + Color? barrierColor, | ||
330 | bool expand = false, | 336 | bool expand = false, |
331 | bool useRootNavigator = false, | 337 | bool useRootNavigator = false, |
332 | bool bounce = true, | 338 | bool bounce = true, |
333 | - bool isDismissible, | 339 | + bool? isDismissible, |
334 | bool enableDrag = true, | 340 | bool enableDrag = true, |
335 | - Duration duration, | ||
336 | - RouteSettings settings, | 341 | + Duration? duration, |
342 | + RouteSettings? settings, | ||
337 | }) async { | 343 | }) async { |
338 | assert(context != null); | 344 | assert(context != null); |
339 | assert(builder != null); | 345 | assert(builder != null); |
@@ -348,16 +354,16 @@ class CupertinoScaffold extends StatefulWidget { | @@ -348,16 +354,16 @@ class CupertinoScaffold extends StatefulWidget { | ||
348 | assert(debugCheckHasMaterialLocalizations(context)); | 354 | assert(debugCheckHasMaterialLocalizations(context)); |
349 | barrierLabel = MaterialLocalizations.of(context).modalBarrierDismissLabel; | 355 | barrierLabel = MaterialLocalizations.of(context).modalBarrierDismissLabel; |
350 | } | 356 | } |
351 | - final topRadius = CupertinoScaffold.of(context).topRadius; | 357 | + final topRadius = CupertinoScaffold.of(context)!.topRadius; |
352 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) | 358 | final result = await Navigator.of(context, rootNavigator: useRootNavigator) |
353 | .push(CupertinoModalBottomSheetRoute<T>( | 359 | .push(CupertinoModalBottomSheetRoute<T>( |
354 | closeProgressThreshold: closeProgressThreshold, | 360 | closeProgressThreshold: closeProgressThreshold, |
355 | builder: builder, | 361 | builder: builder, |
356 | - secondAnimationController: CupertinoScaffold.of(context).animation, | 362 | + secondAnimationController: CupertinoScaffold.of(context)!.animation, |
357 | containerBuilder: (context, _, child) => _CupertinoBottomSheetContainer( | 363 | containerBuilder: (context, _, child) => _CupertinoBottomSheetContainer( |
358 | child: child, | 364 | child: child, |
359 | backgroundColor: backgroundColor, | 365 | backgroundColor: backgroundColor, |
360 | - topRadius: topRadius, | 366 | + topRadius: _default_top_radius, |
361 | ), | 367 | ), |
362 | expanded: expand, | 368 | expanded: expand, |
363 | barrierLabel: barrierLabel, | 369 | barrierLabel: barrierLabel, |
@@ -365,7 +371,7 @@ class CupertinoScaffold extends StatefulWidget { | @@ -365,7 +371,7 @@ class CupertinoScaffold extends StatefulWidget { | ||
365 | isDismissible: isDismissible ?? expand == false ? true : false, | 371 | isDismissible: isDismissible ?? expand == false ? true : false, |
366 | modalBarrierColor: barrierColor ?? Colors.black12, | 372 | modalBarrierColor: barrierColor ?? Colors.black12, |
367 | enableDrag: enableDrag, | 373 | enableDrag: enableDrag, |
368 | - topRadius: topRadius, | 374 | + topRadius: topRadius ?? _default_top_radius, |
369 | animationCurve: animationCurve, | 375 | animationCurve: animationCurve, |
370 | previousRouteAnimationCurve: previousRouteAnimationCurve, | 376 | previousRouteAnimationCurve: previousRouteAnimationCurve, |
371 | duration: duration, | 377 | duration: duration, |
@@ -377,9 +383,9 @@ class CupertinoScaffold extends StatefulWidget { | @@ -377,9 +383,9 @@ class CupertinoScaffold extends StatefulWidget { | ||
377 | 383 | ||
378 | class _CupertinoScaffoldState extends State<CupertinoScaffold> | 384 | class _CupertinoScaffoldState extends State<CupertinoScaffold> |
379 | with TickerProviderStateMixin { | 385 | with TickerProviderStateMixin { |
380 | - AnimationController animationController; | 386 | + late AnimationController animationController; |
381 | 387 | ||
382 | - SystemUiOverlayStyle lastStyle; | 388 | + SystemUiOverlayStyle? lastStyle; |
383 | 389 | ||
384 | @override | 390 | @override |
385 | void initState() { | 391 | void initState() { |
@@ -3,23 +3,23 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | @@ -3,23 +3,23 @@ import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; | ||
3 | import 'dart:async'; | 3 | import 'dart:async'; |
4 | 4 | ||
5 | /// Shows a modal material design bottom sheet. | 5 | /// Shows a modal material design bottom sheet. |
6 | -Future<T> showMaterialModalBottomSheet<T>({ | ||
7 | - @required BuildContext context, | ||
8 | - double closeProgressThreshold, | ||
9 | - @required WidgetBuilder builder, | ||
10 | - Color backgroundColor, | ||
11 | - double elevation, | ||
12 | - ShapeBorder shape, | ||
13 | - Clip clipBehavior, | ||
14 | - Color barrierColor, | 6 | +Future<T?> showMaterialModalBottomSheet<T>({ |
7 | + required BuildContext context, | ||
8 | + double? closeProgressThreshold, | ||
9 | + required WidgetBuilder builder, | ||
10 | + Color? backgroundColor, | ||
11 | + double? elevation, | ||
12 | + ShapeBorder? shape, | ||
13 | + Clip? clipBehavior, | ||
14 | + Color? barrierColor, | ||
15 | bool bounce = false, | 15 | bool bounce = false, |
16 | bool expand = false, | 16 | bool expand = false, |
17 | - AnimationController secondAnimation, | ||
18 | - Curve animationCurve, | 17 | + AnimationController? secondAnimation, |
18 | + Curve? animationCurve, | ||
19 | bool useRootNavigator = false, | 19 | bool useRootNavigator = false, |
20 | bool isDismissible = true, | 20 | bool isDismissible = true, |
21 | bool enableDrag = true, | 21 | bool enableDrag = true, |
22 | - Duration duration, | 22 | + Duration? duration, |
23 | }) async { | 23 | }) async { |
24 | assert(context != null); | 24 | assert(context != null); |
25 | assert(builder != null); | 25 | assert(builder != null); |
@@ -56,15 +56,15 @@ Future<T> showMaterialModalBottomSheet<T>({ | @@ -56,15 +56,15 @@ Future<T> showMaterialModalBottomSheet<T>({ | ||
56 | 56 | ||
57 | //Default container builder is the Material Appearance | 57 | //Default container builder is the Material Appearance |
58 | WidgetWithChildBuilder _materialContainerBuilder(BuildContext context, | 58 | WidgetWithChildBuilder _materialContainerBuilder(BuildContext context, |
59 | - {Color backgroundColor, | ||
60 | - double elevation, | ||
61 | - ThemeData theme, | ||
62 | - Clip clipBehavior, | ||
63 | - ShapeBorder shape}) { | 59 | + {Color? backgroundColor, |
60 | + double? elevation, | ||
61 | + ThemeData? theme, | ||
62 | + Clip? clipBehavior, | ||
63 | + ShapeBorder? shape}) { | ||
64 | final bottomSheetTheme = Theme.of(context).bottomSheetTheme; | 64 | final bottomSheetTheme = Theme.of(context).bottomSheetTheme; |
65 | final color = backgroundColor ?? | 65 | final color = backgroundColor ?? |
66 | - bottomSheetTheme?.modalBackgroundColor ?? | ||
67 | - bottomSheetTheme?.backgroundColor; | 66 | + bottomSheetTheme.modalBackgroundColor ?? |
67 | + bottomSheetTheme.backgroundColor; | ||
68 | final _elevation = elevation ?? bottomSheetTheme.elevation ?? 0.0; | 68 | final _elevation = elevation ?? bottomSheetTheme.elevation ?? 0.0; |
69 | final _shape = shape ?? bottomSheetTheme.shape; | 69 | final _shape = shape ?? bottomSheetTheme.shape; |
70 | final _clipBehavior = | 70 | final _clipBehavior = |
@@ -11,8 +11,8 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -11,8 +11,8 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
11 | /// The values of [builder], [maintainState], and [fullScreenDialog] must not | 11 | /// The values of [builder], [maintainState], and [fullScreenDialog] must not |
12 | /// be null. | 12 | /// be null. |
13 | MaterialWithModalsPageRoute({ | 13 | MaterialWithModalsPageRoute({ |
14 | - @required WidgetBuilder builder, | ||
15 | - RouteSettings settings, | 14 | + required WidgetBuilder builder, |
15 | + RouteSettings? settings, | ||
16 | bool maintainState = true, | 16 | bool maintainState = true, |
17 | bool fullscreenDialog = false, | 17 | bool fullscreenDialog = false, |
18 | }) : assert(builder != null), | 18 | }) : assert(builder != null), |
@@ -24,7 +24,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -24,7 +24,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
24 | builder: builder, | 24 | builder: builder, |
25 | maintainState: maintainState); | 25 | maintainState: maintainState); |
26 | 26 | ||
27 | - ModalBottomSheetRoute _nextModalRoute; | 27 | + ModalBottomSheetRoute? _nextModalRoute; |
28 | 28 | ||
29 | @override | 29 | @override |
30 | bool canTransitionTo(TransitionRoute<dynamic> nextRoute) { | 30 | bool canTransitionTo(TransitionRoute<dynamic> nextRoute) { |
@@ -37,7 +37,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -37,7 +37,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
37 | } | 37 | } |
38 | 38 | ||
39 | @override | 39 | @override |
40 | - void didChangeNext(Route nextRoute) { | 40 | + void didChangeNext(Route? nextRoute) { |
41 | if (nextRoute is ModalBottomSheetRoute) { | 41 | if (nextRoute is ModalBottomSheetRoute) { |
42 | _nextModalRoute = nextRoute; | 42 | _nextModalRoute = nextRoute; |
43 | } | 43 | } |
@@ -51,7 +51,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -51,7 +51,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
51 | } | 51 | } |
52 | 52 | ||
53 | @override | 53 | @override |
54 | - bool didPop(T result) { | 54 | + bool didPop(T? result) { |
55 | _nextModalRoute = null; | 55 | _nextModalRoute = null; |
56 | return super.didPop(result); | 56 | return super.didPop(result); |
57 | } | 57 | } |
@@ -60,7 +60,8 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -60,7 +60,8 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
60 | Widget buildTransitions(BuildContext context, Animation<double> animation, | 60 | Widget buildTransitions(BuildContext context, Animation<double> animation, |
61 | Animation<double> secondaryAnimation, Widget child) { | 61 | Animation<double> secondaryAnimation, Widget child) { |
62 | final theme = Theme.of(context).pageTransitionsTheme; | 62 | final theme = Theme.of(context).pageTransitionsTheme; |
63 | - if (_nextModalRoute != null) { | 63 | + final nextRoute = _nextModalRoute; |
64 | + if (nextRoute != null) { | ||
64 | if (!secondaryAnimation.isDismissed) { | 65 | if (!secondaryAnimation.isDismissed) { |
65 | // Avoid default transition theme to animate when a new modal view is pushed | 66 | // Avoid default transition theme to animate when a new modal view is pushed |
66 | final fakeSecondaryAnimation = | 67 | final fakeSecondaryAnimation = |
@@ -68,7 +69,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | @@ -68,7 +69,7 @@ class MaterialWithModalsPageRoute<T> extends MaterialPageRoute<T> { | ||
68 | 69 | ||
69 | final defaultTransition = theme.buildTransitions<T>( | 70 | final defaultTransition = theme.buildTransitions<T>( |
70 | this, context, animation, fakeSecondaryAnimation, child); | 71 | this, context, animation, fakeSecondaryAnimation, child); |
71 | - return _nextModalRoute.getPreviousRouteTransition( | 72 | + return nextRoute.getPreviousRouteTransition( |
72 | context, secondaryAnimation, defaultTransition); | 73 | context, secondaryAnimation, defaultTransition); |
73 | } else { | 74 | } else { |
74 | _nextModalRoute = null; | 75 | _nextModalRoute = null; |
@@ -25,7 +25,7 @@ import 'package:flutter/foundation.dart'; | @@ -25,7 +25,7 @@ import 'package:flutter/foundation.dart'; | ||
25 | /// animation at the time when the finger was released. | 25 | /// animation at the time when the finger was released. |
26 | /// | 26 | /// |
27 | /// The [startingPoint] and [curve] arguments must not be null. | 27 | /// The [startingPoint] and [curve] arguments must not be null. |
28 | -class BottomSheetSuspendedCurve extends ParametricCurve<double> { | 28 | +class BottomSheetSuspendedCurve extends Curve { |
29 | /// Creates a suspended curve. | 29 | /// Creates a suspended curve. |
30 | const BottomSheetSuspendedCurve( | 30 | const BottomSheetSuspendedCurve( |
31 | this.startingPoint, { | 31 | this.startingPoint, { |
@@ -56,7 +56,7 @@ class BottomSheetSuspendedCurve extends ParametricCurve<double> { | @@ -56,7 +56,7 @@ class BottomSheetSuspendedCurve extends ParametricCurve<double> { | ||
56 | 56 | ||
57 | final curveProgress = (t - startingPoint) / (1 - startingPoint); | 57 | final curveProgress = (t - startingPoint) / (1 - startingPoint); |
58 | final transformed = curve.transform(curveProgress); | 58 | final transformed = curve.transform(curveProgress); |
59 | - return lerpDouble(startingPoint, 1, transformed); | 59 | + return lerpDouble(startingPoint, 1, transformed)!; |
60 | } | 60 | } |
61 | 61 | ||
62 | @override | 62 | @override |
@@ -13,9 +13,9 @@ import 'package:flutter/widgets.dart'; | @@ -13,9 +13,9 @@ import 'package:flutter/widgets.dart'; | ||
13 | class ModalScrollController extends InheritedWidget { | 13 | class ModalScrollController extends InheritedWidget { |
14 | /// Creates a widget that associates a [ScrollController] with a subtree. | 14 | /// Creates a widget that associates a [ScrollController] with a subtree. |
15 | ModalScrollController({ | 15 | ModalScrollController({ |
16 | - Key key, | ||
17 | - @required this.controller, | ||
18 | - @required Widget child, | 16 | + Key? key, |
17 | + required this.controller, | ||
18 | + required Widget child, | ||
19 | }) : assert(controller != null), | 19 | }) : assert(controller != null), |
20 | super( | 20 | super( |
21 | key: key, | 21 | key: key, |
@@ -38,7 +38,7 @@ class ModalScrollController extends InheritedWidget { | @@ -38,7 +38,7 @@ class ModalScrollController extends InheritedWidget { | ||
38 | /// | 38 | /// |
39 | /// Returns null if there is no [ScrollController] associated with the given | 39 | /// Returns null if there is no [ScrollController] associated with the given |
40 | /// context. | 40 | /// context. |
41 | - static ScrollController of(BuildContext context) { | 41 | + static ScrollController? of(BuildContext context) { |
42 | final result = | 42 | final result = |
43 | context.dependOnInheritedWidgetOfExactType<ModalScrollController>(); | 43 | context.dependOnInheritedWidgetOfExactType<ModalScrollController>(); |
44 | return result?.controller; | 44 | return result?.controller; |
@@ -9,9 +9,9 @@ class ScrollToTopStatusBarHandler extends StatefulWidget { | @@ -9,9 +9,9 @@ class ScrollToTopStatusBarHandler extends StatefulWidget { | ||
9 | final ScrollController scrollController; | 9 | final ScrollController scrollController; |
10 | 10 | ||
11 | const ScrollToTopStatusBarHandler({ | 11 | const ScrollToTopStatusBarHandler({ |
12 | - Key key, | ||
13 | - @required this.child, | ||
14 | - @required this.scrollController, | 12 | + Key? key, |
13 | + required this.child, | ||
14 | + required this.scrollController, | ||
15 | }) : super(key: key); | 15 | }) : super(key: key); |
16 | 16 | ||
17 | @override | 17 | @override |
@@ -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.2" | 10 | + version: "2.5.0-nullsafety.3" |
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.2" | 17 | + version: "2.1.0-nullsafety.3" |
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.4" | 24 | + version: "1.1.0-nullsafety.5" |
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.2" | 31 | + version: "1.2.0-nullsafety.3" |
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.2" | 38 | + version: "1.1.0-nullsafety.3" |
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.4" | 45 | + version: "1.15.0-nullsafety.5" |
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.2" | 52 | + version: "1.2.0-nullsafety.3" |
53 | flutter: | 53 | flutter: |
54 | dependency: "direct main" | 54 | dependency: "direct main" |
55 | description: flutter | 55 | description: flutter |
@@ -66,21 +66,21 @@ packages: | @@ -66,21 +66,21 @@ packages: | ||
66 | name: matcher | 66 | name: matcher |
67 | url: "https://pub.dartlang.org" | 67 | url: "https://pub.dartlang.org" |
68 | source: hosted | 68 | source: hosted |
69 | - version: "0.12.10-nullsafety.2" | 69 | + version: "0.12.10-nullsafety.3" |
70 | meta: | 70 | meta: |
71 | dependency: transitive | 71 | dependency: transitive |
72 | description: | 72 | description: |
73 | name: meta | 73 | name: meta |
74 | url: "https://pub.dartlang.org" | 74 | url: "https://pub.dartlang.org" |
75 | source: hosted | 75 | source: hosted |
76 | - version: "1.3.0-nullsafety.5" | 76 | + version: "1.3.0-nullsafety.6" |
77 | path: | 77 | path: |
78 | dependency: transitive | 78 | dependency: transitive |
79 | description: | 79 | description: |
80 | name: path | 80 | name: path |
81 | url: "https://pub.dartlang.org" | 81 | url: "https://pub.dartlang.org" |
82 | source: hosted | 82 | source: hosted |
83 | - version: "1.8.0-nullsafety.2" | 83 | + version: "1.8.0-nullsafety.3" |
84 | pedantic: | 84 | pedantic: |
85 | dependency: "direct dev" | 85 | dependency: "direct dev" |
86 | description: | 86 | description: |
@@ -99,56 +99,56 @@ packages: | @@ -99,56 +99,56 @@ packages: | ||
99 | name: source_span | 99 | name: source_span |
100 | url: "https://pub.dartlang.org" | 100 | url: "https://pub.dartlang.org" |
101 | source: hosted | 101 | source: hosted |
102 | - version: "1.8.0-nullsafety.3" | 102 | + version: "1.8.0-nullsafety.4" |
103 | stack_trace: | 103 | stack_trace: |
104 | dependency: transitive | 104 | dependency: transitive |
105 | description: | 105 | description: |
106 | name: stack_trace | 106 | name: stack_trace |
107 | url: "https://pub.dartlang.org" | 107 | url: "https://pub.dartlang.org" |
108 | source: hosted | 108 | source: hosted |
109 | - version: "1.10.0-nullsafety.5" | 109 | + version: "1.10.0-nullsafety.6" |
110 | stream_channel: | 110 | stream_channel: |
111 | dependency: transitive | 111 | dependency: transitive |
112 | description: | 112 | description: |
113 | name: stream_channel | 113 | name: stream_channel |
114 | url: "https://pub.dartlang.org" | 114 | url: "https://pub.dartlang.org" |
115 | source: hosted | 115 | source: hosted |
116 | - version: "2.1.0-nullsafety.2" | 116 | + version: "2.1.0-nullsafety.3" |
117 | string_scanner: | 117 | string_scanner: |
118 | dependency: transitive | 118 | dependency: transitive |
119 | description: | 119 | description: |
120 | name: string_scanner | 120 | name: string_scanner |
121 | url: "https://pub.dartlang.org" | 121 | url: "https://pub.dartlang.org" |
122 | source: hosted | 122 | source: hosted |
123 | - version: "1.1.0-nullsafety.2" | 123 | + version: "1.1.0-nullsafety.3" |
124 | term_glyph: | 124 | term_glyph: |
125 | dependency: transitive | 125 | dependency: transitive |
126 | description: | 126 | description: |
127 | name: term_glyph | 127 | name: term_glyph |
128 | url: "https://pub.dartlang.org" | 128 | url: "https://pub.dartlang.org" |
129 | source: hosted | 129 | source: hosted |
130 | - version: "1.2.0-nullsafety.2" | 130 | + version: "1.2.0-nullsafety.3" |
131 | test_api: | 131 | test_api: |
132 | dependency: transitive | 132 | dependency: transitive |
133 | description: | 133 | description: |
134 | name: test_api | 134 | name: test_api |
135 | url: "https://pub.dartlang.org" | 135 | url: "https://pub.dartlang.org" |
136 | source: hosted | 136 | source: hosted |
137 | - version: "0.2.19-nullsafety.4" | 137 | + version: "0.2.19-nullsafety.6" |
138 | typed_data: | 138 | typed_data: |
139 | dependency: transitive | 139 | dependency: transitive |
140 | description: | 140 | description: |
141 | name: typed_data | 141 | name: typed_data |
142 | url: "https://pub.dartlang.org" | 142 | url: "https://pub.dartlang.org" |
143 | source: hosted | 143 | source: hosted |
144 | - version: "1.3.0-nullsafety.4" | 144 | + version: "1.3.0-nullsafety.5" |
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.4" | 151 | + version: "2.1.0-nullsafety.5" |
152 | sdks: | 152 | sdks: |
153 | - dart: ">=2.11.0-0.0 <2.12.0" | 153 | + dart: ">=2.12.0-29.10.beta <3.0.0" |
154 | flutter: ">=1.12.0 <2.0.0" | 154 | flutter: ">=1.12.0 <2.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: 1.0.0 | 3 | +version: 1.0.0+1 |
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.0.0 <3.0.0" | 7 | + sdk: ">=2.12.0-29.10.beta <3.0.0" |
8 | flutter: ">=1.12.0 <2.0.0" | 8 | flutter: ">=1.12.0 <2.0.0" |
9 | 9 | ||
10 | dependencies: | 10 | dependencies: |
-
Please register or login to post a comment