showCustom<T> static method

FutureBuilder<Widget?> showCustom<T>(
  1. String key, {
  2. required Duration duration,
  3. required Widget? builder(),
  4. Widget? fallback()?,
  5. bool debugCallback = false,
  6. bool debugFallback = false,
})

A generic callback that runs on a custom basis set by the user/developer by referencing a period duration

Implementation

static FutureBuilder<Widget?> showCustom<T>(
  String key, {
  required Duration duration,
  required Widget? Function() builder,
  Widget? Function()? fallback,
  bool debugCallback = false,
  bool debugFallback = false,
}) {
  return OnceBuilder.build(
    OnceRunner.run(
      key: key,
      duration: duration.inMilliseconds,
      callback: builder,
      debugCallback: debugCallback,
      debugFallback: debugFallback,
    ),
    fallback,
  );
}