mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-26 03:54:15 +01:00
fix: EmojiPicker background
This commit is contained in:
parent
bd53745f35
commit
0a5270bbf7
@ -469,21 +469,24 @@ class ChatController extends State<Chat> {
|
|||||||
final emoji = await showModalBottomSheet(
|
final emoji = await showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
builder: (context) => Column(
|
builder: (innerContext) => Column(
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
EmojiPicker(
|
Material(
|
||||||
onEmojiSelected: (category, emoji) {
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
// recent emojis don't work, so we sadly have to re-implement them
|
child: EmojiPicker(
|
||||||
// https://github.com/JeffG05/emoji_picker/issues/31
|
onEmojiSelected: (category, emoji) {
|
||||||
SharedPreferences.getInstance().then((prefs) {
|
// recent emojis don't work, so we sadly have to re-implement them
|
||||||
final recents = prefs.getStringList('recents') ?? <String>[];
|
// https://github.com/JeffG05/emoji_picker/issues/31
|
||||||
recents.insert(0, emoji.name);
|
SharedPreferences.getInstance().then((prefs) {
|
||||||
// make sure we remove duplicates
|
final recents = prefs.getStringList('recents') ?? <String>[];
|
||||||
prefs.setStringList('recents', recents.toSet().toList());
|
recents.insert(0, emoji.name);
|
||||||
});
|
// make sure we remove duplicates
|
||||||
Navigator.of(context, rootNavigator: false).pop(emoji);
|
prefs.setStringList('recents', recents.toSet().toList());
|
||||||
},
|
});
|
||||||
|
Navigator.of(innerContext, rootNavigator: false).pop(emoji);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user