phase3: nullfix.py batch script — bang/late/param-nullable
Automated null-safety fixes driven by dart analyze (no corruption): - unchecked_use_of_nullable_value: insert '!' on receiver (property/method/[]/op) - not_initialized field/var: mark 'late' - missing_default_value_for_parameter: nullable param Errors: 2374(peak) -> 907
This commit is contained in:
@@ -34,7 +34,7 @@ class DoubleBackToCloseApp extends StatefulWidget {
|
||||
|
||||
class _DoubleBackToCloseAppState extends State<DoubleBackToCloseApp> {
|
||||
/// The last time the user tapped Android's back-button.
|
||||
DateTime _lastTimeBackButtonWasTapped;
|
||||
late DateTime _lastTimeBackButtonWasTapped;
|
||||
|
||||
/// Returns whether the current platform is Android.
|
||||
bool get _isAndroid => Theme.of(context).platform == TargetPlatform.android;
|
||||
@@ -59,7 +59,7 @@ class _DoubleBackToCloseAppState extends State<DoubleBackToCloseApp> {
|
||||
/// local-history of the current route, in order to handle pop. This is done
|
||||
/// by [Drawer], for example, so it can close on pop.
|
||||
bool get _willHandlePopInternally =>
|
||||
ModalRoute.of(context).willHandlePopInternally;
|
||||
ModalRoute.of(context)!.willHandlePopInternally;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user