Skip to content

double? no generate correct adapter #671

Description

@hortigado
  @Rest(fromGenerator: "double.tryParse(data['amount']?.toString() ?? '')")
  double? amount;

The adapter is generated as double.parse(data['amount']?.toString() ?? '') which generates an error. It needs to be tryParse. To fix this, I have to specify the fromGenerator. With int, which seems to generate the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions