From baa1f976b255ced89c4aa28cd0c8370951eaa246 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 13 May 2020 09:18:26 +1000 Subject: [PATCH] Samples maintenance (#435) --- add_to_app/flutter_module/pubspec.lock | 8 +-- .../flutter_module_using_plugin/pubspec.lock | 26 ++++++-- .../flutter_module_using_plugin/pubspec.yaml | 2 +- animations/analysis_options.yaml | 2 +- animations/lib/main.dart | 3 + .../lib/src/basics/01_animated_container.dart | 3 + .../lib/src/basics/02_page_route_builder.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 | 5 ++ .../lib/src/basics/07_tween_sequence.dart | 2 + animations/lib/src/misc/animated_list.dart | 25 ++++---- .../lib/src/misc/animated_positioned.dart | 5 +- .../lib/src/misc/animated_switcher.dart | 5 +- animations/lib/src/misc/card_swipe.dart | 7 +++ animations/lib/src/misc/carousel.dart | 2 +- animations/lib/src/misc/expand_card.dart | 1 + animations/lib/src/misc/focus_image.dart | 4 ++ animations/pubspec.lock | 28 ++++----- animations/pubspec.yaml | 2 +- animations/test/misc/expand_card_test.dart | 4 +- .../analysis_options.yaml | 2 +- .../lib/src/widgets/data_tree.dart | 12 ++-- .../lib/src/widgets/split.dart | 4 +- .../desktop_photo_search/pubspec.lock | 59 ++++++++++-------- .../desktop_photo_search/pubspec.yaml | 4 +- experimental/web_dashboard/pubspec.lock | 24 ++++---- flutter_maps_firestore/analysis_options.yaml | 2 +- flutter_maps_firestore/pubspec.lock | 52 ++++++++++++++-- flutter_maps_firestore/pubspec.yaml | 6 +- isolate_example/analysis_options.yaml | 2 +- isolate_example/lib/data_transfer_page.dart | 17 +++--- .../lib/infinite_process_page.dart | 19 +++--- isolate_example/pubspec.lock | 6 +- isolate_example/pubspec.yaml | 2 +- jsonexample/analysis_options.yaml | 2 +- jsonexample/lib/tab_pages.dart | 12 ++-- jsonexample/lib/widgets.dart | 4 +- jsonexample/pubspec.lock | 22 +++---- jsonexample/pubspec.yaml | 2 +- .../test/complex_object_unit_test.dart | 60 +++++++++---------- jsonexample/test/simple_object_unit_test.dart | 18 +++--- jsonexample/test/widget_tests_test.dart | 12 ++-- place_tracker/analysis_options.yaml | 2 +- place_tracker/lib/app_model.dart | 5 +- place_tracker/lib/place_list.dart | 4 +- place_tracker/lib/place_map.dart | 55 +++++++++-------- place_tracker/pubspec.lock | 34 ++++++++++- place_tracker/pubspec.yaml | 6 +- platform_design/analysis_options.yaml | 2 +- platform_design/lib/widgets.dart | 2 +- platform_design/pubspec.yaml | 2 +- platform_view_swift/analysis_options.yaml | 2 +- platform_view_swift/lib/main.dart | 4 +- platform_view_swift/pubspec.yaml | 2 +- provider_counter/analysis_options.yaml | 2 +- provider_counter/pubspec.lock | 12 +++- provider_counter/pubspec.yaml | 4 +- provider_shopper/analysis_options.yaml | 2 +- provider_shopper/pubspec.lock | 6 +- provider_shopper/pubspec.yaml | 2 +- provider_shopper/test/cart_widget_test.dart | 2 +- .../test/catalog_widget_test.dart | 2 +- tool/flutter_pub_upgrade.sh | 1 + veggieseasons/analysis_options.yaml | 2 +- veggieseasons/lib/data/app_state.dart | 8 +-- veggieseasons/lib/data/preferences.dart | 2 +- veggieseasons/lib/screens/details.dart | 11 ++-- veggieseasons/lib/screens/list.dart | 8 +-- veggieseasons/lib/screens/settings.dart | 6 +- veggieseasons/lib/widgets/search_bar.dart | 2 +- veggieseasons/lib/widgets/settings_group.dart | 4 +- veggieseasons/lib/widgets/settings_item.dart | 4 +- veggieseasons/lib/widgets/trivia.dart | 2 +- .../lib/widgets/veggie_headline.dart | 6 +- veggieseasons/pubspec.lock | 29 ++++----- veggieseasons/pubspec.yaml | 2 +- web/_tool/pubspec.lock | 2 +- web/charts/pubspec.lock | 2 +- web/filipino_cuisine/lib/cook.dart | 2 +- web/filipino_cuisine/lib/main.dart | 8 +-- web/filipino_cuisine/pubspec.lock | 11 +--- web/filipino_cuisine/pubspec.yaml | 2 +- web/github_dataviz/lib/main.dart | 9 ++- web/github_dataviz/pubspec.lock | 11 +--- web/samples_index/lib/cookbook.dart | 2 +- web/samples_index/lib/src/data.dart | 2 +- web/samples_index/lib/src/templates.dart | 20 ++++--- web/samples_index/lib/src/util.dart | 2 +- web/samples_index/pubspec.yaml | 2 +- web/samples_index/tool/grind.dart | 4 +- .../src/widgets/decoration_image_plus.dart | 6 +- web/slide_puzzle/pubspec.lock | 18 +++--- web/timeflow/lib/numberpicker.dart | 12 ++-- 94 files changed, 492 insertions(+), 349 deletions(-) diff --git a/add_to_app/flutter_module/pubspec.lock b/add_to_app/flutter_module/pubspec.lock index 60c970af8..b818aa8c8 100644 --- a/add_to_app/flutter_module/pubspec.lock +++ b/add_to_app/flutter_module/pubspec.lock @@ -63,7 +63,7 @@ packages: name: espresso url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "0.0.1+5" file: dependency: transitive description: @@ -167,7 +167,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.0.5" + version: "4.1.0" pub_semver: dependency: transitive description: @@ -279,5 +279,5 @@ packages: source: hosted version: "3.6.1" sdks: - dart: ">=2.6.0 <3.0.0" - flutter: ">=1.12.1 <2.0.0" + dart: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0 <2.0.0" diff --git a/add_to_app/flutter_module_using_plugin/pubspec.lock b/add_to_app/flutter_module_using_plugin/pubspec.lock index af6ce8e45..91c47029b 100644 --- a/add_to_app/flutter_module_using_plugin/pubspec.lock +++ b/add_to_app/flutter_module_using_plugin/pubspec.lock @@ -79,6 +79,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.12" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" matcher: dependency: transitive description: @@ -93,6 +100,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.8" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" path: dependency: transitive description: @@ -120,7 +134,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.1.0" quiver: dependency: transitive description: @@ -188,14 +202,14 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.4.2" + version: "5.4.5" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "0.0.1+5" url_launcher_platform_interface: dependency: transitive description: @@ -209,7 +223,7 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.1+1" + version: "0.1.1+4" vector_math: dependency: transitive description: @@ -225,5 +239,5 @@ packages: source: hosted version: "3.6.1" sdks: - dart: ">=2.6.0 <3.0.0" - flutter: ">=1.12.8 <2.0.0" + dart: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0 <2.0.0" diff --git a/add_to_app/flutter_module_using_plugin/pubspec.yaml b/add_to_app/flutter_module_using_plugin/pubspec.yaml index 70c68fb55..39a7737c5 100644 --- a/add_to_app/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/flutter_module_using_plugin/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - provider: ^3.1.0 + provider: ^4.1.0 url_launcher: ^5.2.5 dev_dependencies: diff --git a/animations/analysis_options.yaml b/animations/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/animations/analysis_options.yaml +++ b/animations/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/animations/lib/main.dart b/animations/lib/main.dart index 618d1b790..eee14aa14 100644 --- a/animations/lib/main.dart +++ b/animations/lib/main.dart @@ -128,6 +128,7 @@ final allRoutes = { }; class AnimationSamples extends StatelessWidget { + @override Widget build(BuildContext context) { return MaterialApp( title: 'Animation Samples', @@ -141,6 +142,7 @@ class AnimationSamples extends StatelessWidget { } class HomePage extends StatelessWidget { + @override Widget build(BuildContext context) { final headerStyle = Theme.of(context).textTheme.headline6; return Scaffold( @@ -164,6 +166,7 @@ class DemoTile extends StatelessWidget { DemoTile(this.demo); + @override Widget build(BuildContext context) { return ListTile( title: Text(demo.name), diff --git a/animations/lib/src/basics/01_animated_container.dart b/animations/lib/src/basics/01_animated_container.dart index f08ace32f..9256e0afd 100644 --- a/animations/lib/src/basics/01_animated_container.dart +++ b/animations/lib/src/basics/01_animated_container.dart @@ -13,6 +13,7 @@ Color generateColor() => Color(0xFFFFFFFF & Random().nextInt(0xFFFFFFFF)); class AnimatedContainerDemo extends StatefulWidget { static String routeName = '/basics/01_animated_container'; + @override _AnimatedContainerDemoState createState() => _AnimatedContainerDemoState(); } @@ -21,6 +22,7 @@ class _AnimatedContainerDemoState extends State { double borderRadius; double margin; + @override void initState() { super.initState(); color = Colors.deepPurple; @@ -36,6 +38,7 @@ class _AnimatedContainerDemoState extends State { }); } + @override Widget build(BuildContext context) { // This widget is built using an AnimatedContainer, one of the easiest to use // animated Widgets. Whenever the AnimatedContainer's properties, such as decoration, diff --git a/animations/lib/src/basics/02_page_route_builder.dart b/animations/lib/src/basics/02_page_route_builder.dart index 9c6ef0047..9e314c575 100644 --- a/animations/lib/src/basics/02_page_route_builder.dart +++ b/animations/lib/src/basics/02_page_route_builder.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; class PageRouteBuilderDemo extends StatelessWidget { static const String routeName = '/basics/page_route_builder'; + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), @@ -38,6 +39,7 @@ Route _createRoute() { } class _Page2 extends StatelessWidget { + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), diff --git a/animations/lib/src/basics/04_tweens.dart b/animations/lib/src/basics/04_tweens.dart index c029e584e..28d772c53 100644 --- a/animations/lib/src/basics/04_tweens.dart +++ b/animations/lib/src/basics/04_tweens.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; class TweenDemo extends StatefulWidget { static const String routeName = '/basics/tweens'; + @override _TweenDemoState createState() => _TweenDemoState(); } @@ -17,6 +18,7 @@ class _TweenDemoState extends State AnimationController controller; Animation animation; + @override void initState() { super.initState(); @@ -28,11 +30,13 @@ class _TweenDemoState extends State animation = Tween(begin: 0.0, end: accountBalance).animate(controller); } + @override void dispose() { controller.dispose(); super.dispose(); } + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), diff --git a/animations/lib/src/basics/05_animated_builder.dart b/animations/lib/src/basics/05_animated_builder.dart index 29c185011..ee1cef4c5 100644 --- a/animations/lib/src/basics/05_animated_builder.dart +++ b/animations/lib/src/basics/05_animated_builder.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; class AnimatedBuilderDemo extends StatefulWidget { static const String routeName = '/basics/animated_builder'; + @override _AnimatedBuilderDemoState createState() => _AnimatedBuilderDemoState(); } @@ -18,6 +19,7 @@ class _AnimatedBuilderDemoState extends State AnimationController controller; Animation animation; + @override void initState() { super.initState(); @@ -26,11 +28,13 @@ class _AnimatedBuilderDemoState extends State ColorTween(begin: beginColor, end: endColor).animate(controller); } + @override void dispose() { controller.dispose(); super.dispose(); } + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), diff --git a/animations/lib/src/basics/06_custom_tween.dart b/animations/lib/src/basics/06_custom_tween.dart index c0c9f10a5..fed5cfd3c 100644 --- a/animations/lib/src/basics/06_custom_tween.dart +++ b/animations/lib/src/basics/06_custom_tween.dart @@ -8,6 +8,7 @@ class TypewriterTween extends Tween { 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); @@ -17,6 +18,7 @@ class TypewriterTween extends Tween { class CustomTweenDemo extends StatefulWidget { static const String routeName = '/basics/custom_tweens'; + @override _CustomTweenDemoState createState() => _CustomTweenDemoState(); } @@ -27,6 +29,7 @@ class _CustomTweenDemoState extends State AnimationController controller; Animation animation; + @override void initState() { super.initState(); @@ -34,11 +37,13 @@ class _CustomTweenDemoState extends State animation = TypewriterTween(end: message).animate(controller); } + @override void dispose() { controller.dispose(); super.dispose(); } + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( diff --git a/animations/lib/src/basics/07_tween_sequence.dart b/animations/lib/src/basics/07_tween_sequence.dart index 8850686ec..81dc9fc26 100644 --- a/animations/lib/src/basics/07_tween_sequence.dart +++ b/animations/lib/src/basics/07_tween_sequence.dart @@ -27,6 +27,7 @@ class _TweenSequenceDemoState extends State Colors.purple, ]; + @override void initState() { super.initState(); @@ -49,6 +50,7 @@ class _TweenSequenceDemoState extends State animation = TweenSequence(sequenceItems).animate(controller); } + @override void dispose() { controller.dispose(); super.dispose(); diff --git a/animations/lib/src/misc/animated_list.dart b/animations/lib/src/misc/animated_list.dart index 6cb712506..e5a1b2b89 100644 --- a/animations/lib/src/misc/animated_list.dart +++ b/animations/lib/src/misc/animated_list.dart @@ -8,6 +8,7 @@ import 'package:flutter/widgets.dart'; class AnimatedListDemo extends StatefulWidget { static String routeName = '/misc/animated_list'; + @override _AnimatedListDemoState createState() => _AnimatedListDemoState(); } @@ -17,9 +18,9 @@ class _AnimatedListDemoState extends State { void addUser() { setState(() { - int index = listData.length; + var index = listData.length; listData.add( - UserModel(firstName: "New", lastName: "Person"), + UserModel(firstName: 'New', lastName: 'Person'), ); _listKey.currentState .insertItem(index, duration: Duration(milliseconds: 300)); @@ -96,23 +97,23 @@ class UserModel { List initialListData = [ UserModel( - firstName: "Govind", - lastName: "Dixit", + firstName: 'Govind', + lastName: 'Dixit', ), UserModel( - firstName: "Greta", - lastName: "Stoll", + firstName: 'Greta', + lastName: 'Stoll', ), UserModel( - firstName: "Monty", - lastName: "Carlo", + firstName: 'Monty', + lastName: 'Carlo', ), UserModel( - firstName: "Petey", - lastName: "Cruiser", + firstName: 'Petey', + lastName: 'Cruiser', ), UserModel( - firstName: "Barry", - lastName: "Cade", + firstName: 'Barry', + lastName: 'Cade', ), ]; diff --git a/animations/lib/src/misc/animated_positioned.dart b/animations/lib/src/misc/animated_positioned.dart index 68fde935e..0270a308a 100644 --- a/animations/lib/src/misc/animated_positioned.dart +++ b/animations/lib/src/misc/animated_positioned.dart @@ -9,6 +9,7 @@ import 'package:flutter/material.dart'; class AnimatedPositionedDemo extends StatefulWidget { static String routeName = '/basics/09_animated_positioned'; + @override _AnimatedPositionedDemoState createState() => _AnimatedPositionedDemoState(); } @@ -20,6 +21,7 @@ class _AnimatedPositionedDemoState extends State { double generateLeftPosition(double left) => Random().nextDouble() * left; + @override void initState() { super.initState(); topPosition = generateTopPosition(30); @@ -33,6 +35,7 @@ class _AnimatedPositionedDemoState extends State { }); } + @override Widget build(BuildContext context) { final size = MediaQuery.of(context).size; final appBar = AppBar(); @@ -60,7 +63,7 @@ class _AnimatedPositionedDemoState extends State { width: 150, height: 50, child: Text( - "Click Me", + 'Click Me', style: TextStyle( color: Theme.of(context).buttonTheme.colorScheme.onPrimary, diff --git a/animations/lib/src/misc/animated_switcher.dart b/animations/lib/src/misc/animated_switcher.dart index 41478f1ff..a54737366 100644 --- a/animations/lib/src/misc/animated_switcher.dart +++ b/animations/lib/src/misc/animated_switcher.dart @@ -25,6 +25,7 @@ Widget generateContainer(int keyCount) => Container( class AnimatedSwitcherDemo extends StatefulWidget { static String routeName = '/basics/10_animated_switcher'; + @override _AnimatedSwitcherDemoState createState() => _AnimatedSwitcherDemoState(); } @@ -32,12 +33,14 @@ class _AnimatedSwitcherDemoState extends State { Widget container; int keyCount; + @override void initState() { super.initState(); keyCount = 0; container = generateContainer(keyCount); } + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( @@ -47,7 +50,7 @@ class _AnimatedSwitcherDemoState extends State { () => container = generateContainer(++keyCount), ), child: Text( - "Change Widget", + 'Change Widget', style: TextStyle( 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 c25a0bf06..f6d57c511 100644 --- a/animations/lib/src/misc/card_swipe.dart +++ b/animations/lib/src/misc/card_swipe.dart @@ -17,6 +17,7 @@ class CardSwipeDemo extends StatefulWidget { class _CardSwipeDemoState extends State { List fileNames; + @override void initState() { super.initState(); _resetCards(); @@ -30,6 +31,7 @@ class _CardSwipeDemoState extends State { ]; } + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( @@ -79,6 +81,7 @@ class Card extends StatelessWidget { Card(this.imageAssetName); + @override Widget build(BuildContext context) { return AspectRatio( aspectRatio: 3 / 5, @@ -104,6 +107,7 @@ class SwipeableCard extends StatefulWidget { this.imageAssetName, }); + @override _SwipeableCardState createState() => _SwipeableCardState(); } @@ -114,6 +118,7 @@ class _SwipeableCardState extends State double _dragStartX; bool _isSwipingLeft = false; + @override void initState() { super.initState(); _controller = AnimationController.unbounded(vsync: this); @@ -123,6 +128,7 @@ class _SwipeableCardState extends State )); } + @override Widget build(BuildContext context) { return SlideTransition( position: _animation, @@ -181,6 +187,7 @@ class _SwipeableCardState extends State }); } + @override void dispose() { _controller.dispose(); super.dispose(); diff --git a/animations/lib/src/misc/carousel.dart b/animations/lib/src/misc/carousel.dart index b4fe45b14..f89217b7d 100644 --- a/animations/lib/src/misc/carousel.dart +++ b/animations/lib/src/misc/carousel.dart @@ -41,7 +41,7 @@ class CarouselDemo extends StatelessWidget { } } -typedef void OnCurrentItemChangedCallback(int currentItem); +typedef OnCurrentItemChangedCallback = void Function(int currentItem); class Carousel extends StatefulWidget { final IndexedWidgetBuilder itemBuilder; diff --git a/animations/lib/src/misc/expand_card.dart b/animations/lib/src/misc/expand_card.dart index bdd5d3cba..6f97fabbf 100644 --- a/animations/lib/src/misc/expand_card.dart +++ b/animations/lib/src/misc/expand_card.dart @@ -19,6 +19,7 @@ class ExpandCardDemo extends StatelessWidget { } class ExpandCard extends StatefulWidget { + @override _ExpandCardState createState() => _ExpandCardState(); } diff --git a/animations/lib/src/misc/focus_image.dart b/animations/lib/src/misc/focus_image.dart index 4b25a4f16..d35f6f092 100644 --- a/animations/lib/src/misc/focus_image.dart +++ b/animations/lib/src/misc/focus_image.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; class FocusImageDemo extends StatelessWidget { static String routeName = '/misc/focus_image'; + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Focus Image')), @@ -16,6 +17,7 @@ class FocusImageDemo extends StatelessWidget { } class Grid extends StatelessWidget { + @override Widget build(BuildContext context) { return Scaffold( body: GridView.builder( @@ -68,6 +70,7 @@ class SmallCard extends StatelessWidget { SmallCard(this.imageAssetName); + @override Widget build(BuildContext context) { return Card( child: Material( @@ -91,6 +94,7 @@ class _SecondPage extends StatelessWidget { _SecondPage(this.imageAssetName); + @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, diff --git a/animations/pubspec.lock b/animations/pubspec.lock index 9a0f87f64..92d70925c 100644 --- a/animations/pubspec.lock +++ b/animations/pubspec.lock @@ -7,42 +7,42 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.13" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.5.2" + version: "1.6.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" + version: "2.4.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.0.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.14.12" convert: dependency: transitive description: @@ -56,7 +56,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.1.4" cupertino_icons: dependency: "direct main" description: @@ -80,7 +80,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.12" matcher: dependency: transitive description: @@ -108,7 +108,7 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.8.0+1" + version: "1.9.0" petitparser: dependency: transitive description: @@ -122,7 +122,7 @@ packages: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.3" sky_engine: dependency: transitive description: flutter @@ -134,7 +134,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.7.0" stack_trace: dependency: transitive description: @@ -169,7 +169,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.11" + version: "0.2.15" typed_data: dependency: transitive description: @@ -190,6 +190,6 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.5.0" + version: "3.6.1" sdks: - dart: ">=2.5.0 <3.0.0" + dart: ">=2.6.0 <3.0.0" diff --git a/animations/pubspec.yaml b/animations/pubspec.yaml index 1f60e2a2d..0a2d340ae 100644 --- a/animations/pubspec.yaml +++ b/animations/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: uses-material-design: true diff --git a/animations/test/misc/expand_card_test.dart b/animations/test/misc/expand_card_test.dart index f59650477..ee033b908 100644 --- a/animations/test/misc/expand_card_test.dart +++ b/animations/test/misc/expand_card_test.dart @@ -16,7 +16,7 @@ void main() { await tester.pumpWidget(createExpandCardScreen()); // Get the initial size of ExpandCard. - Size initialSize = tester.getSize(find.byType(ExpandCard)); + var initialSize = tester.getSize(find.byType(ExpandCard)); // Tap on the ExpandCard. await tester.tap(find.byType(ExpandCard)); @@ -33,7 +33,7 @@ void main() { testWidgets('ExpandCard changes image on tap', (tester) async { await tester.pumpWidget(createExpandCardScreen()); - Image initialImage = tester.widget(find.byType(Image).last); + var initialImage = tester.widget(find.byType(Image).last); // Tap on ExpandCard. await tester.tap(find.byType(ExpandCard)); diff --git a/experimental/desktop_photo_search/analysis_options.yaml b/experimental/desktop_photo_search/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/experimental/desktop_photo_search/analysis_options.yaml +++ b/experimental/desktop_photo_search/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/experimental/desktop_photo_search/lib/src/widgets/data_tree.dart b/experimental/desktop_photo_search/lib/src/widgets/data_tree.dart index 380bafbd1..e43869e00 100644 --- a/experimental/desktop_photo_search/lib/src/widgets/data_tree.dart +++ b/experimental/desktop_photo_search/lib/src/widgets/data_tree.dart @@ -59,16 +59,16 @@ class _DataTreeInkWellState extends State @override Widget build(BuildContext context) { - final ColorScheme colorScheme = Theme.of(context).colorScheme; + final colorScheme = Theme.of(context).colorScheme; - final Animation backgroundColor = controller + final backgroundColor = controller .drive(CurveTween(curve: Curves.fastOutSlowIn)) .drive(ColorTween( begin: colorScheme.primary.withOpacity(0.0), end: colorScheme.primary.withOpacity(0.08), )); - final Animation iconColor = controller + final iconColor = controller .drive(CurveTween(curve: Curves.fastOutSlowIn)) .drive(ColorTween( begin: colorScheme.onBackground.withOpacity(0.54), @@ -235,10 +235,10 @@ class _DataTreeNodeState extends State @override Widget build(BuildContext context) { - final ColorScheme colorScheme = Theme.of(context).colorScheme; - final Color textColor = colorScheme.onBackground.withOpacity(0.87); + final colorScheme = Theme.of(context).colorScheme; + final textColor = colorScheme.onBackground.withOpacity(0.87); - final bool closed = !_isExpanded && _controller.isDismissed; + final closed = !_isExpanded && _controller.isDismissed; return widget.children.isEmpty // Leaf node. diff --git a/experimental/desktop_photo_search/lib/src/widgets/split.dart b/experimental/desktop_photo_search/lib/src/widgets/split.dart index 74f58b147..68be03408 100644 --- a/experimental/desktop_photo_search/lib/src/widgets/split.dart +++ b/experimental/desktop_photo_search/lib/src/widgets/split.dart @@ -107,8 +107,8 @@ class _SplitState extends State { // Determine what fraction to give each child, including enough space to // display the divider. - double firstSize = axisSize * firstFraction; - double secondSize = axisSize * secondFraction; + var firstSize = axisSize * firstFraction; + var secondSize = axisSize * secondFraction; // Clamp the sizes to be sure there is enough space for the dividers. firstSize = firstSize.clamp(halfDivider, axisSize - halfDivider) as double; diff --git a/experimental/desktop_photo_search/pubspec.lock b/experimental/desktop_photo_search/pubspec.lock index f1ad94c5e..49763f954 100644 --- a/experimental/desktop_photo_search/pubspec.lock +++ b/experimental/desktop_photo_search/pubspec.lock @@ -7,7 +7,7 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "3.0.0" analysis_server_lib: dependency: transitive description: @@ -21,7 +21,7 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.6" + version: "0.39.8" archive: dependency: transitive description: @@ -77,21 +77,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "1.3.4" + version: "1.3.7" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" built_collection: dependency: "direct main" description: @@ -105,14 +105,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "7.0.9" + version: "7.1.0" built_value_generator: dependency: "direct dev" description: name: built_value_generator url: "https://pub.dartlang.org" source: hosted - version: "7.0.9" + version: "7.1.0" charcode: dependency: transitive description: @@ -133,7 +133,7 @@ packages: name: cli_util url: "https://pub.dartlang.org" source: hosted - version: "0.1.3+2" + version: "0.1.4" code_builder: dependency: transitive description: @@ -189,13 +189,13 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.3.4" + version: "1.3.6" file_chooser: dependency: "direct main" description: path: "plugins/file_chooser" ref: HEAD - resolved-ref: "588f89e5a5d8495eb95568175978f88405e443a2" + resolved-ref: "100bc306dd15532dbbb2b353170aea47e8173a13" url: "https://github.com/google/flutter-desktop-embedding.git" source: git version: "0.1.0" @@ -255,7 +255,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_multi_server: dependency: transitive description: @@ -283,7 +283,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.15.8" + version: "0.16.1" io: dependency: transitive description: @@ -324,7 +324,7 @@ packages: description: path: "plugins/menubar" ref: HEAD - resolved-ref: "588f89e5a5d8495eb95568175978f88405e443a2" + resolved-ref: "100bc306dd15532dbbb2b353170aea47e8173a13" url: "https://github.com/google/flutter-desktop-embedding.git" source: git version: "0.0.1" @@ -349,6 +349,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" node_interop: dependency: transitive description: @@ -362,7 +369,7 @@ packages: name: node_io url: "https://pub.dartlang.org" source: hosted - version: "1.0.1+2" + version: "1.1.0" node_preamble: dependency: transitive description: @@ -418,7 +425,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.1.0" pub_semver: dependency: transitive description: @@ -542,7 +549,7 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.14.2" + version: "1.14.3" test_api: dependency: transitive description: @@ -556,7 +563,7 @@ packages: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.3" + version: "0.3.4" timing: dependency: transitive description: @@ -577,7 +584,7 @@ packages: name: tuneup url: "https://pub.dartlang.org" source: hosted - version: "0.3.6+1" + version: "0.3.6+2" typed_data: dependency: transitive description: @@ -591,14 +598,14 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.4.2" + version: "5.4.5" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "0.0.1+5" url_launcher_platform_interface: dependency: transitive description: @@ -612,7 +619,7 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.1+1" + version: "0.1.1+4" uuid: dependency: "direct main" description: @@ -633,14 +640,14 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.2" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+14" + version: "0.9.7+15" web_socket_channel: dependency: transitive description: @@ -654,7 +661,7 @@ packages: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "0.5.0+1" + version: "0.5.3" xml: dependency: transitive description: @@ -668,7 +675,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" - flutter: ">=1.13.1-pre <2.0.0" + flutter: ">=1.17.0 <2.0.0" diff --git a/experimental/desktop_photo_search/pubspec.yaml b/experimental/desktop_photo_search/pubspec.yaml index 6744ead2b..aa42359db 100644 --- a/experimental/desktop_photo_search/pubspec.yaml +++ b/experimental/desktop_photo_search/pubspec.yaml @@ -22,8 +22,8 @@ dependencies: url: https://github.com/google/flutter-desktop-embedding.git path: plugins/menubar meta: ^1.1.8 - pedantic: ^1.8.0 - provider: ^3.2.0 + pedantic: ^1.9.0 + provider: ^4.1.0 transparent_image: ^1.0.0 uuid: ^2.0.4 url_launcher: ^5.4.0 diff --git a/experimental/web_dashboard/pubspec.lock b/experimental/web_dashboard/pubspec.lock index 6d1a9248b..bd3a93fc0 100644 --- a/experimental/web_dashboard/pubspec.lock +++ b/experimental/web_dashboard/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "3.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.6" + version: "0.39.8" archive: dependency: transitive description: @@ -122,7 +122,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_multi_server: dependency: transitive description: @@ -213,7 +213,7 @@ packages: name: node_io url: "https://pub.dartlang.org" source: hosted - version: "1.0.1+2" + version: "1.1.0" node_preamble: dependency: transitive description: @@ -262,7 +262,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.0.4" + version: "4.1.0" pub_semver: dependency: transitive description: @@ -365,7 +365,7 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.14.2" + version: "1.14.3" test_api: dependency: transitive description: @@ -379,7 +379,7 @@ packages: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.3" + version: "0.3.4" typed_data: dependency: transitive description: @@ -407,14 +407,14 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.2" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+14" + version: "0.9.7+15" web_socket_channel: dependency: transitive description: @@ -428,7 +428,7 @@ packages: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "0.5.0+1" + version: "0.5.3" xml: dependency: transitive description: @@ -442,7 +442,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" - flutter: ">=1.12.1" + flutter: ">=1.17.0" diff --git a/flutter_maps_firestore/analysis_options.yaml b/flutter_maps_firestore/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/flutter_maps_firestore/analysis_options.yaml +++ b/flutter_maps_firestore/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/flutter_maps_firestore/pubspec.lock b/flutter_maps_firestore/pubspec.lock index af8f903e7..c748b77d8 100644 --- a/flutter_maps_firestore/pubspec.lock +++ b/flutter_maps_firestore/pubspec.lock @@ -42,7 +42,21 @@ packages: name: cloud_firestore url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.13.5" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+2" collection: dependency: transitive description: @@ -103,7 +117,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "1.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -120,7 +134,14 @@ packages: name: google_maps_flutter url: "https://pub.dartlang.org" source: hosted - version: "0.5.25+3" + version: "0.5.27+1" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" google_maps_webservice: dependency: "direct main" description: @@ -134,7 +155,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_parser: dependency: transitive description: @@ -162,7 +183,21 @@ packages: name: location url: "https://pub.dartlang.org" source: hosted - version: "2.5.4" + version: "3.0.2" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + location_web: + dependency: transitive + description: + name: location_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" matcher: dependency: transitive description: @@ -238,6 +273,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" string_scanner: dependency: transitive description: diff --git a/flutter_maps_firestore/pubspec.yaml b/flutter_maps_firestore/pubspec.yaml index 868133a4a..5c8460ebd 100644 --- a/flutter_maps_firestore/pubspec.yaml +++ b/flutter_maps_firestore/pubspec.yaml @@ -8,15 +8,15 @@ environment: dependencies: flutter: sdk: flutter - cloud_firestore: ^0.12.5+1 + cloud_firestore: ^0.13.5 google_maps_flutter: ^0.5.17 google_maps_webservice: ^0.0.14 - location: ^2.3.5 + location: ^3.0.2 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: uses-material-design: true diff --git a/isolate_example/analysis_options.yaml b/isolate_example/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/isolate_example/analysis_options.yaml +++ b/isolate_example/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/isolate_example/lib/data_transfer_page.dart b/isolate_example/lib/data_transfer_page.dart index 1cf6a897a..0c91dd675 100644 --- a/isolate_example/lib/data_transfer_page.dart +++ b/isolate_example/lib/data_transfer_page.dart @@ -159,11 +159,11 @@ class DataTransferIsolateController extends ChangeNotifier { _timer.reset(); _timer.start(); - List randNums = []; - for (int i = 0; i < 100; i++) { + var randNums = []; + for (var i = 0; i < 100; i++) { randNums.clear(); - for (int j = 0; j < 1000000; j++) { + for (var j = 0; j < 1000000; j++) { randNums.add(random.nextInt(100)); } @@ -183,6 +183,7 @@ class DataTransferIsolateController extends ChangeNotifier { }); } + @override void dispose() { super.dispose(); _isolate?.kill(priority: Isolate.immediate); @@ -226,7 +227,7 @@ class RunningList extends StatelessWidget { Future _secondIsolateEntryPoint(SendPort sendPort) async { var receivePort = ReceivePort(); sendPort.send(receivePort.sendPort); - int length = 1; + var length = 1; receivePort.listen( (dynamic message) async { @@ -253,7 +254,7 @@ Future _secondIsolateEntryPoint(SendPort sendPort) async { Iterable createNums() sync* { var random = Random(); - for (int i = 0; i < 100000000; i++) { + for (var i = 0; i < 100000000; i++) { yield random.nextInt(100); } } @@ -263,10 +264,10 @@ Future generateAndSum( Iterable iter, int length, ) async { - int sum = 0; - int count = 1; + var sum = 0; + var count = 1; - for (int x in iter) { + for (var x in iter) { sum += x; if (count % 1000000 == 0) { callerSP.send((count ~/ 1000000) * length); diff --git a/isolate_example/lib/infinite_process_page.dart b/isolate_example/lib/infinite_process_page.dart index e0583e767..b0584dc1e 100644 --- a/isolate_example/lib/infinite_process_page.dart +++ b/isolate_example/lib/infinite_process_page.dart @@ -107,7 +107,7 @@ class InfiniteProcessIsolateController extends ChangeNotifier { Capability capability; int _currentMultiplier = 1; - List _currentResults = []; + final List _currentResults = []; bool _created = false; bool _paused = false; @@ -174,6 +174,7 @@ class InfiniteProcessIsolateController extends ChangeNotifier { notifyListeners(); } + @override void dispose() { newIsolate?.kill(priority: Isolate.immediate); newIsolate = null; @@ -186,7 +187,7 @@ class RunningList extends StatelessWidget { Widget build(context) { final controller = Provider.of(context); - List sums = controller.currentResults; + var sums = controller.currentResults; return DecoratedBox( decoration: BoxDecoration( @@ -219,9 +220,9 @@ class RunningList extends StatelessWidget { } Future _secondIsolateEntryPoint(SendPort callerSP) async { - int multiplyValue = 1; + var multiplyValue = 1; - ReceivePort newIceRP = ReceivePort(); + var newIceRP = ReceivePort(); callerSP.send(newIceRP.sendPort); newIceRP.listen((dynamic message) { @@ -232,9 +233,9 @@ Future _secondIsolateEntryPoint(SendPort callerSP) async { // This runs until the isolate is terminated. while (true) { - int sum = 0; + var sum = 0; - for (int i = 0; i < 10000; i++) { + for (var i = 0; i < 10000; i++) { sum += await doSomeWork(); } @@ -243,12 +244,12 @@ Future _secondIsolateEntryPoint(SendPort callerSP) async { } Future doSomeWork() { - Random rng = Random(); + var rng = Random(); return Future(() { - int sum = 0; + var sum = 0; - for (int i = 0; i < 1000; i++) { + for (var i = 0; i < 1000; i++) { sum += rng.nextInt(100); } diff --git a/isolate_example/pubspec.lock b/isolate_example/pubspec.lock index e4f19b57f..923af10b1 100644 --- a/isolate_example/pubspec.lock +++ b/isolate_example/pubspec.lock @@ -122,7 +122,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.0.5" + version: "4.1.0" quiver: dependency: transitive description: @@ -199,5 +199,5 @@ packages: source: hosted version: "3.6.1" sdks: - dart: ">=2.6.0 <3.0.0" - flutter: ">=1.12.1" + dart: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0" diff --git a/isolate_example/pubspec.yaml b/isolate_example/pubspec.yaml index aee130f0a..4726960a0 100644 --- a/isolate_example/pubspec.yaml +++ b/isolate_example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: diff --git a/jsonexample/analysis_options.yaml b/jsonexample/analysis_options.yaml index 5aafb422a..301602ff8 100644 --- a/jsonexample/analysis_options.yaml +++ b/jsonexample/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: exclude: diff --git a/jsonexample/lib/tab_pages.dart b/jsonexample/lib/tab_pages.dart index e179d4cc8..3fae450c0 100644 --- a/jsonexample/lib/tab_pages.dart +++ b/jsonexample/lib/tab_pages.dart @@ -149,7 +149,7 @@ class BasicsPage extends StatelessWidget { class ConvertedSimplePage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.simpleObjects.map( + var objects = JsonStrings.simpleObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return ConvertedSimpleObject.fromJson(parsedJson); @@ -170,7 +170,7 @@ class ConvertedSimplePage extends StatelessWidget { class ConvertedComplexPage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.complexObjects.map( + var objects = JsonStrings.complexObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return ConvertedComplexObject.fromJson(parsedJson); @@ -212,7 +212,7 @@ class ConvertedListPage extends StatelessWidget { class SerializableSimplePage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.simpleObjects.map( + var objects = JsonStrings.simpleObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return SerializableSimpleObject.fromJson(parsedJson); @@ -233,7 +233,7 @@ class SerializableSimplePage extends StatelessWidget { class SerializableComplexPage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.complexObjects.map( + var objects = JsonStrings.complexObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return SerializableComplexObject.fromJson(parsedJson); @@ -275,7 +275,7 @@ class SerializableListPage extends StatelessWidget { class BuiltSimplePage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.simpleObjects.map( + var objects = JsonStrings.simpleObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return serializers.deserializeWith( @@ -297,7 +297,7 @@ class BuiltSimplePage extends StatelessWidget { class BuiltComplexPage extends StatelessWidget { @override Widget build(BuildContext context) { - List objects = JsonStrings.complexObjects.map( + var objects = JsonStrings.complexObjects.map( (jsonString) { final dynamic parsedJson = json.decode(jsonString); return serializers.deserializeWith( diff --git a/jsonexample/lib/widgets.dart b/jsonexample/lib/widgets.dart index 6a7f5463a..a6ae9a4c1 100644 --- a/jsonexample/lib/widgets.dart +++ b/jsonexample/lib/widgets.dart @@ -100,7 +100,7 @@ class SimpleObjectViewList extends StatelessWidget { Widget build(BuildContext context) { final widgets = []; - for (int i = 0; i < simpleObjects.length; i++) { + for (var i = 0; i < simpleObjects.length; i++) { widgets.addAll([ Text( 'SimpleObject $i:', @@ -274,7 +274,7 @@ class ComplexObjectViewList extends StatelessWidget { Widget build(BuildContext context) { final widgets = []; - for (int i = 0; i < complexObjects.length; i++) { + for (var i = 0; i < complexObjects.length; i++) { widgets.addAll([ Text( 'Complex Object $i:', diff --git a/jsonexample/pubspec.lock b/jsonexample/pubspec.lock index 717e236dd..5dc7718f5 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: "2.1.0" + version: "3.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.6" + version: "0.39.8" archive: dependency: transitive description: @@ -70,21 +70,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "1.3.4" + version: "1.3.7" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.0" built_collection: dependency: "direct main" description: @@ -98,14 +98,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "7.0.9" + version: "7.1.0" built_value_generator: dependency: "direct dev" description: name: built_value_generator url: "https://pub.dartlang.org" source: hosted - version: "7.0.9" + version: "7.1.0" charcode: dependency: transitive description: @@ -161,7 +161,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "1.3.4" + version: "1.3.6" fixnum: dependency: transitive description: @@ -290,7 +290,7 @@ packages: name: node_io url: "https://pub.dartlang.org" source: hosted - version: "1.0.1+2" + version: "1.1.0" package_config: dependency: transitive description: @@ -449,7 +449,7 @@ packages: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+14" + version: "0.9.7+15" web_socket_channel: dependency: transitive description: @@ -470,6 +470,6 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" diff --git a/jsonexample/pubspec.yaml b/jsonexample/pubspec.yaml index 407133756..1929ed698 100644 --- a/jsonexample/pubspec.yaml +++ b/jsonexample/pubspec.yaml @@ -18,7 +18,7 @@ dev_dependencies: build_runner: ^1.7.2 built_value_generator: ^7.0.4 json_serializable: ^3.2.5 - pedantic: ^1.8.0+1 + pedantic: ^1.9.0 flutter: uses-material-design: true diff --git a/jsonexample/test/complex_object_unit_test.dart b/jsonexample/test/complex_object_unit_test.dart index dcb44227b..cdb506860 100644 --- a/jsonexample/test/complex_object_unit_test.dart +++ b/jsonexample/test/complex_object_unit_test.dart @@ -121,13 +121,13 @@ void main() { test('Typical object is converted correctly', () { final complexObject = ConvertedComplexObject.fromJson(typicalObjectJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -135,8 +135,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, @@ -163,7 +163,7 @@ void main() { final complexObject = ConvertedComplexObject.fromJson(emptySimpleObjectsJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); expect(complexObject.aListOfStrings, ['one', 'two', 'three']); @@ -177,7 +177,7 @@ void main() { expect(complexObject.anObject.aListOfDoubles, isNull); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { + 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); @@ -191,13 +191,13 @@ void main() { final complexObject = ConvertedComplexObject.fromJson(unexpectedPropertiesJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -205,8 +205,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, @@ -222,13 +222,13 @@ void main() { final complexObject = SerializableComplexObject.fromJson(typicalObjectJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -236,8 +236,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, @@ -264,7 +264,7 @@ void main() { final complexObject = SerializableComplexObject.fromJson(emptySimpleObjectsJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); expect(complexObject.aListOfStrings, ['one', 'two', 'three']); @@ -278,7 +278,7 @@ void main() { expect(complexObject.anObject.aListOfDoubles, isNull); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { + 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); @@ -292,13 +292,13 @@ void main() { final complexObject = SerializableComplexObject.fromJson(unexpectedPropertiesJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -306,8 +306,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, @@ -323,13 +323,13 @@ void main() { final complexObject = serializers.deserializeWith( BuiltComplexObject.serializer, typicalObjectJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -337,8 +337,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, @@ -366,7 +366,7 @@ void main() { final complexObject = serializers.deserializeWith( BuiltComplexObject.serializer, emptySimpleObjectsJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); expect(complexObject.aListOfStrings, ['one', 'two', 'three']); @@ -380,7 +380,7 @@ void main() { expect(complexObject.anObject.aListOfDoubles, isNull); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { + 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); @@ -394,13 +394,13 @@ void main() { final complexObject = serializers.deserializeWith( BuiltComplexObject.serializer, unexpectedPropertiesJson); - expect(complexObject.aString, "Blah, blah, blah."); + expect(complexObject.aString, 'Blah, blah, blah.'); expect(complexObject.anInt, 1); expect(complexObject.aDouble, 1.0); 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.aString, 'Blah, blah, blah.'); expect(complexObject.anObject.anInt, 1); expect(complexObject.anObject.aDouble, 1.0); expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']); @@ -408,8 +408,8 @@ void main() { expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]); expect(complexObject.aListOfObjects.length, 3); - for (int i = 0; i < 3; i++) { - expect(complexObject.aListOfObjects[i].aString, "Blah, blah, blah."); + 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, diff --git a/jsonexample/test/simple_object_unit_test.dart b/jsonexample/test/simple_object_unit_test.dart index 982d0675f..e67d7539c 100644 --- a/jsonexample/test/simple_object_unit_test.dart +++ b/jsonexample/test/simple_object_unit_test.dart @@ -46,7 +46,7 @@ void main() { final simpleObject = ConvertedSimpleObject.fromJson(typicalObjectJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); @@ -70,7 +70,7 @@ void main() { final simpleObject = ConvertedSimpleObject.fromJson(emptyListJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, []); @@ -83,7 +83,7 @@ void main() { ConvertedSimpleObject.fromJson(unexpectedPropertiesJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); @@ -97,7 +97,7 @@ void main() { final simpleObject = SerializableSimpleObject.fromJson(typicalObjectJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); @@ -121,7 +121,7 @@ void main() { final simpleObject = SerializableSimpleObject.fromJson(emptyListJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, []); @@ -134,7 +134,7 @@ void main() { SerializableSimpleObject.fromJson(unexpectedPropertiesJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); @@ -149,7 +149,7 @@ void main() { BuiltSimpleObject.serializer, typicalObjectJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); @@ -175,7 +175,7 @@ void main() { BuiltSimpleObject.serializer, emptyListJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, []); @@ -188,7 +188,7 @@ void main() { BuiltSimpleObject.serializer, unexpectedPropertiesJson); expect(simpleObject, isNotNull); - expect(simpleObject.aString, "Blah, blah, blah."); + expect(simpleObject.aString, 'Blah, blah, blah.'); expect(simpleObject.anInt, 1); expect(simpleObject.aDouble, 1.0); expect(simpleObject.aListOfStrings, ['one', 'two', 'three']); diff --git a/jsonexample/test/widget_tests_test.dart b/jsonexample/test/widget_tests_test.dart index cc3f79de9..94778ad0e 100644 --- a/jsonexample/test/widget_tests_test.dart +++ b/jsonexample/test/widget_tests_test.dart @@ -83,7 +83,7 @@ void main() { aListOfInts: [1, 2, 3], aListOfDoubles: [1.0, 2.0, 3.0], anObject: ConvertedSimpleObject( - aString: "Child 1", + aString: 'Child 1', anInt: 101, aDouble: 101.0, aListOfStrings: ['1011', '1012', '1013'], @@ -92,7 +92,7 @@ void main() { ), aListOfObjects: [ ConvertedSimpleObject( - aString: "Child 2", + aString: 'Child 2', anInt: 102, aDouble: 102.0, aListOfStrings: ['1021', '1022', '1023'], @@ -100,7 +100,7 @@ void main() { aListOfDoubles: [1021.0, 1022.0, 1023.0], ), ConvertedSimpleObject( - aString: "Child 3", + aString: 'Child 3', anInt: 103, aDouble: 103.0, aListOfStrings: ['1031', '1032', '1033'], @@ -108,7 +108,7 @@ void main() { aListOfDoubles: [1031.0, 1032.0, 1033.0], ), ConvertedSimpleObject( - aString: "Child 4", + aString: 'Child 4', anInt: 104, aDouble: 104.0, aListOfStrings: ['1041', '1042', '1043'], @@ -131,7 +131,7 @@ void main() { expect(find.text('[1, 2, 3]'), findsOneWidget); expect(find.text('[1.0, 2.0, 3.0]'), findsOneWidget); - for (int i = 1; i <= 4; i++) { + for (var i = 1; i <= 4; i++) { expect(find.text('"Child $i"'), findsOneWidget); expect(find.text('10$i'), findsOneWidget); expect(find.text('10$i.0'), findsOneWidget); @@ -150,7 +150,7 @@ void main() { aListOfInts: [], aListOfDoubles: [], anObject: ConvertedSimpleObject( - aString: "Child 1", + aString: 'Child 1', anInt: 101, aDouble: 101.0, aListOfStrings: ['1011', '1012', '1013'], diff --git a/place_tracker/analysis_options.yaml b/place_tracker/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/place_tracker/analysis_options.yaml +++ b/place_tracker/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/place_tracker/lib/app_model.dart b/place_tracker/lib/app_model.dart index a0120290d..a23a5b6b1 100644 --- a/place_tracker/lib/app_model.dart +++ b/place_tracker/lib/app_model.dart @@ -24,16 +24,17 @@ class AppModel extends StatefulWidget { final T initialState; final Widget child; + @override _AppModelState createState() => _AppModelState(); static T of(BuildContext context) { - final _AppModelScope scope = + final scope = context.dependOnInheritedWidgetOfExactType<_AppModelScope>(); return scope.appModelState.currentState; } static void update(BuildContext context, T newState) { - final _AppModelScope scope = + final scope = context.dependOnInheritedWidgetOfExactType<_AppModelScope>(); scope.appModelState.updateState(newState); } diff --git a/place_tracker/lib/place_list.dart b/place_tracker/lib/place_list.dart index 9d3d1e4b1..ad4f243b7 100644 --- a/place_tracker/lib/place_list.dart +++ b/place_tracker/lib/place_list.dart @@ -12,7 +12,7 @@ class PlaceList extends StatefulWidget { } class PlaceListState extends State { - ScrollController _scrollController = ScrollController(); + final ScrollController _scrollController = ScrollController(); void _onCategoryChanged(PlaceCategory newCategory) { _scrollController.jumpTo(0.0); @@ -107,7 +107,7 @@ class _PlaceListTile extends StatelessWidget { }).toList(), ), Text( - place.description != null ? place.description : '', + place.description ?? '', style: Theme.of(context).textTheme.subtitle1, maxLines: 4, overflow: TextOverflow.ellipsis, diff --git a/place_tracker/lib/place_map.dart b/place_tracker/lib/place_map.dart index 4a5bee55e..c03364fa9 100644 --- a/place_tracker/lib/place_map.dart +++ b/place_tracker/lib/place_map.dart @@ -22,13 +22,16 @@ class PlaceMap extends StatefulWidget { } class PlaceMapState extends State { - static BitmapDescriptor _getPlaceMarkerIcon(PlaceCategory category) { + static Future _getPlaceMarkerIcon( + BuildContext context, PlaceCategory category) async { switch (category) { case PlaceCategory.favorite: - return BitmapDescriptor.fromAsset('assets/heart.png'); + return BitmapDescriptor.fromAssetImage( + createLocalImageConfiguration(context), 'assets/heart.png'); break; case PlaceCategory.visited: - return BitmapDescriptor.fromAsset('assets/visited.png'); + return BitmapDescriptor.fromAssetImage( + createLocalImageConfiguration(context), 'assets/visited.png'); break; case PlaceCategory.wantToGo: default: @@ -47,7 +50,7 @@ class PlaceMapState extends State { LatLng _lastMapPosition; - Map _markedPlaces = Map(); + final Map _markedPlaces = {}; final Set _markers = {}; @@ -61,10 +64,12 @@ class PlaceMapState extends State { // Draw initial place markers on creation so that we have something // interesting to look at. + var markers = {}; + for (var place in AppState.of(context).places) { + markers.add(await _createPlaceMarker(context, place)); + } setState(() { - for (Place place in AppState.of(context).places) { - _markers.add(_createPlaceMarker(place)); - } + _markers.addAll(markers); }); // Zoom to fit the initially selected category. @@ -76,7 +81,7 @@ class PlaceMapState extends State { ); } - Marker _createPlaceMarker(Place place) { + Future _createPlaceMarker(BuildContext context, Place place) async { final marker = Marker( markerId: MarkerId(place.latLng.toString()), position: place.latLng, @@ -85,7 +90,7 @@ class PlaceMapState extends State { snippet: '${place.starRating} Star Rating', onTap: () => _pushPlaceDetailsScreen(place), ), - icon: _getPlaceMarkerIcon(place.category), + icon: await _getPlaceMarkerIcon(context, place.category), visible: place.category == AppState.of(context).selectedCategory, ); _markedPlaces[marker] = place; @@ -126,7 +131,7 @@ class PlaceMapState extends State { } void _updateExistingPlaceMarker({@required Place place}) { - Marker marker = _markedPlaces.keys + var marker = _markedPlaces.keys .singleWhere((value) => _markedPlaces[value].id == place.id); setState(() { @@ -160,7 +165,7 @@ class PlaceMapState extends State { Future _showPlacesForSelectedCategory(PlaceCategory category) async { setState(() { - for (Marker marker in List.of(_markedPlaces.keys)) { + for (var marker in List.of(_markedPlaces.keys)) { final place = _markedPlaces[marker]; final updatedMarker = marker.copyWith( visibleParam: place.category == category, @@ -181,15 +186,15 @@ class PlaceMapState extends State { } Future _zoomToFitPlaces(List places) async { - GoogleMapController controller = await mapController.future; + var controller = await mapController.future; // Default min/max values to latitude and longitude of center. - double minLat = widget.center.latitude; - double maxLat = widget.center.latitude; - double minLong = widget.center.longitude; - double maxLong = widget.center.longitude; + var minLat = widget.center.latitude; + var maxLat = widget.center.latitude; + var minLong = widget.center.longitude; + var maxLong = widget.center.longitude; - for (Place place in places) { + for (var place in places) { minLat = min(minLat, place.latitude); maxLat = max(maxLat, place.latitude); minLong = min(minLong, place.longitude); @@ -224,16 +229,19 @@ class PlaceMapState extends State { Future _confirmAddPlace(BuildContext context) async { if (_pendingMarker != null) { // Create a new Place and map it to the marker we just added. - final Place newPlace = Place( - id: Uuid().v1() as String, + final newPlace = Place( + id: Uuid().v1(), latLng: _pendingMarker.position, name: _pendingMarker.infoWindow.title, category: AppState.of(context).selectedCategory, ); + var placeMarker = await _getPlaceMarkerIcon( + context, AppState.of(context).selectedCategory); + setState(() { final updatedMarker = _pendingMarker.copyWith( - iconParam: _getPlaceMarkerIcon(AppState.of(context).selectedCategory), + iconParam: placeMarker, infoWindowParam: InfoWindow( title: 'New Place', snippet: null, @@ -267,7 +275,7 @@ class PlaceMapState extends State { ); // Add the new place to the places stored in appState. - final List newPlaces = List.from(AppState.of(context).places) + final newPlaces = List.from(AppState.of(context).places) ..add(newPlace); // Manually update our map configuration here since our map is already @@ -292,7 +300,7 @@ class PlaceMapState extends State { } void _onToggleMapTypePressed() { - final MapType nextType = + final nextType = MapType.values[(_currentMapType.index + 1) % MapType.values.length]; setState(() { @@ -302,8 +310,7 @@ class PlaceMapState extends State { Future _maybeUpdateMapConfiguration() async { _configuration ??= MapConfiguration.of(AppState.of(context)); - final MapConfiguration newConfiguration = - MapConfiguration.of(AppState.of(context)); + final newConfiguration = MapConfiguration.of(AppState.of(context)); // Since we manually update [_configuration] when place or selectedCategory // changes come from the [place_map], we should only enter this if statement diff --git a/place_tracker/pubspec.lock b/place_tracker/pubspec.lock index 830fc683a..bfb5656f8 100644 --- a/place_tracker/pubspec.lock +++ b/place_tracker/pubspec.lock @@ -69,6 +69,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.7" flutter_test: dependency: "direct dev" description: flutter @@ -80,7 +87,14 @@ packages: name: google_maps_flutter url: "https://pub.dartlang.org" source: hosted - version: "0.4.0" + version: "0.5.27+1" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" image: dependency: transitive description: @@ -123,6 +137,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" quiver: dependency: transitive description: @@ -156,6 +177,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" string_scanner: dependency: transitive description: @@ -190,7 +218,7 @@ packages: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.4" vector_math: dependency: transitive description: @@ -207,4 +235,4 @@ packages: version: "3.6.1" sdks: dart: ">=2.6.0 <3.0.0" - flutter: ">=0.11.9 <2.0.0" + flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/place_tracker/pubspec.yaml b/place_tracker/pubspec.yaml index 30baf2188..2fbd29970 100644 --- a/place_tracker/pubspec.yaml +++ b/place_tracker/pubspec.yaml @@ -11,13 +11,13 @@ dependencies: sdk: flutter cupertino_icons: ^0.1.3 - google_maps_flutter: ^0.4.0 - uuid: ^1.0.3 + google_maps_flutter: ^0.5.27+1 + uuid: ^2.0.4 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: assets: diff --git a/platform_design/analysis_options.yaml b/platform_design/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/platform_design/analysis_options.yaml +++ b/platform_design/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/platform_design/lib/widgets.dart b/platform_design/lib/widgets.dart index 1f0918893..e675d0fe6 100644 --- a/platform_design/lib/widgets.dart +++ b/platform_design/lib/widgets.dart @@ -283,7 +283,7 @@ void showChoices(BuildContext context, List choices) { showDialog( context: context, builder: (context) { - int selectedRadio = 1; + var selectedRadio = 1; return AlertDialog( contentPadding: EdgeInsets.only(top: 12), content: StatefulBuilder( diff --git a/platform_design/pubspec.yaml b/platform_design/pubspec.yaml index 6c6fe8d2f..a5d6676c9 100644 --- a/platform_design/pubspec.yaml +++ b/platform_design/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: uses-material-design: true diff --git a/platform_view_swift/analysis_options.yaml b/platform_view_swift/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/platform_view_swift/analysis_options.yaml +++ b/platform_view_swift/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/platform_view_swift/lib/main.dart b/platform_view_swift/lib/main.dart index b071798e8..ba37ee8fc 100644 --- a/platform_view_swift/lib/main.dart +++ b/platform_view_swift/lib/main.dart @@ -40,8 +40,8 @@ class _HomePageState extends State { int _counter = 0; Future _launchPlatformCount() async { - final int platformCounter = - await _methodChannel.invokeMethod('switchView', _counter); + final platformCounter = + await _methodChannel.invokeMethod('switchView', _counter); setState(() => _counter = platformCounter); } diff --git a/platform_view_swift/pubspec.yaml b/platform_view_swift/pubspec.yaml index 0c1dc6c30..0790bb986 100644 --- a/platform_view_swift/pubspec.yaml +++ b/platform_view_swift/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: diff --git a/provider_counter/analysis_options.yaml b/provider_counter/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/provider_counter/analysis_options.yaml +++ b/provider_counter/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/provider_counter/pubspec.lock b/provider_counter/pubspec.lock index 1ff9a72ee..6dfd2e54a 100644 --- a/provider_counter/pubspec.lock +++ b/provider_counter/pubspec.lock @@ -95,6 +95,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.8" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" path: dependency: transitive description: @@ -122,7 +129,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.1.0" quiver: dependency: transitive description: @@ -199,4 +206,5 @@ packages: source: hosted version: "3.6.1" sdks: - dart: ">=2.6.0 <3.0.0" + dart: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0" diff --git a/provider_counter/pubspec.yaml b/provider_counter/pubspec.yaml index d36611fc2..9a11ba358 100644 --- a/provider_counter/pubspec.yaml +++ b/provider_counter/pubspec.yaml @@ -11,13 +11,13 @@ dependencies: flutter: sdk: flutter - provider: ^3.1.0+1 + provider: ^4.1.0 cupertino_icons: ^0.1.3 dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter: diff --git a/provider_shopper/analysis_options.yaml b/provider_shopper/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/provider_shopper/analysis_options.yaml +++ b/provider_shopper/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/provider_shopper/pubspec.lock b/provider_shopper/pubspec.lock index 412f094ed..923af10b1 100644 --- a/provider_shopper/pubspec.lock +++ b/provider_shopper/pubspec.lock @@ -122,7 +122,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.0.4" + version: "4.1.0" quiver: dependency: transitive description: @@ -199,5 +199,5 @@ packages: source: hosted version: "3.6.1" sdks: - dart: ">=2.6.0 <3.0.0" - flutter: ">=1.12.1" + dart: ">=2.7.0 <3.0.0" + flutter: ">=1.17.0" diff --git a/provider_shopper/pubspec.yaml b/provider_shopper/pubspec.yaml index baf6a98e7..47716d07a 100644 --- a/provider_shopper/pubspec.yaml +++ b/provider_shopper/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0 + pedantic: ^1.9.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 8109fe43a..f722caea5 100644 --- a/provider_shopper/test/cart_widget_test.dart +++ b/provider_shopper/test/cart_widget_test.dart @@ -47,7 +47,7 @@ void main() { await tester.pumpWidget(createCartScreen()); // Adding five items in the cart and testing. - for (int i = 0; i < 5; i++) { + for (var i = 0; i < 5; i++) { var item = catalogModel.getByPosition(i); cartModel.add(item); await tester.pumpAndSettle(); diff --git a/provider_shopper/test/catalog_widget_test.dart b/provider_shopper/test/catalog_widget_test.dart index 0b1279549..00df72869 100644 --- a/provider_shopper/test/catalog_widget_test.dart +++ b/provider_shopper/test/catalog_widget_test.dart @@ -35,7 +35,7 @@ void main() { // Testing for the items on the screen after modifying // the model for a fixed number of items. - for (String item in catalogListItems) { + for (var item in catalogListItems) { expect(find.text(item), findsWidgets); } }); diff --git a/tool/flutter_pub_upgrade.sh b/tool/flutter_pub_upgrade.sh index 1f67549f2..de2cc4eb4 100755 --- a/tool/flutter_pub_upgrade.sh +++ b/tool/flutter_pub_upgrade.sh @@ -10,5 +10,6 @@ do cd `dirname $file` echo "Updating `pwd`" flutter pub upgrade + flutter pub outdated ) done diff --git a/veggieseasons/analysis_options.yaml b/veggieseasons/analysis_options.yaml index 2099c39ea..c64725cc6 100644 --- a/veggieseasons/analysis_options.yaml +++ b/veggieseasons/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.8.0.yaml +include: package:pedantic/analysis_options.1.9.0.yaml analyzer: strong-mode: diff --git a/veggieseasons/lib/data/app_state.dart b/veggieseasons/lib/data/app_state.dart index 27e239508..f19029cd0 100644 --- a/veggieseasons/lib/data/app_state.dart +++ b/veggieseasons/lib/data/app_state.dart @@ -7,7 +7,7 @@ import 'package:veggieseasons/data/veggie.dart'; import 'package:veggieseasons/data/local_veggie_provider.dart'; class AppState extends Model { - List _veggies; + final List _veggies; AppState() : _veggies = LocalVeggieProvider.veggies; @@ -16,12 +16,12 @@ class AppState extends Model { Veggie getVeggie(int id) => _veggies.singleWhere((v) => v.id == id); List get availableVeggies { - Season currentSeason = _getSeasonForDate(DateTime.now()); + var currentSeason = _getSeasonForDate(DateTime.now()); return _veggies.where((v) => v.seasons.contains(currentSeason)).toList(); } List get unavailableVeggies { - Season currentSeason = _getSeasonForDate(DateTime.now()); + var currentSeason = _getSeasonForDate(DateTime.now()); return _veggies.where((v) => !v.seasons.contains(currentSeason)).toList(); } @@ -33,7 +33,7 @@ class AppState extends Model { .toList(); void setFavorite(int id, bool isFavorite) { - Veggie veggie = getVeggie(id); + var veggie = getVeggie(id); veggie.isFavorite = isFavorite; notifyListeners(); } diff --git a/veggieseasons/lib/data/preferences.dart b/veggieseasons/lib/data/preferences.dart index 96f7007a7..dc67feb2a 100644 --- a/veggieseasons/lib/data/preferences.dart +++ b/veggieseasons/lib/data/preferences.dart @@ -20,7 +20,7 @@ class Preferences extends Model { int _desiredCalories = 2000; - Set _preferredCategories = Set(); + final Set _preferredCategories = {}; Future get desiredCalories async { await _loading; diff --git a/veggieseasons/lib/screens/details.dart b/veggieseasons/lib/screens/details.dart index 7156934f7..cd8f2b2b4 100644 --- a/veggieseasons/lib/screens/details.dart +++ b/veggieseasons/lib/screens/details.dart @@ -28,7 +28,7 @@ class ServingInfoChart extends StatelessWidget { builder: (context, snapshot) { final target = snapshot?.data ?? 2000; final percent = standardPercentage * 2000 ~/ target; - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return Text( '$percent% DV', @@ -41,7 +41,7 @@ class ServingInfoChart extends StatelessWidget { @override Widget build(BuildContext context) { - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return Column( children: [ SizedBox(height: 16), @@ -141,8 +141,8 @@ class ServingInfoChart extends StatelessWidget { future: prefs.desiredCalories, builder: (context, snapshot) { return Text( - 'Percent daily values based on a diet of ' + - '${snapshot?.data ?? '2,000'} calories.', + 'Percent daily values based on a diet of ' + '${snapshot?.data ?? '2,000'} calories.', style: Styles.detailsServingNoteText(themeData), ); }, @@ -161,11 +161,12 @@ class InfoView extends StatelessWidget { const InfoView(this.id); + @override Widget build(BuildContext context) { final appState = ScopedModel.of(context, rebuildOnChange: true); final prefs = ScopedModel.of(context, rebuildOnChange: true); final veggie = appState.getVeggie(id); - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return Padding( padding: const EdgeInsets.all(24), diff --git a/veggieseasons/lib/screens/list.dart b/veggieseasons/lib/screens/list.dart index 931c37d72..48c202558 100644 --- a/veggieseasons/lib/screens/list.dart +++ b/veggieseasons/lib/screens/list.dart @@ -20,7 +20,7 @@ class ListScreen extends StatelessWidget { child: FutureBuilder>( future: prefs.preferredCategories, builder: (context, snapshot) { - final data = snapshot.data ?? Set(); + final data = snapshot.data ?? {}; return VeggieCard(veggie, inSeason, data.contains(veggie.category)); }), ); @@ -30,13 +30,13 @@ class ListScreen extends StatelessWidget { Widget build(BuildContext context) { return CupertinoTabView( builder: (context) { - String dateString = DateFormat("MMMM y").format(DateTime.now()); + var dateString = DateFormat('MMMM y').format(DateTime.now()); final appState = ScopedModel.of(context, rebuildOnChange: true); final prefs = ScopedModel.of(context, rebuildOnChange: true); - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return SafeArea( bottom: false, child: ListView.builder( @@ -66,7 +66,7 @@ class ListScreen extends StatelessWidget { style: Styles.headlineText(themeData)), ); } else { - int relativeIndex = + var relativeIndex = index - (appState.availableVeggies.length + 2); return _generateVeggieRow( appState.unavailableVeggies[relativeIndex], prefs, diff --git a/veggieseasons/lib/screens/settings.dart b/veggieseasons/lib/screens/settings.dart index 0d6611185..9bea1f597 100644 --- a/veggieseasons/lib/screens/settings.dart +++ b/veggieseasons/lib/screens/settings.dart @@ -17,7 +17,7 @@ class VeggieCategorySettingsScreen extends StatelessWidget { Widget build(BuildContext context) { final model = ScopedModel.of(context, rebuildOnChange: true); final currentPrefs = model.preferredCategories; - Brightness brightness = CupertinoTheme.brightnessOf(context); + var brightness = CupertinoTheme.brightnessOf(context); return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( middle: Text('Preferred Categories'), @@ -80,7 +80,7 @@ class CalorieSettingsScreen extends StatelessWidget { @override Widget build(BuildContext context) { final model = ScopedModel.of(context, rebuildOnChange: true); - Brightness brightness = CupertinoTheme.brightnessOf(context); + var brightness = CupertinoTheme.brightnessOf(context); return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( previousPageTitle: 'Settings', @@ -93,7 +93,7 @@ class CalorieSettingsScreen extends StatelessWidget { builder: (context, snapshot) { final steps = []; - for (int cals = max; cals < min; cals += step) { + for (var cals = max; cals < min; cals += step) { steps.add( SettingsItem( label: cals.toString(), diff --git a/veggieseasons/lib/widgets/search_bar.dart b/veggieseasons/lib/widgets/search_bar.dart index 395bf9e33..be63317a9 100644 --- a/veggieseasons/lib/widgets/search_bar.dart +++ b/veggieseasons/lib/widgets/search_bar.dart @@ -17,7 +17,7 @@ class SearchBar extends StatelessWidget { @override Widget build(BuildContext context) { - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return DecoratedBox( decoration: BoxDecoration( diff --git a/veggieseasons/lib/widgets/settings_group.dart b/veggieseasons/lib/widgets/settings_group.dart index 717be79fa..2f0105eb9 100644 --- a/veggieseasons/lib/widgets/settings_group.dart +++ b/veggieseasons/lib/widgets/settings_group.dart @@ -76,9 +76,9 @@ class SettingsGroup extends StatelessWidget { final Widget footer; @override Widget build(BuildContext context) { - Brightness brightness = CupertinoTheme.brightnessOf(context); + var brightness = CupertinoTheme.brightnessOf(context); final dividedItems = [items[0]]; - for (int i = 1; i < items.length; i++) { + for (var i = 1; i < items.length; i++) { dividedItems.add(Container( color: Styles.settingsLineation(brightness), height: 0.3, diff --git a/veggieseasons/lib/widgets/settings_item.dart b/veggieseasons/lib/widgets/settings_item.dart index 6f4479941..f53a2c236 100644 --- a/veggieseasons/lib/widgets/settings_item.dart +++ b/veggieseasons/lib/widgets/settings_item.dart @@ -85,8 +85,8 @@ class SettingsItemState extends State { @override Widget build(BuildContext context) { - CupertinoThemeData themeData = CupertinoTheme.of(context); - Brightness brightness = CupertinoTheme.brightnessOf(context); + var themeData = CupertinoTheme.of(context); + var brightness = CupertinoTheme.brightnessOf(context); return AnimatedContainer( duration: const Duration(milliseconds: 200), color: Styles.settingsItemColor(brightness), diff --git a/veggieseasons/lib/widgets/trivia.dart b/veggieseasons/lib/widgets/trivia.dart index 834636c25..734bf0345 100644 --- a/veggieseasons/lib/widgets/trivia.dart +++ b/veggieseasons/lib/widgets/trivia.dart @@ -106,7 +106,7 @@ class _TriviaViewState extends State { // Widget shown when the game is over. It includes the score and a button to // restart everything. Widget _buildFinishedView() { - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return Padding( padding: const EdgeInsets.all(32), diff --git a/veggieseasons/lib/widgets/veggie_headline.dart b/veggieseasons/lib/widgets/veggie_headline.dart index 88ac0a0d1..9d6bd93de 100644 --- a/veggieseasons/lib/widgets/veggie_headline.dart +++ b/veggieseasons/lib/widgets/veggie_headline.dart @@ -46,9 +46,9 @@ class VeggieHeadline extends StatelessWidget { const VeggieHeadline(this.veggie); List _buildSeasonDots(List seasons) { - List widgets = []; + var widgets = []; - for (Season season in seasons) { + for (var season in seasons) { widgets.add(SizedBox(width: 4)); widgets.add( Container( @@ -67,7 +67,7 @@ class VeggieHeadline extends StatelessWidget { @override Widget build(BuildContext context) { - final CupertinoThemeData themeData = CupertinoTheme.of(context); + final themeData = CupertinoTheme.of(context); return GestureDetector( onTap: () => Navigator.of(context).push(CupertinoPageRoute( diff --git a/veggieseasons/pubspec.lock b/veggieseasons/pubspec.lock index 472d699e0..a52865917 100644 --- a/veggieseasons/pubspec.lock +++ b/veggieseasons/pubspec.lock @@ -36,13 +36,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.3" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" collection: dependency: transitive description: @@ -71,13 +64,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -141,7 +127,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.6.4" pedantic: dependency: "direct dev" description: @@ -155,7 +141,14 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "2.4.0" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" scoped_model: dependency: "direct main" description: @@ -258,7 +251,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "3.6.1" yaml: dependency: transitive description: @@ -267,5 +260,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.7.0 <3.0.0" + dart: ">=2.6.0 <3.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/veggieseasons/pubspec.yaml b/veggieseasons/pubspec.yaml index d2137e646..dc9596bd1 100644 --- a/veggieseasons/pubspec.yaml +++ b/veggieseasons/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.8.0+1 + pedantic: ^1.9.0 flutter_launcher_icons: ^0.7.5 flutter: diff --git a/web/_tool/pubspec.lock b/web/_tool/pubspec.lock index bae2d309f..43cbad122 100644 --- a/web/_tool/pubspec.lock +++ b/web/_tool/pubspec.lock @@ -28,6 +28,6 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.7.0" sdks: dart: ">=2.3.0 <3.0.0" diff --git a/web/charts/pubspec.lock b/web/charts/pubspec.lock index bf4e9464a..d0c49efcf 100644 --- a/web/charts/pubspec.lock +++ b/web/charts/pubspec.lock @@ -54,7 +54,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.7.0" sky_engine: dependency: transitive description: flutter diff --git a/web/filipino_cuisine/lib/cook.dart b/web/filipino_cuisine/lib/cook.dart index 0845643a2..a1eeea1f6 100644 --- a/web/filipino_cuisine/lib/cook.dart +++ b/web/filipino_cuisine/lib/cook.dart @@ -36,7 +36,7 @@ class CState extends State { title: Text(widget.nme, style: Theme.of(ct) .textTheme - .display2 + .headline3 .copyWith(fontFamily: 'ark', color: Colors.black))), margin: EdgeInsets.only(top: 40, bottom: 30, left: 20)), Expanded( diff --git a/web/filipino_cuisine/lib/main.dart b/web/filipino_cuisine/lib/main.dart index 8421fa4be..4f2009b4c 100644 --- a/web/filipino_cuisine/lib/main.dart +++ b/web/filipino_cuisine/lib/main.dart @@ -71,16 +71,16 @@ class HState extends State { scale: .9)), Text(fi['fn'], style: - t.display3.copyWith(fontFamily: 'ark', color: Colors.black)), + t.headline2.copyWith(fontFamily: 'ark', color: Colors.black)), Container( child: Text(fi['cn'], - style: t.subhead.apply(color: Colors.red, fontFamily: 'opb')), + style: t.subtitle1.apply(color: Colors.red, fontFamily: 'opb')), margin: EdgeInsets.only(top: 10, bottom: 30), ), Container( child: Text(fi['dc'], textAlign: TextAlign.center, - style: t.subhead.copyWith(fontFamily: 'opr')), + style: t.subtitle1.copyWith(fontFamily: 'opr')), margin: EdgeInsets.only(left: 10, right: 10)), Expanded( flex: 2, @@ -101,7 +101,7 @@ class HState extends State { children: [ Text(fi['ig'][i]['n'], style: - t.subtitle.copyWith(fontFamily: 'opb')), + t.subtitle2.copyWith(fontFamily: 'opb')), Text(fi['ig'][i]['c'], style: t.caption.copyWith(fontFamily: 'opr')) diff --git a/web/filipino_cuisine/pubspec.lock b/web/filipino_cuisine/pubspec.lock index bfa9b8750..1b78d2733 100644 --- a/web/filipino_cuisine/pubspec.lock +++ b/web/filipino_cuisine/pubspec.lock @@ -1,13 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.1" charcode: dependency: transitive description: @@ -47,7 +40,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_parser: dependency: transitive description: @@ -68,7 +61,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.7.0" pedantic: dependency: "direct dev" description: diff --git a/web/filipino_cuisine/pubspec.yaml b/web/filipino_cuisine/pubspec.yaml index 37078084c..714e03445 100644 --- a/web/filipino_cuisine/pubspec.yaml +++ b/web/filipino_cuisine/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: http: ^0.12.0 dev_dependencies: - pedantic: ^1.8.0 + pedantic: ^1.9.0 flutter_icons: diff --git a/web/github_dataviz/lib/main.dart b/web/github_dataviz/lib/main.dart index ecb099713..92dc260e3 100644 --- a/web/github_dataviz/lib/main.dart +++ b/web/github_dataviz/lib/main.dart @@ -191,15 +191,18 @@ class _MainLayoutState extends State with TickerProviderStateMixin { int numWeeksTotal = contributionList[0].contributions.length; - String starsByWeekStr = (await http.get("assets/github_data/stars.tsv")).body; + String starsByWeekStr = + (await http.get("assets/github_data/stars.tsv")).body; List starsByWeekLoaded = summarizeWeeksFromTSV(starsByWeekStr, numWeeksTotal); - String forksByWeekStr = (await http.get("assets/github_data/forks.tsv")).body; + String forksByWeekStr = + (await http.get("assets/github_data/forks.tsv")).body; List forksByWeekLoaded = summarizeWeeksFromTSV(forksByWeekStr, numWeeksTotal); - String commitsByWeekStr = (await http.get("assets/github_data/commits.tsv")).body; + String commitsByWeekStr = + (await http.get("assets/github_data/commits.tsv")).body; List commitsByWeekLoaded = summarizeWeeksFromTSV(commitsByWeekStr, numWeeksTotal); diff --git a/web/github_dataviz/pubspec.lock b/web/github_dataviz/pubspec.lock index 5fc547220..d933d8b13 100644 --- a/web/github_dataviz/pubspec.lock +++ b/web/github_dataviz/pubspec.lock @@ -1,13 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.4.1" charcode: dependency: transitive description: @@ -33,7 +26,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_parser: dependency: transitive description: @@ -61,7 +54,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.7.0" pedantic: dependency: transitive description: diff --git a/web/samples_index/lib/cookbook.dart b/web/samples_index/lib/cookbook.dart index d6a37c472..b1a46bf82 100644 --- a/web/samples_index/lib/cookbook.dart +++ b/web/samples_index/lib/cookbook.dart @@ -40,7 +40,7 @@ class CookbookScraper { var description = page.querySelectorAll('main>.container>p').first.text; var urlSegments = Uri.parse(url).pathSegments; - var category = urlSegments[urlSegments.length-2]; + var category = urlSegments[urlSegments.length - 2]; return Sample( name: name, diff --git a/web/samples_index/lib/src/data.dart b/web/samples_index/lib/src/data.dart index a8b18ae79..ed843c590 100644 --- a/web/samples_index/lib/src/data.dart +++ b/web/samples_index/lib/src/data.dart @@ -147,7 +147,7 @@ class Sample { var nameWithoutChars = name.replaceAll(RegExp(r'[^A-Za-z0-9\-\_\ ]'), ''); var nameWithUnderscores = nameWithoutChars.replaceAll(' ', '_'); var snake = util.snakeCase(nameWithUnderscores); - var s = snake.replaceAll('__', '_'); + var s = snake.replaceAll('__', '_'); return s; } diff --git a/web/samples_index/lib/src/templates.dart b/web/samples_index/lib/src/templates.dart index e95e5ae0d..17136d0a6 100644 --- a/web/samples_index/lib/src/templates.dart +++ b/web/samples_index/lib/src/templates.dart @@ -8,7 +8,8 @@ import 'util.dart' as util; String _escapeAttribute(String s) => HtmlEscape(HtmlEscapeMode.attribute).convert(s); -String _escapeElement(String s) => HtmlEscape(HtmlEscapeMode.element).convert(s); +String _escapeElement(String s) => + HtmlEscape(HtmlEscapeMode.element).convert(s); String description(Sample sample) => ''' @@ -184,19 +185,24 @@ String _descriptionPage(Sample sample) => ''' String _descriptionButtons(Sample sample) { var buf = StringBuffer(); if (sample?.web?.isNotEmpty == true) { - buf.write(''''''); + buf.write( + ''''''); } - if (sample.type == 'app' || sample.type == 'sample' || sample.type == 'demo') { - buf.write(''''''); } - if (sample.type =='cookbook') { - buf.write(''''''); + if (sample.type == 'cookbook') { + buf.write( + ''''''); } return buf.toString(); } @@ -219,4 +225,4 @@ String _descriptionScreenshots(Sample sample) { String _descriptionText(Sample sample) { return '

${sample.description}

'; -} \ No newline at end of file +} diff --git a/web/samples_index/lib/src/util.dart b/web/samples_index/lib/src/util.dart index b135879b6..a20d1e668 100644 --- a/web/samples_index/lib/src/util.dart +++ b/web/samples_index/lib/src/util.dart @@ -30,4 +30,4 @@ String _fixCase(String input, String separator) => } return lower; - }); \ No newline at end of file + }); diff --git a/web/samples_index/pubspec.yaml b/web/samples_index/pubspec.yaml index a649d6837..ac3a1f872 100644 --- a/web/samples_index/pubspec.yaml +++ b/web/samples_index/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: html: ^0.14.0 dev_dependencies: grinder: ^0.8.3 - pedantic: ^1.8.0 + pedantic: ^1.9.0 test: ^1.6.0 json_serializable: ^3.2.0 build: ^1.2.0 diff --git a/web/samples_index/tool/grind.dart b/web/samples_index/tool/grind.dart index ecb383c9f..3b79df179 100644 --- a/web/samples_index/tool/grind.dart +++ b/web/samples_index/tool/grind.dart @@ -62,8 +62,8 @@ Future generate() async { Future scrapeCookbook() async { var driver = await Process.start( 'chromedriver', ['--port=4444', '--url-base=wd/hub', '--verbose']); - driver.stdout.pipe(stdout); - driver.stderr.pipe(stderr); + await driver.stdout.pipe(stdout); + await driver.stderr.pipe(stderr); var scraper = CookbookScraper(); await scraper.init(); var links = await scraper.fetchCookbookLinks(); diff --git a/web/slide_puzzle/lib/src/widgets/decoration_image_plus.dart b/web/slide_puzzle/lib/src/widgets/decoration_image_plus.dart index 8dd3989fe..868c28ea5 100644 --- a/web/slide_puzzle/lib/src/widgets/decoration_image_plus.dart +++ b/web/slide_puzzle/lib/src/widgets/decoration_image_plus.dart @@ -160,9 +160,11 @@ class DecorationImagePlus implements DecorationImage { @override ImageErrorListener get onError => (error, stackTrace) { - developer.log('Failed to load image.\n' + developer.log( + 'Failed to load image.\n' '$error\n' - '$stackTrace', name: 'slide_puzzle.decoration_image_plus'); + '$stackTrace', + name: 'slide_puzzle.decoration_image_plus'); }; } diff --git a/web/slide_puzzle/pubspec.lock b/web/slide_puzzle/pubspec.lock index ab2c0eb0f..be339bab7 100644 --- a/web/slide_puzzle/pubspec.lock +++ b/web/slide_puzzle/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "3.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.39.7" + version: "0.39.8" archive: dependency: transitive description: @@ -115,7 +115,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_multi_server: dependency: transitive description: @@ -199,7 +199,7 @@ packages: name: node_io url: "https://pub.dartlang.org" source: hosted - version: "1.0.1+2" + version: "1.1.0" node_preamble: dependency: transitive description: @@ -351,7 +351,7 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.14.2" + version: "1.14.3" test_api: dependency: transitive description: @@ -365,7 +365,7 @@ packages: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.3.3" + version: "0.3.4" typed_data: dependency: transitive description: @@ -386,7 +386,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "4.0.1" + version: "4.0.2" watcher: dependency: transitive description: @@ -407,7 +407,7 @@ packages: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "0.5.0+1" + version: "0.5.3" xml: dependency: transitive description: @@ -421,6 +421,6 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.7.0 <3.0.0" diff --git a/web/timeflow/lib/numberpicker.dart b/web/timeflow/lib/numberpicker.dart index dbef35011..58a9f56cd 100644 --- a/web/timeflow/lib/numberpicker.dart +++ b/web/timeflow/lib/numberpicker.dart @@ -186,9 +186,9 @@ class NumberPicker extends StatelessWidget { } Widget _integerListView(ThemeData themeData) { - TextStyle defaultStyle = themeData.textTheme.body1; + TextStyle defaultStyle = themeData.textTheme.bodyText2; TextStyle selectedStyle = - themeData.textTheme.headline.copyWith(color: themeData.accentColor); + themeData.textTheme.headline5.copyWith(color: themeData.accentColor); var listItemCount = integerItemCount + 2; @@ -223,9 +223,9 @@ class NumberPicker extends StatelessWidget { } Widget _decimalListView(ThemeData themeData) { - TextStyle defaultStyle = themeData.textTheme.body1; + TextStyle defaultStyle = themeData.textTheme.bodyText2; TextStyle selectedStyle = - themeData.textTheme.headline.copyWith(color: themeData.accentColor); + themeData.textTheme.headline5.copyWith(color: themeData.accentColor); int decimalItemCount = selectedIntValue == maxValue ? 3 : math.pow(10, decimalPlaces) + 2; @@ -262,9 +262,9 @@ class NumberPicker extends StatelessWidget { } Widget _integerInfiniteListView(ThemeData themeData) { - TextStyle defaultStyle = themeData.textTheme.body1; + TextStyle defaultStyle = themeData.textTheme.bodyText2; TextStyle selectedStyle = - themeData.textTheme.headline.copyWith(color: themeData.accentColor); + themeData.textTheme.headline5.copyWith(color: themeData.accentColor); return new NotificationListener( child: new Container(