🐛 Bug fixes of scaffold
This commit is contained in:
		| @@ -47,7 +47,11 @@ class SolianApp extends StatelessWidget { | ||||
|           child: Overlay( | ||||
|             initialEntries: [ | ||||
|               OverlayEntry(builder: (context) { | ||||
|                 return NotificationNotifier(child: child ?? Container()); | ||||
|                 return ScaffoldMessenger( | ||||
|                   child: Scaffold( | ||||
|                     body: NotificationNotifier(child: child ?? Container()), | ||||
|                   ), | ||||
|                 ); | ||||
|               }), | ||||
|               OverlayEntry(builder: (context) => const CallOverlay()), | ||||
|             ], | ||||
|   | ||||
| @@ -159,6 +159,8 @@ abstract class SolianRouter { | ||||
|     ], | ||||
|   ); | ||||
|  | ||||
|   static GoRoute get currentRoute => SolianRouter.router.routerDelegate.currentConfiguration.last.route; | ||||
|  | ||||
|   static Page defaultPageBuilder( | ||||
|     BuildContext context, | ||||
|     GoRouterState state, | ||||
|   | ||||
| @@ -32,7 +32,6 @@ class ChatScreen extends StatelessWidget { | ||||
|       title: chat.focusChannel?.name ?? 'Loading...', | ||||
|       hideDrawer: true, | ||||
|       fixedAppBarColor: SolianTheme.isLargeScreen(context), | ||||
|       appBarLeading: IconButton(icon: const Icon(Icons.tag), onPressed: () {}), | ||||
|       appBarActions: chat.focusChannel != null | ||||
|           ? [ | ||||
|               ChannelCallAction( | ||||
|   | ||||
| @@ -25,10 +25,17 @@ class ChatListScreen extends StatelessWidget { | ||||
|       fixedAppBarColor: SolianTheme.isLargeScreen(context), | ||||
|       child: ChatListWidget( | ||||
|         onSelect: (item) { | ||||
|           SolianRouter.router.pushReplacementNamed( | ||||
|             'chat.channel', | ||||
|             pathParameters: {'channel': item.alias}, | ||||
|           ); | ||||
|           if (SolianRouter.currentRoute.name == 'chat.channel') { | ||||
|             SolianRouter.router.pushReplacementNamed( | ||||
|               'chat.channel', | ||||
|               pathParameters: {'channel': item.alias}, | ||||
|             ); | ||||
|           } else { | ||||
|             SolianRouter.router.pushNamed( | ||||
|               'chat.channel', | ||||
|               pathParameters: {'channel': item.alias}, | ||||
|             ); | ||||
|           } | ||||
|         }, | ||||
|       ), | ||||
|     ); | ||||
|   | ||||
| @@ -9,9 +9,6 @@ abstract class SolianTheme { | ||||
|       brightness: brightness, | ||||
|       useMaterial3: true, | ||||
|       colorScheme: ColorScheme.fromSeed(brightness: brightness, seedColor: Colors.indigo), | ||||
|       snackBarTheme: const SnackBarThemeData( | ||||
|         behavior: SnackBarBehavior.floating, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @@ -13,19 +13,15 @@ class TwoColumnLayout extends StatelessWidget { | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return ScaffoldMessenger( | ||||
|       child: Scaffold( | ||||
|         body: Row( | ||||
|           children: [ | ||||
|             SizedBox( | ||||
|               width: 400, | ||||
|               child: sideChild, | ||||
|             ), | ||||
|             const VerticalDivider(width: 0.3, thickness: 0.3), | ||||
|             Expanded(child: mainChild ?? const PageEmptyWidget()), | ||||
|           ], | ||||
|     return Row( | ||||
|       children: [ | ||||
|         SizedBox( | ||||
|           width: 400, | ||||
|           child: sideChild, | ||||
|         ), | ||||
|       ), | ||||
|         const VerticalDivider(width: 0.3, thickness: 0.3), | ||||
|         Expanded(child: mainChild ?? const PageEmptyWidget()), | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user