fix(ui): center folder tab labels in chat list
This commit is contained in:
@@ -1581,6 +1581,7 @@ class _ChatListScreenState extends State<ChatListScreen>
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? cs.primaryContainer : cs.surfaceContainerHigh,
|
||||
@@ -1588,6 +1589,7 @@ class _ChatListScreenState extends State<ChatListScreen>
|
||||
),
|
||||
child: Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: isSelected ? cs.onPrimaryContainer : cs.primary,
|
||||
fontSize: 14,
|
||||
|
||||
@@ -2,7 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
void showCustomNotification(BuildContext context, String message) {
|
||||
final overlay = Overlay.of(context);
|
||||
showCustomNotificationOnOverlay(Overlay.of(context), message);
|
||||
}
|
||||
|
||||
void showCustomNotificationOnOverlay(OverlayState overlay, String message) {
|
||||
final entry = OverlayEntry(
|
||||
builder: (context) => CustomNotification(message: message),
|
||||
);
|
||||
|
||||
+3
-3
@@ -73,9 +73,9 @@ class KometAppState extends State<KometApp> {
|
||||
|
||||
final navState = KometApp.navigatorKey.currentState;
|
||||
if (navState != null) {
|
||||
final overlayContext = navState.overlay?.context;
|
||||
if (overlayContext != null && overlayContext.mounted) {
|
||||
showCustomNotification(overlayContext, e.message);
|
||||
final overlay = navState.overlay;
|
||||
if (overlay != null) {
|
||||
showCustomNotificationOnOverlay(overlay, e.message);
|
||||
}
|
||||
|
||||
await navState.pushAndRemoveUntil(
|
||||
|
||||
Reference in New Issue
Block a user