Skip to content

Use freezed's sealed Union Types for the state machines instead of enums #130

@TechnicJelle

Description

@TechnicJelle

Instead of having enums with additional variables on the side that have to be accessed only when the enum is set correctly, use this: https://pub.dev/packages/freezed#union-types

This will reduce the likelihood of potentially broken program states.

Relevant files:

And maybe this can also replace

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions