Skip to content

Either support converting to converter arg types or explicitly disallow non-JSON argument types #806

Open
@kevmoo

Description

@kevmoo

See #795

Converter takes type of List<String>.

generates

LoginState _$LoginStateFromJson(Map<String, dynamic> json) {
  return LoginState(
    cookies:
        const _CookiesJsonConverter().fromJson(json['cookies'] as List<String>),
  );
}

Of course the as List<String> will fail always.

We could/should do better here!

Annoying, but this is not a blocker. User can just change the converter to do the right thing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions