copy static method
void
copy(
- BuildContext context, {
- required String content,
- required Color? bgColor,
- required String text,
copy Copy text to clipboard and show toast
- Param
content
Text to copy - Param
bgColor
Background color of showToast
Implementation
static void copy(BuildContext context,
{required String content,
required Color? bgColor,
required String text}) {
Clipboard.setData(new ClipboardData(text: content)).then((_) {
showToast(text, bgColor: bgColor);
});
}