showBuilder<T> method

Future<T?> showBuilder<T>(
  1. Widget builder(
    1. UpdatableContext uc
    ), {
  2. EdgeInsets? insetPadding,
  3. AlignmentGeometry? alignment,
  4. dynamic clipBehavior = Clip.hardEdge,
  5. Color? backgroundColor,
  6. double? elevation,
  7. Color? shadowColor,
  8. Color? surfaceTintColor,
  9. Duration? insetAnimationDuration,
  10. Curve? insetAnimationCurve,
  11. ShapeBorder? shape,
  12. BoxConstraints? constraints,
})

Implementation

Future<T?> showBuilder<T>(
  Widget Function(UpdatableContext uc) builder, {
  EdgeInsets? insetPadding,
  AlignmentGeometry? alignment,
  clipBehavior = Clip.hardEdge,
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  Duration? insetAnimationDuration,
  Curve? insetAnimationCurve,
  ShapeBorder? shape,
  BoxConstraints? constraints,
}) {
  HareBuilder hb = HareBuilder();
  hb.builder = (c) => builder(UpdatableContext(context: c, updatable: hb));
  return showDialog<T>(
    context: globalContext,
    builder: (c) => Dialog(
      insetPadding: insetPadding ?? options.insetPadding,
      alignment: alignment ?? options.alignment,
      clipBehavior: clipBehavior ?? options.clipBehavior,
      backgroundColor: backgroundColor ?? options.backgroundColor,
      elevation: elevation ?? options.elevation,
      shadowColor: shadowColor ?? options.shadowColor,
      surfaceTintColor: surfaceTintColor ?? options.surfaceTintColor,
      insetAnimationDuration: insetAnimationDuration ?? options.insetAnimationDuration,
      insetAnimationCurve: insetAnimationCurve ?? options.insetAnimationCurve,
      shape: shape ?? options.shape,
      constraints: constraints ?? options.constraints,
      child: hb,
    ),
  );
}