diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm index 585d5a3879356499d181683e1fe9b7f0f263e445..941e3945d015a0b64b47931d063d96e94f2123ac 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm @@ -224,7 +224,11 @@ using namespace flutter; - (void)setClipboardData:(NSDictionary*)data { UIPasteboard* pasteboard = [UIPasteboard generalPasteboard]; - pasteboard.string = data[@"text"]; + if (data[@"text"]) { + pasteboard.string = data[@"text"]; + } else { + pasteboard.string = @"null"; + } } @end