taym95 / flutter_clipboard_manager Goto Github PK
View Code? Open in Web Editor NEWA flutter plugin to manage phone clipboard
License: MIT License
A flutter plugin to manage phone clipboard
License: MIT License
Can we provide the web and desktop support?
fatal error: module map file '/Users/wenxiaoyu/workspace/kuku/coding/kuku_app_flutter/build/ios/Debug-iphonesimulator/flutter_clipboard_manager/flutter_clipboard_manager.modulemap' not found
ios
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.4)
[✓] VS Code (version 1.45.1)
[✓] Connected device (2 available)
This plugin fails when attempting to read the clipboard after switching to another app.
Here is the stacktrace:
E/MethodChannel#flutter_clipboard_manager( 8348): Failed to handle method call
E/MethodChannel#flutter_clipboard_manager( 8348): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.ClipData.getItemCount()' on a null object reference
E/MethodChannel#flutter_clipboard_manager( 8348): at com.example.flutter_clipboard_manager.FlutterClipboardManagerPlugin.onMethodCall(FlutterClipboardManagerPlugin.java:49)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/MethodChannel#flutter_clipboard_manager( 8348): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_clipboard_manager( 8348): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/MethodChannel#flutter_clipboard_manager( 8348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/DartMessenger( 8348): Uncaught exception in binary message listener
E/DartMessenger( 8348): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger( 8348): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139)
E/DartMessenger( 8348): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:253)
E/DartMessenger( 8348): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/DartMessenger( 8348): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/DartMessenger( 8348): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger( 8348): at android.os.MessageQueue.next(MessageQueue.java:336)
E/DartMessenger( 8348): at android.os.Looper.loop(Looper.java:174)
E/DartMessenger( 8348): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/DartMessenger( 8348): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger( 8348): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/DartMessenger( 8348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Code to reproduce:
Timer.periodic(Duration(seconds:2), (_) async {
final text = await FlutterClipboardManager.copyFromClipBoard();
print('got clipboard data: $text');
});
press go into recent screenpress home button on android so the app will be in the paused state.
FlutterClipboardManagerPlugin.java:17: error: invalid method declaration; return type required
[ +1 ms] private ClipboardManagerPlugin(Registrar registrar){
[ ] ^
[ +72 ms] 1 error
[ ] FAILURE: Build failed with an exception.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.