Skip to content

Commit 569b539

Browse files
committed
Dart Fix v3.0.1
1 parent 7f84cf5 commit 569b539

File tree

9 files changed

+25
-28
lines changed

9 files changed

+25
-28
lines changed

lib/components/blog.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:minimal/pages/page_typography.dart';
1010
class ImageWrapper extends StatelessWidget {
1111
final String image;
1212

13-
const ImageWrapper({Key? key, required this.image}) : super(key: key);
13+
const ImageWrapper({super.key, required this.image});
1414

1515
@override
1616
Widget build(BuildContext context) {
@@ -31,7 +31,7 @@ class ImageWrapper extends StatelessWidget {
3131
class TagWrapper extends StatelessWidget {
3232
final List<Tag> tags;
3333

34-
const TagWrapper({Key? key, this.tags = const []}) : super(key: key);
34+
const TagWrapper({super.key, this.tags = const []});
3535

3636
@override
3737
Widget build(BuildContext context) {
@@ -48,7 +48,7 @@ class TagWrapper extends StatelessWidget {
4848
class Tag extends StatelessWidget {
4949
final String tag;
5050

51-
const Tag({Key? key, required this.tag}) : super(key: key);
51+
const Tag({super.key, required this.tag});
5252

5353
@override
5454
Widget build(BuildContext context) {
@@ -72,7 +72,7 @@ class Tag extends StatelessWidget {
7272
class ReadMoreButton extends StatelessWidget {
7373
final VoidCallback onPressed;
7474

75-
const ReadMoreButton({Key? key, required this.onPressed}) : super(key: key);
75+
const ReadMoreButton({super.key, required this.onPressed});
7676

7777
@override
7878
Widget build(BuildContext context) {
@@ -185,7 +185,7 @@ List<Widget> authorSection({String? imageUrl, String? name, String? bio}) {
185185
}
186186

187187
class PostNavigation extends StatelessWidget {
188-
const PostNavigation({Key? key}) : super(key: key);
188+
const PostNavigation({super.key});
189189

190190
// TODO Get PostID from Global Routing Singleton.
191191
// Example: String currentPage = RouteController.of(context).currentPage;
@@ -221,7 +221,7 @@ class PostNavigation extends StatelessWidget {
221221
}
222222

223223
class ListNavigation extends StatelessWidget {
224-
const ListNavigation({Key? key}) : super(key: key);
224+
const ListNavigation({super.key});
225225

226226
@override
227227
Widget build(BuildContext context) {
@@ -255,7 +255,7 @@ class ListNavigation extends StatelessWidget {
255255
}
256256

257257
class Footer extends StatelessWidget {
258-
const Footer({Key? key}) : super(key: key);
258+
const Footer({super.key});
259259

260260
// TODO Add additional footer components (i.e. about, links, logos).
261261
@override
@@ -277,8 +277,7 @@ class ListItem extends StatelessWidget {
277277
final String? description;
278278

279279
const ListItem(
280-
{Key? key, required this.title, this.imageUrl, this.description})
281-
: super(key: key);
280+
{super.key, required this.title, this.imageUrl, this.description});
282281

283282
@override
284283
Widget build(BuildContext context) {
@@ -332,7 +331,7 @@ class ListItem extends StatelessWidget {
332331
* a hamburger menu on screens smaller than 400px.
333332
*/
334333
class MinimalMenuBar extends StatelessWidget {
335-
const MinimalMenuBar({Key? key}) : super(key: key);
334+
const MinimalMenuBar({super.key});
336335

337336
@override
338337
Widget build(BuildContext context) {

lib/components/text.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'color.dart';
77
class TextBody extends StatelessWidget {
88
final String text;
99

10-
const TextBody({Key? key, required this.text}) : super(key: key);
10+
const TextBody({super.key, required this.text});
1111

1212
@override
1313
Widget build(BuildContext context) {
@@ -24,7 +24,7 @@ class TextBody extends StatelessWidget {
2424
class TextBodySecondary extends StatelessWidget {
2525
final String text;
2626

27-
const TextBodySecondary({Key? key, required this.text}) : super(key: key);
27+
const TextBodySecondary({super.key, required this.text});
2828

2929
@override
3030
Widget build(BuildContext context) {
@@ -41,7 +41,7 @@ class TextBodySecondary extends StatelessWidget {
4141
class TextHeadlineSecondary extends StatelessWidget {
4242
final String text;
4343

44-
const TextHeadlineSecondary({Key? key, required this.text}) : super(key: key);
44+
const TextHeadlineSecondary({super.key, required this.text});
4545

4646
@override
4747
Widget build(BuildContext context) {
@@ -58,7 +58,7 @@ class TextHeadlineSecondary extends StatelessWidget {
5858
class TextBlockquote extends StatelessWidget {
5959
final String text;
6060

61-
const TextBlockquote({Key? key, required this.text}) : super(key: key);
61+
const TextBlockquote({super.key, required this.text});
6262

6363
@override
6464
Widget build(BuildContext context) {

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void main() {
77
}
88

99
class MyApp extends StatelessWidget {
10-
const MyApp({Key? key}) : super(key: key);
10+
const MyApp({super.key});
1111

1212
@override
1313
Widget build(BuildContext context) {

lib/main_advanced.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void main() {
1010
}
1111

1212
class MyApp extends StatelessWidget {
13-
const MyApp({Key? key}) : super(key: key);
13+
const MyApp({super.key});
1414

1515
@override
1616
Widget build(BuildContext context) {
@@ -52,10 +52,10 @@ class MyApp extends StatelessWidget {
5252
// Set the fixed width value based on the active breakpoint.
5353
width: ResponsiveValue<double>(context,
5454
conditionalValues: [
55-
Condition.equals(name: MOBILE, value: 450),
56-
Condition.between(
55+
const Condition.equals(name: MOBILE, value: 450),
56+
const Condition.between(
5757
start: 800, end: 1100, value: 800),
58-
Condition.between(
58+
const Condition.between(
5959
start: 1000, end: 1200, value: 1000),
6060
// There are no conditions for width over 1200
6161
// because the `maxWidth` is set to 1200 via the MaxWidthBox.

lib/pages/page_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const String listItemPreviewText =
99
class ListPage extends StatelessWidget {
1010
static const String name = 'list';
1111

12-
const ListPage({Key? key}) : super(key: key);
12+
const ListPage({super.key});
1313

1414
@override
1515
Widget build(BuildContext context) {

lib/pages/page_post.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:minimal/components/components.dart';
44
class PostPage extends StatelessWidget {
55
static const String name = 'post';
66

7-
const PostPage({Key? key}) : super(key: key);
7+
const PostPage({super.key});
88

99
@override
1010
Widget build(BuildContext context) {

lib/pages/page_typography.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:minimal/components/components.dart';
44
class TypographyPage extends StatelessWidget {
55
static const String name = 'typography';
66

7-
const TypographyPage({Key? key}) : super(key: key);
7+
const TypographyPage({super.key});
88

99
@override
1010
Widget build(BuildContext context) {

lib/ui/ui_image.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ class ImageFixedWidth extends StatefulWidget {
1010
final double imageRatio;
1111

1212
const ImageFixedWidth(
13-
{Key? key,
13+
{super.key,
1414
required this.imageUrl,
1515
required this.width,
16-
this.imageRatio = 1})
17-
: super(key: key);
16+
this.imageRatio = 1});
1817

1918
@override
2019
ImageFixedWidthState createState() => ImageFixedWidthState();

lib/utils/conditional_route_widget.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ class ConditionalRouteWidget extends StatelessWidget {
77
final Widget child;
88

99
const ConditionalRouteWidget(
10-
{Key? key,
10+
{super.key,
1111
this.routes,
1212
this.routesExcluded,
1313
required this.builder,
1414
required this.child})
1515
: assert(routes == null || routesExcluded == null,
16-
'Cannot include `routes` and `routesExcluded`. Please provide an list of routes to include or exclude, not both.'),
17-
super(key: key);
16+
'Cannot include `routes` and `routesExcluded`. Please provide an list of routes to include or exclude, not both.');
1817

1918
@override
2019
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)