diff --git a/analysis_options.yaml b/analysis_options.yaml index d0fffaf..799268d 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1 @@ -include: package:very_good_analysis/analysis_options.3.0.1.yaml +include: package:very_good_analysis/analysis_options.5.1.0.yaml diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 77fb8e1..fa798a8 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:very_good_analysis/analysis_options.3.0.1.yaml +include: package:very_good_analysis/analysis_options.5.1.0.yaml linter: rules: public_member_api_docs: false diff --git a/example/lib/authentication_flow/authentication_flow.dart b/example/lib/authentication_flow/authentication_flow.dart index 178b87b..38c720e 100644 --- a/example/lib/authentication_flow/authentication_flow.dart +++ b/example/lib/authentication_flow/authentication_flow.dart @@ -129,7 +129,7 @@ class _OnboardingPageState extends State { } class OnboardingStep extends StatelessWidget { - const OnboardingStep({super.key, required this.step}); + const OnboardingStep({required this.step, super.key}); static Page page(int step) { return MaterialPage(child: OnboardingStep(step: step)); diff --git a/example/lib/location_flow/pages/city_selection/city_selection.dart b/example/lib/location_flow/pages/city_selection/city_selection.dart index 6c865ab..f04d32f 100644 --- a/example/lib/location_flow/pages/city_selection/city_selection.dart +++ b/example/lib/location_flow/pages/city_selection/city_selection.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class CitySelection extends StatelessWidget { - const CitySelection({super.key, required this.state}); + const CitySelection({required this.state, super.key}); static MaterialPage page({required String state}) { return MaterialPage(child: CitySelection(state: state)); diff --git a/example/lib/location_flow/pages/state_selection/state_selection.dart b/example/lib/location_flow/pages/state_selection/state_selection.dart index 4cb09f9..527aec0 100644 --- a/example/lib/location_flow/pages/state_selection/state_selection.dart +++ b/example/lib/location_flow/pages/state_selection/state_selection.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class StateSelection extends StatelessWidget { - const StateSelection({super.key, required this.country}); + const StateSelection({required this.country, super.key}); static MaterialPage page({required String country}) { return MaterialPage(child: StateSelection(country: country)); diff --git a/example/lib/location_flow/widgets/drop_down.dart b/example/lib/location_flow/widgets/drop_down.dart index e29254e..c53a677 100644 --- a/example/lib/location_flow/widgets/drop_down.dart +++ b/example/lib/location_flow/widgets/drop_down.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; class Dropdown extends StatelessWidget { const Dropdown({ - super.key, required this.items, required this.onChanged, this.value, this.hint, + super.key, }); final Widget? hint; diff --git a/example/lib/main.dart b/example/lib/main.dart index 13e093e..3bed3e8 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -8,7 +8,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; void main() => runApp(MyApp(locationRepository: LocationRepository())); class MyApp extends StatelessWidget { - const MyApp({super.key, required LocationRepository locationRepository}) + const MyApp({required LocationRepository locationRepository, super.key}) : _locationRepository = locationRepository; final LocationRepository _locationRepository; diff --git a/example/pubspec.yaml b/example/pubspec.yaml index f19fa1c..e205c58 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,6 +8,7 @@ environment: flutter: ">=3.16.0 <4.0.0" dependencies: + bloc: ^8.0.0 equatable: ^2.0.0 flow_builder: path: ../ @@ -16,7 +17,7 @@ dependencies: flutter_bloc: ^8.0.0 dev_dependencies: - very_good_analysis: ^3.0.1 + very_good_analysis: ^5.1.0 flutter: uses-material-design: true diff --git a/lib/flow_builder.dart b/lib/flow_builder.dart index 01d1193..c79a6ec 100644 --- a/lib/flow_builder.dart +++ b/lib/flow_builder.dart @@ -1,3 +1,4 @@ +/// A Flutter package which simplifies flows with a flexible, declarative API. library flow_builder; import 'dart:collection'; @@ -42,13 +43,13 @@ typedef FlowCallback = T Function(T state); class FlowBuilder extends StatefulWidget { /// {@macro flow_builder} const FlowBuilder({ - super.key, required this.onGeneratePages, this.state, this.onComplete, this.controller, this.observers = const [], this.clipBehavior = Clip.hardEdge, + super.key, }) : assert( state != null || controller != null, 'requires either state or controller', @@ -204,9 +205,9 @@ class _FlowBuilderState extends State> { class _InheritedFlowController extends InheritedWidget { const _InheritedFlowController({ - super.key, required this.controller, required super.child, + super.key, }); final FlowController controller; diff --git a/pubspec.yaml b/pubspec.yaml index 52ef47d..49eb53d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,4 +17,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - very_good_analysis: ^3.0.1 + very_good_analysis: ^5.1.0