This commit is contained in:
committed by
GitHub
parent
b3bde1d9da
commit
0100285e6f
@@ -9,7 +9,7 @@ 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);
|
||||
const SelectionControlsPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _SelectionControlsPageState();
|
||||
@@ -28,15 +28,15 @@ class _SelectionControlsPageState extends State<SelectionControlsPage> {
|
||||
bool _isLabeledOn = false;
|
||||
int _radio = 0;
|
||||
|
||||
void _updateCheckbox(bool newValue) {
|
||||
void _updateCheckbox(bool? newValue) {
|
||||
setState(() {
|
||||
_isChecked = newValue;
|
||||
_isChecked = newValue!;
|
||||
});
|
||||
}
|
||||
|
||||
void _updateRadio(int newValue) {
|
||||
void _updateRadio(int? newValue) {
|
||||
setState(() {
|
||||
_radio = newValue;
|
||||
_radio = newValue!;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ 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);
|
||||
const HeadingsPage({Key? key}) : super(key: key);
|
||||
|
||||
static const ValueKey<String> _appBarTitleKey = ValueKey<String>(appBarTitleKeyValue);
|
||||
static const ValueKey<String> _bodyTextKey = ValueKey<String>(bodyTextKeyValue);
|
||||
|
||||
@@ -10,7 +10,7 @@ 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);
|
||||
const PopupControlsPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _PopupControlsPageState();
|
||||
@@ -22,7 +22,7 @@ class _PopupControlsPageState extends State<PopupControlsPage> {
|
||||
final Key alertKey = const ValueKey<String>(alertKeyValue);
|
||||
|
||||
String popupValue = popupItems.first;
|
||||
String dropdownValue = popupItems.first;
|
||||
String? dropdownValue = popupItems.first;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -60,7 +60,7 @@ class _PopupControlsPageState extends State<PopupControlsPage> {
|
||||
child: Text(item),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (String value) {
|
||||
onChanged: (String? value) {
|
||||
setState(() {
|
||||
dropdownValue = value;
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@ 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);
|
||||
const TextFieldPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _TextFieldPageState();
|
||||
|
||||
Reference in New Issue
Block a user