BooleanField constructor
BooleanField({
- required String name,
- bool? initialValue = true,
- @Deprecated('Fields should not be aware of their context') void onChanged(
- BuildContext context,
- 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',
),
);