Skip to content

Pigeon: FlutterApi doesn't support null for nested class values #63204

Closed

Description

@gaaclarke
  static Player _fromMap(Map<dynamic, dynamic> pigeonMap) {
    final Player result = Player();
    result.battingStats = BattingStats._fromMap(pigeonMap['battingStats'];
    return result;
  }
  static BattingStats _fromMap(Map<dynamic, dynamic> pigeonMap) {
    final BattingStats result = BattingStats();
    result.pa = pigeonMap['pa'];
    return result;
  }

If the value of pigeonMap['battingStats'] is null there will be a null exception.

Activity

  1. github-actions commented on Aug 11, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  2. locked as resolved and limited conversation to collaborators on Aug 11, 2021
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

    p: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions