💄 Optimize the notification snackbar position
This commit is contained in:
parent
5939a1dc5b
commit
536375729f
@ -32,7 +32,9 @@ StreamSubscription<WebSocketPacket> setupNotificationListener(
|
||||
var uri = notification.meta['action_uri'] as String;
|
||||
if (uri.startsWith('/')) {
|
||||
// In-app routes
|
||||
rootNavigatorKey.currentContext?.push(notification.meta['action_uri']);
|
||||
rootNavigatorKey.currentContext?.push(
|
||||
notification.meta['action_uri'],
|
||||
);
|
||||
} else {
|
||||
// External URLs
|
||||
launchUrlString(uri);
|
||||
@ -46,8 +48,14 @@ StreamSubscription<WebSocketPacket> setupNotificationListener(
|
||||
padding: EdgeInsets.only(
|
||||
left: 16,
|
||||
right: 16,
|
||||
top:
|
||||
(!kIsWeb &&
|
||||
(Platform.isMacOS ||
|
||||
Platform.isWindows ||
|
||||
Platform.isLinux))
|
||||
? 24
|
||||
// ignore: use_build_context_synchronously
|
||||
top: MediaQuery.of(context).padding.top + 24,
|
||||
: MediaQuery.of(context).padding.top + 8,
|
||||
bottom: 16,
|
||||
),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user