FLUTTER ECOSYSTEM

anuranBarman/ClipboardManager

一個用於將文字複製到剪貼簿的 Flutter 插件

剪貼簿管理員 專案封面
Stars
17
Forks
17
最近推送(UTC)
2021年9月2日
專案狀態
未封存
Anuran Barman  GitHub avatar
GITHUB User

Anuran Barman ↗

I am a Principal Software Engineer. Fields of work are iOS,Flutter,NodeJS,React/NextJS,MongoDB

WiZN Systems Private LimitedBengaluru,India
語言RubyJavaDartSwiftObjective-C

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 1 項
  • flutter{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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.