File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 build :
2020 uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
2121 with :
22- flutter_channel : stable
22+ flutter_version : 3.32.0
2323
2424 spell-check :
2525 uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ jobs:
1515 build :
1616 uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
1717 with :
18- dart_sdk : ' 3.5.0 ' # The minimum Dart SDK version supported by the package.
19- format_directories : ' lib test'
18+ dart_sdk : 3.8.0
19+ format_directories : " lib test"
2020 check_ignore : true
21- report_on : ' lib,test'
21+ report_on : " lib,test"
2222 no_example : true
2323
2424 spell-check :
3131 modified_files_only : false
3232
3333 pana :
34- runs-on : ubuntu-latest
35-
36- steps :
37- - uses : actions/checkout@v4.1.1
38-
39- - uses : subosito/flutter-action@v2
40- with :
41- flutter-version : " 3.24.0" # Forcing to 3.24.0 for right now as pana has an issue with Dart 3.6 https://github.com/dart-lang/dartdoc/issues/3947
42-
43- - name : Install Dependencies
44- run : |
45- flutter packages get
46- flutter pub global activate pana
47-
48- - name : Verify Pub Score
49- run : |
50- PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
51- echo "score: $PANA_SCORE"
52- IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
53- if (( $SCORE < $TOTAL )); then echo "minimum score not met!"; exit 1; fi
34+ uses : VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
Original file line number Diff line number Diff line change 1- include : package:very_good_analysis/analysis_options.7.0.0. yaml
1+ include : package:very_good_analysis/analysis_options.yaml
Original file line number Diff line number Diff line change 1- include : package:very_good_analysis/analysis_options.7.0.0. yaml
1+ include : package:very_good_analysis/analysis_options.yaml
22linter :
33 rules :
44 public_member_api_docs : false
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class _MyFormState extends State<MyForm> {
6161 try {
6262 await _submitForm ();
6363 _state = _state.copyWith (status: FormzSubmissionStatus .success);
64- } catch (_) {
64+ } on Exception catch (_) {
6565 _state = _state.copyWith (status: FormzSubmissionStatus .failure);
6666 }
6767
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ dependencies:
1616dev_dependencies :
1717 flutter_test :
1818 sdk : flutter
19- very_good_analysis : ^7 .0.0
19+ very_good_analysis : ^9 .0.0
2020
2121flutter :
2222 uses-material-design : true
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ import 'package:mocktail/mocktail.dart';
77
88class MockRandom extends Mock implements Random {}
99
10-
1110final _seed = MockRandom ();
1211
1312void main () {
14-
1513 group ('$MyApp ' , () {
1614 testWidgets ('render example' , (tester) async {
1715 await tester.pumpWidget (const MyApp ());
@@ -20,9 +18,8 @@ void main() {
2018 });
2119
2220 group ('$MyForm ' , () {
23-
2421 setUp (() {
25- when (()=> _seed.nextInt (any ())).thenReturn (1 );
22+ when (() => _seed.nextInt (any ())).thenReturn (1 );
2623 });
2724
2825 testWidgets ('submits valid values' , (tester) async {
@@ -113,7 +110,9 @@ void main() {
113110 await tester.pumpAndSettle ();
114111
115112 expect (
116- find.text ('''Password must be at least 8 characters and contain at least one letter and number''' ),
113+ find.text (
114+ '''Password must be at least 8 characters and contain at least one letter and number''' ,
115+ ),
117116 findsOneWidget,
118117 );
119118 });
@@ -137,7 +136,9 @@ void main() {
137136 await tester.pumpAndSettle ();
138137
139138 expect (
140- find.text ('''Password must be at least 8 characters and contain at least one letter and number''' ),
139+ find.text (
140+ '''Password must be at least 8 characters and contain at least one letter and number''' ,
141+ ),
141142 findsOneWidget,
142143 );
143144 });
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ enum FormzSubmissionStatus {
1515 failure,
1616
1717 /// The form submission has been canceled.
18- canceled
18+ canceled,
1919}
2020
2121/// Useful extensions on [FormzSubmissionStatus]
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ documentation: https://github.com/VeryGoodOpenSource/formz
88version : 0.8.0
99
1010environment :
11- sdk : ^3.5 .0
11+ sdk : ^3.8 .0
1212
1313dependencies :
1414 meta : ^1.7.0
1515
1616dev_dependencies :
1717 test : ^1.16.0
18- very_good_analysis : ^7 .0.0
18+ very_good_analysis : ^9 .0.0
Original file line number Diff line number Diff line change @@ -97,8 +97,7 @@ void main() {
9797 expect (NameInput .dirty (value: 'joe' ).error, isNull);
9898 });
9999
100- test (
101- 'error is NameInputError.empty '
100+ test ('error is NameInputError.empty '
102101 'if super.dirty is used and input is invalid' , () {
103102 expect (NameInput .dirty ().error, NameInputError .empty);
104103 });
@@ -136,11 +135,12 @@ void main() {
136135 });
137136
138137 test (
139- 'isNotValid is true if super.dirty is used '
140- 'and input is invalid' , () {
141- expect (NameInput .dirty ().isValid, isFalse);
142- expect (NameInput .dirty ().isNotValid, isTrue);
143- });
138+ 'isNotValid is true if super.dirty is used and input is invalid' ,
139+ () {
140+ expect (NameInput .dirty ().isValid, isFalse);
141+ expect (NameInput .dirty ().isNotValid, isTrue);
142+ },
143+ );
144144
145145 test ('hashCode is correct' , () {
146146 final name = NameInput .pure ();
You can’t perform that action at this time.
0 commit comments