Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[new rule] Handle all possible states in BlocBuilder #1244

Open
@enseitankad0

Description

@enseitankad0

Hi. I noticed that this is happening quite often when team member forgets to handle Error state coming from Bloc. Can we have special rule for it? Similar to list all props in equatable get props

builder: (BuildContext context, EvChargerState state) {

if (state is LoadingState) {
    return Text('LoadingUserState)
}

if (state is LoadedUserState) {
    return Text(state.name);
}
 // DCM error: There is one State not handled in BlocBuilder : UserErrorState.  <--- New rule needed

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