Remove unnecessary null checks in dev/*_tests (#118844)
This commit is contained in:
committed by
GitHub
parent
25843bdb5a
commit
70cecf6c9e
@@ -48,8 +48,6 @@ class Memento extends Object with Diagnosticable {
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
super.debugFillProperties(properties);
|
||||
properties.add(StringProperty('name', name));
|
||||
properties.add(FlagProperty('undo', value: undo != null, ifTrue: 'undo'));
|
||||
properties.add(FlagProperty('redo', value: redo != null, ifTrue: 'redo'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +61,7 @@ class UndoableActionDispatcher extends ActionDispatcher implements Listenable {
|
||||
/// The [maxUndoLevels] argument must not be null.
|
||||
UndoableActionDispatcher({
|
||||
int maxUndoLevels = _defaultMaxUndoLevels,
|
||||
}) : assert(maxUndoLevels != null),
|
||||
_maxUndoLevels = maxUndoLevels;
|
||||
}) : _maxUndoLevels = maxUndoLevels;
|
||||
|
||||
// A stack of actions that have been performed. The most recent action
|
||||
// performed is at the end of the list.
|
||||
|
||||
@@ -365,9 +365,7 @@ class _OptionsState extends State<Options> {
|
||||
}
|
||||
|
||||
class _ControlTile extends StatelessWidget {
|
||||
const _ControlTile({required this.label, required this.child})
|
||||
: assert(label != null),
|
||||
assert(child != null);
|
||||
const _ControlTile({required this.label, required this.child});
|
||||
|
||||
final String label;
|
||||
final Widget child;
|
||||
|
||||
@@ -43,7 +43,7 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
String _asHex(int value) => value != null ? '0x${value.toRadixString(16)}' : 'null';
|
||||
String _asHex(int value) => '0x${value.toRadixString(16)}';
|
||||
|
||||
String _getEnumName(dynamic enumItem) {
|
||||
final String name = '$enumItem';
|
||||
|
||||
Reference in New Issue
Block a user