Skip to content

Message.replies can throw exception if there are no replies #188

@nylipton

Description

@nylipton
Error: type 'String' is not a subtype of type 'int' of 'index'
Message.replies (package:draw/src/models/message.dart:53:37)

This occurs when there is a message with no replies. I believe the issue is that data['replies'] returns "" instead of null.

Also, FWIW, there is a typo in the method doc. It should be "Returns an empty list" instead of "Returns and empty list."

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