From 58a9b17988bd2432c2815b1c9eef9ba5bf7a449f Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Sat, 19 Jul 2025 23:27:16 +0500 Subject: [PATCH] i forgot --- lib/pages/chat/sticker_picker_dialog.dart | 49 +++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/lib/pages/chat/sticker_picker_dialog.dart b/lib/pages/chat/sticker_picker_dialog.dart index 42ace63..2bf2e31 100644 --- a/lib/pages/chat/sticker_picker_dialog.dart +++ b/lib/pages/chat/sticker_picker_dialog.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:fluffychat/generated/l10n/l10n.dart'; import 'package:matrix/matrix.dart'; import 'package:fluffychat/config/app_config.dart'; +import 'package:fluffychat/generated/l10n/l10n.dart'; import 'package:fluffychat/utils/url_launcher.dart'; import 'package:fluffychat/widgets/mxc_image.dart'; import '../../widgets/avatar.dart'; @@ -73,26 +73,29 @@ class StickerPickerDialogState extends State { physics: const NeverScrollableScrollPhysics(), itemBuilder: (BuildContext context, int imageIndex) { final image = pack.images[imageKeys[imageIndex]]!; - return InkWell( - radius: AppConfig.borderRadius, - key: ValueKey(image.url.toString()), - onTap: () { - // copy the image - final imageCopy = - ImagePackImageContent.fromJson(image.toJson().copy()); - // set the body, if it doesn't exist, to the key - imageCopy.body ??= imageKeys[imageIndex]; - widget.onSelected(imageCopy); - }, - child: AbsorbPointer( - absorbing: true, - child: MxcImage( - uri: image.url, - fit: BoxFit.contain, - width: 128, - height: 128, - animated: true, - isThumbnail: false, + return Tooltip( + message: image.body ?? imageKeys[imageIndex], + child: InkWell( + radius: AppConfig.borderRadius, + key: ValueKey(image.url.toString()), + onTap: () { + // copy the image + final imageCopy = + ImagePackImageContent.fromJson(image.toJson().copy()); + // set the body, if it doesn't exist, to the key + imageCopy.body ??= imageKeys[imageIndex]; + widget.onSelected(imageCopy); + }, + child: AbsorbPointer( + absorbing: true, + child: MxcImage( + uri: image.url, + fit: BoxFit.contain, + width: 128, + height: 128, + animated: true, + isThumbnail: false, + ), ), ), ); @@ -111,6 +114,7 @@ class StickerPickerDialogState extends State { SliverAppBar( floating: true, pinned: true, + scrolledUnderElevation: 0, automaticallyImplyLeading: false, backgroundColor: Colors.transparent, title: SizedBox( @@ -118,6 +122,7 @@ class StickerPickerDialogState extends State { child: TextField( autofocus: false, decoration: InputDecoration( + filled: true, hintText: L10n.of(context).search, prefixIcon: const Icon(Icons.search_outlined), contentPadding: EdgeInsets.zero, @@ -158,4 +163,4 @@ class StickerPickerDialogState extends State { ), ); } -} +} \ No newline at end of file