diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h b/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h index 0034a0709a09b..96c1f5cf0c9b7 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterCodecs.h @@ -116,8 +116,8 @@ FLUTTER_EXPORT - (UInt32)readSize; - (void)readAlignment:(UInt8)alignment; - (NSString*)readUTF8; -- (id)readValue; -- (id)readValueOfType:(UInt8)type; +- (nullable id)readValue; +- (nullable id)readValueOfType:(UInt8)type; @end /** diff --git a/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm b/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm index f4b174bb8408b..f4678d67762fe 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm @@ -408,11 +408,11 @@ - (FlutterStandardTypedData*)readTypedDataOfType:(FlutterStandardDataType)type { return [FlutterStandardTypedData typedDataWithData:data type:type]; } -- (id)readValue { +- (nullable id)readValue { return [self readValueOfType:[self readByte]]; } -- (id)readValueOfType:(UInt8)type { +- (nullable id)readValueOfType:(UInt8)type { FlutterStandardField field = (FlutterStandardField)type; switch (field) { case FlutterStandardFieldNil: