enable use_key_in_widget_constructors lint (#77032)
This commit is contained in:
committed by
GitHub
parent
6ec9014298
commit
0f568298d8
@@ -43,14 +43,14 @@ Future<String> dataHandler(String message) async {
|
||||
}
|
||||
|
||||
Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
||||
selectionControlsRoute : (BuildContext context) => SelectionControlsPage(),
|
||||
popupControlsRoute : (BuildContext context) => PopupControlsPage(),
|
||||
textFieldRoute : (BuildContext context) => TextFieldPage(),
|
||||
headingsRoute: (BuildContext context) => HeadingsPage(),
|
||||
selectionControlsRoute : (BuildContext context) => const SelectionControlsPage(),
|
||||
popupControlsRoute : (BuildContext context) => const PopupControlsPage(),
|
||||
textFieldRoute : (BuildContext context) => const TextFieldPage(),
|
||||
headingsRoute: (BuildContext context) => const HeadingsPage(),
|
||||
};
|
||||
|
||||
class TestApp extends StatelessWidget {
|
||||
const TestApp();
|
||||
const TestApp({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -9,6 +9,8 @@ export 'controls_constants.dart';
|
||||
|
||||
/// A test page with a checkbox, three radio buttons, and a switch.
|
||||
class SelectionControlsPage extends StatefulWidget {
|
||||
const SelectionControlsPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _SelectionControlsPageState();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ export 'headings_constants.dart';
|
||||
|
||||
/// A test page with an app bar and some body text for testing heading flags.
|
||||
class HeadingsPage extends StatelessWidget {
|
||||
const HeadingsPage({Key key}) : super(key: key);
|
||||
|
||||
static const ValueKey<String> _appBarTitleKey = ValueKey<String>(appBarTitleKeyValue);
|
||||
static const ValueKey<String> _bodyTextKey = ValueKey<String>(bodyTextKeyValue);
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ export 'popup_constants.dart';
|
||||
|
||||
/// A page with a popup menu, a dropdown menu, and a modal alert.
|
||||
class PopupControlsPage extends StatefulWidget {
|
||||
const PopupControlsPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _PopupControlsPageState();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ export 'text_field_constants.dart';
|
||||
|
||||
/// A page with a normal text field and a password field.
|
||||
class TextFieldPage extends StatefulWidget {
|
||||
const TextFieldPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _TextFieldPageState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user