diff --git a/lib/route.dart b/lib/route.dart index 8d149b6..be0e6b0 100644 --- a/lib/route.dart +++ b/lib/route.dart @@ -411,7 +411,7 @@ final routerProvider = Provider((ref) { pageBuilder: (context, state, child) => CustomTransitionPage( key: const ValueKey('chat'), - child: child, + child: ChatShellScreen(child: child), transitionsBuilder: _tabPagesTransitionBuilder, ), routes: [ @@ -492,7 +492,7 @@ final routerProvider = Provider((ref) { pageBuilder: (context, state, child) => CustomTransitionPage( key: const ValueKey('account'), - child: child, + child: AccountShellScreen(child: child), transitionsBuilder: _tabPagesTransitionBuilder, ), routes: [ diff --git a/lib/services/notify.dart b/lib/services/notify.dart index c17b742..36d820f 100644 --- a/lib/services/notify.dart +++ b/lib/services/notify.dart @@ -26,7 +26,12 @@ StreamSubscription setupNotificationListener( final notification = SnNotification.fromJson(pkt.data!); showTopSnackBar( globalOverlay.currentState!, - NotificationCard(notification: notification), + Center( + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 480), + child: NotificationCard(notification: notification), + ), + ), onTap: () { if (notification.meta['action_uri'] != null) { var uri = notification.meta['action_uri'] as String; @@ -53,9 +58,9 @@ StreamSubscription setupNotificationListener( (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) - ? 24 + ? 28 // ignore: use_build_context_synchronously - : MediaQuery.of(context).padding.top + 8, + : MediaQuery.of(context).padding.top + 16, bottom: 16, ), ); diff --git a/lib/widgets/alert.dart b/lib/widgets/alert.dart index 233f094..61f55e2 100644 --- a/lib/widgets/alert.dart +++ b/lib/widgets/alert.dart @@ -11,7 +11,12 @@ export 'content/alert.native.dart' void showSnackBar(String message, {SnackBarAction? action}) { showTopSnackBar( globalOverlay.currentState!, - Card(child: Text(message).padding(horizontal: 20, vertical: 16)), + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 480), + child: Center( + child: Card(child: Text(message).padding(horizontal: 20, vertical: 16)), + ), + ), snackBarPosition: SnackBarPosition.bottom, ); }