clipboard_manager 0.0.4 icon indicating copy to clipboard operation
clipboard_manager: ^0.0.4 copied to clipboard

A flutter plugin to copy text to clipboard.

clipboard_manager #

simple flutter plugin to copy text to clipboard in both android and ios.

Install #

  • Add clipboard_manager to your dependencies list in pubspec.yaml file
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  clipboard_manager: ^0.0.1
  • Run flutter packages get from your root project

  • import the package by import 'package:clipboard_manager/clipboard_manager.dart';

Usage #

ClipboardManager.copyToClipBoard("your text to copy").then((result) {
                        final snackBar = SnackBar(
                          content: Text('Copied to Clipboard'),
                          action: SnackBarAction(
                            label: 'Undo',
                            onPressed: () {},
                          ),
                        );
                        Scaffold.of(context).showSnackBar(snackBar);
                      });

Example #

the plugin comes with an simplest example app. run it to see it in working.

37
likes
80
pub points
85%
popularity

Publisher

unverified uploader

A flutter plugin to copy text to clipboard.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on clipboard_manager