copyToClipboard static method

void copyToClipboard({
  1. required String text,
})

Implementation

static void copyToClipboard({required String text}){
  Clipboard.setData(ClipboardData(text: text)).then((_) {
    GNSnackBar.showSystemSnackBar(
        icon: Icons.copy,
        message: "Copied to your clipboard!",
        backgroundColor: Colors.black,
        textColor: Colors.white
    );
  });
}