Skip to content

TypeError when accessing "variants" property of "Submission" object #215

@MrFrankenstein

Description

@MrFrankenstein

Got the following exception message while accessing variants property of a Submission object from my SubmissionPost class:

The following _TypeError was thrown building SubmissionPost(dirty):
type 'Null' is not a subtype of type 'String'
When the exception was thrown, this was the stack
#0      new SubmissionPreview._fromMap
package:draw/…/models/submission_impl.dart:491
#1      Submission.variants
package:draw/…/models/submission_impl.dart:254

Additionally, I have also found that this happens only when the variants field from the JSON object is not empty

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