displayResult method
Implementation
Widget displayResult(BuildContext context, ModResourceResult<R>? result) {
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);
}
}