enable prefer_null_aware_operators (#77105)
This commit is contained in:
parent
8818840aa6
commit
6586a069bc
@ -175,7 +175,7 @@ linter:
|
|||||||
- prefer_is_not_operator
|
- prefer_is_not_operator
|
||||||
- prefer_iterable_whereType
|
- prefer_iterable_whereType
|
||||||
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
|
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
|
||||||
# - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
|
- prefer_null_aware_operators
|
||||||
# - prefer_relative_imports # not yet tested
|
# - prefer_relative_imports # not yet tested
|
||||||
- prefer_single_quotes
|
- prefer_single_quotes
|
||||||
- prefer_spread_collections
|
- prefer_spread_collections
|
||||||
|
@ -267,7 +267,7 @@ class GestureArenaManager {
|
|||||||
bool _debugLogDiagnostic(int pointer, String message, [ _GestureArena? state ]) {
|
bool _debugLogDiagnostic(int pointer, String message, [ _GestureArena? state ]) {
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugPrintGestureArenaDiagnostics) {
|
if (debugPrintGestureArenaDiagnostics) {
|
||||||
final int? count = state != null ? state.members.length : null;
|
final int? count = state?.members.length;
|
||||||
final String s = count != 1 ? 's' : '';
|
final String s = count != 1 ? 's' : '';
|
||||||
debugPrint('Gesture arena ${pointer.toString().padRight(4)} ❙ $message${ count != null ? " with $count member$s." : ""}');
|
debugPrint('Gesture arena ${pointer.toString().padRight(4)} ❙ $message${ count != null ? " with $count member$s." : ""}');
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ Widget buildFormFrame({
|
|||||||
iconEnabledColor: iconEnabledColor,
|
iconEnabledColor: iconEnabledColor,
|
||||||
isDense: isDense,
|
isDense: isDense,
|
||||||
isExpanded: isExpanded,
|
isExpanded: isExpanded,
|
||||||
items: items == null ? null : items.map<DropdownMenuItem<String>>((String item) {
|
items: items?.map<DropdownMenuItem<String>>((String item) {
|
||||||
return DropdownMenuItem<String>(
|
return DropdownMenuItem<String>(
|
||||||
key: ValueKey<String>(item),
|
key: ValueKey<String>(item),
|
||||||
value: item,
|
value: item,
|
||||||
|
@ -54,9 +54,7 @@ Widget buildDropdown({
|
|||||||
Color? focusColor,
|
Color? focusColor,
|
||||||
Color? dropdownColor,
|
Color? dropdownColor,
|
||||||
}) {
|
}) {
|
||||||
final List<DropdownMenuItem<String>>? listItems = items == null
|
final List<DropdownMenuItem<String>>? listItems = items?.map<DropdownMenuItem<String>>((String item) {
|
||||||
? null
|
|
||||||
: items.map<DropdownMenuItem<String>>((String item) {
|
|
||||||
return DropdownMenuItem<String>(
|
return DropdownMenuItem<String>(
|
||||||
key: ValueKey<String>(item),
|
key: ValueKey<String>(item),
|
||||||
value: item,
|
value: item,
|
||||||
|
@ -692,7 +692,7 @@ class _IOSSimulatorLogReader extends DeviceLogReader {
|
|||||||
onListen: _start,
|
onListen: _start,
|
||||||
onCancel: _stop,
|
onCancel: _stop,
|
||||||
);
|
);
|
||||||
_appName = app == null ? null : app.name.replaceAll('.app', '');
|
_appName = app?.name?.replaceAll('.app', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
final IOSSimulator device;
|
final IOSSimulator device;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user