diff --git a/lib/main.dart b/lib/main.dart index d3aa075..f2eecbe 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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(); diff --git a/lib/widgets/desktop/desktop_checkout.dart b/lib/widgets/desktop/desktop_checkout.dart index 12e3ff7..8fc9c84 100644 --- a/lib/widgets/desktop/desktop_checkout.dart +++ b/lib/widgets/desktop/desktop_checkout.dart @@ -306,7 +306,7 @@ class DesktopCheckoutState extends State 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, diff --git a/lib/widgets/mobile/mobile_checkout.dart b/lib/widgets/mobile/mobile_checkout.dart index 6e0dfa0..92bda21 100644 --- a/lib/widgets/mobile/mobile_checkout.dart +++ b/lib/widgets/mobile/mobile_checkout.dart @@ -281,7 +281,7 @@ class MobileCheckoutState extends State 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,