toWidget method
Builds the current field into a Widget to be used for input in the side panel.
Implementation
@override
Widget toWidget(BuildContext context, String group, T? value) {
final defaultValue = (T == int ? 0 : 0.0) as T;
return TextFormField(
initialValue: codec.toParam(value ?? initialValue ?? defaultValue),
keyboardType: TextInputType.number,
inputFormatters: formatters,
onChanged: (value) => updateField(
context,
group,
codec.toValue(value) ?? initialValue!,
),
);
}