myIntResourceFutureBuilder top-level property
Implementation
final myIntResourceFutureBuilder = ResourceFutureBuilder(
future: getSomeIntFuture,
success: (context, myInt) => Text("My int loaded successfully: $myInt"),
loadingIndicator: (context) => const CircularProgressIndicator(),
/* optional handleError: defaults to red Text with error message */
handleFailure: (context, failure) =>
Text("Failed to get my int :(. ${failure.error?.message}"),
);