1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-04 02:32:25 +00:00

Enforce use_key_in_widget_constructors and file_names lints (#913)

* Start enforcing use_key_in_widget_constructors and file_names lints

* dart format

* analysis fixes

* analysis fixes, pt2

* analysis fixes, part 3

* Revert platform_design (test failure)

* More reverts

* Notate why we aren't enforcing a lint
This commit is contained in:
Brett Morgan
2021-10-09 08:30:28 +11:00
committed by GitHub
parent e160f5261c
commit e2e2713986
69 changed files with 174 additions and 114 deletions

View File

@@ -11,10 +11,12 @@ import '../app.dart';
import 'edit_entry.dart';
class NewCategoryDialog extends StatelessWidget {
const NewCategoryDialog({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return SimpleDialog(
title: const Text('New Category'),
return const SimpleDialog(
title: Text('New Category'),
children: <Widget>[
NewCategoryForm(),
],
@@ -27,7 +29,8 @@ class EditCategoryDialog extends StatelessWidget {
const EditCategoryDialog({
@required this.category,
});
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -51,6 +54,8 @@ class EditCategoryDialog extends StatelessWidget {
}
class NewEntryDialog extends StatefulWidget {
const NewEntryDialog({Key key}) : super(key: key);
@override
_NewEntryDialogState createState() => _NewEntryDialogState();
}
@@ -58,8 +63,8 @@ class NewEntryDialog extends StatefulWidget {
class _NewEntryDialogState extends State<NewEntryDialog> {
@override
Widget build(BuildContext context) {
return SimpleDialog(
title: const Text('New Entry'),
return const SimpleDialog(
title: Text('New Entry'),
children: [
NewEntryForm(),
],
@@ -74,7 +79,8 @@ class EditEntryDialog extends StatelessWidget {
const EditEntryDialog({
this.category,
this.entry,
});
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {