buildPasteButton method
- {required BuildContext context,
- required WidgetRef ref,
- required AppModel appModel}
Menu bar action.
Implementation
Widget buildPasteButton(
{required BuildContext context,
required WidgetRef ref,
required AppModel appModel}) {
return FloatingSearchBarAction(
child: JidoujishoIconButton(
size: Theme.of(context).textTheme.titleLarge?.fontSize,
tooltip: t.paste,
icon: Icons.note_alt_outlined,
onTap: () async {
ClipboardData? data = await Clipboard.getData('text/plain');
ref.watch(clipboardProvider.notifier).state = data?.text ?? '';
},
),
);
}