BooleanField constructor

BooleanField({
  1. required String name,
  2. bool? initialValue = true,
  3. @Deprecated('Fields should not be aware of their context') void onChanged(
    1. BuildContext context,
    2. bool? value
    )?,
})

Implementation

BooleanField({
  required super.name,
  super.initialValue = true,
  @Deprecated('Fields should not be aware of their context') super.onChanged,
}) : super(
        type: FieldType.boolean,
        codec: FieldCodec(
          toParam: (value) => value.toString(),
          toValue: (param) => param == null ? null : param == 'true',
        ),
      );