-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48e3fdb
commit 1d09967
Showing
2 changed files
with
46 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
# clipboard | ||
|
||
A flutter package to copy text tp clipboard and paste from clipboard. | ||
# Polls | ||
|
||
## Getting Started | ||
[![pub package](https://img.shields.io/badge/pub-0.1.1-brightgreen)](https://github.com/samuelezedi/flutter_clipboard) | ||
|
||
This project is a starting point for a Dart | ||
[package](https://flutter.dev/developing-packages/), | ||
a library module containing code that can be shared easily across | ||
multiple Flutter or Dart projects. | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
[GitHub](https://github.com/samuelezedi/flutter_clipboard) | ||
|
||
|
||
## Usage | ||
|
||
Basic: | ||
|
||
```dart | ||
import 'package:clipboard/clipboard.dart'; | ||
``` | ||
|
||
###To Copy to clipboard from your app | ||
|
||
```dart | ||
FlutterClipboard.copy('hello flutter friends').then(( value ) => print('copied')); | ||
``` | ||
|
||
### To Paste from clipboard whats copied anywhere in your phone | ||
|
||
```dart | ||
FlutterClipboard.paste().then((value) { | ||
// Do what ever you want with the value. | ||
setState(() { | ||
field.text = value; | ||
pasteValue = value; | ||
}); | ||
}); | ||
``` | ||
|
||
|
||
## Why I made this plugin | ||
|
||
I have build quite a few app that required being able to copy to clipboard until I wanted to build a URL shortener, | ||
now I need people to be able to paste from clipboard and I discover the plugin I was using could not perform that, I | ||
search and found another plugin that could paste from clipboard but would only paste what was copied from within you app | ||
. Now I wanted user to paste what was in the Phones Clipboard, I discovered a way and then built this to help many other developers. | ||
### kindly follow on github | ||
[github](https://github.com/samuelezedi) | ||
|
||
## Kindly follow me on | ||
[twitter](https://twitter.com/samuelezedi) | ||
[medium](https://medium.com/@samuelezedi) | ||
[instagram](https://instagram.com/samuelezedi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
# example | ||
|
||
A new Flutter application. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. | ||
# example for flutter clipboard package |