fix: change the backgroundcolors

This commit is contained in:
Freek van de Ven 2024-06-14 16:33:02 +02:00
parent d46c83e847
commit 2f2e2be6dd
7 changed files with 3 additions and 18 deletions

View file

@ -4,6 +4,7 @@
- fix bug where you would route back to the user selection screen insterad of routing back to the chat overview screen
- Add onPopInvoked callback to the userstory to add custom behaviour for the back button on the chatscreen
- Handle overflows for users with a long name.
- Remove the scaffold backgrounds because they should be inherited from the scaffold theme
## 3.0.0

View file

@ -14,7 +14,6 @@ List<GoRoute> getChatStoryRoutes(
GoRoute(
path: ChatUserStoryRoutes.chatScreen,
pageBuilder: (context, state) {
var theme = Theme.of(context);
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var chatScreen = ChatScreen(
@ -52,7 +51,6 @@ List<GoRoute> getChatStoryRoutes(
chatScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: chatScreen,
),
),
@ -65,7 +63,6 @@ List<GoRoute> getChatStoryRoutes(
var chatId = state.pathParameters["id"];
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var theme = Theme.of(context);
var chatDetailScreen = ChatDetailScreen(
chatTitleBuilder: configuration.chatTitleBuilder,
@ -127,7 +124,6 @@ List<GoRoute> getChatStoryRoutes(
chatDetailScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: chatDetailScreen,
),
);
@ -138,7 +134,6 @@ List<GoRoute> getChatStoryRoutes(
pageBuilder: (context, state) {
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var theme = Theme.of(context);
var newChatScreen = NewChatScreen(
options: configuration.chatOptionsBuilder(context),
@ -177,7 +172,6 @@ List<GoRoute> getChatStoryRoutes(
newChatScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: newChatScreen,
),
);
@ -188,7 +182,6 @@ List<GoRoute> getChatStoryRoutes(
pageBuilder: (context, state) {
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var theme = Theme.of(context);
var newGroupChatScreen = NewGroupChatScreen(
options: configuration.chatOptionsBuilder(context),
@ -208,7 +201,6 @@ List<GoRoute> getChatStoryRoutes(
newGroupChatScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: newGroupChatScreen,
),
);
@ -220,7 +212,6 @@ List<GoRoute> getChatStoryRoutes(
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var users = state.extra! as List<ChatUserModel>;
var theme = Theme.of(context);
var newGroupChatOverviewScreen = NewGroupChatOverviewScreen(
options: configuration.chatOptionsBuilder(context),
@ -255,7 +246,6 @@ List<GoRoute> getChatStoryRoutes(
newGroupChatOverviewScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: newGroupChatOverviewScreen,
),
);
@ -269,7 +259,6 @@ List<GoRoute> getChatStoryRoutes(
var id = userId == "null" ? null : userId;
var service = configuration.chatServiceBuilder?.call(context) ??
configuration.chatService;
var theme = Theme.of(context);
var profileScreen = ChatProfileScreen(
translations: configuration.translationsBuilder?.call(context) ??
@ -295,7 +284,6 @@ List<GoRoute> getChatStoryRoutes(
profileScreen,
) ??
Scaffold(
backgroundColor: theme.colorScheme.surface,
body: profileScreen,
),
);

View file

@ -177,6 +177,7 @@ Scaffold _createScaffold(
Scaffold(
appBar: appbar,
body: body,
backgroundColor: backgroundColor,
);
Widget _createUserAvatar(

View file

@ -174,7 +174,6 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
: "";
return Scaffold(
backgroundColor: theme.colorScheme.surface,
appBar: AppBar(
backgroundColor: theme.appBarTheme.backgroundColor,
iconTheme: theme.appBarTheme.iconTheme ??

View file

@ -66,7 +66,6 @@ class _ProfileScreenState extends State<ChatProfileScreen> {
);
}
return Scaffold(
backgroundColor: theme.colorScheme.surface,
appBar: AppBar(
backgroundColor: theme.appBarTheme.backgroundColor,
iconTheme: theme.appBarTheme.iconTheme ??

View file

@ -147,9 +147,7 @@ class _ChatScreenState extends State<ChatScreen> {
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context)
.colorScheme
.secondary
color: theme.colorScheme.secondary
.withOpacity(0.3),
width: 0.5,
),

View file

@ -47,7 +47,6 @@ class _NewChatScreenState extends State<NewChatScreen> {
Widget build(BuildContext context) {
var theme = Theme.of(context);
return Scaffold(
backgroundColor: theme.colorScheme.surface,
appBar: AppBar(
iconTheme: theme.appBarTheme.iconTheme ??
const IconThemeData(color: Colors.white),