https://github.com/code-vedas/cv-native-client
Native client for accessing native implementation of functions in Flutter
https://github.com/code-vedas/cv-native-client
Last synced: about 2 months ago
JSON representation
Native client for accessing native implementation of functions in Flutter
- Host: GitHub
- URL: https://github.com/code-vedas/cv-native-client
- Owner: Code-Vedas
- License: mit
- Created: 2023-06-13T00:00:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-27T21:04:43.000Z (about 2 years ago)
- Last Synced: 2024-04-25T16:45:05.092Z (almost 2 years ago)
- Language: C++
- Homepage:
- Size: 424 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# 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](https://flutter.io/platform-plugins/).
### Installation
Add this to your package's pubspec.yaml file:
```yaml
dependencies:
cv_native_client: ^1.0.1
```
### Example
```dart
import 'package:cv_native_client/cv_native_client.dart';
// Get platform version
String platformVersion = await CvNativeClient.getPlatformVersion();
// Get clipboard data mime types
final List 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: 'Hello World!'));
```