uipasteboard 0.1.1 copy "uipasteboard: ^0.1.1" to clipboard
uipasteboard: ^0.1.1 copied to clipboard

PlatformiOS

A Flutter plugin to interact with UIPasteboard on iOS.

UIPasteboard #

pub package

A Flutter plugin to interact with UIPasteboard on iOS.

Get Started #

Add the following in the dependencies section of your pubspec.yaml:

dependencies:
  uipasteboard: <latest version>
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // the plugin only works on iOS
  if (Platform.isIOS) {
    final pasteboard = UIPasteboard();
    final hasUrl = await pasteboard.hasURLs();
    // Check if the pasteboard has a URL, to avoid asking for permission dialogs.
    if (hasUrl) {
      // Get the URL from the pasteboard
      final url = await pasteboard.getURL();
      print(url);
    }
  }
}
2
likes
160
points
68
downloads

Publisher

verified publisherliplum.net

Weekly Downloads

A Flutter plugin to interact with UIPasteboard on iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on uipasteboard

Packages that implement uipasteboard