mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 05:45:10 +00:00
Merge pull request #555 from reinhart1010/keyboard-dynamic-theme
feat: Dynamic theming for emoji keyboard
This commit is contained in:
commit
7bd94d4c3b
2 changed files with 28 additions and 0 deletions
|
@ -776,6 +776,11 @@
|
|||
"type": "text",
|
||||
"placeholders": {}
|
||||
},
|
||||
"emoteKeyboardNoRecents": "Recently-used emotes will appear here...",
|
||||
"@emoteKeyboardNoRecents": {
|
||||
"type": "text",
|
||||
"placeholders": {}
|
||||
},
|
||||
"emotePacks": "Emote packs for room",
|
||||
"@emotePacks": {
|
||||
"type": "text",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'chat.dart';
|
||||
|
@ -11,6 +12,7 @@ class ChatEmojiPicker extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
return AnimatedContainer(
|
||||
duration: FluffyThemes.animationDuration,
|
||||
curve: FluffyThemes.animationCurve,
|
||||
|
@ -21,6 +23,27 @@ class ChatEmojiPicker extends StatelessWidget {
|
|||
? EmojiPicker(
|
||||
onEmojiSelected: controller.onEmojiSelected,
|
||||
onBackspacePressed: controller.emojiPickerBackspace,
|
||||
config: Config(
|
||||
backspaceColor: theme.colorScheme.primary,
|
||||
bgColor: Color.lerp(
|
||||
theme.colorScheme.background,
|
||||
theme.colorScheme.primaryContainer,
|
||||
0.25,
|
||||
)!,
|
||||
iconColor: theme.colorScheme.primary.withOpacity(0.5),
|
||||
iconColorSelected: theme.colorScheme.primary,
|
||||
indicatorColor: theme.colorScheme.primary,
|
||||
noRecents: Text(
|
||||
L10n.of(context)!.emoteKeyboardNoRecents,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
),
|
||||
skinToneDialogBgColor: Color.lerp(
|
||||
theme.colorScheme.background,
|
||||
theme.colorScheme.primaryContainer,
|
||||
0.75,
|
||||
)!,
|
||||
skinToneIndicatorColor: theme.colorScheme.onBackground,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue