AlertDialogAction<T> constructor

AlertDialogAction<T>({
  1. Key? key,
  2. ValueGetter<FutureOr<T>>? onAction,
  3. T? value,
  4. OnActionResult<T>? onResult = popResult,
  5. bool autofocus = false,
  6. LiveData<bool>? enabled,
  7. ButtonStyleBuilder buttonBuilder = buttonText,
  8. Object? label,
  9. Widget? child,
  10. WidgetBuilder? builder,
})

Implementation

AlertDialogAction({
  super.key,
  this.onAction,
  this.value,
  this.onResult = popResult,
  this.autofocus = false,
  this.enabled,
  this.buttonBuilder = buttonText,
  Object? label,
  Widget? child,
  WidgetBuilder? builder,
})  : assert(value is T || onAction != null, 'exactly one of [value, onAction] must be defines'),
      assert([builder != null || child != null || label != null].count(true) == 1,
          'exactly one of [builder, child, label] must be defined'),
      contentBuilder = builder ?? ((context) => child ?? Text(label.toString()));