Revert "Migrate android_semantics_testing to null safety (#111420)" (#111429)

This reverts commit 0df0e2ea1f.
This commit is contained in:
Zachary Anderson
2022-09-12 18:11:07 -07:00
committed by GitHub
parent 257e31ecc3
commit e99341920e
10 changed files with 80 additions and 81 deletions

View File

@@ -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({super.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;
});
}

View File

@@ -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({super.key});
const HeadingsPage({Key key}) : super(key: key);
static const ValueKey<String> _appBarTitleKey = ValueKey<String>(appBarTitleKeyValue);
static const ValueKey<String> _bodyTextKey = ValueKey<String>(bodyTextKeyValue);

View File

@@ -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({super.key});
const PopupControlsPage({Key key}) : super(key: key);
@override
State<StatefulWidget> createState() => _PopupControlsPageState();
@@ -60,9 +60,9 @@ class _PopupControlsPageState extends State<PopupControlsPage> {
child: Text(item),
);
}).toList(),
onChanged: (String? value) {
onChanged: (String value) {
setState(() {
dropdownValue = value!;
dropdownValue = value;
});
},
),

View File

@@ -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({super.key});
const TextFieldPage({Key key}) : super(key: key);
@override
State<StatefulWidget> createState() => _TextFieldPageState();