Skip to content

Commit

Permalink
refactor: update lint rules (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Apr 2, 2024
1 parent 7b83894 commit 5cb75d8
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.3.0.1.yaml
include: package:very_good_analysis/analysis_options.5.1.0.yaml
2 changes: 1 addition & 1 deletion example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion example/lib/authentication_flow/authentication_flow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
}

class OnboardingStep extends StatelessWidget {
const OnboardingStep({super.key, required this.step});
const OnboardingStep({required this.step, super.key});

static Page<void> page(int step) {
return MaterialPage<void>(child: OnboardingStep(step: step));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> page({required String state}) {
return MaterialPage<void>(child: CitySelection(state: state));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> page({required String country}) {
return MaterialPage<void>(child: StateSelection(country: country));
Expand Down
2 changes: 1 addition & 1 deletion example/lib/location_flow/widgets/drop_down.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ environment:
flutter: ">=3.16.0 <4.0.0"

dependencies:
bloc: ^8.0.0
equatable: ^2.0.0
flow_builder:
path: ../
Expand All @@ -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
5 changes: 3 additions & 2 deletions lib/flow_builder.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// A Flutter package which simplifies flows with a flexible, declarative API.
library flow_builder;

import 'dart:collection';
Expand Down Expand Up @@ -42,13 +43,13 @@ typedef FlowCallback<T> = T Function(T state);
class FlowBuilder<T> extends StatefulWidget {
/// {@macro flow_builder}
const FlowBuilder({
super.key,
required this.onGeneratePages,
this.state,
this.onComplete,
this.controller,
this.observers = const <NavigatorObserver>[],
this.clipBehavior = Clip.hardEdge,
super.key,
}) : assert(
state != null || controller != null,
'requires either state or controller',
Expand Down Expand Up @@ -204,9 +205,9 @@ class _FlowBuilderState<T> extends State<FlowBuilder<T>> {

class _InheritedFlowController<T> extends InheritedWidget {
const _InheritedFlowController({
super.key,
required this.controller,
required super.child,
super.key,
});

final FlowController<T> controller;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^3.0.1
very_good_analysis: ^5.1.0

0 comments on commit 5cb75d8

Please sign in to comment.