Pass "null" when copy data is null to iOS pasteboard.string (flutter/engine#14046)

This commit is contained in:
神楽坂花火
2019-11-27 22:46:30 +08:00
committed by Gary Qian
parent 1fe24fb302
commit d999372f50

View File

@@ -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