size<S> static method

DiagramProperty<S, DiagramSize> size<S>(
  1. String key, {
  2. required String label,
  3. required DiagramSize read(
    1. S subject
    ),
  4. String? verb,
  5. DiagramPropertyArgs<S, DiagramSize>? args,
  6. S update(
    1. S subject,
    2. DiagramSize value
    )?,
  7. (String, String) labels = ('W', 'H'),
  8. DiagramSize minimum = const DiagramSize(0, 0),
  9. double max = 1000000,
  10. double step = 1,
  11. String unit = '',
  12. (bool, bool) editable = (true, true),
  13. DiagramPropertyGroup group = DiagramPropertyGroup.general,
  14. bool visible(
    1. S subject
    )?,
  15. bool enabled(
    1. S subject
    )?,
  16. String editLabel(
    1. DiagramSize value
    )?,
})

A width/height pair of at least minimum. editable disables an axis.

Implementation

static DiagramProperty<S, DiagramSize> size<S>(
  String key, {
  required String label,
  required DiagramSize Function(S subject) read,
  String? verb,
  DiagramPropertyArgs<S, DiagramSize>? args,
  S Function(S subject, DiagramSize value)? update,
  (String, String) labels = ('W', 'H'),
  DiagramSize minimum = const DiagramSize(0, 0),
  double max = 1000000,
  double step = 1,
  String unit = '',
  (bool, bool) editable = (true, true),
  DiagramPropertyGroup group = DiagramPropertyGroup.general,
  bool Function(S subject)? visible,
  bool Function(S subject)? enabled,
  String Function(DiagramSize value)? editLabel,
}) => DiagramProperty._(
  key,
  label: label,
  presentation: DiagramPairPresentation._(
    axisLabels: labels,
    minimum: (minimum.width, minimum.height),
    max: max,
    step: step,
    unit: unit,
    editableAxes: editable,
  ),
  read: read,
  verb: verb,
  args: args,
  update: update,
  group: group,
  visible: visible,
  enabled: enabled,
  editLabel: editLabel,
);