Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clipboard] setData and getData implementations added (flutter#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
- Loading branch information