wallpapers and ui cleanup

This commit is contained in:
Christien Rioux 2025-03-17 20:30:20 -04:00
parent 77c68aa45f
commit 6bd60207d8
32 changed files with 17947 additions and 150 deletions

View file

@ -82,15 +82,16 @@ class ChatComponentWidget extends StatelessWidget {
Widget _buildChatComponent(BuildContext context) {
final theme = Theme.of(context);
final scale = theme.extension<ScaleScheme>()!;
final scaleScheme = theme.extension<ScaleScheme>()!;
final scaleConfig = theme.extension<ScaleConfig>()!;
final scale = scaleScheme.scale(ScaleKind.primary);
final textTheme = theme.textTheme;
final chatTheme = makeChatTheme(scale, scaleConfig, textTheme);
final chatTheme = makeChatTheme(scaleScheme, scaleConfig, textTheme);
final errorChatTheme = (ChatThemeEditor(chatTheme)
..inputTextColor = scale.errorScale.primary
..inputTextColor = scaleScheme.errorScale.primary
..sendButtonIcon = Image.asset(
'assets/icon-send.png',
color: scale.errorScale.primary,
color: scaleScheme.errorScale.primary,
package: 'flutter_chat_ui',
))
.commit();
@ -126,7 +127,7 @@ class ChatComponentWidget extends StatelessWidget {
Container(
height: 48,
decoration: BoxDecoration(
color: scale.primaryScale.subtleBorder,
color: scale.border,
),
child: Row(children: [
Align(
@ -136,12 +137,11 @@ class ChatComponentWidget extends StatelessWidget {
child: Text(title,
textAlign: TextAlign.start,
style: textTheme.titleMedium!
.copyWith(color: scale.primaryScale.borderText)),
.copyWith(color: scale.borderText)),
)),
const Spacer(),
IconButton(
icon:
Icon(Icons.close, color: scale.primaryScale.borderText),
icon: Icon(Icons.close, color: scale.borderText),
onPressed: _onClose)
.paddingLTRB(16, 0, 16, 0)
]),
@ -201,54 +201,51 @@ class ChatComponentWidget extends StatelessWidget {
2048;
return Chat(
key: chatComponentState.chatKey,
theme:
messageIsValid ? chatTheme : errorChatTheme,
messages: messageWindow.window.toList(),
scrollToBottomOnSend: isFirstPage,
scrollController:
chatComponentState.scrollController,
inputOptions: InputOptions(
inputClearMode: messageIsValid
? InputClearMode.always
: InputClearMode.never,
textEditingController:
chatComponentState.textEditingController),
// isLastPage: isLastPage,
// onEndReached: () async {
// await _handlePageBackward(
// chatComponentCubit, messageWindow);
// },
//onEndReachedThreshold: onEndReachedThreshold,
//onAttachmentPressed: _handleAttachmentPressed,
//onMessageTap: _handleMessageTap,
//onPreviewDataFetched: _handlePreviewDataFetched,
usePreviewData: false, //
onSendPressed: (pt) {
try {
if (!messageIsValid) {
context.read<NotificationsCubit>().error(
text:
translate('chat.message_too_long'));
return;
}
_handleSendPressed(chatComponentCubit, pt);
} on FormatException {
context.read<NotificationsCubit>().error(
text: translate('chat.message_too_long'));
}
},
listBottomWidget: messageIsValid
? null
: Text(translate('chat.message_too_long'),
style: TextStyle(
color: scale.errorScale.primary))
.toCenter(),
//showUserAvatars: false,
//showUserNames: true,
user: localUser,
emptyState: const EmptyChatWidget())
.paddingLTRB(0, 2, 0, 0);
key: chatComponentState.chatKey,
theme: messageIsValid ? chatTheme : errorChatTheme,
messages: messageWindow.window.toList(),
scrollToBottomOnSend: isFirstPage,
scrollController: chatComponentState.scrollController,
inputOptions: InputOptions(
inputClearMode: messageIsValid
? InputClearMode.always
: InputClearMode.never,
textEditingController:
chatComponentState.textEditingController),
// isLastPage: isLastPage,
// onEndReached: () async {
// await _handlePageBackward(
// chatComponentCubit, messageWindow);
// },
//onEndReachedThreshold: onEndReachedThreshold,
//onAttachmentPressed: _handleAttachmentPressed,
//onMessageTap: _handleMessageTap,
//onPreviewDataFetched: _handlePreviewDataFetched,
usePreviewData: false, //
onSendPressed: (pt) {
try {
if (!messageIsValid) {
context.read<NotificationsCubit>().error(
text: translate('chat.message_too_long'));
return;
}
_handleSendPressed(chatComponentCubit, pt);
} on FormatException {
context.read<NotificationsCubit>().error(
text: translate('chat.message_too_long'));
}
},
listBottomWidget: messageIsValid
? null
: Text(translate('chat.message_too_long'),
style: TextStyle(
color:
scaleScheme.errorScale.primary))
.toCenter(),
//showUserAvatars: false,
//showUserNames: true,
user: localUser,
emptyState: const EmptyChatWidget());
}))).expanded(),
],
);