---
# System prepended metadata

title: 『Flutter』 複製到黏貼簿
tags: [Flutter]

---

# 『Flutter』 複製到黏貼簿
###### tags: `Flutter`
導入
```=
 import 'package:flutter/services.dart';
 ```
複製本文到年貼簿

```=
Clipboard.setData(ClipboardData(text: '复制到剪切板'));
```

從剪貼簿讀取

```=
var text = Clipboard.getData(Clipboard.kTextPlain);
```