diff --git a/boxy/CHANGELOG.md b/boxy/CHANGELOG.md index 768e1a4..136ac70 100644 --- a/boxy/CHANGELOG.md +++ b/boxy/CHANGELOG.md @@ -1,3 +1,6 @@ +## [2.1.0] +* Support for Flutter 2.13 + ## [2.0.9] * Skipped calls to buildScope as a minor performance improvement diff --git a/boxy/analysis_options.yaml b/boxy/analysis_options.yaml index 12c1adb..9394ffd 100644 --- a/boxy/analysis_options.yaml +++ b/boxy/analysis_options.yaml @@ -1,10 +1,10 @@ analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false errors: missing_required_param: warning missing_return: warning + language: + strict-casts: true + strict-raw-types: true linter: rules: @@ -82,14 +82,13 @@ linter: - flutter_style_todos - hash_and_equals - implementation_imports - - iterable_contains_unrelated_type + - collection_methods_unrelated_type # - join_return_with_assignment # not required by flutter style - leading_newlines_in_multiline_strings - library_names - library_prefixes - library_private_types_in_public_api # - lines_longer_than_80_chars # not required by flutter style - - list_remove_unrelated_type # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/linter/issues/453 - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list diff --git a/boxy/example/lib/main.dart b/boxy/example/lib/main.dart index 34e7fbb..cd71cb9 100644 --- a/boxy/example/lib/main.dart +++ b/boxy/example/lib/main.dart @@ -14,7 +14,7 @@ import 'pages/tree_view.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/boxy/example/lib/pages/boxy_row.dart b/boxy/example/lib/pages/boxy_row.dart index dd3d7ff..9bd90c8 100644 --- a/boxy/example/lib/pages/boxy_row.dart +++ b/boxy/example/lib/pages/boxy_row.dart @@ -61,8 +61,8 @@ class BoxyRowPageState extends State { label: 'BoxyRow', child: BoxyRow( mainAxisSize: MainAxisSize.min, - children: [ - const ChildCard(text: 'Child 1', color: Colors.red), + children: const [ + ChildCard(text: 'Child 1', color: Colors.red), Dominant( child: LabelBox( label: 'Dominant', @@ -70,7 +70,7 @@ class BoxyRowPageState extends State { label: 'Column', child: Column( mainAxisSize: MainAxisSize.min, - children: const [ + children: [ ChildCard( text: 'Child 2', color: Colors.lightGreen), ChildCard(text: 'Child 3', color: Colors.blue), diff --git a/boxy/example/lib/pages/product_tile.dart b/boxy/example/lib/pages/product_tile.dart index 1999e5c..326cf36 100644 --- a/boxy/example/lib/pages/product_tile.dart +++ b/boxy/example/lib/pages/product_tile.dart @@ -174,7 +174,7 @@ class SeebTitle extends StatefulWidget { } class SeebTitleState extends State { - late StreamSubscription subscription; + late StreamSubscription subscription; late bool expanded; @override diff --git a/boxy/example/pubspec.yaml b/boxy/example/pubspec.yaml index 0b2a729..677efe5 100644 --- a/boxy/example/pubspec.yaml +++ b/boxy/example/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 homepage: https://github.com/PixelToast/boxy environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.18.0 <3.0.0' dependencies: boxy: ^2.0.6+2 diff --git a/boxy/lib/src/boxy_flex.dart b/boxy/lib/src/boxy_flex.dart index 9cd0794..5fa359a 100644 --- a/boxy/lib/src/boxy_flex.dart +++ b/boxy/lib/src/boxy_flex.dart @@ -53,7 +53,7 @@ class BoxyFlex extends MultiChildRenderObjectWidget { /// to be necessary to decide which direction to lay the children in or to /// disambiguate `start` or `end` values for the main or cross axis /// directions, the [textDirection] must not be null. - BoxyFlex({ + const BoxyFlex({ super.key, required this.direction, this.mainAxisAlignment = MainAxisAlignment.start, @@ -267,7 +267,7 @@ class BoxyRow extends BoxyFlex { /// unless the row has no children or only one child) or to disambiguate /// `start` or `end` values for the [mainAxisAlignment], the [textDirection] /// must not be null. - BoxyRow({ + const BoxyRow({ super.key, super.mainAxisAlignment, super.mainAxisSize, @@ -309,7 +309,7 @@ class BoxyColumn extends BoxyFlex { /// any. If there is no ambient directionality, and a text direction is going /// to be necessary to disambiguate `start` or `end` values for the /// [crossAxisAlignment], the [textDirection] must not be null. - BoxyColumn({ + const BoxyColumn({ super.key, super.mainAxisAlignment, super.mainAxisSize, @@ -438,7 +438,7 @@ class BoxyFlexible extends ParentDataWidget { } if (needsLayout) { - final AbstractNode? targetParent = renderObject.parent; + final targetParent = renderObject.parent; if (targetParent is RenderObject) { targetParent.markNeedsLayout(); } diff --git a/boxy/pubspec.yaml b/boxy/pubspec.yaml index 8db0bc5..c3d9686 100644 --- a/boxy/pubspec.yaml +++ b/boxy/pubspec.yaml @@ -1,6 +1,6 @@ name: boxy description: Overcome limitations of built-in layouts, advanced flex, custom multi-child layouts, slivers, and more! -version: 2.0.9 +version: 2.1.0 homepage: https://github.com/PixelToast/boxy documentation: https://boxy.wiki diff --git a/boxy/test/boxy_state_test.dart b/boxy/test/boxy_state_test.dart index 63e9f72..ed16955 100644 --- a/boxy/test/boxy_state_test.dart +++ b/boxy/test/boxy_state_test.dart @@ -141,13 +141,13 @@ void main() { inflatedNames: inflated.toList(), ), children: [ - for (var nm in children) + for (final nm in children) StateTestChild(key: GlobalObjectKey(nm)), ], ), ], ), - for (var nm in outside) + for (final nm in outside) StateTestChild(key: GlobalObjectKey(nm)), ], ),