flutter_clipbord_conformance 0.0.4 flutter_clipbord_conformance: ^0.0.4 copied to clipboard
flutter plugin for clipbord conformance
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_clipbord_conformance/flutter_clipbord_conformance.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
Center(
child: Text('Running on: $_platformVersion\n'),
),
TextField(),
OutlinedButton(
onPressed: () async {
String result = await FlutterClipbordConformance.enableClipbord() ?? "";
print('result:$result');
},
child: Text('允许'))
],
),
),
);
}
}