ControlledComponentAdapter<T> constructor

const ControlledComponentAdapter<T>({
  1. Key? key,
  2. required Widget builder(
    1. BuildContext context,
    2. ControlledComponentData<T> data
    ),
  3. T? initialValue,
  4. ValueChanged<T>? onChanged,
  5. ComponentController<T>? controller,
  6. bool enabled = true,
})

Implementation

const ControlledComponentAdapter({
  super.key,
  required this.builder,
  this.initialValue,
  this.onChanged,
  this.controller,
  this.enabled = true,
}) : assert(controller != null || initialValue is T,
          'Either controller or initialValue must be provided');