Skip to content

Native client for accessing native implementation of functions in Flutter

License

Notifications You must be signed in to change notification settings

Code-Vedas/cv-native-client

Repository files navigation

CV Native Client

Flutter plugin for CV Native Client. This plugin allows you to access Native API's of platform.

Usage

To use this plugin, add cv_native_client as a dependency in your pubspec.yaml file.

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  cv_native_client: ^1.0.1

Example

import 'package:cv_native_client/cv_native_client.dart';

// Get platform version
String platformVersion = await CvNativeClient.getPlatformVersion();

// Get clipboard data mime types
final List<CvClipboardMimeType> mimeTypes = await CvNativeClient.getClipboardDataMimeTypes();
log('Clipboard mime types: $mimeTypes');

// Get clipboard Data
final CvClipboardData? clipboardData = await CvNativeClient.getClipboardData();
log('Clipboard text: ${clipboardData?.plainText}');
log('Clipboard html: ${clipboardData?.htmlText}');

// Set clipboard Data
await CvNativeClient.setClipboardData(CvClipboardData(plainText: 'Hello World!', htmlText: '<b>Hello World!</b>'));

About

Native client for accessing native implementation of functions in Flutter

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published