otherNames constant

NotationVocabulary const otherNames

The names models reach for (SDK tool/vocabulary/corpus) for words the notation has under one name. None is read: a line that uses one is said with the line to write, the notation's own word in its place.

Implementation

static const otherNames = NotationVocabulary(
  types: {
    // A slider with two thumbs: ours when the line binds a variable for
    // each end (`RangeSlider @lo @hi`, `low=@lo high=@hi`). (Most answers
    // bind one list variable, which ours does not take: those stay
    // unknown.)
    // `end=@hi` (test 10: 6 runs) and `start=`, as a range is often written.
    'RangeSlider': TypeAlias(to: 'Slider', requires: ['low', 'high'], parameters: {'start': 'low', 'end': 'high', 'rangeEnd': 'high'}),
    // A text with what matched a search marked in it.
    'Highlight': TypeAlias(to: 'Text', parameters: {'match': 'mark', 'query': 'mark'}),
    'HighlightText': TypeAlias(to: 'Text', parameters: {'match': 'mark', 'query': 'mark'}),
    // A month in the page.
    'MiniCalendar': TypeAlias(to: 'Calendar'),
    'CalendarMonth': TypeAlias(to: 'Calendar'),
    'MonthGrid': TypeAlias(to: 'Calendar'),
    // The bar at the foot of an app's window (a now-playing bar, a
    // composer, a basket): ours is `Footer` in Main (or `Row sticky bottom`).
    'StickyBar': TypeAlias(to: 'Footer'),
    'StickyFooter': TypeAlias(to: 'Footer'),
    'BottomBar': TypeAlias(to: 'Footer'),
    'FooterBar': TypeAlias(to: 'Footer'),
    'BottomDock': TypeAlias(to: 'Footer'),
    // A QR code (the primitives list's QRCode, review 3): our Barcode, as a
    // QR code.
    'QRCode': TypeAlias(to: 'Barcode', add: 'symbology=qrCode'),
    'QrCode': TypeAlias(to: 'Barcode', add: 'symbology=qrCode'),
    // A round meter, and shares of a whole.
    'Dial': TypeAlias(to: 'Gauge'),
    // A column of lines.
    'List': TypeAlias(to: 'Column'),
    'DonutChart': TypeAlias(to: 'Donut'),
    'PieChart': TypeAlias(to: 'Pie'),
  },
  parameters: {
    // Input (docs/design/21 section 7): the text field's own words under
    // the names answers wrote.
    'Input': {'maxlength': 'maxLength', 'maxChars': 'maxLength', 'rows': 'lines'},
    // A ListTile's second string is its subtitle (10 of 20 apps named it).
    'ListTile': {'subtitle': r'$text', 'title': r'$text'},
    // What a barcode encodes, and how (three self-defining answers named
    // it value or code: the vocabulary loop's Review 5).
    'Barcode': {'value': r'$text', 'code': r'$text', 'format': 'symbology', 'type': 'symbology'},
  },
  events: {
    // A universal event under its other name (docs/design/21).
    '*': {'onDelete': 'onRemove'},
    // An Input submitted from the keyboard (Flutter's onSubmitted), and
    // left after editing.
    'Input': {'onEnter': 'onSubmit', 'onSubmitted': 'onSubmit', 'onSaved': 'onBlur'},
    // A day picked in a month.
    'Calendar': {'onSelect': 'onChange'},
  },
  flags: {
    '*': {'sortable': 'reorder', 'reorderable': 'reorder'},
    'Input': {'uppercase': 'caps', 'allcaps': 'caps'},
    // A value kept on the device: ours is `state draft="" saved` (12 of 20
    // apps wrote persist, which was read into the value).
    'state': {'persist': 'saved', 'persisted': 'saved', 'persistent': 'saved'},
    'project': {'persist': 'saved', 'persisted': 'saved', 'persistent': 'saved'},
  },
);