custom<S, T> static method

DiagramProperty<S, T> custom<S, T>(
  1. String key, {
  2. required String label,
  3. required T read(
    1. S subject
    ),
  4. String? verb,
  5. DiagramPropertyArgs<S, T>? args,
  6. S update(
    1. S subject,
    2. T value
    )?,
  7. bool equals(
    1. T a,
    2. T b
    )?,
  8. String summary(
    1. T value
    )?,
  9. String? check(
    1. T value
    )?,
  10. DiagramPropertyGroup group = DiagramPropertyGroup.general,
  11. DiagramIcon? icon,
  12. bool visible(
    1. S subject
    )?,
  13. bool enabled(
    1. S subject
    )?,
  14. String editLabel(
    1. T value
    )?,
})

A value of type T whose editor an inspector chooses by T; without one it shows summary. equals compares values for mixed selections; by default values compare with ==.

Implementation

static DiagramProperty<S, T> custom<S, T>(
  String key, {
  required String label,
  required T Function(S subject) read,
  String? verb,
  DiagramPropertyArgs<S, T>? args,
  S Function(S subject, T value)? update,
  bool Function(T a, T b)? equals,
  String Function(T value)? summary,
  String? Function(T value)? check,
  DiagramPropertyGroup group = DiagramPropertyGroup.general,
  DiagramIcon? icon,
  bool Function(S subject)? visible,
  bool Function(S subject)? enabled,
  String Function(T value)? editLabel,
}) => DiagramProperty._(
  key,
  label: label,
  presentation: const DiagramCustomPresentation._(),
  read: read,
  verb: verb,
  args: args,
  update: update,
  equals: equals,
  summary: summary,
  check: check,
  group: group,
  icon: icon,
  visible: visible,
  enabled: enabled,
  editLabel: editLabel,
);