Skip to content

[BUG] missing !mounted/disposed checks #299

Open
@quaaantumdev

Description

@quaaantumdev

The library uses WidgetsBinding.instance.addPostFrameCallback and uses the context in the callback without checking if the state is actually still mounted. This may not cause issues most of the time – but the time will come – and it did for me 🙈

Same thing with the CodeController, it has an async gap in rebuild() before accessing the context but it does not check if the controller has been disposed in the meantime. another 💣

Here is a pull request that fixes both of these: #298

Thanks for the package! 🙏

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