SafeFutureBuilder<T> constructor

const SafeFutureBuilder<T>({
  1. required Widget builder(
    1. BuildContext context,
    2. T data,
    3. ConnectionState connectionState
    ),
  2. Future<T>? future,
  3. T? initialData,
  4. Widget onError(
    1. Object? error,
    2. StackTrace? stackTrace,
    3. Widget child,
    4. ConnectionState connectionState,
    )?,
  5. Widget onWait(
    1. ConnectionState connectionState,
    2. Widget child
    )?,
  6. String? waitingMessage,
  7. Key? key,
})

Implementation

const SafeFutureBuilder({
  required this.builder,
  this.future,
  this.initialData,
  this.onError,
  this.onWait,
  this.waitingMessage,
  super.key,
}) : assert(
        onWait == null || waitingMessage == null,
        'onWait or waitingMessage must be null.',
      );