fix(runtime): checkout table_token(store.state.tableNumber!) -> tableNumber ?? ''. 普通网购用户无餐桌号(null)时崩溃. desktop L309/mobile L284. Fixes checkout/310 Unexpected null value
This commit is contained in:
@@ -33,6 +33,11 @@ import 'utils/utils.dart';
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterError.onError = (details) {
|
||||
FlutterError.presentError(details);
|
||||
print('CK_ERROR: ${details.exceptionAsString()}');
|
||||
print('CK_STACK: ${details.stack}');
|
||||
};
|
||||
// Enable configureApp will cause route problem.
|
||||
// configureApp();
|
||||
setPathUrlStrategy();
|
||||
|
||||
@@ -306,7 +306,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
S.of(context).table_token(store.state.tableNumber!),
|
||||
S.of(context).table_token(store.state.tableNumber ?? ''),
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -281,7 +281,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
S.of(context).table_token(store.state.tableNumber!),
|
||||
S.of(context).table_token(store.state.tableNumber ?? ''),
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
Reference in New Issue
Block a user