From 8c1cd0b0493675e2b852577086cf210f9621d293 Mon Sep 17 00:00:00 2001 From: Andrew Brogdon Date: Wed, 3 Mar 2021 11:44:35 -0800 Subject: [PATCH] Landing beta changes in master for the new stable release (#747) --- .../books/flutter_module_books/pubspec.lock | 38 +-- .../ios/Runner.xcodeproj/project.pbxproj | 17 +- .../contents.xcworkspacedata | 2 +- animations/lib/main.dart | 6 +- .../lib/src/basics/01_animated_container.dart | 6 +- .../src/basics/03_animation_controller.dart | 2 +- animations/lib/src/basics/04_tweens.dart | 4 +- .../lib/src/basics/05_animated_builder.dart | 4 +- .../lib/src/basics/06_custom_tween.dart | 10 +- .../lib/src/basics/07_tween_sequence.dart | 10 +- .../lib/src/basics/08_fade_transition.dart | 6 +- animations/lib/src/misc/animated_list.dart | 56 ++-- .../lib/src/misc/animated_positioned.dart | 62 +++-- .../lib/src/misc/animated_switcher.dart | 6 +- animations/lib/src/misc/card_swipe.dart | 29 ++- animations/lib/src/misc/carousel.dart | 10 +- animations/lib/src/misc/curved_animation.dart | 33 ++- animations/lib/src/misc/hero_animation.dart | 7 +- .../lib/src/misc/physics_card_drag.dart | 6 +- .../lib/src/misc/repeating_animation.dart | 4 +- animations/pubspec.lock | 2 +- animations/pubspec.yaml | 4 +- .../veggieseasons/ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + experimental/veggieseasons/pubspec.lock | 2 +- .../web_dashboard/ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + flutter_maps_firestore/lib/main.dart | 38 +-- flutter_maps_firestore/pubspec.yaml | 14 +- infinite_list/lib/main.dart | 2 +- infinite_list/lib/src/api/item.dart | 6 +- infinite_list/lib/src/api/page.dart | 9 +- infinite_list/lib/src/catalog.dart | 4 +- infinite_list/lib/src/item_tile.dart | 4 +- infinite_list/pubspec.lock | 46 ++-- infinite_list/pubspec.yaml | 10 +- ios_app_clip/ios/Flutter/Debug.xcconfig | 1 + ios_app_clip/ios/Flutter/Release.xcconfig | 1 + ios_app_clip/pubspec.lock | 40 +-- .../ios/Runner.xcodeproj/project.pbxproj | 17 +- .../contents.xcworkspacedata | 2 +- isolate_example/lib/data_transfer_page.dart | 10 +- .../lib/infinite_process_page.dart | 18 +- isolate_example/lib/performance_page.dart | 8 +- isolate_example/pubspec.lock | 44 ++-- isolate_example/pubspec.yaml | 6 +- isolate_example/test/widget_test.dart | 4 +- .../ios/Runner.xcodeproj/project.pbxproj | 17 +- .../contents.xcworkspacedata | 2 +- .../lib/built_value/built_complex_object.dart | 24 +- .../built_value/built_complex_object.g.dart | 129 +++++----- .../lib/built_value/built_simple_object.dart | 18 +- .../built_value/built_simple_object.g.dart | 103 ++++---- .../converted_complex_object.dart | 24 +- .../dart_convert/converted_simple_object.dart | 20 +- .../serializable_complex_object.dart | 16 +- .../serializable_complex_object.g.dart | 29 ++- .../serializable_simple_object.dart | 12 +- .../serializable_simple_object.g.dart | 20 +- jsonexample/lib/main.dart | 2 +- jsonexample/lib/tab_pages.dart | 8 +- jsonexample/lib/utils.dart | 2 +- jsonexample/lib/widgets.dart | 21 +- jsonexample/pubspec.lock | 98 +++---- jsonexample/pubspec.yaml | 14 +- .../test/complex_object_unit_test.dart | 240 +++++++++--------- place_tracker/ios/Flutter/Debug.xcconfig | 1 + place_tracker/ios/Flutter/Release.xcconfig | 1 + place_tracker/lib/place_map.dart | 2 +- .../lib/src/method_channel_demo.dart | 106 ++++---- .../lib/src/pet_list_screen.dart | 16 +- platform_channels/pubspec.lock | 40 +-- platform_design/lib/main.dart | 2 +- platform_design/lib/news_tab.dart | 10 +- platform_design/lib/profile_tab.dart | 6 +- platform_design/lib/song_detail_tab.dart | 6 +- platform_design/lib/songs_tab.dart | 21 +- platform_design/lib/utils.dart | 2 +- platform_design/lib/widgets.dart | 57 ++--- platform_design/pubspec.lock | 46 ++-- platform_design/pubspec.yaml | 10 +- platform_view_swift/pubspec.lock | 38 +-- provider_counter/pubspec.lock | 46 ++-- provider_counter/pubspec.yaml | 9 +- provider_shopper/lib/main.dart | 1 + provider_shopper/lib/models/cart.dart | 5 +- provider_shopper/lib/screens/cart.dart | 4 +- provider_shopper/lib/screens/catalog.dart | 6 +- provider_shopper/pubspec.lock | 44 ++-- provider_shopper/pubspec.yaml | 6 +- provider_shopper/test/cart_widget_test.dart | 10 +- .../test/catalog_widget_test.dart | 2 +- provider_shopper/test/login_widget_test.dart | 2 +- testing_app/ios/Flutter/Debug.xcconfig | 1 + testing_app/ios/Flutter/Release.xcconfig | 1 + testing_app/lib/screens/favorites.dart | 2 +- testing_app/lib/screens/home.dart | 2 +- testing_app/pubspec.lock | 99 +++----- tool/ios_ci_script.sh | 25 +- 101 files changed, 1005 insertions(+), 1039 deletions(-) diff --git a/add_to_app/books/flutter_module_books/pubspec.lock b/add_to_app/books/flutter_module_books/pubspec.lock index 44b3665c2..d82e5807c 100644 --- a/add_to_app/books/flutter_module_books/pubspec.lock +++ b/add_to_app/books/flutter_module_books/pubspec.lock @@ -28,14 +28,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" build: dependency: transitive description: @@ -63,14 +63,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" cli_util: dependency: transitive description: @@ -84,7 +84,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" code_builder: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" convert: dependency: transitive description: @@ -126,7 +126,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" file: dependency: transitive description: @@ -185,14 +185,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" mockito: dependency: "direct dev" description: @@ -227,7 +227,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" pedantic: dependency: transitive description: @@ -274,56 +274,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" watcher: dependency: transitive description: @@ -339,4 +339,4 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/animations/ios/Runner.xcodeproj/project.pbxproj b/animations/ios/Runner.xcodeproj/project.pbxproj index b7ef4c45f..1b8fd3034 100644 --- a/animations/ios/Runner.xcodeproj/project.pbxproj +++ b/animations/ios/Runner.xcodeproj/project.pbxproj @@ -9,11 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -26,8 +22,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,13 +32,11 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -57,8 +49,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -68,9 +58,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -201,7 +189,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -253,7 +241,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -330,7 +317,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -386,7 +372,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16e..919434a62 100644 --- a/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/animations/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/animations/lib/main.dart b/animations/lib/main.dart index eee14aa14..b74b957bf 100644 --- a/animations/lib/main.dart +++ b/animations/lib/main.dart @@ -31,7 +31,11 @@ class Demo { final String route; final WidgetBuilder builder; - const Demo({this.name, this.route, this.builder}); + const Demo({ + required this.name, + required this.route, + required this.builder, + }); } final basicDemos = [ diff --git a/animations/lib/src/basics/01_animated_container.dart b/animations/lib/src/basics/01_animated_container.dart index 9b84fd4e6..e009f43ff 100644 --- a/animations/lib/src/basics/01_animated_container.dart +++ b/animations/lib/src/basics/01_animated_container.dart @@ -18,9 +18,9 @@ class AnimatedContainerDemo extends StatefulWidget { } class _AnimatedContainerDemoState extends State { - Color color; - double borderRadius; - double margin; + late Color color; + late double borderRadius; + late double margin; @override void initState() { diff --git a/animations/lib/src/basics/03_animation_controller.dart b/animations/lib/src/basics/03_animation_controller.dart index a9d46f35b..3a88bfebe 100644 --- a/animations/lib/src/basics/03_animation_controller.dart +++ b/animations/lib/src/basics/03_animation_controller.dart @@ -20,7 +20,7 @@ class _AnimationControllerDemoState extends State // Widget is not visible. static const Duration _duration = Duration(seconds: 1); - AnimationController controller; + late final AnimationController controller; @override void initState() { diff --git a/animations/lib/src/basics/04_tweens.dart b/animations/lib/src/basics/04_tweens.dart index 9ed9822aa..1984f8b0c 100644 --- a/animations/lib/src/basics/04_tweens.dart +++ b/animations/lib/src/basics/04_tweens.dart @@ -15,8 +15,8 @@ class _TweenDemoState extends State with SingleTickerProviderStateMixin { static const Duration _duration = Duration(seconds: 1); static const double accountBalance = 1000000; - AnimationController controller; - Animation animation; + late final AnimationController controller; + late final Animation animation; @override void initState() { diff --git a/animations/lib/src/basics/05_animated_builder.dart b/animations/lib/src/basics/05_animated_builder.dart index 70919886c..10d7f0dbe 100644 --- a/animations/lib/src/basics/05_animated_builder.dart +++ b/animations/lib/src/basics/05_animated_builder.dart @@ -16,8 +16,8 @@ class _AnimatedBuilderDemoState extends State static const Color beginColor = Colors.deepPurple; static const Color endColor = Colors.deepOrange; Duration duration = Duration(milliseconds: 800); - AnimationController controller; - Animation animation; + late AnimationController controller; + late Animation animation; @override void initState() { diff --git a/animations/lib/src/basics/06_custom_tween.dart b/animations/lib/src/basics/06_custom_tween.dart index 4c2ce48e1..87471a449 100644 --- a/animations/lib/src/basics/06_custom_tween.dart +++ b/animations/lib/src/basics/06_custom_tween.dart @@ -5,13 +5,13 @@ import 'package:flutter/material.dart'; class TypewriterTween extends Tween { - TypewriterTween({String begin = '', String end}) + TypewriterTween({String begin = '', String end = ''}) : super(begin: begin, end: end); @override String lerp(double t) { - var cutoff = (end.length * t).round(); - return end.substring(0, cutoff); + var cutoff = (end!.length * t).round(); + return end!.substring(0, cutoff); } } @@ -26,8 +26,8 @@ class _CustomTweenDemoState extends State with SingleTickerProviderStateMixin { static const Duration _duration = Duration(seconds: 3); static const String message = loremIpsum; - AnimationController controller; - Animation animation; + late final AnimationController controller; + late final Animation animation; @override void initState() { diff --git a/animations/lib/src/basics/07_tween_sequence.dart b/animations/lib/src/basics/07_tween_sequence.dart index 231458777..59f98d6a1 100644 --- a/animations/lib/src/basics/07_tween_sequence.dart +++ b/animations/lib/src/basics/07_tween_sequence.dart @@ -14,8 +14,8 @@ class TweenSequenceDemo extends StatefulWidget { class _TweenSequenceDemoState extends State with SingleTickerProviderStateMixin { static const Duration duration = Duration(seconds: 3); - AnimationController controller; - Animation animation; + late final AnimationController controller; + late final Animation animation; static final colors = [ Colors.red, @@ -31,7 +31,7 @@ class _TweenSequenceDemoState extends State void initState() { super.initState(); - final sequenceItems = >[]; + final sequenceItems = >[]; for (var i = 0; i < colors.length; i++) { final beginColor = colors[i]; @@ -39,7 +39,7 @@ class _TweenSequenceDemoState extends State final weight = 1 / colors.length; sequenceItems.add( - TweenSequenceItem( + TweenSequenceItem( tween: ColorTween(begin: beginColor, end: endColor), weight: weight, ), @@ -47,7 +47,7 @@ class _TweenSequenceDemoState extends State } controller = AnimationController(duration: duration, vsync: this); - animation = TweenSequence(sequenceItems).animate(controller); + animation = TweenSequence(sequenceItems).animate(controller); } @override diff --git a/animations/lib/src/basics/08_fade_transition.dart b/animations/lib/src/basics/08_fade_transition.dart index 4d04dad19..15e5817cf 100644 --- a/animations/lib/src/basics/08_fade_transition.dart +++ b/animations/lib/src/basics/08_fade_transition.dart @@ -15,9 +15,9 @@ class FadeTransitionDemo extends StatefulWidget { class _FadeTransitionDemoState extends State with SingleTickerProviderStateMixin { - AnimationController _controller; - Animation _animation; - CurvedAnimation _curve; + late final AnimationController _controller; + late final Animation _animation; + late final CurvedAnimation _curve; @override void initState() { diff --git a/animations/lib/src/misc/animated_list.dart b/animations/lib/src/misc/animated_list.dart index 7c9aff2ae..7c115c520 100644 --- a/animations/lib/src/misc/animated_list.dart +++ b/animations/lib/src/misc/animated_list.dart @@ -14,23 +14,31 @@ class AnimatedListDemo extends StatefulWidget { class _AnimatedListDemoState extends State { final GlobalKey _listKey = GlobalKey(); - final listData = initialListData; + final listData = [ + UserModel(0, 'Govind', 'Dixit'), + UserModel(1, 'Greta', 'Stoll'), + UserModel(2, 'Monty', 'Carlo'), + UserModel(3, 'Petey', 'Cruiser'), + UserModel(4, 'Barry', 'Cade'), + ]; + final initialListSize = 5; void addUser() { setState(() { var index = listData.length; listData.add( - UserModel(firstName: 'New', lastName: 'Person'), + UserModel(++_maxIdValue, 'New', 'Person'), ); - _listKey.currentState + _listKey.currentState! .insertItem(index, duration: Duration(milliseconds: 300)); }); } - void deleteUser(int index) { + void deleteUser(int id) { setState(() { + final index = listData.indexWhere((u) => u.id == id); var user = listData.removeAt(index); - _listKey.currentState.removeItem( + _listKey.currentState!.removeItem( index, (context, animation) { return FadeTransition( @@ -49,7 +57,7 @@ class _AnimatedListDemoState extends State { }); } - Widget _buildItem(UserModel user, [int index]) { + Widget _buildItem(UserModel user) { return ListTile( key: ValueKey(user), title: Text(user.firstName), @@ -59,7 +67,7 @@ class _AnimatedListDemoState extends State { ), trailing: IconButton( icon: Icon(Icons.delete), - onPressed: () => deleteUser(index), + onPressed: () => deleteUser(user.id), ), ); } @@ -79,11 +87,11 @@ class _AnimatedListDemoState extends State { body: SafeArea( child: AnimatedList( key: _listKey, - initialItemCount: initialListData.length, + initialItemCount: 5, itemBuilder: (context, index, animation) { return FadeTransition( opacity: animation, - child: _buildItem(listData[index], index), + child: _buildItem(listData[index]), ); }, ), @@ -93,31 +101,15 @@ class _AnimatedListDemoState extends State { } class UserModel { - const UserModel({this.firstName, this.lastName}); + UserModel( + this.id, + this.firstName, + this.lastName, + ); + final int id; final String firstName; final String lastName; } -List initialListData = [ - UserModel( - firstName: 'Govind', - lastName: 'Dixit', - ), - UserModel( - firstName: 'Greta', - lastName: 'Stoll', - ), - UserModel( - firstName: 'Monty', - lastName: 'Carlo', - ), - UserModel( - firstName: 'Petey', - lastName: 'Cruiser', - ), - UserModel( - firstName: 'Barry', - lastName: 'Cade', - ), -]; +int _maxIdValue = 4; diff --git a/animations/lib/src/misc/animated_positioned.dart b/animations/lib/src/misc/animated_positioned.dart index 641ff91eb..a514e96a6 100644 --- a/animations/lib/src/misc/animated_positioned.dart +++ b/animations/lib/src/misc/animated_positioned.dart @@ -14,8 +14,8 @@ class AnimatedPositionedDemo extends StatefulWidget { } class _AnimatedPositionedDemoState extends State { - double topPosition; - double leftPosition; + late double topPosition; + late double leftPosition; double generateTopPosition(double top) => Random().nextDouble() * top; @@ -41,40 +41,38 @@ class _AnimatedPositionedDemoState extends State { final appBar = AppBar(title: Text('AnimatedPositioned')); final topPadding = MediaQuery.of(context).padding.top; // AnimatedPositioned animates changes to a widget's position within a Stack - return SafeArea( - child: Scaffold( - appBar: appBar, - body: Container( - height: size.height, - width: size.width, - child: Stack( - children: [ - AnimatedPositioned( - top: topPosition, - left: leftPosition, - duration: Duration(seconds: 1), - child: InkWell( - onTap: () => changePosition( - size.height - - (appBar.preferredSize.height + topPadding + 50), - size.width - 150), - child: Container( - alignment: Alignment.center, - width: 150, - height: 50, - child: Text( - 'Click Me', - style: TextStyle( - color: - Theme.of(context).buttonTheme.colorScheme.onPrimary, - ), + return Scaffold( + appBar: appBar, + body: Container( + height: size.height, + width: size.width, + child: Stack( + children: [ + AnimatedPositioned( + top: topPosition, + left: leftPosition, + duration: Duration(seconds: 1), + child: InkWell( + onTap: () => changePosition( + size.height - + (appBar.preferredSize.height + topPadding + 50), + size.width - 150), + child: Container( + alignment: Alignment.center, + width: 150, + height: 50, + child: Text( + 'Click Me', + style: TextStyle( + color: + Theme.of(context).buttonTheme.colorScheme!.onPrimary, ), - color: Theme.of(context).primaryColor, ), + color: Theme.of(context).primaryColor, ), ), - ], - ), + ), + ], ), ), ); diff --git a/animations/lib/src/misc/animated_switcher.dart b/animations/lib/src/misc/animated_switcher.dart index 4c316d230..bbd6e445c 100644 --- a/animations/lib/src/misc/animated_switcher.dart +++ b/animations/lib/src/misc/animated_switcher.dart @@ -30,8 +30,8 @@ class AnimatedSwitcherDemo extends StatefulWidget { } class _AnimatedSwitcherDemoState extends State { - Widget container; - int keyCount; + late Widget container; + late int keyCount; @override void initState() { @@ -53,7 +53,7 @@ class _AnimatedSwitcherDemoState extends State { child: Text( 'Change Widget', style: TextStyle( - color: Theme.of(context).buttonTheme.colorScheme.onPrimary), + color: Theme.of(context).buttonTheme.colorScheme!.onPrimary), ), ), ], diff --git a/animations/lib/src/misc/card_swipe.dart b/animations/lib/src/misc/card_swipe.dart index d024816fb..56f7d55c6 100644 --- a/animations/lib/src/misc/card_swipe.dart +++ b/animations/lib/src/misc/card_swipe.dart @@ -15,7 +15,7 @@ class CardSwipeDemo extends StatefulWidget { } class _CardSwipeDemoState extends State { - List fileNames; + late List fileNames; @override void initState() { @@ -102,8 +102,8 @@ class SwipeableCard extends StatefulWidget { final VoidCallback onSwiped; SwipeableCard({ - this.onSwiped, - this.imageAssetName, + required this.onSwiped, + required this.imageAssetName, }); @override @@ -112,9 +112,9 @@ class SwipeableCard extends StatefulWidget { class _SwipeableCardState extends State with SingleTickerProviderStateMixin { - AnimationController _controller; - Animation _animation; - double _dragStartX; + late AnimationController _controller; + late Animation _animation; + late double _dragStartX; bool _isSwipingLeft = false; @override @@ -155,18 +155,29 @@ class _SwipeableCardState extends State } setState(() { + final size = context.size; + + if (size == null) { + return; + } + // Calculate the amount dragged in unit coordinates (between 0 and 1) // using this widgets width. _controller.value = - (details.localPosition.dx - _dragStartX).abs() / context.size.width; + (details.localPosition.dx - _dragStartX).abs() / size.width; }); } /// Runs the fling / spring animation using the final velocity of the drag /// gesture. void _dragEnd(DragEndDetails details) { - var velocity = - (details.velocity.pixelsPerSecond.dx / context.size.width).abs(); + final size = context.size; + + if (size == null) { + return; + } + + var velocity = (details.velocity.pixelsPerSecond.dx / size.width).abs(); _animate(velocity: velocity); } diff --git a/animations/lib/src/misc/carousel.dart b/animations/lib/src/misc/carousel.dart index f89217b7d..712aecc30 100644 --- a/animations/lib/src/misc/carousel.dart +++ b/animations/lib/src/misc/carousel.dart @@ -46,15 +46,15 @@ typedef OnCurrentItemChangedCallback = void Function(int currentItem); class Carousel extends StatefulWidget { final IndexedWidgetBuilder itemBuilder; - const Carousel({Key key, @required this.itemBuilder}); + const Carousel({Key? key, required this.itemBuilder}) : super(key: key); @override _CarouselState createState() => _CarouselState(); } class _CarouselState extends State { - PageController _controller; - int _currentPage; + late final PageController _controller; + late int _currentPage; bool _pageHasChanged = false; @override @@ -81,11 +81,11 @@ class _CarouselState extends State { itemBuilder: (context, index) => AnimatedBuilder( animation: _controller, builder: (context, child) { - var result = _pageHasChanged ? _controller.page : _currentPage * 1.0; + var result = _pageHasChanged ? _controller.page! : _currentPage * 1.0; // The horizontal position of the page between a 1 and 0 var value = result - index; - value = (1 - (value.abs() * .5)).clamp(0.0, 1.0) as double; + value = (1 - (value.abs() * .5)).clamp(0.0, 1.0); return Center( child: SizedBox( diff --git a/animations/lib/src/misc/curved_animation.dart b/animations/lib/src/misc/curved_animation.dart index 06558ebde..52edbdebb 100644 --- a/animations/lib/src/misc/curved_animation.dart +++ b/animations/lib/src/misc/curved_animation.dart @@ -15,14 +15,15 @@ class CurvedAnimationDemo extends StatefulWidget { class CurveChoice { final Curve curve; final String name; - const CurveChoice({this.curve, this.name}); + + const CurveChoice({required this.curve, required this.name}); } class _CurvedAnimationDemoState extends State with SingleTickerProviderStateMixin { - AnimationController controller; - Animation animationRotation; - Animation animationTranslation; + late final AnimationController controller; + late final Animation animationRotation; + late final Animation animationTranslation; static const _duration = Duration(seconds: 4); List curves = [ CurveChoice(curve: Curves.bounceIn, name: 'Bounce In'), @@ -38,8 +39,8 @@ class _CurvedAnimationDemoState extends State CurveChoice(curve: Curves.easeInCirc, name: 'Ease In Circle'), CurveChoice(curve: Curves.easeOutCirc, name: 'Ease Out Circle'), ]; - CurveChoice selectedForwardCurve, selectedReverseCurve; - CurvedAnimation curvedAnimation; + late CurveChoice selectedForwardCurve, selectedReverseCurve; + late final CurvedAnimation curvedAnimation; @override void initState() { @@ -100,10 +101,12 @@ class _CurvedAnimationDemoState extends State value: curve, child: Text(curve.name)); }).toList(), onChanged: (newCurve) { - setState(() { - selectedForwardCurve = newCurve; - curvedAnimation.curve = selectedForwardCurve.curve; - }); + if (newCurve != null) { + setState(() { + selectedForwardCurve = newCurve; + curvedAnimation.curve = selectedForwardCurve.curve; + }); + } }, value: selectedForwardCurve, ), @@ -118,10 +121,12 @@ class _CurvedAnimationDemoState extends State value: curve, child: Text(curve.name)); }).toList(), onChanged: (newCurve) { - setState(() { - selectedReverseCurve = newCurve; - curvedAnimation.reverseCurve = selectedReverseCurve.curve; - }); + if (newCurve != null) { + setState(() { + selectedReverseCurve = newCurve; + curvedAnimation.reverseCurve = selectedReverseCurve.curve; + }); + } }, value: selectedReverseCurve, ), diff --git a/animations/lib/src/misc/hero_animation.dart b/animations/lib/src/misc/hero_animation.dart index 8579cb2ff..fabac4cc4 100644 --- a/animations/lib/src/misc/hero_animation.dart +++ b/animations/lib/src/misc/hero_animation.dart @@ -18,7 +18,7 @@ class HeroAnimationDemo extends StatelessWidget { tag: 'hero-page-child', child: _createHeroContainer( size: 50.0, - color: Colors.grey[300], + color: Colors.grey.shade300, ), ), onTap: () => Navigator.of(context) @@ -47,7 +47,10 @@ class HeroPage extends StatelessWidget { } } -StatelessWidget _createHeroContainer({double size, Color color}) { +StatelessWidget _createHeroContainer({ + required double size, + required Color color, +}) { return Container( height: size, width: size, diff --git a/animations/lib/src/misc/physics_card_drag.dart b/animations/lib/src/misc/physics_card_drag.dart index 99443a8a3..8edd1b29e 100644 --- a/animations/lib/src/misc/physics_card_drag.dart +++ b/animations/lib/src/misc/physics_card_drag.dart @@ -27,7 +27,7 @@ class PhysicsCardDragDemo extends StatelessWidget { /// released. class DraggableCard extends StatefulWidget { final Widget child; - DraggableCard({this.child}); + DraggableCard({required this.child}); @override _DraggableCardState createState() => _DraggableCardState(); @@ -35,7 +35,7 @@ class DraggableCard extends StatefulWidget { class _DraggableCardState extends State with SingleTickerProviderStateMixin { - AnimationController _controller; + late final AnimationController _controller; /// The alignment of the card as it is dragged or being animated. /// @@ -44,7 +44,7 @@ class _DraggableCardState extends State /// this value is set to the value of the [_animation]. var _dragAlignment = Alignment.center; - Animation _animation; + late Animation _animation; final _spring = const SpringDescription( mass: 10, diff --git a/animations/lib/src/misc/repeating_animation.dart b/animations/lib/src/misc/repeating_animation.dart index f27fd73bb..31b3dda06 100644 --- a/animations/lib/src/misc/repeating_animation.dart +++ b/animations/lib/src/misc/repeating_animation.dart @@ -13,8 +13,8 @@ class RepeatingAnimationDemo extends StatefulWidget { class RepeatingAnimationDemoState extends State with SingleTickerProviderStateMixin { - AnimationController _controller; - Animation _borderRadius; + late final AnimationController _controller; + late final Animation _borderRadius; @override void initState() { diff --git a/animations/pubspec.lock b/animations/pubspec.lock index 444ac4138..9ccea1634 100644 --- a/animations/pubspec.lock +++ b/animations/pubspec.lock @@ -94,7 +94,7 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" sky_engine: dependency: transitive description: flutter diff --git a/animations/pubspec.yaml b/animations/pubspec.yaml index c587d9a5a..b1449dc3f 100644 --- a/animations/pubspec.yaml +++ b/animations/pubspec.yaml @@ -3,12 +3,12 @@ description: A new Flutter project. version: 1.0.0+1 environment: - sdk: ">=2.10.0 <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: flutter: sdk: flutter - cupertino_icons: ^1.0.0 + cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: diff --git a/experimental/veggieseasons/ios/Flutter/Debug.xcconfig b/experimental/veggieseasons/ios/Flutter/Debug.xcconfig index e8efba114..b2f5fae9c 100644 --- a/experimental/veggieseasons/ios/Flutter/Debug.xcconfig +++ b/experimental/veggieseasons/ios/Flutter/Debug.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/experimental/veggieseasons/ios/Flutter/Release.xcconfig b/experimental/veggieseasons/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/experimental/veggieseasons/ios/Flutter/Release.xcconfig +++ b/experimental/veggieseasons/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/experimental/veggieseasons/pubspec.lock b/experimental/veggieseasons/pubspec.lock index 9d0f73c3d..67117332c 100644 --- a/experimental/veggieseasons/pubspec.lock +++ b/experimental/veggieseasons/pubspec.lock @@ -373,4 +373,4 @@ packages: version: "2.2.1" sdks: dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.16.0 <2.0.0" + flutter: ">=1.16.0" diff --git a/experimental/web_dashboard/ios/Flutter/Debug.xcconfig b/experimental/web_dashboard/ios/Flutter/Debug.xcconfig index e8efba114..b2f5fae9c 100644 --- a/experimental/web_dashboard/ios/Flutter/Debug.xcconfig +++ b/experimental/web_dashboard/ios/Flutter/Debug.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/experimental/web_dashboard/ios/Flutter/Release.xcconfig b/experimental/web_dashboard/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/experimental/web_dashboard/ios/Flutter/Release.xcconfig +++ b/experimental/web_dashboard/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/flutter_maps_firestore/ios/Flutter/Debug.xcconfig b/flutter_maps_firestore/ios/Flutter/Debug.xcconfig index e8efba114..b2f5fae9c 100644 --- a/flutter_maps_firestore/ios/Flutter/Debug.xcconfig +++ b/flutter_maps_firestore/ios/Flutter/Debug.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/flutter_maps_firestore/ios/Flutter/Release.xcconfig b/flutter_maps_firestore/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/flutter_maps_firestore/ios/Flutter/Release.xcconfig +++ b/flutter_maps_firestore/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/flutter_maps_firestore/lib/main.dart b/flutter_maps_firestore/lib/main.dart index 0bb5fc55f..4f9e67824 100644 --- a/flutter_maps_firestore/lib/main.dart +++ b/flutter_maps_firestore/lib/main.dart @@ -38,7 +38,7 @@ class App extends StatelessWidget { } class HomePage extends StatefulWidget { - const HomePage({@required this.title}); + const HomePage({required this.title}); final String title; @@ -49,7 +49,7 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - Stream _iceCreamStores; + late Stream _iceCreamStores; final Completer _mapController = Completer(); @override @@ -80,13 +80,13 @@ class _HomePageState extends State { return Stack( children: [ StoreMap( - documents: snapshot.data.docs, + documents: snapshot.data!.docs, initialPosition: initialPosition, mapController: _mapController, ), StoreCarousel( mapController: _mapController, - documents: snapshot.data.docs, + documents: snapshot.data!.docs, ), ], ); @@ -98,9 +98,9 @@ class _HomePageState extends State { class StoreCarousel extends StatelessWidget { const StoreCarousel({ - Key key, - @required this.documents, - @required this.mapController, + Key? key, + required this.documents, + required this.mapController, }) : super(key: key); final List documents; @@ -126,9 +126,9 @@ class StoreCarousel extends StatelessWidget { class StoreCarouselList extends StatelessWidget { const StoreCarouselList({ - Key key, - @required this.documents, - @required this.mapController, + Key? key, + required this.documents, + required this.mapController, }) : super(key: key); final List documents; @@ -161,9 +161,9 @@ class StoreCarouselList extends StatelessWidget { class StoreListTile extends StatefulWidget { const StoreListTile({ - Key key, - @required this.document, - @required this.mapController, + Key? key, + required this.document, + required this.mapController, }) : super(key: key); final DocumentSnapshot document; @@ -239,10 +239,10 @@ class _StoreListTileState extends State { class StoreMap extends StatelessWidget { const StoreMap({ - Key key, - @required this.documents, - @required this.initialPosition, - @required this.mapController, + Key? key, + required this.documents, + required this.initialPosition, + required this.mapController, }) : super(key: key); final List documents; @@ -265,8 +265,8 @@ class StoreMap extends StatelessWidget { document['location'].longitude as double, ), infoWindow: InfoWindow( - title: document['name'] as String, - snippet: document['address'] as String, + title: document['name'] as String?, + snippet: document['address'] as String?, ), )) .toSet(), diff --git a/flutter_maps_firestore/pubspec.yaml b/flutter_maps_firestore/pubspec.yaml index 6263051bc..2386e42ab 100644 --- a/flutter_maps_firestore/pubspec.yaml +++ b/flutter_maps_firestore/pubspec.yaml @@ -3,21 +3,21 @@ description: A new Flutter project. version: 1.0.0+1 environment: - sdk: ">=2.10.0 <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: flutter: sdk: flutter - cloud_firestore: ^0.16.0 - firebase_core: ^0.7.0 - google_maps_flutter: ^1.2.0 - google_maps_webservice: ^0.0.19 - location: ^3.0.2 + cloud_firestore: ^0.17.0-1.0.nullsafety.2 + firebase_core: ^0.8.0-1.0.nullsafety.2 + google_maps_flutter: ^2.0.0 + google_maps_webservice: ^0.0.20-nullsafety.0 + location: ^4.0.0-nullsafety.0 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.10.0 flutter: uses-material-design: true diff --git a/infinite_list/lib/main.dart b/infinite_list/lib/main.dart index 99df2c7f2..6bd57252a 100644 --- a/infinite_list/lib/main.dart +++ b/infinite_list/lib/main.dart @@ -32,7 +32,7 @@ class MyHomePage extends StatelessWidget { appBar: AppBar( title: Text('Infinite List Sample'), ), - body: Selector( + body: Selector( // Selector is a widget from package:provider. It allows us to listen // to only one aspect of a provided value. In this case, we are only // listening to the catalog's `itemCount`, because that's all we need diff --git a/infinite_list/lib/src/api/item.dart b/infinite_list/lib/src/api/item.dart index 4a713b1a5..c60efee48 100644 --- a/infinite_list/lib/src/api/item.dart +++ b/infinite_list/lib/src/api/item.dart @@ -12,9 +12,9 @@ class Item { final String name; Item({ - @required this.color, - @required this.name, - @required this.price, + required this.color, + required this.name, + required this.price, }); Item.loading() : this(color: Colors.grey, name: '...', price: 0); diff --git a/infinite_list/lib/src/api/page.dart b/infinite_list/lib/src/api/page.dart index 19c251414..15a485d64 100644 --- a/infinite_list/lib/src/api/page.dart +++ b/infinite_list/lib/src/api/page.dart @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/material.dart'; -import 'package:meta/meta.dart'; - import 'item.dart'; const int itemsPerPage = 20; @@ -17,8 +14,8 @@ class ItemPage { final bool hasNext; ItemPage({ - @required this.items, - @required this.startingIndex, - @required this.hasNext, + required this.items, + required this.startingIndex, + required this.hasNext, }); } diff --git a/infinite_list/lib/src/catalog.dart b/infinite_list/lib/src/catalog.dart index 9d42e9589..ce80c89dc 100644 --- a/infinite_list/lib/src/catalog.dart +++ b/infinite_list/lib/src/catalog.dart @@ -32,7 +32,7 @@ class Catalog extends ChangeNotifier { /// The size of the catalog. This is `null` at first, and only when the user /// reaches the end of the catalog, it will hold the actual number. - int itemCount; + int? itemCount; /// After the catalog is disposed, we don't allow it to call /// [notifyListeners]. @@ -62,7 +62,7 @@ class Catalog extends ChangeNotifier { // If the corresponding page is already in memory, return immediately. if (_pages.containsKey(startingIndex)) { - var item = _pages[startingIndex].items[index - startingIndex]; + var item = _pages[startingIndex]!.items[index - startingIndex]; return item; } diff --git a/infinite_list/lib/src/item_tile.dart b/infinite_list/lib/src/item_tile.dart index ce66d3577..4a740deed 100644 --- a/infinite_list/lib/src/item_tile.dart +++ b/infinite_list/lib/src/item_tile.dart @@ -11,7 +11,7 @@ import 'api/item.dart'; class ItemTile extends StatelessWidget { final Item item; - ItemTile({@required this.item, Key key}) : super(key: key); + ItemTile({required this.item, Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -34,7 +34,7 @@ class ItemTile extends StatelessWidget { /// This is the widget responsible for building the "still loading" item /// in the list (represented with "..." and a crossed square). class LoadingItemTile extends StatelessWidget { - const LoadingItemTile({Key key}) : super(key: key); + const LoadingItemTile({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/infinite_list/pubspec.lock b/infinite_list/pubspec.lock index 047295af7..c4b11aac1 100644 --- a/infinite_list/pubspec.lock +++ b/infinite_list/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -73,42 +73,42 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: "direct main" description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" nested: dependency: transitive description: name: nested url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "0.0.5-nullsafety.1" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.2+3" + version: "5.0.0-nullsafety.3" sky_engine: dependency: transitive description: flutter @@ -120,56 +120,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" flutter: ">=1.16.0" diff --git a/infinite_list/pubspec.yaml b/infinite_list/pubspec.yaml index ae163d115..c368a7560 100644 --- a/infinite_list/pubspec.yaml +++ b/infinite_list/pubspec.yaml @@ -5,21 +5,21 @@ description: > version: 1.0.0+1 environment: - sdk: ">=2.10.0 <3.0.0" + sdk: '>=2.12.0-0 <3.0.0' dependencies: flutter: sdk: flutter - cupertino_icons: ^1.0.0 - meta: ^1.1.8 - provider: ^4.0.0 + cupertino_icons: ^1.0.2 + meta: ^1.3.0 + provider: ^5.0.0-nullsafety.3 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.10.0 flutter: uses-material-design: true diff --git a/ios_app_clip/ios/Flutter/Debug.xcconfig b/ios_app_clip/ios/Flutter/Debug.xcconfig index 49dc19fc4..267b3d078 100644 --- a/ios_app_clip/ios/Flutter/Debug.xcconfig +++ b/ios_app_clip/ios/Flutter/Debug.xcconfig @@ -1,3 +1,4 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios_app_clip/ios/Flutter/Release.xcconfig b/ios_app_clip/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/ios_app_clip/ios/Flutter/Release.xcconfig +++ b/ios_app_clip/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios_app_clip/pubspec.lock b/ios_app_clip/pubspec.lock index d251fe0c2..08d0373f2 100644 --- a/ios_app_clip/pubspec.lock +++ b/ios_app_clip/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" cupertino_icons: dependency: "direct main" description: @@ -70,7 +70,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" flutter: dependency: "direct main" description: flutter @@ -87,21 +87,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" plugin_platform_interface: dependency: transitive description: @@ -120,56 +120,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.10.0-110 <2.11.0" - flutter: ">=1.12.13+hotfix.5 <2.0.0" + dart: ">=2.12.0-0.0 <3.0.0" + flutter: ">=1.12.13+hotfix.5" diff --git a/isolate_example/ios/Runner.xcodeproj/project.pbxproj b/isolate_example/ios/Runner.xcodeproj/project.pbxproj index 20dc8e91c..0f51382b3 100644 --- a/isolate_example/ios/Runner.xcodeproj/project.pbxproj +++ b/isolate_example/ios/Runner.xcodeproj/project.pbxproj @@ -9,11 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -26,8 +22,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,13 +32,11 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -57,8 +49,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -68,9 +58,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -201,7 +189,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -253,7 +241,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -330,7 +317,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -386,7 +372,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/isolate_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/isolate_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16e..919434a62 100644 --- a/isolate_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/isolate_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/isolate_example/lib/data_transfer_page.dart b/isolate_example/lib/data_transfer_page.dart index 54b08b5e7..7ac517449 100644 --- a/isolate_example/lib/data_transfer_page.dart +++ b/isolate_example/lib/data_transfer_page.dart @@ -87,17 +87,15 @@ class DataTransferPage extends StatelessWidget { } class DataTransferIsolateController extends ChangeNotifier { - Isolate _isolate; - ReceivePort _incomingReceivePort; - SendPort _outgoingSendPort; + Isolate? _isolate; + late ReceivePort _incomingReceivePort; + late SendPort _outgoingSendPort; final currentProgress = []; int runningTest = 0; Stopwatch _timer = Stopwatch(); double progressPercent = 0; - Isolate get newIsolate => _isolate; - bool get running => runningTest != 0; DataTransferIsolateController() { @@ -262,7 +260,7 @@ Iterable createNums() sync* { } } -Future generateAndSum( +Future generateAndSum( SendPort callerSP, Iterable iter, int length, diff --git a/isolate_example/lib/infinite_process_page.dart b/isolate_example/lib/infinite_process_page.dart index c0e146fc6..4152a8678 100644 --- a/isolate_example/lib/infinite_process_page.dart +++ b/isolate_example/lib/infinite_process_page.dart @@ -86,7 +86,7 @@ class InfiniteProcessPage extends StatelessWidget { Radio( value: i, groupValue: controller.currentMultiplier, - onChanged: (val) => controller.setMultiplier(val), + onChanged: (val) => controller.setMultiplier(val!), ), Text('${i}x') ], @@ -101,10 +101,10 @@ class InfiniteProcessPage extends StatelessWidget { } class InfiniteProcessIsolateController extends ChangeNotifier { - Isolate newIsolate; - ReceivePort receivePort; - SendPort newIceSP; - Capability capability; + Isolate? newIsolate; + late ReceivePort receivePort; + late SendPort newIceSP; + Capability? capability; int _currentMultiplier = 1; final List _currentResults = []; @@ -146,17 +146,17 @@ class InfiniteProcessIsolateController extends ChangeNotifier { } void terminate() { - newIsolate.kill(); + newIsolate?.kill(); _created = false; _currentResults.clear(); notifyListeners(); } void pausedSwitch() { - if (_paused) { - newIsolate.resume(capability); + if (_paused && capability != null) { + newIsolate?.resume(capability!); } else { - capability = newIsolate.pause(); + capability = newIsolate?.pause(); } _paused = !_paused; diff --git a/isolate_example/lib/performance_page.dart b/isolate_example/lib/performance_page.dart index cfa5f852d..1f600a15d 100644 --- a/isolate_example/lib/performance_page.dart +++ b/isolate_example/lib/performance_page.dart @@ -88,7 +88,7 @@ class _PerformancePageState extends State { var snackBar = SnackBar( content: Text('Main Isolate Done!'), ); - Scaffold.of(context).showSnackBar(snackBar); + ScaffoldMessenger.of(context).showSnackBar(snackBar); }); setState(() { @@ -102,7 +102,7 @@ class _PerformancePageState extends State { var snackBar = SnackBar( content: Text('Secondary Isolate Done!'), ); - Scaffold.of(context).showSnackBar(snackBar); + ScaffoldMessenger.of(context).showSnackBar(snackBar); }); setState(() { @@ -131,8 +131,8 @@ class SmoothAnimationWidget extends StatefulWidget { class SmoothAnimationWidgetState extends State with TickerProviderStateMixin { - AnimationController _animationController; - Animation _borderAnimation; + late final AnimationController _animationController; + late final Animation _borderAnimation; @override void initState() { diff --git a/isolate_example/pubspec.lock b/isolate_example/pubspec.lock index 56ed87f2b..fa76f7174 100644 --- a/isolate_example/pubspec.lock +++ b/isolate_example/pubspec.lock @@ -7,49 +7,49 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -66,42 +66,42 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" nested: dependency: transitive description: name: nested url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "1.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.2+3" + version: "5.0.0-nullsafety.5" sky_engine: dependency: transitive description: flutter @@ -113,56 +113,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" flutter: ">=1.16.0" diff --git a/isolate_example/pubspec.yaml b/isolate_example/pubspec.yaml index 4726960a0..0ff5ea9dc 100644 --- a/isolate_example/pubspec.yaml +++ b/isolate_example/pubspec.yaml @@ -3,17 +3,17 @@ description: A Flutter sample to demonstrate isolates version: 1.0.0+1 environment: - sdk: ">=2.5.0 <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: flutter: sdk: flutter - provider: ^4.0.5 + provider: ^5.0.0-0 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.10.0 flutter: diff --git a/isolate_example/test/widget_test.dart b/isolate_example/test/widget_test.dart index 0ab1c19b3..d86eebc01 100644 --- a/isolate_example/test/widget_test.dart +++ b/isolate_example/test/widget_test.dart @@ -15,7 +15,5 @@ import 'package:flutter_test/flutter_test.dart'; void main() { - testWidgets('This test will always pass', (tester) async { - return true; - }); + testWidgets('This test will always pass', (tester) async {}); } diff --git a/jsonexample/ios/Runner.xcodeproj/project.pbxproj b/jsonexample/ios/Runner.xcodeproj/project.pbxproj index 5cf66e638..1a5ae166e 100644 --- a/jsonexample/ios/Runner.xcodeproj/project.pbxproj +++ b/jsonexample/ios/Runner.xcodeproj/project.pbxproj @@ -9,11 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -26,8 +22,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,13 +32,11 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -57,8 +49,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -68,9 +58,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -201,7 +189,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -253,7 +241,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -330,7 +317,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -386,7 +372,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/jsonexample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/jsonexample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16e..919434a62 100644 --- a/jsonexample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/jsonexample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/jsonexample/lib/built_value/built_complex_object.dart b/jsonexample/lib/built_value/built_complex_object.dart index 0670df8c6..aab23fbfe 100644 --- a/jsonexample/lib/built_value/built_complex_object.dart +++ b/jsonexample/lib/built_value/built_complex_object.dart @@ -14,29 +14,21 @@ abstract class BuiltComplexObject static Serializer get serializer => _$builtComplexObjectSerializer; - @nullable - String get aString; + String? get aString; - @nullable - int get anInt; + int? get anInt; - @nullable - double get aDouble; + double? get aDouble; - @nullable - BuiltSimpleObject get anObject; + BuiltSimpleObject? get anObject; - @nullable - BuiltList get aListOfStrings; + BuiltList? get aListOfStrings; - @nullable - BuiltList get aListOfInts; + BuiltList? get aListOfInts; - @nullable - BuiltList get aListOfDoubles; + BuiltList? get aListOfDoubles; - @nullable - BuiltList get aListOfObjects; + BuiltList? get aListOfObjects; BuiltComplexObject._(); diff --git a/jsonexample/lib/built_value/built_complex_object.g.dart b/jsonexample/lib/built_value/built_complex_object.g.dart index 9408abb55..59cc27334 100644 --- a/jsonexample/lib/built_value/built_complex_object.g.dart +++ b/jsonexample/lib/built_value/built_complex_object.g.dart @@ -20,55 +20,63 @@ class _$BuiltComplexObjectSerializer Iterable serialize(Serializers serializers, BuiltComplexObject object, {FullType specifiedType = FullType.unspecified}) { final result = []; - if (object.aString != null) { + Object? value; + value = object.aString; + if (value != null) { result ..add('aString') - ..add(serializers.serialize(object.aString, + ..add(serializers.serialize(value, specifiedType: const FullType(String))); } - if (object.anInt != null) { + value = object.anInt; + if (value != null) { result ..add('anInt') - ..add(serializers.serialize(object.anInt, - specifiedType: const FullType(int))); + ..add(serializers.serialize(value, specifiedType: const FullType(int))); } - if (object.aDouble != null) { + value = object.aDouble; + if (value != null) { result ..add('aDouble') - ..add(serializers.serialize(object.aDouble, + ..add(serializers.serialize(value, specifiedType: const FullType(double))); } - if (object.anObject != null) { + value = object.anObject; + if (value != null) { result ..add('anObject') - ..add(serializers.serialize(object.anObject, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltSimpleObject))); } - if (object.aListOfStrings != null) { + value = object.aListOfStrings; + if (value != null) { result ..add('aListOfStrings') - ..add(serializers.serialize(object.aListOfStrings, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(String)]))); } - if (object.aListOfInts != null) { + value = object.aListOfInts; + if (value != null) { result ..add('aListOfInts') - ..add(serializers.serialize(object.aListOfInts, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(int)]))); } - if (object.aListOfDoubles != null) { + value = object.aListOfDoubles; + if (value != null) { result ..add('aListOfDoubles') - ..add(serializers.serialize(object.aListOfDoubles, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(double)]))); } - if (object.aListOfObjects != null) { + value = object.aListOfObjects; + if (value != null) { result ..add('aListOfObjects') - ..add(serializers.serialize(object.aListOfObjects, + ..add(serializers.serialize(value, specifiedType: const FullType( BuiltList, const [const FullType(BuiltSimpleObject)]))); } @@ -85,7 +93,7 @@ class _$BuiltComplexObjectSerializer while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); - final dynamic value = iterator.current; + final Object value = iterator.current; switch (key) { case 'aString': result.aString = serializers.deserialize(value, @@ -137,24 +145,24 @@ class _$BuiltComplexObjectSerializer class _$BuiltComplexObject extends BuiltComplexObject { @override - final String aString; + final String? aString; @override - final int anInt; + final int? anInt; @override - final double aDouble; + final double? aDouble; @override - final BuiltSimpleObject anObject; + final BuiltSimpleObject? anObject; @override - final BuiltList aListOfStrings; + final BuiltList? aListOfStrings; @override - final BuiltList aListOfInts; + final BuiltList? aListOfInts; @override - final BuiltList aListOfDoubles; + final BuiltList? aListOfDoubles; @override - final BuiltList aListOfObjects; + final BuiltList? aListOfObjects; factory _$BuiltComplexObject( - [void Function(BuiltComplexObjectBuilder) updates]) => + [void Function(BuiltComplexObjectBuilder)? updates]) => (new BuiltComplexObjectBuilder()..update(updates)).build(); _$BuiltComplexObject._( @@ -224,62 +232,63 @@ class _$BuiltComplexObject extends BuiltComplexObject { class BuiltComplexObjectBuilder implements Builder { - _$BuiltComplexObject _$v; + _$BuiltComplexObject? _$v; - String _aString; - String get aString => _$this._aString; - set aString(String aString) => _$this._aString = aString; + String? _aString; + String? get aString => _$this._aString; + set aString(String? aString) => _$this._aString = aString; - int _anInt; - int get anInt => _$this._anInt; - set anInt(int anInt) => _$this._anInt = anInt; + int? _anInt; + int? get anInt => _$this._anInt; + set anInt(int? anInt) => _$this._anInt = anInt; - double _aDouble; - double get aDouble => _$this._aDouble; - set aDouble(double aDouble) => _$this._aDouble = aDouble; + double? _aDouble; + double? get aDouble => _$this._aDouble; + set aDouble(double? aDouble) => _$this._aDouble = aDouble; - BuiltSimpleObjectBuilder _anObject; + BuiltSimpleObjectBuilder? _anObject; BuiltSimpleObjectBuilder get anObject => _$this._anObject ??= new BuiltSimpleObjectBuilder(); - set anObject(BuiltSimpleObjectBuilder anObject) => + set anObject(BuiltSimpleObjectBuilder? anObject) => _$this._anObject = anObject; - ListBuilder _aListOfStrings; + ListBuilder? _aListOfStrings; ListBuilder get aListOfStrings => _$this._aListOfStrings ??= new ListBuilder(); - set aListOfStrings(ListBuilder aListOfStrings) => + set aListOfStrings(ListBuilder? aListOfStrings) => _$this._aListOfStrings = aListOfStrings; - ListBuilder _aListOfInts; + ListBuilder? _aListOfInts; ListBuilder get aListOfInts => _$this._aListOfInts ??= new ListBuilder(); - set aListOfInts(ListBuilder aListOfInts) => + set aListOfInts(ListBuilder? aListOfInts) => _$this._aListOfInts = aListOfInts; - ListBuilder _aListOfDoubles; + ListBuilder? _aListOfDoubles; ListBuilder get aListOfDoubles => _$this._aListOfDoubles ??= new ListBuilder(); - set aListOfDoubles(ListBuilder aListOfDoubles) => + set aListOfDoubles(ListBuilder? aListOfDoubles) => _$this._aListOfDoubles = aListOfDoubles; - ListBuilder _aListOfObjects; + ListBuilder? _aListOfObjects; ListBuilder get aListOfObjects => _$this._aListOfObjects ??= new ListBuilder(); - set aListOfObjects(ListBuilder aListOfObjects) => + set aListOfObjects(ListBuilder? aListOfObjects) => _$this._aListOfObjects = aListOfObjects; BuiltComplexObjectBuilder(); BuiltComplexObjectBuilder get _$this { - if (_$v != null) { - _aString = _$v.aString; - _anInt = _$v.anInt; - _aDouble = _$v.aDouble; - _anObject = _$v.anObject?.toBuilder(); - _aListOfStrings = _$v.aListOfStrings?.toBuilder(); - _aListOfInts = _$v.aListOfInts?.toBuilder(); - _aListOfDoubles = _$v.aListOfDoubles?.toBuilder(); - _aListOfObjects = _$v.aListOfObjects?.toBuilder(); + final $v = _$v; + if ($v != null) { + _aString = $v.aString; + _anInt = $v.anInt; + _aDouble = $v.aDouble; + _anObject = $v.anObject?.toBuilder(); + _aListOfStrings = $v.aListOfStrings?.toBuilder(); + _aListOfInts = $v.aListOfInts?.toBuilder(); + _aListOfDoubles = $v.aListOfDoubles?.toBuilder(); + _aListOfObjects = $v.aListOfObjects?.toBuilder(); _$v = null; } return this; @@ -287,14 +296,12 @@ class BuiltComplexObjectBuilder @override void replace(BuiltComplexObject other) { - if (other == null) { - throw new ArgumentError.notNull('other'); - } + ArgumentError.checkNotNull(other, 'other'); _$v = other as _$BuiltComplexObject; } @override - void update(void Function(BuiltComplexObjectBuilder) updates) { + void update(void Function(BuiltComplexObjectBuilder)? updates) { if (updates != null) updates(this); } @@ -313,7 +320,7 @@ class BuiltComplexObjectBuilder aListOfDoubles: _aListOfDoubles?.build(), aListOfObjects: _aListOfObjects?.build()); } catch (_) { - String _$failedField; + late String _$failedField; try { _$failedField = 'anObject'; _anObject?.build(); diff --git a/jsonexample/lib/built_value/built_simple_object.dart b/jsonexample/lib/built_value/built_simple_object.dart index 1ff84be0d..5805aca9d 100644 --- a/jsonexample/lib/built_value/built_simple_object.dart +++ b/jsonexample/lib/built_value/built_simple_object.dart @@ -13,23 +13,17 @@ abstract class BuiltSimpleObject static Serializer get serializer => _$builtSimpleObjectSerializer; - @nullable - String get aString; + String? get aString; - @nullable - int get anInt; + int? get anInt; - @nullable - double get aDouble; + double? get aDouble; - @nullable - BuiltList get aListOfStrings; + BuiltList? get aListOfStrings; - @nullable - BuiltList get aListOfInts; + BuiltList? get aListOfInts; - @nullable - BuiltList get aListOfDoubles; + BuiltList? get aListOfDoubles; BuiltSimpleObject._(); diff --git a/jsonexample/lib/built_value/built_simple_object.g.dart b/jsonexample/lib/built_value/built_simple_object.g.dart index 213cdcee3..92e9ad9cf 100644 --- a/jsonexample/lib/built_value/built_simple_object.g.dart +++ b/jsonexample/lib/built_value/built_simple_object.g.dart @@ -20,42 +20,48 @@ class _$BuiltSimpleObjectSerializer Iterable serialize(Serializers serializers, BuiltSimpleObject object, {FullType specifiedType = FullType.unspecified}) { final result = []; - if (object.aString != null) { + Object? value; + value = object.aString; + if (value != null) { result ..add('aString') - ..add(serializers.serialize(object.aString, + ..add(serializers.serialize(value, specifiedType: const FullType(String))); } - if (object.anInt != null) { + value = object.anInt; + if (value != null) { result ..add('anInt') - ..add(serializers.serialize(object.anInt, - specifiedType: const FullType(int))); + ..add(serializers.serialize(value, specifiedType: const FullType(int))); } - if (object.aDouble != null) { + value = object.aDouble; + if (value != null) { result ..add('aDouble') - ..add(serializers.serialize(object.aDouble, + ..add(serializers.serialize(value, specifiedType: const FullType(double))); } - if (object.aListOfStrings != null) { + value = object.aListOfStrings; + if (value != null) { result ..add('aListOfStrings') - ..add(serializers.serialize(object.aListOfStrings, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(String)]))); } - if (object.aListOfInts != null) { + value = object.aListOfInts; + if (value != null) { result ..add('aListOfInts') - ..add(serializers.serialize(object.aListOfInts, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(int)]))); } - if (object.aListOfDoubles != null) { + value = object.aListOfDoubles; + if (value != null) { result ..add('aListOfDoubles') - ..add(serializers.serialize(object.aListOfDoubles, + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [const FullType(double)]))); } @@ -72,7 +78,7 @@ class _$BuiltSimpleObjectSerializer while (iterator.moveNext()) { final key = iterator.current as String; iterator.moveNext(); - final dynamic value = iterator.current; + final Object value = iterator.current; switch (key) { case 'aString': result.aString = serializers.deserialize(value, @@ -113,20 +119,20 @@ class _$BuiltSimpleObjectSerializer class _$BuiltSimpleObject extends BuiltSimpleObject { @override - final String aString; + final String? aString; @override - final int anInt; + final int? anInt; @override - final double aDouble; + final double? aDouble; @override - final BuiltList aListOfStrings; + final BuiltList? aListOfStrings; @override - final BuiltList aListOfInts; + final BuiltList? aListOfInts; @override - final BuiltList aListOfDoubles; + final BuiltList? aListOfDoubles; factory _$BuiltSimpleObject( - [void Function(BuiltSimpleObjectBuilder) updates]) => + [void Function(BuiltSimpleObjectBuilder)? updates]) => (new BuiltSimpleObjectBuilder()..update(updates)).build(); _$BuiltSimpleObject._( @@ -185,48 +191,49 @@ class _$BuiltSimpleObject extends BuiltSimpleObject { class BuiltSimpleObjectBuilder implements Builder { - _$BuiltSimpleObject _$v; + _$BuiltSimpleObject? _$v; - String _aString; - String get aString => _$this._aString; - set aString(String aString) => _$this._aString = aString; + String? _aString; + String? get aString => _$this._aString; + set aString(String? aString) => _$this._aString = aString; - int _anInt; - int get anInt => _$this._anInt; - set anInt(int anInt) => _$this._anInt = anInt; + int? _anInt; + int? get anInt => _$this._anInt; + set anInt(int? anInt) => _$this._anInt = anInt; - double _aDouble; - double get aDouble => _$this._aDouble; - set aDouble(double aDouble) => _$this._aDouble = aDouble; + double? _aDouble; + double? get aDouble => _$this._aDouble; + set aDouble(double? aDouble) => _$this._aDouble = aDouble; - ListBuilder _aListOfStrings; + ListBuilder? _aListOfStrings; ListBuilder get aListOfStrings => _$this._aListOfStrings ??= new ListBuilder(); - set aListOfStrings(ListBuilder aListOfStrings) => + set aListOfStrings(ListBuilder? aListOfStrings) => _$this._aListOfStrings = aListOfStrings; - ListBuilder _aListOfInts; + ListBuilder? _aListOfInts; ListBuilder get aListOfInts => _$this._aListOfInts ??= new ListBuilder(); - set aListOfInts(ListBuilder aListOfInts) => + set aListOfInts(ListBuilder? aListOfInts) => _$this._aListOfInts = aListOfInts; - ListBuilder _aListOfDoubles; + ListBuilder? _aListOfDoubles; ListBuilder get aListOfDoubles => _$this._aListOfDoubles ??= new ListBuilder(); - set aListOfDoubles(ListBuilder aListOfDoubles) => + set aListOfDoubles(ListBuilder? aListOfDoubles) => _$this._aListOfDoubles = aListOfDoubles; BuiltSimpleObjectBuilder(); BuiltSimpleObjectBuilder get _$this { - if (_$v != null) { - _aString = _$v.aString; - _anInt = _$v.anInt; - _aDouble = _$v.aDouble; - _aListOfStrings = _$v.aListOfStrings?.toBuilder(); - _aListOfInts = _$v.aListOfInts?.toBuilder(); - _aListOfDoubles = _$v.aListOfDoubles?.toBuilder(); + final $v = _$v; + if ($v != null) { + _aString = $v.aString; + _anInt = $v.anInt; + _aDouble = $v.aDouble; + _aListOfStrings = $v.aListOfStrings?.toBuilder(); + _aListOfInts = $v.aListOfInts?.toBuilder(); + _aListOfDoubles = $v.aListOfDoubles?.toBuilder(); _$v = null; } return this; @@ -234,14 +241,12 @@ class BuiltSimpleObjectBuilder @override void replace(BuiltSimpleObject other) { - if (other == null) { - throw new ArgumentError.notNull('other'); - } + ArgumentError.checkNotNull(other, 'other'); _$v = other as _$BuiltSimpleObject; } @override - void update(void Function(BuiltSimpleObjectBuilder) updates) { + void update(void Function(BuiltSimpleObjectBuilder)? updates) { if (updates != null) updates(this); } @@ -258,7 +263,7 @@ class BuiltSimpleObjectBuilder aListOfInts: _aListOfInts?.build(), aListOfDoubles: _aListOfDoubles?.build()); } catch (_) { - String _$failedField; + late String _$failedField; try { _$failedField = 'aListOfStrings'; _aListOfStrings?.build(); diff --git a/jsonexample/lib/dart_convert/converted_complex_object.dart b/jsonexample/lib/dart_convert/converted_complex_object.dart index adb073785..5d03a582f 100644 --- a/jsonexample/lib/dart_convert/converted_complex_object.dart +++ b/jsonexample/lib/dart_convert/converted_complex_object.dart @@ -16,22 +16,20 @@ class ConvertedComplexObject { this.aListOfObjects, }); - final String aString; - final int anInt; - final double aDouble; - final ConvertedSimpleObject anObject; - final List aListOfStrings; - final List aListOfInts; - final List aListOfDoubles; - final List aListOfObjects; + final String? aString; + final int? anInt; + final double? aDouble; + final ConvertedSimpleObject? anObject; + final List? aListOfStrings; + final List? aListOfInts; + final List? aListOfDoubles; + final List? aListOfObjects; factory ConvertedComplexObject.fromJson(Map json) { - if (json == null) return null; - return ConvertedComplexObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: json['aDouble'] as double, + aString: json['aString'] as String?, + anInt: json['anInt'] as int?, + aDouble: json['aDouble'] as double?, anObject: json['anObject'] != null ? ConvertedSimpleObject.fromJson( json['anObject'] as Map) diff --git a/jsonexample/lib/dart_convert/converted_simple_object.dart b/jsonexample/lib/dart_convert/converted_simple_object.dart index a9611841d..b32ec6448 100644 --- a/jsonexample/lib/dart_convert/converted_simple_object.dart +++ b/jsonexample/lib/dart_convert/converted_simple_object.dart @@ -12,20 +12,18 @@ class ConvertedSimpleObject { this.aListOfDoubles, }); - final String aString; - final int anInt; - final double aDouble; - final List aListOfStrings; - final List aListOfInts; - final List aListOfDoubles; + final String? aString; + final int? anInt; + final double? aDouble; + final List? aListOfStrings; + final List? aListOfInts; + final List? aListOfDoubles; factory ConvertedSimpleObject.fromJson(Map json) { - if (json == null) return null; - return ConvertedSimpleObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: json['aDouble'] as double, + aString: json['aString'] as String?, + anInt: json['anInt'] as int?, + aDouble: json['aDouble'] as double?, aListOfStrings: json['aListOfStrings'] != null ? List.from(json['aListOfStrings'] as Iterable) : null, diff --git a/jsonexample/lib/json_serializable/serializable_complex_object.dart b/jsonexample/lib/json_serializable/serializable_complex_object.dart index 467e48e0c..e77c505f9 100644 --- a/jsonexample/lib/json_serializable/serializable_complex_object.dart +++ b/jsonexample/lib/json_serializable/serializable_complex_object.dart @@ -20,14 +20,14 @@ class SerializableComplexObject { this.aListOfObjects, }); - final String aString; - final int anInt; - final double aDouble; - final SerializableSimpleObject anObject; - final List aListOfStrings; - final List aListOfInts; - final List aListOfDoubles; - final List aListOfObjects; + final String? aString; + final int? anInt; + final double? aDouble; + final SerializableSimpleObject? anObject; + final List? aListOfStrings; + final List? aListOfInts; + final List? aListOfDoubles; + final List? aListOfObjects; factory SerializableComplexObject.fromJson(Map json) => _$SerializableComplexObjectFromJson(json); diff --git a/jsonexample/lib/json_serializable/serializable_complex_object.g.dart b/jsonexample/lib/json_serializable/serializable_complex_object.g.dart index 038d82e36..ee1687aaa 100644 --- a/jsonexample/lib/json_serializable/serializable_complex_object.g.dart +++ b/jsonexample/lib/json_serializable/serializable_complex_object.g.dart @@ -9,24 +9,25 @@ part of 'serializable_complex_object.dart'; SerializableComplexObject _$SerializableComplexObjectFromJson( Map json) { return SerializableComplexObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: (json['aDouble'] as num)?.toDouble(), + aString: json['aString'] as String?, + anInt: json['anInt'] as int?, + aDouble: (json['aDouble'] as num?)?.toDouble(), anObject: json['anObject'] == null ? null : SerializableSimpleObject.fromJson( json['anObject'] as Map), - aListOfStrings: - (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), - aListOfInts: (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), - aListOfDoubles: (json['aListOfDoubles'] as List) - ?.map((e) => (e as num)?.toDouble()) - ?.toList(), - aListOfObjects: (json['aListOfObjects'] as List) - ?.map((e) => e == null - ? null - : SerializableSimpleObject.fromJson(e as Map)) - ?.toList(), + aListOfStrings: (json['aListOfStrings'] as List?) + ?.map((e) => e as String) + .toList(), + aListOfInts: + (json['aListOfInts'] as List?)?.map((e) => e as int).toList(), + aListOfDoubles: (json['aListOfDoubles'] as List?) + ?.map((e) => (e as num).toDouble()) + .toList(), + aListOfObjects: (json['aListOfObjects'] as List?) + ?.map( + (e) => SerializableSimpleObject.fromJson(e as Map)) + .toList(), ); } diff --git a/jsonexample/lib/json_serializable/serializable_simple_object.dart b/jsonexample/lib/json_serializable/serializable_simple_object.dart index f762c9441..0847d2d6c 100644 --- a/jsonexample/lib/json_serializable/serializable_simple_object.dart +++ b/jsonexample/lib/json_serializable/serializable_simple_object.dart @@ -19,12 +19,12 @@ class SerializableSimpleObject { this.aListOfDoubles, }); - final String aString; - final int anInt; - final double aDouble; - final List aListOfStrings; - final List aListOfInts; - final List aListOfDoubles; + final String? aString; + final int? anInt; + final double? aDouble; + final List? aListOfStrings; + final List? aListOfInts; + final List? aListOfDoubles; factory SerializableSimpleObject.fromJson(Map json) => _$SerializableSimpleObjectFromJson(json); diff --git a/jsonexample/lib/json_serializable/serializable_simple_object.g.dart b/jsonexample/lib/json_serializable/serializable_simple_object.g.dart index 3d86dac92..f6572e882 100644 --- a/jsonexample/lib/json_serializable/serializable_simple_object.g.dart +++ b/jsonexample/lib/json_serializable/serializable_simple_object.g.dart @@ -9,15 +9,17 @@ part of 'serializable_simple_object.dart'; SerializableSimpleObject _$SerializableSimpleObjectFromJson( Map json) { return SerializableSimpleObject( - aString: json['aString'] as String, - anInt: json['anInt'] as int, - aDouble: (json['aDouble'] as num)?.toDouble(), - aListOfStrings: - (json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(), - aListOfInts: (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(), - aListOfDoubles: (json['aListOfDoubles'] as List) - ?.map((e) => (e as num)?.toDouble()) - ?.toList(), + aString: json['aString'] as String?, + anInt: json['anInt'] as int?, + aDouble: (json['aDouble'] as num?)?.toDouble(), + aListOfStrings: (json['aListOfStrings'] as List?) + ?.map((e) => e as String) + .toList(), + aListOfInts: + (json['aListOfInts'] as List?)?.map((e) => e as int).toList(), + aListOfDoubles: (json['aListOfDoubles'] as List?) + ?.map((e) => (e as num).toDouble()) + .toList(), ); } diff --git a/jsonexample/lib/main.dart b/jsonexample/lib/main.dart index ca4be3ebd..1db98aa55 100644 --- a/jsonexample/lib/main.dart +++ b/jsonexample/lib/main.dart @@ -21,7 +21,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatelessWidget { - MyHomePage({Key key}) : super(key: key); + MyHomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/jsonexample/lib/tab_pages.dart b/jsonexample/lib/tab_pages.dart index b5ba18e6b..b889be92f 100644 --- a/jsonexample/lib/tab_pages.dart +++ b/jsonexample/lib/tab_pages.dart @@ -39,7 +39,7 @@ class BasicsPage extends StatelessWidget { Widget build(BuildContext context) { final localTheme = Theme.of(context).textTheme; final boldStyle = - localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600); + localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600); final dynamicListOfInts = json.decode(JsonStrings.listOfInts) as List; final strongListOfInts = List.from(dynamicListOfInts); @@ -134,7 +134,7 @@ class BasicsPage extends StatelessWidget { }, children: createMapRows( strongMapOfDynamics, - localTheme.bodyText2, + localTheme.bodyText2!, boldStyle, ), ), @@ -275,7 +275,7 @@ class BuiltSimplePage extends StatelessWidget { Widget build(BuildContext context) { var objects = JsonStrings.simpleObjects.map( (jsonString) { - final dynamic parsedJson = json.decode(jsonString); + final parsedJson = json.decode(jsonString) as Object; return serializers.deserializeWith( BuiltSimpleObject.serializer, parsedJson); }, @@ -297,7 +297,7 @@ class BuiltComplexPage extends StatelessWidget { Widget build(BuildContext context) { var objects = JsonStrings.complexObjects.map( (jsonString) { - final dynamic parsedJson = json.decode(jsonString); + final parsedJson = json.decode(jsonString) as Object; return serializers.deserializeWith( BuiltComplexObject.serializer, parsedJson); }, diff --git a/jsonexample/lib/utils.dart b/jsonexample/lib/utils.dart index 7ff2796df..4f78b3c8b 100644 --- a/jsonexample/lib/utils.dart +++ b/jsonexample/lib/utils.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -String prettyPrintList(Iterable iter) { +String prettyPrintList(Iterable? iter) { if (iter == null) return 'NULL'; final buff = StringBuffer(); diff --git a/jsonexample/lib/widgets.dart b/jsonexample/lib/widgets.dart index a6ae9a4c1..609c0164f 100644 --- a/jsonexample/lib/widgets.dart +++ b/jsonexample/lib/widgets.dart @@ -14,7 +14,7 @@ class SimpleObjectView extends StatelessWidget { Widget build(BuildContext context) { final localTheme = Theme.of(context).textTheme; final boldStyle = - localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600); + localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600); if (simpleObject == null) return Text('NULL', style: localTheme.bodyText2); @@ -59,7 +59,7 @@ class SimpleObjectView extends StatelessWidget { Text('aListOfStrings:', style: boldStyle), Text( prettyPrintList( - simpleObject.aListOfStrings as Iterable, + simpleObject.aListOfStrings as Iterable?, ), style: localTheme.bodyText2, ), @@ -69,7 +69,7 @@ class SimpleObjectView extends StatelessWidget { children: [ Text('aListOfInts:', style: boldStyle), Text( - prettyPrintList(simpleObject.aListOfInts as Iterable), + prettyPrintList(simpleObject.aListOfInts as Iterable?), style: localTheme.bodyText2, ), ], @@ -81,7 +81,8 @@ class SimpleObjectView extends StatelessWidget { child: Text('aListOfDoubles:', style: boldStyle), ), Text( - prettyPrintList(simpleObject.aListOfDoubles as Iterable), + prettyPrintList( + simpleObject.aListOfDoubles as Iterable?), style: localTheme.bodyText2, ), ], @@ -126,7 +127,7 @@ class ComplexObjectView extends StatelessWidget { ComplexObjectView(dynamic obj) : complexObject = obj; - List _generateSimpleObjectWidgets(Iterable simpleObjects) { + List _generateSimpleObjectWidgets(Iterable? simpleObjects) { if (simpleObjects == null) { return [ const Padding( @@ -158,7 +159,7 @@ class ComplexObjectView extends StatelessWidget { Widget build(BuildContext context) { final localTheme = Theme.of(context).textTheme; final boldStyle = - localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600); + localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600); return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -216,7 +217,7 @@ class ComplexObjectView extends StatelessWidget { Text('aListOfStrings:', style: boldStyle), Text( prettyPrintList( - complexObject.aListOfStrings as Iterable), + complexObject.aListOfStrings as Iterable?), style: localTheme.bodyText2, ), ], @@ -226,7 +227,7 @@ class ComplexObjectView extends StatelessWidget { Text('aListOfInts:', style: boldStyle), Text( prettyPrintList( - complexObject.aListOfInts as Iterable), + complexObject.aListOfInts as Iterable?), style: localTheme.bodyText2, ), ], @@ -239,7 +240,7 @@ class ComplexObjectView extends StatelessWidget { ), Text( prettyPrintList( - complexObject.aListOfDoubles as Iterable), + complexObject.aListOfDoubles as Iterable?), style: localTheme.bodyText2, ), ], @@ -257,7 +258,7 @@ class ComplexObjectView extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: _generateSimpleObjectWidgets( - complexObject.aListOfObjects as Iterable), + complexObject.aListOfObjects as Iterable?), ), ), ], diff --git a/jsonexample/pubspec.lock b/jsonexample/pubspec.lock index 1296fc252..d6a021b07 100644 --- a/jsonexample/pubspec.lock +++ b/jsonexample/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "7.0.0" + version: "12.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.17" + version: "0.40.6" args: dependency: transitive description: @@ -28,91 +28,91 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" build: dependency: transitive description: name: build url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.6.2" build_config: dependency: transitive description: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.5" build_daemon: dependency: transitive description: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.7" build_resolvers: dependency: transitive description: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "1.3.11" + version: "1.5.3" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.10.2" + version: "1.11.1" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "6.0.1" + version: "6.1.7" built_collection: dependency: "direct main" description: name: built_collection url: "https://pub.dartlang.org" source: hosted - version: "4.3.2" + version: "5.0.0-nullsafety.0" built_value: dependency: "direct main" description: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "7.1.0" + version: "8.0.0-nullsafety.0" built_value_generator: dependency: "direct dev" description: name: built_value_generator url: "https://pub.dartlang.org" source: hosted - version: "7.1.0" + version: "8.0.0-nullsafety.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" checked_yaml: dependency: transitive description: @@ -133,21 +133,21 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" code_builder: dependency: transitive description: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "3.5.0" + version: "3.6.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" convert: dependency: transitive description: @@ -162,27 +162,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.5" - csslib: - dependency: transitive - description: - name: csslib - url: "https://pub.dartlang.org" - source: hosted - version: "0.16.2" dart_style: dependency: transitive description: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.3.6" + version: "1.3.10" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" file: dependency: transitive description: @@ -196,7 +189,7 @@ packages: name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "0.10.11" + version: "1.0.0" flutter: dependency: "direct main" description: flutter @@ -221,13 +214,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.0" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0+4" http_multi_server: dependency: transitive description: @@ -262,49 +248,49 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "3.1.1" + version: "4.0.0-nullsafety.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "3.5.1" + version: "4.0.0-nullsafety.0" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "0.11.4" + version: "1.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "0.9.7" + version: "1.0.0" node_interop: dependency: transitive description: @@ -332,14 +318,14 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" pool: dependency: transitive description: @@ -381,7 +367,7 @@ packages: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.3" + version: "0.2.4" sky_engine: dependency: transitive description: flutter @@ -393,28 +379,28 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+1" + version: "0.9.10+1" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" stream_transform: dependency: transitive description: @@ -428,21 +414,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" timing: dependency: transitive description: @@ -456,14 +442,14 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" watcher: dependency: transitive description: @@ -477,7 +463,7 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" yaml: dependency: transitive description: @@ -486,4 +472,4 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/jsonexample/pubspec.yaml b/jsonexample/pubspec.yaml index 1929ed698..b414041bc 100644 --- a/jsonexample/pubspec.yaml +++ b/jsonexample/pubspec.yaml @@ -2,12 +2,12 @@ name: jsonexample description: A demonstration of JSON parsing environment: - sdk: '>=2.5.0 <3.0.0' + sdk: '>=2.12.0-0 <3.0.0' dependencies: - json_annotation: ^3.0.1 - built_collection: ^4.3.2 - built_value: ^7.0.4 + json_annotation: ^4.0.0-0 + built_collection: ^5.0.0-0 + built_value: ^8.0.0-0 flutter: sdk: flutter @@ -15,9 +15,9 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - build_runner: ^1.7.2 - built_value_generator: ^7.0.4 - json_serializable: ^3.2.5 + build_runner: ^1.11.1 + built_value_generator: ^8.0.0-0 + json_serializable: ^4.0.0-0 pedantic: ^1.9.0 flutter: diff --git a/jsonexample/test/complex_object_unit_test.dart b/jsonexample/test/complex_object_unit_test.dart index cdb506860..97c6e43d2 100644 --- a/jsonexample/test/complex_object_unit_test.dart +++ b/jsonexample/test/complex_object_unit_test.dart @@ -127,22 +127,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); @@ -169,21 +170,21 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, isNull); - expect(complexObject.anObject.anInt, isNull); - expect(complexObject.anObject.aDouble, isNull); - expect(complexObject.anObject.aListOfStrings, isNull); - expect(complexObject.anObject.aListOfInts, isNull); - expect(complexObject.anObject.aListOfDoubles, isNull); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, isNull); + expect(complexObject.anObject?.anInt, isNull); + expect(complexObject.anObject?.aDouble, isNull); + expect(complexObject.anObject?.aListOfStrings, isNull); + expect(complexObject.anObject?.aListOfInts, isNull); + expect(complexObject.anObject?.aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, isNull); - expect(complexObject.aListOfObjects[i].anInt, isNull); - expect(complexObject.aListOfObjects[i].aDouble, isNull); - expect(complexObject.aListOfObjects[i].aListOfStrings, isNull); - expect(complexObject.aListOfObjects[i].aListOfInts, isNull); - expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?[i].aString, isNull); + expect(complexObject.aListOfObjects?[i].anInt, isNull); + expect(complexObject.aListOfObjects?[i].aDouble, isNull); + expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull); + expect(complexObject.aListOfObjects?[i].aListOfInts, isNull); + expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull); } }); @@ -197,22 +198,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); }); @@ -228,22 +230,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); @@ -270,21 +273,21 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, isNull); - expect(complexObject.anObject.anInt, isNull); - expect(complexObject.anObject.aDouble, isNull); - expect(complexObject.anObject.aListOfStrings, isNull); - expect(complexObject.anObject.aListOfInts, isNull); - expect(complexObject.anObject.aListOfDoubles, isNull); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, isNull); + expect(complexObject.anObject?.anInt, isNull); + expect(complexObject.anObject?.aDouble, isNull); + expect(complexObject.anObject?.aListOfStrings, isNull); + expect(complexObject.anObject?.aListOfInts, isNull); + expect(complexObject.anObject?.aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, isNull); - expect(complexObject.aListOfObjects[i].anInt, isNull); - expect(complexObject.aListOfObjects[i].aDouble, isNull); - expect(complexObject.aListOfObjects[i].aListOfStrings, isNull); - expect(complexObject.aListOfObjects[i].aListOfInts, isNull); - expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?[i].aString, isNull); + expect(complexObject.aListOfObjects?[i].anInt, isNull); + expect(complexObject.aListOfObjects?[i].aDouble, isNull); + expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull); + expect(complexObject.aListOfObjects?[i].aListOfInts, isNull); + expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull); } }); @@ -298,22 +301,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); }); @@ -329,22 +333,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); @@ -372,21 +377,21 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, isNull); - expect(complexObject.anObject.anInt, isNull); - expect(complexObject.anObject.aDouble, isNull); - expect(complexObject.anObject.aListOfStrings, isNull); - expect(complexObject.anObject.aListOfInts, isNull); - expect(complexObject.anObject.aListOfDoubles, isNull); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, isNull); + expect(complexObject.anObject?.anInt, isNull); + expect(complexObject.anObject?.aDouble, isNull); + expect(complexObject.anObject?.aListOfStrings, isNull); + expect(complexObject.anObject?.aListOfInts, isNull); + expect(complexObject.anObject?.aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, isNull); - expect(complexObject.aListOfObjects[i].anInt, isNull); - expect(complexObject.aListOfObjects[i].aDouble, isNull); - expect(complexObject.aListOfObjects[i].aListOfStrings, isNull); - expect(complexObject.aListOfObjects[i].aListOfInts, isNull); - expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull); + expect(complexObject.aListOfObjects?[i].aString, isNull); + expect(complexObject.aListOfObjects?[i].anInt, isNull); + expect(complexObject.aListOfObjects?[i].aDouble, isNull); + expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull); + expect(complexObject.aListOfObjects?[i].aListOfInts, isNull); + expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull); } }); @@ -400,22 +405,23 @@ void main() { expect(complexObject.aListOfStrings, ['one', 'two', 'three']); expect(complexObject.aListOfInts, [1, 2, 3]); expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.anObject.aString, 'Blah, blah, blah.'); - expect(complexObject.anObject.anInt, 1); - expect(complexObject.anObject.aDouble, 1.0); - expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.anObject.aListOfInts, [1, 2, 3]); - expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); - expect(complexObject.aListOfObjects.length, 3); + expect(complexObject.anObject?.aString, 'Blah, blah, blah.'); + expect(complexObject.anObject?.anInt, 1); + expect(complexObject.anObject?.aDouble, 1.0); + expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']); + expect(complexObject.anObject?.aListOfInts, [1, 2, 3]); + expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?.length, 3); for (var i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.'); - expect(complexObject.aListOfObjects[i].anInt, i + 1); - expect(complexObject.aListOfObjects[i].aDouble, 1.0); - expect(complexObject.aListOfObjects[i].aListOfStrings, + expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.'); + expect(complexObject.aListOfObjects?[i].anInt, i + 1); + expect(complexObject.aListOfObjects?[i].aDouble, 1.0); + expect(complexObject.aListOfObjects?[i].aListOfStrings, ['one', 'two', 'three']); - expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]); - expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]); + expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]); + expect( + complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]); } }); }); diff --git a/place_tracker/ios/Flutter/Debug.xcconfig b/place_tracker/ios/Flutter/Debug.xcconfig index e8efba114..b2f5fae9c 100644 --- a/place_tracker/ios/Flutter/Debug.xcconfig +++ b/place_tracker/ios/Flutter/Debug.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/place_tracker/ios/Flutter/Release.xcconfig b/place_tracker/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/place_tracker/ios/Flutter/Release.xcconfig +++ b/place_tracker/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/place_tracker/lib/place_map.dart b/place_tracker/lib/place_map.dart index c96072fee..dd09e2750 100644 --- a/place_tracker/lib/place_map.dart +++ b/place_tracker/lib/place_map.dart @@ -204,7 +204,7 @@ class PlaceMapState extends State { }); // Show a confirmation snackbar that has an action to edit the new place. - Scaffold.of(context).showSnackBar( + ScaffoldMessenger.of(context).showSnackBar( SnackBar( duration: Duration(seconds: 3), content: diff --git a/platform_channels/lib/src/method_channel_demo.dart b/platform_channels/lib/src/method_channel_demo.dart index 91e1f4a07..c993f2746 100644 --- a/platform_channels/lib/src/method_channel_demo.dart +++ b/platform_channels/lib/src/method_channel_demo.dart @@ -22,70 +22,66 @@ class _MethodChannelDemoState extends State { appBar: AppBar( title: const Text('MethodChannel Demo'), ), - body: Builder( - builder: (context) { - return Column( - mainAxisAlignment: MainAxisAlignment.center, + body: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Value of count is $count', + style: Theme.of(context).textTheme.headline5, + ), + SizedBox( + height: 16, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Text( - 'Value of count is $count', - style: Theme.of(context).textTheme.headline5, + // Whenever users press the ElevatedButton, it invokes + // Counter.increment method to increment the value of count. + ElevatedButton.icon( + onPressed: () async { + try { + final value = await Counter.increment(counterValue: count); + setState(() => count = value); + } catch (error) { + showErrorMessage( + context, + error.message as String, + ); + } + }, + icon: Icon(Icons.add), + label: Text('Increment'), ), - SizedBox( - height: 16, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - // Whenever users press the ElevatedButton, it invokes - // Counter.increment method to increment the value of count. - ElevatedButton.icon( - onPressed: () async { - try { - final value = - await Counter.increment(counterValue: count); - setState(() => count = value); - } catch (error) { - showErrorMessage( - context, - error.message as String, - ); - } - }, - icon: Icon(Icons.add), - label: Text('Increment'), - ), - // Whenever users press the ElevatedButton, it invokes - // Counter.decrement method to decrement the value of count. - ElevatedButton.icon( - onPressed: () async { - try { - final value = - await Counter.decrement(counterValue: count); - setState(() => count = value); - } catch (error) { - showErrorMessage( - context, - error.message as String, - ); - } - }, - icon: Icon(Icons.remove), - label: Text('Decrement'), - ) - ], + // Whenever users press the ElevatedButton, it invokes + // Counter.decrement method to decrement the value of count. + ElevatedButton.icon( + onPressed: () async { + try { + final value = await Counter.decrement(counterValue: count); + setState(() => count = value); + } catch (error) { + showErrorMessage( + context, + error.message as String, + ); + } + }, + icon: Icon(Icons.remove), + label: Text('Decrement'), ) ], - ); - }, + ) + ], ), ); } void showErrorMessage(BuildContext context, String errorMessage) { - Scaffold.of(context).showSnackBar(SnackBar( - content: Text(errorMessage), - )); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(errorMessage), + ), + ); } } diff --git a/platform_channels/lib/src/pet_list_screen.dart b/platform_channels/lib/src/pet_list_screen.dart index b2f4b3cc0..909815ae1 100644 --- a/platform_channels/lib/src/pet_list_screen.dart +++ b/platform_channels/lib/src/pet_list_screen.dart @@ -25,11 +25,7 @@ class _PetListScreenState extends State { BasicMessageChannel('stringCodecDemo', StringCodec()) .setMessageHandler((message) async { if (message == null) { - scaffoldKey.currentState.showSnackBar( - SnackBar( - content: - const Text('An error occurred while adding pet details.')), - ); + showSnackBar('An error occurred while adding pet details.', context); } else { setState(() { petListModel = PetListModel.fromJson(message); @@ -91,10 +87,10 @@ class BuildPetList extends StatelessWidget { }, ); } +} - void showSnackBar(String message, BuildContext context) { - Scaffold.of(context).showSnackBar(SnackBar( - content: Text(message), - )); - } +void showSnackBar(String message, BuildContext context) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: Text(message), + )); } diff --git a/platform_channels/pubspec.lock b/platform_channels/pubspec.lock index ff74a3253..444ac4138 100644 --- a/platform_channels/pubspec.lock +++ b/platform_channels/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" flutter: dependency: "direct main" description: flutter @@ -73,21 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" pedantic: dependency: "direct dev" description: @@ -106,55 +106,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/platform_design/lib/main.dart b/platform_design/lib/main.dart index 623bc4cd4..a634de31e 100644 --- a/platform_design/lib/main.dart +++ b/platform_design/lib/main.dart @@ -116,7 +116,7 @@ class _PlatformAdaptingHomePageState extends State { ); default: assert(false, 'Unexpected tab'); - return null; + return SizedBox.shrink(); } }, ); diff --git a/platform_design/lib/news_tab.dart b/platform_design/lib/news_tab.dart index 7a447c9ba..d74f6a2a4 100644 --- a/platform_design/lib/news_tab.dart +++ b/platform_design/lib/news_tab.dart @@ -22,9 +22,9 @@ class NewsTab extends StatefulWidget { class _NewsTabState extends State { static const _itemsLength = 20; - List colors; - List titles; - List contents; + late final List colors; + late final List titles; + late final List contents; @override void initState() { @@ -36,8 +36,6 @@ class _NewsTabState extends State { } Widget _listBuilder(BuildContext context, int index) { - if (index >= _itemsLength) return null; - return SafeArea( top: false, bottom: false, @@ -101,6 +99,7 @@ class _NewsTabState extends State { ), body: Container( child: ListView.builder( + itemCount: _itemsLength, itemBuilder: _listBuilder, ), ), @@ -111,6 +110,7 @@ class _NewsTabState extends State { return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar(), child: ListView.builder( + itemCount: _itemsLength, itemBuilder: _listBuilder, ), ); diff --git a/platform_design/lib/profile_tab.dart b/platform_design/lib/profile_tab.dart index 1ebdec851..06c106e4b 100644 --- a/platform_design/lib/profile_tab.dart +++ b/platform_design/lib/profile_tab.dart @@ -109,7 +109,11 @@ class ProfileTab extends StatelessWidget { } class PreferenceCard extends StatelessWidget { - const PreferenceCard({this.header, this.content, this.preferenceChoices}); + const PreferenceCard({ + required this.header, + required this.content, + required this.preferenceChoices, + }); final String header; final String content; diff --git a/platform_design/lib/song_detail_tab.dart b/platform_design/lib/song_detail_tab.dart index 180f34dd1..fc91bf213 100644 --- a/platform_design/lib/song_detail_tab.dart +++ b/platform_design/lib/song_detail_tab.dart @@ -12,7 +12,11 @@ import 'widgets.dart'; /// On Android, this page sits at the top of your app. On iOS, this page is on /// top of the songs tab's content but is below the tab bar itself. class SongDetailTab extends StatelessWidget { - const SongDetailTab({this.id, this.song, this.color}); + const SongDetailTab({ + required this.id, + required this.song, + required this.color, + }); final int id; final String song; diff --git a/platform_design/lib/songs_tab.dart b/platform_design/lib/songs_tab.dart index 4270d40f1..8fd79b404 100644 --- a/platform_design/lib/songs_tab.dart +++ b/platform_design/lib/songs_tab.dart @@ -15,9 +15,9 @@ class SongsTab extends StatefulWidget { static const androidIcon = Icon(Icons.music_note); static const iosIcon = Icon(CupertinoIcons.music_note); - const SongsTab({Key key, this.androidDrawer}) : super(key: key); + const SongsTab({Key? key, this.androidDrawer}) : super(key: key); - final Widget androidDrawer; + final Widget? androidDrawer; @override _SongsTabState createState() => _SongsTabState(); @@ -28,8 +28,8 @@ class _SongsTabState extends State { final _androidRefreshKey = GlobalKey(); - List colors; - List songNames; + late List colors; + late List songNames; @override void initState() { @@ -51,7 +51,7 @@ class _SongsTabState extends State { } Widget _listBuilder(BuildContext context, int index) { - if (index >= _itemsLength) return null; + if (index >= _itemsLength) return Container(); // Show a slightly different color palette. Show poppy-ier colors on iOS // due to lighter contrasting bars and tone it down on Android. @@ -96,7 +96,7 @@ class _SongsTabState extends State { // done in a real app but it's done here since this app // unrealistically toggles the current platform for demonstration // purposes. - WidgetsBinding.instance.reassembleApplication(); + WidgetsBinding.instance!.reassembleApplication(); } // =========================================================================== @@ -117,7 +117,8 @@ class _SongsTabState extends State { actions: [ IconButton( icon: Icon(Icons.refresh), - onPressed: () async => await _androidRefreshKey.currentState.show(), + onPressed: () async => + await _androidRefreshKey.currentState!.show(), ), IconButton( icon: Icon(Icons.shuffle), @@ -131,6 +132,7 @@ class _SongsTabState extends State { onRefresh: _refreshData, child: ListView.builder( padding: EdgeInsets.symmetric(vertical: 12), + itemCount: _itemsLength, itemBuilder: _listBuilder, ), ), @@ -155,7 +157,10 @@ class _SongsTabState extends State { sliver: SliverPadding( padding: EdgeInsets.symmetric(vertical: 12), sliver: SliverList( - delegate: SliverChildBuilderDelegate(_listBuilder), + delegate: SliverChildBuilderDelegate( + _listBuilder, + childCount: _itemsLength, + ), ), ), ), diff --git a/platform_design/lib/utils.dart b/platform_design/lib/utils.dart index b88d4d669..f6d6ce9eb 100644 --- a/platform_design/lib/utils.dart +++ b/platform_design/lib/utils.dart @@ -57,7 +57,7 @@ String generateRandomHeadline() { } assert(false, 'Failed to generate news headline'); - return null; + return 'Failed to generate news headline'; } List getRandomColors(int amount) { diff --git a/platform_design/lib/widgets.dart b/platform_design/lib/widgets.dart index 7eea2dcb1..cd0e8a97c 100644 --- a/platform_design/lib/widgets.dart +++ b/platform_design/lib/widgets.dart @@ -9,12 +9,10 @@ import 'package:flutter/material.dart'; /// A simple widget that builds different things on different platforms. class PlatformWidget extends StatelessWidget { const PlatformWidget({ - Key key, - @required this.androidBuilder, - @required this.iosBuilder, - }) : assert(androidBuilder != null), - assert(iosBuilder != null), - super(key: key); + Key? key, + required this.androidBuilder, + required this.iosBuilder, + }) : super(key: key); final WidgetBuilder androidBuilder; final WidgetBuilder iosBuilder; @@ -28,7 +26,7 @@ class PlatformWidget extends StatelessWidget { return iosBuilder(context); default: assert(false, 'Unexpected platform $defaultTargetPlatform'); - return null; + return SizedBox.shrink(); } } } @@ -40,15 +38,15 @@ class PlatformWidget extends StatelessWidget { class PressableCard extends StatefulWidget { const PressableCard({ this.onPressed, - this.color, - this.flattenAnimation, + required this.color, + required this.flattenAnimation, this.child, }); - final VoidCallback onPressed; + final VoidCallback? onPressed; final Color color; final Animation flattenAnimation; - final Widget child; + final Widget? child; @override State createState() => _PressableCardState(); @@ -57,8 +55,8 @@ class PressableCard extends StatefulWidget { class _PressableCardState extends State with SingleTickerProviderStateMixin { bool pressed = false; - AnimationController controller; - Animation elevationAnimation; + late final AnimationController controller; + late final Animation elevationAnimation; @override void initState() { @@ -93,9 +91,7 @@ class _PressableCardState extends State child: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - if (widget.onPressed != null) { - widget.onPressed(); - } + widget.onPressed?.call(); }, // This widget both internally drives an animation when pressed and // responds to an external animation to flatten the card when in a @@ -138,13 +134,17 @@ class _PressableCardState extends State /// This is an example of a custom widget that an app developer might create for /// use on both iOS and Android as part of their brand's unique design. class HeroAnimatingSongCard extends StatelessWidget { - HeroAnimatingSongCard( - {this.song, this.color, this.heroAnimation, this.onPressed}); + HeroAnimatingSongCard({ + required this.song, + required this.color, + required this.heroAnimation, + this.onPressed, + }); final String song; final Color color; final Animation heroAnimation; - final VoidCallback onPressed; + final VoidCallback? onPressed; double get playButtonSize => 50 + 50 * heroAnimation.value; @@ -226,7 +226,7 @@ class SongPlaceholderTile extends StatelessWidget { child: Row( children: [ Container( - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, width: 130, ), Padding( @@ -239,27 +239,27 @@ class SongPlaceholderTile extends StatelessWidget { Container( height: 9, margin: EdgeInsets.only(right: 60), - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, ), Container( height: 9, margin: EdgeInsets.only(right: 20, top: 8), - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, ), Container( height: 9, margin: EdgeInsets.only(right: 40, top: 8), - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, ), Container( height: 9, margin: EdgeInsets.only(right: 80, top: 8), - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, ), Container( height: 9, margin: EdgeInsets.only(right: 50, top: 8), - color: Theme.of(context).textTheme.bodyText2.color, + color: Theme.of(context).textTheme.bodyText2!.color, ), ], ), @@ -287,7 +287,7 @@ void showChoices(BuildContext context, List choices) { showDialog( context: context, builder: (context) { - var selectedRadio = 1; + int? selectedRadio = 1; return AlertDialog( contentPadding: EdgeInsets.only(top: 12), content: StatefulBuilder( @@ -295,12 +295,11 @@ void showChoices(BuildContext context, List choices) { return Column( mainAxisSize: MainAxisSize.min, children: List.generate(choices.length, (index) { - return RadioListTile( + return RadioListTile( title: Text(choices[index]), value: index, groupValue: selectedRadio, - // ignore: avoid_types_on_closure_parameters - onChanged: (int value) { + onChanged: (value) { setState(() => selectedRadio = value); }, ); diff --git a/platform_design/pubspec.lock b/platform_design/pubspec.lock index af7674f52..b9b996ca0 100644 --- a/platform_design/pubspec.lock +++ b/platform_design/pubspec.lock @@ -7,63 +7,63 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.2" english_words: dependency: "direct main" description: name: english_words url: "https://pub.dartlang.org" source: hosted - version: "3.1.5" + version: "4.0.0-nullsafety.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -75,7 +75,7 @@ packages: name: flutter_lorem url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "2.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -87,28 +87,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" sky_engine: dependency: transitive description: flutter @@ -120,55 +120,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-259 <3.0.0" diff --git a/platform_design/pubspec.yaml b/platform_design/pubspec.yaml index a5d6676c9..4f0aa33d7 100644 --- a/platform_design/pubspec.yaml +++ b/platform_design/pubspec.yaml @@ -3,20 +3,20 @@ description: A project showcasing a Flutter app following different platform IA version: 1.0.0+1 environment: - sdk: ">=2.5.0 <3.0.0" + sdk: '>=2.12.0-0 <3.0.0' dependencies: - english_words: ^3.1.5 - flutter_lorem: ^1.1.0 + english_words: ^4.0.0-nullsafety.0 + flutter_lorem: ^2.0.0 flutter: sdk: flutter - cupertino_icons: ^0.1.3 + cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.10.0 flutter: uses-material-design: true diff --git a/platform_view_swift/pubspec.lock b/platform_view_swift/pubspec.lock index 64e19789d..83affb500 100644 --- a/platform_view_swift/pubspec.lock +++ b/platform_view_swift/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" flutter: dependency: "direct main" description: flutter @@ -73,21 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" pedantic: dependency: "direct dev" description: @@ -106,55 +106,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/provider_counter/pubspec.lock b/provider_counter/pubspec.lock index c99b28fd1..cb0fff0a2 100644 --- a/provider_counter/pubspec.lock +++ b/provider_counter/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -73,42 +73,42 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" nested: dependency: transitive description: name: nested url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "1.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.2+3" + version: "5.0.0-nullsafety.5" sky_engine: dependency: transitive description: flutter @@ -120,56 +120,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.12.0-0.0 <3.0.0" flutter: ">=1.16.0" diff --git a/provider_counter/pubspec.yaml b/provider_counter/pubspec.yaml index 5d4b066d6..a9588f248 100644 --- a/provider_counter/pubspec.yaml +++ b/provider_counter/pubspec.yaml @@ -5,20 +5,19 @@ description: > version: 1.0.0 environment: - sdk: ">=2.10.0 <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: flutter: sdk: flutter - provider: ^4.3.2 - cupertino_icons: ^1.0.0 + provider: ^5.0.0-nullsafety.5 + cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 - + pedantic: ^1.10.0 flutter: uses-material-design: true diff --git a/provider_shopper/lib/main.dart b/provider_shopper/lib/main.dart index 6a1c1dbd8..df03d0dd9 100644 --- a/provider_shopper/lib/main.dart +++ b/provider_shopper/lib/main.dart @@ -30,6 +30,7 @@ class MyApp extends StatelessWidget { ChangeNotifierProxyProvider( create: (context) => CartModel(), update: (context, catalog, cart) { + if (cart == null) throw ArgumentError.notNull('cart'); cart.catalog = catalog; return cart; }, diff --git a/provider_shopper/lib/models/cart.dart b/provider_shopper/lib/models/cart.dart index aac72854f..d416b0847 100644 --- a/provider_shopper/lib/models/cart.dart +++ b/provider_shopper/lib/models/cart.dart @@ -7,7 +7,7 @@ import 'package:provider_shopper/models/catalog.dart'; class CartModel extends ChangeNotifier { /// The private field backing [catalog]. - CatalogModel _catalog; + late CatalogModel _catalog; /// Internal, private state of the cart. Stores the ids of each item. final List _itemIds = []; @@ -16,9 +16,6 @@ class CartModel extends ChangeNotifier { CatalogModel get catalog => _catalog; set catalog(CatalogModel newCatalog) { - assert(newCatalog != null); - assert(_itemIds.every((id) => newCatalog.getById(id) != null), - 'The catalog $newCatalog does not have one of $_itemIds in it.'); _catalog = newCatalog; // Notify listeners, in case the new catalog provides information // different from the previous one. For example, availability of an item diff --git a/provider_shopper/lib/screens/cart.dart b/provider_shopper/lib/screens/cart.dart index 989f2f0d4..c155256f2 100644 --- a/provider_shopper/lib/screens/cart.dart +++ b/provider_shopper/lib/screens/cart.dart @@ -65,7 +65,7 @@ class _CartTotal extends StatelessWidget { @override Widget build(BuildContext context) { var hugeStyle = - Theme.of(context).textTheme.headline1.copyWith(fontSize: 48); + Theme.of(context).textTheme.headline1!.copyWith(fontSize: 48); return SizedBox( height: 200, @@ -85,7 +85,7 @@ class _CartTotal extends StatelessWidget { SizedBox(width: 24), TextButton( onPressed: () { - Scaffold.of(context).showSnackBar( + ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text('Buying not supported yet.'))); }, style: TextButton.styleFrom(primary: Colors.white), diff --git a/provider_shopper/lib/screens/catalog.dart b/provider_shopper/lib/screens/catalog.dart index 5d32a7473..c9e7d2a7a 100644 --- a/provider_shopper/lib/screens/catalog.dart +++ b/provider_shopper/lib/screens/catalog.dart @@ -28,7 +28,7 @@ class MyCatalog extends StatelessWidget { class _AddButton extends StatelessWidget { final Item item; - const _AddButton({Key key, @required this.item}) : super(key: key); + const _AddButton({required this.item, Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -55,7 +55,7 @@ class _AddButton extends StatelessWidget { cart.add(item); }, style: ButtonStyle( - overlayColor: MaterialStateProperty.resolveWith((states) { + overlayColor: MaterialStateProperty.resolveWith((states) { if (states.contains(MaterialState.pressed)) { return Theme.of(context).primaryColor; } @@ -86,7 +86,7 @@ class _MyAppBar extends StatelessWidget { class _MyListItem extends StatelessWidget { final int index; - _MyListItem(this.index, {Key key}) : super(key: key); + _MyListItem(this.index, {Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/provider_shopper/pubspec.lock b/provider_shopper/pubspec.lock index ef969e037..54257b56f 100644 --- a/provider_shopper/pubspec.lock +++ b/provider_shopper/pubspec.lock @@ -7,49 +7,49 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.3" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.5" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.5" + version: "1.15.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -66,42 +66,42 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.3" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.6" + version: "1.3.0" nested: dependency: transitive description: name: nested url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "1.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.3" + version: "1.8.0" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.10.0" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.3" + version: "5.0.0-nullsafety.5" sky_engine: dependency: transitive description: flutter @@ -113,56 +113,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.4" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.6" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.3" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.6" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.5" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.5" + version: "2.1.0" sdks: - dart: ">=2.12.0-0.0 <3.0.0" + dart: ">=2.12.0-259.16.beta <3.0.0" flutter: ">=1.16.0" diff --git a/provider_shopper/pubspec.yaml b/provider_shopper/pubspec.yaml index 913345ea1..2aa55e913 100644 --- a/provider_shopper/pubspec.yaml +++ b/provider_shopper/pubspec.yaml @@ -4,19 +4,19 @@ description: A shopping app sample that uses Provider for state management. version: 1.0.0+1 environment: - sdk: ">=2.5.0 <3.0.0" + sdk: '>=2.12.0-259.16.beta <3.0.0' dependencies: flutter: sdk: flutter # Import the provider package. - provider: ^4.3.2 + provider: '>=5.0.0-nullsafety.5 <6.0.0' dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.10.0 flutter: uses-material-design: true diff --git a/provider_shopper/test/cart_widget_test.dart b/provider_shopper/test/cart_widget_test.dart index f722caea5..ed8379379 100644 --- a/provider_shopper/test/cart_widget_test.dart +++ b/provider_shopper/test/cart_widget_test.dart @@ -9,8 +9,8 @@ import 'package:provider_shopper/models/cart.dart'; import 'package:provider_shopper/models/catalog.dart'; import 'package:provider_shopper/screens/cart.dart'; -CartModel cartModel; -CatalogModel catalogModel; +CartModel? cartModel; +CatalogModel? catalogModel; Widget createCartScreen() => MultiProvider( providers: [ Provider(create: (context) => CatalogModel()), @@ -19,7 +19,7 @@ Widget createCartScreen() => MultiProvider( update: (context, catalog, cart) { catalogModel = catalog; cartModel = cart; - cart.catalog = catalogModel; + cart!.catalog = catalogModel!; return cart; }, ), @@ -48,8 +48,8 @@ void main() { // Adding five items in the cart and testing. for (var i = 0; i < 5; i++) { - var item = catalogModel.getByPosition(i); - cartModel.add(item); + var item = catalogModel!.getByPosition(i); + cartModel!.add(item); await tester.pumpAndSettle(); expect(find.text(item.name), findsOneWidget); } diff --git a/provider_shopper/test/catalog_widget_test.dart b/provider_shopper/test/catalog_widget_test.dart index ecd2db677..f8419098f 100644 --- a/provider_shopper/test/catalog_widget_test.dart +++ b/provider_shopper/test/catalog_widget_test.dart @@ -16,7 +16,7 @@ Widget createCatalogScreen() => MultiProvider( ChangeNotifierProxyProvider( create: (context) => CartModel(), update: (context, catalog, cart) { - cart.catalog = catalog; + cart!.catalog = catalog; return cart; }, ), diff --git a/provider_shopper/test/login_widget_test.dart b/provider_shopper/test/login_widget_test.dart index 88157631d..b2aa493ef 100644 --- a/provider_shopper/test/login_widget_test.dart +++ b/provider_shopper/test/login_widget_test.dart @@ -18,7 +18,7 @@ void main() { ChangeNotifierProxyProvider( create: (context) => CartModel(), update: (context, catalog, cart) { - cart.catalog = catalog; + cart!.catalog = catalog; return cart; }, ), diff --git a/testing_app/ios/Flutter/Debug.xcconfig b/testing_app/ios/Flutter/Debug.xcconfig index e8efba114..b2f5fae9c 100644 --- a/testing_app/ios/Flutter/Debug.xcconfig +++ b/testing_app/ios/Flutter/Debug.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/testing_app/ios/Flutter/Release.xcconfig b/testing_app/ios/Flutter/Release.xcconfig index 399e9340e..88c29144c 100644 --- a/testing_app/ios/Flutter/Release.xcconfig +++ b/testing_app/ios/Flutter/Release.xcconfig @@ -1,2 +1,3 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/testing_app/lib/screens/favorites.dart b/testing_app/lib/screens/favorites.dart index 37ee345a6..cf63e27ea 100644 --- a/testing_app/lib/screens/favorites.dart +++ b/testing_app/lib/screens/favorites.dart @@ -55,7 +55,7 @@ class FavoriteItemTile extends StatelessWidget { icon: Icon(Icons.close), onPressed: () { Provider.of(context, listen: false).remove(itemNo); - Scaffold.of(context).showSnackBar( + ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('Removed from favorites.'), duration: Duration(seconds: 1), diff --git a/testing_app/lib/screens/home.dart b/testing_app/lib/screens/home.dart index e1fee8720..56c4a6fda 100644 --- a/testing_app/lib/screens/home.dart +++ b/testing_app/lib/screens/home.dart @@ -67,7 +67,7 @@ class ItemTile extends StatelessWidget { !favoritesList.items.contains(itemNo) ? favoritesList.add(itemNo) : favoritesList.remove(itemNo); - Scaffold.of(context).showSnackBar( + ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text(favoritesList.items.contains(itemNo) ? 'Added to favorites.' diff --git a/testing_app/pubspec.lock b/testing_app/pubspec.lock index 317f9d411..54ef99c21 100644 --- a/testing_app/pubspec.lock +++ b/testing_app/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "12.0.0" + version: "14.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.40.6" + version: "0.41.2" archive: dependency: transitive description: @@ -35,28 +35,28 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" cli_util: dependency: transitive description: @@ -70,14 +70,14 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" convert: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "0.14.2" + version: "0.15.1" crypto: dependency: transitive description: @@ -112,14 +112,14 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.0.0-nullsafety.2" + version: "6.0.0-nullsafety.4" flutter: dependency: "direct main" description: flutter @@ -147,13 +147,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.2" http_multi_server: dependency: transitive description: @@ -188,14 +181,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3-nullsafety.2" - json_rpc_2: - dependency: transitive - description: - name: json_rpc_2 - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.2" + version: "0.6.3-nullsafety.3" logging: dependency: transitive description: @@ -209,14 +195,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" mime: dependency: transitive description: @@ -251,7 +237,7 @@ packages: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "1.4.12" + version: "1.4.13" package_config: dependency: transitive description: @@ -265,42 +251,42 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" pedantic: dependency: "direct dev" description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.3" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0-nullsafety.2" + version: "3.0.0-nullsafety.4" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.5.0-nullsafety.2" + version: "1.5.0-nullsafety.3" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.0.0-nullsafety.2" + version: "4.0.0-nullsafety.4" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.2+3" + version: "4.3.3" pub_semver: dependency: transitive description: @@ -321,21 +307,21 @@ packages: name: shelf_packages_handler url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" shelf_static: dependency: transitive description: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "0.2.9+1" + version: "0.2.9+2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.3" + version: "0.2.4" sky_engine: dependency: transitive description: flutter @@ -347,42 +333,42 @@ packages: name: source_map_stack_trace url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.4" source_maps: dependency: transitive description: name: source_maps url: "https://pub.dartlang.org" source: hosted - version: "0.10.10-nullsafety.2" + version: "0.10.10-nullsafety.3" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" sync_http: dependency: transitive description: @@ -396,42 +382,42 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.16.0-nullsafety.5" + version: "1.16.0-nullsafety.17" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.12-nullsafety.5" + version: "0.3.12-nullsafety.15" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" vm_service: dependency: transitive description: @@ -439,13 +425,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.5.0" - vm_service_client: - dependency: transitive - description: - name: vm_service_client - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.6+2" watcher: dependency: transitive description: @@ -459,7 +438,7 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" webdriver: dependency: transitive description: @@ -482,5 +461,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" - flutter: ">=1.16.0 <2.0.0" + dart: ">=2.12.0-0.0 <3.0.0" + flutter: ">=1.16.0" diff --git a/tool/ios_ci_script.sh b/tool/ios_ci_script.sh index 7b912b863..cd750c250 100755 --- a/tool/ios_ci_script.sh +++ b/tool/ios_ci_script.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e -set -o pipefail # Necessary so xcpretty won't mask xcodebuild failures later. echo "Pre-caching ios artifacts, such as the Flutter.framework" flutter precache --no-web --no-linux --no-windows --no-fuchsia --no-android --no-macos @@ -22,6 +21,11 @@ pushd add_to_app/fullscreen/flutter_module flutter packages get popd +echo "Fetching dependencies and building 'multiple_flutters/multiple_flutters_module'." +pushd add_to_app/multiple_flutters/multiple_flutters_module +flutter packages get +popd + echo "== Testing 'add_to_app/fullscreen/ios_fullscreen' on Flutter's $FLUTTER_VERSION channel ==" pushd "add_to_app/fullscreen/ios_fullscreen" @@ -72,4 +76,23 @@ COMPILER_INDEX_STORE_ENABLE=NO CONFIGURATION=Release \ popd +echo "== Testing 'add_to_app/multiple_flutters/multiple_flutters_ios' on Flutter's $FLUTTER_VERSION channel ==" +pushd "add_to_app/multiple_flutters/multiple_flutters_ios" + +pod install + +xcodebuild -workspace "MultipleFluttersIos.xcworkspace" \ +-scheme "MultipleFluttersIos" CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO \ +CODE_SIGN_IDENTITY=- EXPANDED_CODE_SIGN_IDENTITY=- \ +COMPILER_INDEX_STORE_ENABLE=NO CONFIGURATION=Debug | xcpretty + +xcodebuild -workspace "MultipleFluttersIos.xcworkspace" \ +-scheme "MultipleFluttersIos" CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO \ +CODE_SIGN_IDENTITY=- EXPANDED_CODE_SIGN_IDENTITY=- \ +COMPILER_INDEX_STORE_ENABLE=NO CONFIGURATION=Release \ +-destination generic/platform=iOS | xcpretty + +popd + + echo "-- Success --"