Skip to content

Commit 99d6eb0

Browse files
authored
chore: Bump dependencies (#126)
* chore: Bump dependencies * Bump ci actions * Run pub get before formatting * Fix formatting * on Exception
1 parent 73cccb6 commit 99d6eb0

33 files changed

+138
-142
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,25 @@ jobs:
1212
format:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- uses: subosito/flutter-action@v2
17-
with:
18-
channel: 'stable'
19-
cache: true
20-
- run: dart format --set-exit-if-changed lib test
17+
- run: |
18+
flutter pub get
19+
dart format --set-exit-if-changed .
2120
2221
analyze:
2322
runs-on: ubuntu-latest
2423
steps:
25-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2625
- uses: subosito/flutter-action@v2
27-
with:
28-
channel: 'stable'
29-
cache: true
3026
- run: flutter analyze lib test
3127
# END LINTING STAGE
3228

3329
# BEGIN TESTING STAGE
3430
test:
3531
runs-on: ubuntu-latest
3632
steps:
37-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v4
3834
- uses: subosito/flutter-action@v2
39-
with:
40-
channel: 'stable'
41-
cache: true
4235
- run: flutter test
4336
# END TESTING STAGE
44-

analysis_options.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
include: package:very_good_analysis/analysis_options.2.4.0.yaml
1+
include: package:very_good_analysis/analysis_options.7.0.0.yaml
2+
3+
analyzer:
4+
errors:
5+
document_ignores: ignore
26

37
linter:
48
rules:
@@ -8,4 +12,4 @@ linter:
812
only_throw_errors: false
913
avoid_returning_this: false
1014
prefer_function_declarations_over_variables: false
11-
no_logic_in_create_state: false
15+
no_logic_in_create_state: false

example/analysis_options.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include: package:very_good_analysis/analysis_options.7.0.0.yaml
2+
3+
analyzer:
4+
errors:
5+
document_ignores: ignore
6+
7+
linter:
8+
rules:
9+
public_member_api_docs: false
10+
sort_constructors_first: false
11+
avoid_positional_boolean_parameters: false
12+
only_throw_errors: false
13+
avoid_returning_this: false
14+
prefer_function_declarations_over_variables: false
15+
no_logic_in_create_state: false

example/lib/widgets/message_card.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class MessageCard extends StatelessWidget {
1515
final Color infoColor;
1616

1717
const MessageCard({
18-
Key? key,
1918
required this.message,
2019
required this.type,
20+
super.key,
2121
this.errorColor = const Color(0xFFCC6941),
2222
this.infoColor = const Color(0xFF5E89FF),
23-
}) : super(key: key);
23+
});
2424

2525
@override
2626
Widget build(BuildContext context) {

example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ version: 1.0.0+1
66
publish_to: none
77

88
environment:
9-
sdk: ">=3.0.0 <4.0.0"
10-
flutter: ">=3.13.0"
9+
sdk: ">=3.6.0 <4.0.0"
10+
flutter: ">=3.27.0"
1111

1212
dependencies:
1313
dashbook:
@@ -19,7 +19,7 @@ dependencies:
1919
dev_dependencies:
2020
flutter_test:
2121
sdk: flutter
22-
very_good_analysis: ^5.1.0
22+
very_good_analysis: ^7.0.0
2323

2424
flutter:
2525
uses-material-design: true

lib/src/story.dart

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,12 @@ class ListProperty<T> extends Property<T> {
9393
final List<T> list;
9494

9595
ListProperty(
96-
String name,
97-
T defaultValue,
96+
super.name,
97+
super.defaultValue,
9898
this.list, {
99-
String? tooltipMessage,
100-
ControlProperty? visibilityControlProperty,
101-
}) : super(
102-
name,
103-
defaultValue,
104-
tooltipMessage: tooltipMessage,
105-
visibilityControlProperty: visibilityControlProperty,
106-
);
99+
super.tooltipMessage,
100+
super.visibilityControlProperty,
101+
});
107102

108103
@override
109104
Widget createPropertyEditor({required PropertyChanged onChanged, Key? key}) {
@@ -119,17 +114,12 @@ class OptionsProperty<T> extends Property<T> {
119114
final List<PropertyOption<T>> list;
120115

121116
OptionsProperty(
122-
String name,
123-
T defaultValue,
117+
super.name,
118+
super.defaultValue,
124119
this.list, {
125-
String? tooltipMessage,
126-
ControlProperty? visibilityControlProperty,
127-
}) : super(
128-
name,
129-
defaultValue,
130-
tooltipMessage: tooltipMessage,
131-
visibilityControlProperty: visibilityControlProperty,
132-
);
120+
super.tooltipMessage,
121+
super.visibilityControlProperty,
122+
});
133123

134124
@override
135125
Widget createPropertyEditor({required PropertyChanged onChanged, Key? key}) {
@@ -154,7 +144,7 @@ class PropertyOption<T> {
154144
}
155145

156146
class DashbookContext {
157-
Map<String, Property> properties = {};
147+
Map<String, Property<Object?>> properties = {};
158148
Map<String, void Function(BuildContext)> actions = {};
159149

160150
void action(String name, void Function(BuildContext) callback) {
@@ -375,15 +365,15 @@ class Story {
375365
String? info,
376366
bool pinInfo = false,
377367
}) {
378-
final _chapter = Chapter(
368+
final chapter = Chapter(
379369
name,
380370
buildFn,
381371
this,
382372
codeLink: codeLink,
383373
info: info,
384374
pinInfo: pinInfo,
385375
);
386-
chapters.add(_chapter);
376+
chapters.add(chapter);
387377

388378
return this;
389379
}

lib/src/widgets/actions_container.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import 'package:flutter/material.dart';
66

77
class ActionsContainer extends StatelessWidget {
88
const ActionsContainer({
9-
Key? key,
109
required this.onCancel,
1110
required this.currentChapter,
12-
}) : super(key: key);
11+
super.key,
12+
});
1313

1414
final VoidCallback onCancel;
1515
final Chapter currentChapter;

lib/src/widgets/device_preview.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ class DevicePreview extends StatelessWidget {
88
final bool showDeviceFrame;
99

1010
const DevicePreview({
11-
Key? key,
1211
required this.child,
1312
required this.deviceInfo,
1413
required this.deviceOrientation,
1514
required this.showDeviceFrame,
16-
}) : super(key: key);
15+
super.key,
16+
});
1717

1818
@override
1919
Widget build(BuildContext context) {
@@ -33,7 +33,7 @@ class DevicePreview extends StatelessWidget {
3333
isFrameVisible: showDeviceFrame,
3434
screen: MediaQuery(
3535
data: mediaQuery,
36-
child: Container(
36+
child: ColoredBox(
3737
color: Theme.of(context).scaffoldBackgroundColor,
3838
child: child,
3939
),

lib/src/widgets/device_settings_container.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class DeviceSettingsContainer extends StatefulWidget {
1212
final VoidCallback onCancel;
1313

1414
const DeviceSettingsContainer({
15-
Key? key,
1615
required this.onCancel,
17-
}) : super(key: key);
16+
super.key,
17+
});
1818

1919
@override
2020
State<DeviceSettingsContainer> createState() =>

lib/src/widgets/intructions_dialog.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class InstructionsDialog extends StatelessWidget {
3838
final String instructions;
3939

4040
const InstructionsDialog({
41-
Key? key,
4241
required this.instructions,
43-
}) : super(key: key);
42+
super.key,
43+
});
4444

4545
@override
4646
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)