fix: fake/mock clipboard getData

This commit is contained in:
julian 2023-05-30 10:41:53 -06:00
parent e81bba2357
commit 9c8101d3ea

View file

@ -23,8 +23,8 @@ class FakeClipboard implements ClipboardInterface {
String? _value; String? _value;
@override @override
Future<ClipboardData> getData(String format) async { Future<ClipboardData?> getData(String format) async {
return ClipboardData(text: _value); return _value == null ? null : ClipboardData(text: _value!);
} }
@override @override