fields property

  1. @override
List<Field> get fields
override

Implementation

@override
List<Field> get fields {
  return [
    ListField<DeviceInfo>(
      name: 'name',
      values: devices,
      initialValue: devices.first,
      labelBuilder: (device) => device.name,
    ),
    ListField<Orientation>(
      name: 'orientation',
      values: Orientation.values,
      initialValue: Orientation.portrait,
      labelBuilder: (orientation) =>
          orientation.name.substring(0, 1).toUpperCase() +
          orientation.name.substring(1),
    ),
    ListField<bool>(
      name: 'frame',
      values: [false, true],
      initialValue: true,
      labelBuilder: (hasFrame) => hasFrame ? 'Device Frame' : 'None',
    ),
  ];
}