You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Clipboard] setData and getData implementations added (#76)
* [Clipboard] setData and getData implementations added
and also removed code for hasStrings, as this API is not present in documentation.
[Before] Clipboard.setData and Clipboard.getData feature was not implemented
[After] Naive implementation of clipboard shared only inside Flutter application
and only via Clipboard API. Such decision was done because of supporting partial
functionality on all profiles. CBHM API is supported only on mobile and currently
it is not possible to support it in other way.
Dart code below is able to set/get internal clipboard data:
ClipboardData cd = ClipboardData(text: 'some text');
Clipboard.setData(cd);
Future<ClipboardData?> d = Clipboard.getData(Clipboard.kTextPlain);
void dataCallback(ClipboardData? d) {
if (d != null) {
String? text = d.text;
if(text != null) {
print("Clipboard data $text");
}
}
}
d.then(dataCallback);
* [Clipboard] Fixes after review
* Removed unnecessary mutex
* Cleaned temporary logs
0 commit comments