import:
import 'package:flutter/services.dart';
And then Simply implement this:
onTap: () async {
await Clipboard.setData(ClipboardData(text: "your text"));
// copied successfully
},
More Related Contents:
- Passing data between screens in Flutter
- When should I use a FutureBuilder?
- Converting timestamp
- How to preserve widget states in flutter, when navigating using BottomNavigationBar?
- Flutter setState to another class?
- Flutter get context in initState method
- How do I determine the width and height of an image in Flutter?
- How to remove scroll glow?
- Flutter: disable screenshot capture for app
- Flutter – Read text file from assets
- dart advantage of a factory constructor identifier
- Flutter Error: MediaQuery.of() called with a context that does not contain a MediaQuery
- Enumerate or map through a list with index and value in Dart
- How do I build different versions of my Flutter app for qa/dev/prod?
- How to Pick files and Images for upload with flutter web
- Flutter: Retrieving top-level state from child returns null
- dart:ui:1: Error: Not found: dart:ui. flutter/dart:
- How to Save Image File in Flutter ? File selected using Image_picker plugin
- AlertDialog without context in Flutter
- flutter run function every x amount of seconds
- Invalid Arabic characters With Utf-8 charset Retrived with http.get Flutter
- how to use local flutter package in another flutter application?
- Horizontally scrollable cards with Snap effect in flutter
- Dart convert int variable to string
- Flutter System Navigation bar and Status bar color [duplicate]
- Usage of FutureBuilder with setState
- Flutter: Testing for exceptions in widget tests
- how to download/create pdf through webview in flutter
- How to set state from another widget?
- How do I crop an image in Flutter?