map<R extends Object?> method
R
map<R extends Object?>({
- required R showLoading(
- EditFormUIStateShowLoading showLoading
- required R showContent(
- EditFormUIStateShowContent showContent
Implementation
R map<R extends Object?>({
required R Function(EditFormUIStateShowLoading showLoading) showLoading,
required R Function(EditFormUIStateShowContent showContent) showContent,
}) {
final editFormUIState = this;
if (editFormUIState is EditFormUIStateShowLoading) {
return showLoading(editFormUIState);
} else if (editFormUIState is EditFormUIStateShowContent) {
return showContent(editFormUIState);
} else {
throw AssertionError();
}
}