Flutter (Dart) How to add copy to clipboard on tap to a app?

import:

import 'package:flutter/services.dart';

And then Simply implement this:

onTap: () async {
  await Clipboard.setData(ClipboardData(text: "your text"));
  // copied successfully
},

Leave a Comment