copyToClipboard method

void copyToClipboard(
  1. String term
)

Copies a term to clipboard and shows an appropriate toast.

Implementation

void copyToClipboard(String term) {
  FlutterClipboard.copy(term);

  /// Redundant to do this with the share notification on Android
  if (_androidDeviceInfo.version.sdkInt < 33) {
    Fluttertoast.showToast(
      msg: t.copied_to_clipboard,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
    );
  }
}