buildFields method
Converts the fields into a Widget that will be rendered in the
settings side panel.
Implementation
@override
Widget buildFields(BuildContext context) {
return NullableSetting(
name: label,
description: description,
isNull: isNull,
isNullable: isNullable,
onChangedNullable: (isEnabled) {
WidgetbookState.of(context).knobs.updateNullability(
label,
!isEnabled,
);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: fields
.map(
(field) => Padding(
padding: const EdgeInsets.symmetric(
vertical: 4.0,
),
child: field.build(context, groupName),
),
)
.toList(),
),
);
}