Skip to content

Commit 3efefc7

Browse files
committed
chore: Bump dependencies
1 parent 73cccb6 commit 3efefc7

30 files changed

+114
-131
lines changed

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/lib/widgets/message_card.dart

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

1717
const MessageCard({
18-
Key? key,
19-
required this.message,
20-
required this.type,
18+
required this.message, required this.type, super.key,
2119
this.errorColor = const Color(0xFFCC6941),
2220
this.infoColor = const Color(0xFF5E89FF),
23-
}) : super(key: key);
21+
});
2422

2523
@override
2624
Widget build(BuildContext context) {

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) {

lib/src/widgets/link.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class Link extends StatelessWidget {
88
final EdgeInsets padding;
99

1010
const Link({
11-
Key? key,
1211
required this.label,
1312
required this.textStyle,
1413
required this.textAlign,
14+
super.key,
1515
this.onTap,
1616
this.padding = const EdgeInsets.all(10),
17-
}) : super(key: key);
17+
});
1818

1919
@override
2020
Widget build(BuildContext context) {

lib/src/widgets/properties_container.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class PropertiesContainer extends StatefulWidget {
1111
final VoidCallback onCancel;
1212

1313
const PropertiesContainer({
14-
Key? key,
1514
required this.currentChapter,
1615
required this.onPropertyChange,
1716
required this.onCancel,
18-
}) : super(key: key);
17+
super.key,
18+
});
1919

2020
@override
2121
State createState() => _PropertiesContainerState();
@@ -41,17 +41,17 @@ class _PropertiesContainerState extends State<PropertiesContainer> {
4141
}
4242
}
4343

44-
final _propertyKey =
44+
final propertyKey =
4545
Key('${widget.currentChapter.id}#${entry.value.name}');
46-
final _onChanged = () {
46+
final onChanged = () {
4747
setState(() {});
4848
widget.onPropertyChange();
4949
};
5050

5151
children.add(
5252
entry.value.createPropertyEditor(
53-
onChanged: _onChanged,
54-
key: _propertyKey,
53+
onChanged: onChanged,
54+
key: propertyKey,
5555
),
5656
);
5757
}

lib/src/widgets/property_widgets/bool_property.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class BoolProperty extends StatefulWidget {
88
const BoolProperty({
99
required this.property,
1010
required this.onChanged,
11-
Key? key,
12-
}) : super(key: key);
11+
super.key,
12+
});
1313

1414
@override
1515
State<StatefulWidget> createState() => BoolPropertyState(property.getValue());

0 commit comments

Comments
 (0)