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
Description
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
Labels
No labels