Skip to content

Null check operator used on a null value #187

@LennartMart

Description

@LennartMart

I've got an error report on this line:

"Null check operator used on a null value".
Seems to be that after the await, the widget was destroyed. So attempting to set state on a destroyed widget => error.

Is it sufficient to add this check after an await and before setState?
if (!mounted) return;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions