mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: remove icon button not working in popover (#2885)
This commit is contained in:
parent
bef7fe87aa
commit
9834eccc7b
@ -39,7 +39,7 @@ class _EmojiPopoverState extends State<EmojiPopover> {
|
|||||||
padding: const EdgeInsets.only(bottom: 4.0),
|
padding: const EdgeInsets.only(bottom: 4.0),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: DeleteButton(onPressed: widget.removeIcon),
|
child: DeleteButton(onTap: widget.removeIcon),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -67,13 +67,13 @@ class _EmojiPopoverState extends State<EmojiPopover> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class DeleteButton extends StatelessWidget {
|
class DeleteButton extends StatelessWidget {
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onTap;
|
||||||
const DeleteButton({required this.onPressed, Key? key}) : super(key: key);
|
const DeleteButton({required this.onTap, Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
onTap: () => onPressed,
|
onTap: onTap,
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
LocaleKeys.document_plugins_cover_removeIcon.tr(),
|
LocaleKeys.document_plugins_cover_removeIcon.tr(),
|
||||||
|
Loading…
Reference in New Issue
Block a user