ReactiveNullable<T> constructor

ReactiveNullable<T>({
  1. Key? key,
  2. T? value,
  3. Widget ifNull = const Nothing(),
  4. required Widget builder(
    1. T
    ),
  5. Key? reactiveKey,
})

Creates a reactive widget that responds to nullability of a value.

If value is not null, builder is called with the value. If value is null, ifNull is rendered instead.

If reactiveKey is not provided, it defaults to ReactivityTypeEnum.reactive.

Implementation

ReactiveNullable({
  super.key,
  this.value,
  this.ifNull = const Nothing(),
  required this.builder,
  Key? reactiveKey,
}) : reactiveKey = reactiveKey ?? ValueKey(ReactivityTypeEnum.reactive);