displayResult method
Implementation
Widget displayResult(BuildContext context, ModResourceResult<R>? result) {
if (result != null) {
switch (result.state) {
case ResourceState.LOADING:
return this.buildLoadingState(context);
case ResourceState.SUCCESS:
return this.buildSuccessState(context, result.data);
case ResourceState.ERROR:
return this.buildErrorState(context, result.error);
default:
}
}
return this.buildInitialState(context);
}