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() {
|
void main() {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
FlutterError.onError = (details) {
|
||||||
|
FlutterError.presentError(details);
|
||||||
|
print('CK_ERROR: ${details.exceptionAsString()}');
|
||||||
|
print('CK_STACK: ${details.stack}');
|
||||||
|
};
|
||||||
// Enable configureApp will cause route problem.
|
// Enable configureApp will cause route problem.
|
||||||
// configureApp();
|
// configureApp();
|
||||||
setPathUrlStrategy();
|
setPathUrlStrategy();
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ class DesktopCheckoutState extends State<DesktopCheckout> with SingleTickerProvi
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
S.of(context).table_token(store.state.tableNumber!),
|
S.of(context).table_token(store.state.tableNumber ?? ''),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.0,
|
fontSize: 20.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ class MobileCheckoutState extends State<MobileCheckout> with SingleTickerProvide
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
S.of(context).table_token(store.state.tableNumber!),
|
S.of(context).table_token(store.state.tableNumber ?? ''),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20.0,
|
fontSize: 20.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
Reference in New Issue
Block a user