Skip to content

Incorrect nullability annotations in FlutterCodecs.h #192122

Description

@LongCatIsLooong
Interface Member Current Signature Correct Signature Issue
FlutterMethodCodec encodeMethodCall: - (NSData*)encodeMethodCall:(FlutterMethodCall*)methodCall; - (NSData* _Nullable)encodeMethodCall:(FlutterMethodCall*)methodCall; Return type is implicitly nonnull, but encoding can fail and return nil.
FlutterMethodCodec decodeMethodCall: - (FlutterMethodCall*)decodeMethodCall:(NSData*)methodCall; - (FlutterMethodCall* _Nullable)decodeMethodCall:(NSData*)methodCall; Return type is implicitly nonnull, but decoding can fail and return nil.
FlutterMethodCodec encodeSuccessEnvelope: - (NSData*)encodeSuccessEnvelope:(id _Nullable)result; - (NSData* _Nullable)encodeSuccessEnvelope:(id _Nullable)result; Return type is implicitly nonnull, but encoding can fail and return nil.
FlutterMethodCodec encodeErrorEnvelope: - (NSData*)encodeErrorEnvelope:(FlutterError*)error; - (NSData* _Nullable)encodeErrorEnvelope:(FlutterError*)error; Return type is implicitly nonnull, but encoding can fail and return nil.
FlutterStandardWriter writeValue: - (void)writeValue:(id)value; - (void)writeValue:(id _Nullable)value; Parameter value is implicitly nonnull, but the writer explicitly supports nil.

The FlutterStandardWriter one is especially bad since it would prevent swift callers from passing in nil.

Activity

  1. added
    in triagePresently being triaged by the triage team
    engineflutter/engine related. See also e: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Sep 2, 2026
  2. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: API breakBackwards-incompatible API changesengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions