Created
January 4, 2020 14:12
-
-
Save kishansinhparmar/b2f61d0bf99eeb68c8afa9bb1d7ed45f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BlocBuilder<$BlocClass$, $BlocState$>( | |
builder: (context, state) { | |
print("$state"); | |
if (state is InitialQuoteState) { | |
return buildInitialState(); | |
} else if (state is LoadingQuoteState) { | |
return buildLoadingState(); | |
} else if (state is DetailQuoteState) { | |
return buildQuoteState(state.quoteDetails, context); | |
} else if (state is ErrorState) { | |
return buildErrorState(state.errorMsg); | |
} else { | |
return Center( | |
child: Text("Unhandled state"), | |
); | |
} | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment