fix(runtime): 37 late fields with == null checks were wrongly migrated -> nullable. Fixes LateInitializationError crashes on page navigation (shop/checkout/comment/data pages)

This commit is contained in:
2026-08-01 01:58:36 +08:00
parent b49fb59db4
commit 0526baa3c8
32 changed files with 317 additions and 317 deletions

View File

@@ -34,7 +34,7 @@ class DoubleBackToCloseApp extends StatefulWidget {
class _DoubleBackToCloseAppState extends State<DoubleBackToCloseApp> {
/// The last time the user tapped Android's back-button.
late DateTime _lastTimeBackButtonWasTapped;
DateTime? _lastTimeBackButtonWasTapped;
/// Returns whether the current platform is Android.
bool get _isAndroid => Theme.of(context).platform == TargetPlatform.android;
@@ -50,7 +50,7 @@ class _DoubleBackToCloseAppState extends State<DoubleBackToCloseApp> {
bool get _isSnackBarVisible =>
(_lastTimeBackButtonWasTapped != null) &&
(widget.snackBar.duration >
DateTime.now().difference(_lastTimeBackButtonWasTapped));
DateTime.now().difference(_lastTimeBackButtonWasTapped!));
/// Returns whether the next back navigation of this route will be handled
/// internally.