combine7<A, B, C, D, E, F, G> static method

AsyncBuilder combine7<A, B, C, D, E, F, G>(
  1. Future<A> snapshot1,
  2. Future<B> snapshot2,
  3. Future<C> snapshot3,
  4. Future<D> snapshot4,
  5. Future<E> snapshot5,
  6. Future<F> snapshot6,
  7. Future<G> snapshot7, {
  8. required Widget onData(
    1. BuildContext context,
    2. A data1,
    3. B data2,
    4. C data3,
    5. D data4,
    6. E data5,
    7. F data6,
    8. G data7,
    ),
  9. Widget builder(
    1. BuildContext context,
    2. Widget child,
    3. A? data1,
    4. B? data2,
    5. C? data3,
    6. D? data4,
    7. E? data5,
    8. F? data6,
    9. G? data7,
    )?,
  10. ErrorBuilder? onError,
  11. WidgetBuilder? onLoading,
  12. WidgetBuilder? orElse,
})

Implementation

static AsyncBuilder combine7<A, B, C, D, E, F, G>(
  Future<A> snapshot1,
  Future<B> snapshot2,
  Future<C> snapshot3,
  Future<D> snapshot4,
  Future<E> snapshot5,
  Future<F> snapshot6,
  Future<G> snapshot7, {
  required Widget Function(BuildContext context, A data1, B data2, C data3,
          D data4, E data5, F data6, G data7)
      onData,
  Widget Function(BuildContext context, Widget child, A? data1, B? data2,
          C? data3, D? data4, E? data5, F? data6, G? data7)?
      builder,
  ErrorBuilder? onError,
  WidgetBuilder? onLoading,
  WidgetBuilder? orElse,
}) =>
    AsyncBuilder._(
      snapshots: [
        snapshot1,
        snapshot2,
        snapshot3,
        snapshot4,
        snapshot5,
        snapshot6,
        snapshot7
      ],
      onData: (context, data) => onData(
        context,
        data[0] as A,
        data[1] as B,
        data[2] as C,
        data[3] as D,
        data[4] as E,
        data[5] as F,
        data[6] as G,
      ),
      builder: (context, child, data) => builder != null
          ? builder.call(
              context,
              child,
              data[0] as A?,
              data[1] as B?,
              data[2] as C?,
              data[3] as D?,
              data[4] as E?,
              data[5] as F?,
              data[6] as G?,
            )
          : child,
      onError: onError,
      onLoading: onLoading,
      orElse: orElse,
    );