NotationOptions class final
How the notation expands.
Constructors
-
NotationOptions({double width = 390, String screen = 'screen', Map<
String, Object> textStyles = defaultTextVariants, Json card = defaultCard, Map<String, (String, String, String)> badges = badgeVariants, String surface = '#FFFFFFFF', String accent = '#FF2563EB', String track = '#FFE5E7EB', Map<String, ({Object height, Object width})> components = const {}, Map<String, List< componentRules = const {}, Map<Json> >String, List< componentScreenActions = const {}, Map<Json> >String, List< componentScreenOverlays = const {}, Map<Json> >String, String> componentPressEvents = const {}, Json badge = defaultBadge, Json? cta, Map<String, String> palette = const {}, bool nearestColors = false, Json? tile, num? sectionRadius, Json barChart = const {}, Json progress = const {}, num? cardGap, ({String fill, String page})? pageFill, num? ringStroke, double height = 800, double contentWidth = 1120, String selectedFill = '#FFE5E7EB', String? selectedRow, bool darkGround = false, String line = '#FFE5E7EB', double narrowWidth = 720, double sidebarWidth = 248, double? sidebarRail, double sectionPad = 64, double gutter = 24, String? band, String? siteFill, String? paneFill, String? iconTile, String? sideFill, String? iconStyle, Set<String> rowFrames = const {}, Map<String, num> frameGaps = const {}, Set<String> frameRows = const {}, double? controlHeight, Object? fieldLabel, Object? fieldText, bool reflow = true, Map<String, num> displaySizes = const {}, Map<String, String> colorValues = const {}, Map<String, Json> themeTextStyles = const {}, (String, String, String)? quietInks, Map<String, Json> projectVariables = const {}, String? accentText, bool openVocabulary = false, NotationVocabulary vocabulary = NotationVocabulary.core, Set<String> screens = const {}, Set<String> ownComponents = const {}, Set<String> themeColors = const {}, bool roles = false}) -
const
-
NotationOptions.fromDesignSystem(DesignSystem designSystem, {double width = 390, String screen = 'screen', bool named = false, bool nearestColors = false, bool reflow = true, Map<
String, Json> projectVariables = const {}, bool roles = false}) -
The looks of
designSystem(NotationOptions.fromTheme over its tokens) and the sizes of its components, so a component called by name (StatusBadge "Paid",Stepper @qty) is as big as its own design says: as wide as its parent, as its content, or a size of its own.factory - NotationOptions.fromTheme(Json theme, {double width = 390, String screen = 'screen', bool named = false, bool nearestColors = false, bool reflow = true, bool roles = false})
-
The looks of a design system's
theme(itsthemeJSON:colors,textStyles,radii, the roles): its text styles by name with their colors written out, the short words mapped onto them, its card, badge tones, surface and accent. A UI written in the notation then looks like that design system with nothing else said.factory
Properties
- accent → String
-
The color of what has none of its own (a chart's bars and line, a
progress bar's fill).
final
- accentText → String?
-
The accent as text on a light page (a link in running text): a theme's
colors.accentText, else itsaccentDeep. Null: the accent.final - badge → Json
-
What
Badgeis: itsradius,height,paddingand, when given, thestyleof its text (else 11, medium, in the tone's ink).final -
badges
→ Map<
String, (String, String, String)> -
Badge.<tone>: its fill, hairline and ink.final - band → String?
-
A tinted section's fill (
Section tint), what a website page is drawn on, an app's sidebar and top bar, and the tile behind an icon: a theme'scolors.band,pageFill,cardandiconTile. Null: none.final - barChart → Json
-
What a
BarCharttakes unless the line says (barRadius,barGap,maxBarWidth, its labels' font and colors): a theme'sradii.bar,spacing.barandsizes.bar. Empty: the chart's own defaults.final - card → Json
-
What
Cardadds to a column: decoration and padding.final - cardGap → num?
-
The space between a
Card's children when it writes nogap: a theme'sspacing.cardGap. Null: none.final -
colorValues
→ Map<
String, String> -
The theme's colors and roles by name →
#AARRGGBB, as the side the site opens on has them (the light one; under"mode": "dark"what the dark side gives over it): what a page's band writtenfill=<name>is drawn in, for the ink of the texts on it.final -
componentPressEvents
→ Map<
String, String> -
The event a component sends when it is pressed (its root's click
emits it: a MenuItem's onSelected), by type:
onTapon a call is that event, not a press on the call around the component's own.final -
componentRules
→ Map<
String, List< Json> > -
A design system's components' own rules at other widths (their root's
media rules), by type: what a call takes of them, its size and whether
it shows (
w=232 tablet.w=64on the root of a sidebar), unless the call says that itself.final -
components
→ Map<
String, ({Object height, Object width})> -
A design system's components by type, each with the width and height
a call takes when it writes none (a number,
{fill: 0}or{hug: 0}).final -
componentScreenActions
→ Map<
String, List< Json> > -
What a component's
key,everyandon loadlines do, by type (its document'sscreenActions): the screen that shows the component takes them (once, however many calls), as if written on it.final -
componentScreenOverlays
→ Map<
String, List< Json> > -
The overlays a component writes after its tree (
Drawer#basket,Sheet#details stops=[0.5,1]), by type (its document'sscreenOverlays: each{"id", "nodes"}, its canvas and its lines): the screen that shows the component takes them (once, unless it writes an overlay of that id itself), so what the component opens is there, shown as it was written (round 10, R28: they were left out, and the open showed nothing or a centred dialog).final - contentWidth → double
-
The widest a page section's content gets (
Section,Nav,Footer): a theme'ssizes.content.final - controlHeight → double?
-
The height of a button, a field and a select that write none: a
theme's
sizes.control. Null: the control's own (its compact step).final - cta → Json?
-
The layout of a button alone on its line in a column (not a ghost or
icon button): as wide as the column at the design system's height for
its one thing to do. Null: it is as big as its label, as any control.
final
- darkGround → bool
-
Whether the theme's ground is dark where the site opens (a dark
theme, or one whose
modeis dark and whose dark side gives a dark ground): its inks are light, so a text on a light band of the page's own takes a dark ink.final -
displaySizes
→ Map<
String, num> -
The theme's text styles of a headline's size (32 and up), by name →
font size: a text in one of them is smaller on a phone.
final
- fieldLabel → Object?
-
The styles of a field's label and of its text on a page: a theme's
fieldLabelWideandinputTextWide. Null: the control's own.final - fieldText → Object?
-
The styles of a field's label and of its text on a page: a theme's
fieldLabelWideandinputTextWide. Null: the control's own.final -
frameGaps
→ Map<
String, num> -
The space such a component keeps between the lines written under a
call (the spacing of the row or column its
Slotis a child of), by its type: aneachwritten there spaces its copies by it, as the copies written out one by one would be.final -
frameRows
→ Set<
String> -
Those of them whose slot is a row's child: the copies go across.
final
- gutter → double
-
The widths of a narrow section's content and of a sidebar, a
section's padding above and below, and a page's side gutter: a
theme's
sizes.narrow,sizes.sidebar,spacing.sectionandspacing.gutter.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The height of the window an app is drawn in (
App, or a root writtenh=fill): the canvas's design height.final - iconStyle → String?
-
The style a Material icon written by its bare name is drawn in: a
theme's
iconStyle(outlined,rounded,sharp), so every icon of the page shares the design system's look (Icon "inbox"isinbox_outlined). A name with a style of its own keeps it. Null: as written (filled).final - iconTile → String?
-
A tinted section's fill (
Section tint), what a website page is drawn on, an app's sidebar and top bar, and the tile behind an icon: a theme'scolors.band,pageFill,cardandiconTile. Null: none.final - line → String
-
The fill of a selected row and the hairline of a pane's edge and
a bar's rule: a theme's
neutralFillandline.final - narrowWidth → double
-
The widths of a narrow section's content and of a sidebar, a
section's padding above and below, and a page's side gutter: a
theme's
sizes.narrow,sizes.sidebar,spacing.sectionandspacing.gutter.final - nearestColors → bool
-
Whether a color the notation writes is read as the theme's nearest
color of the palette (
fill=#FFF5F5F5on a panel is the theme's nearest neutral fill, and so follows dark mode and the theme). Off by default: a written color stays as written, so a design with a palette of its own (a dark workspace on a light theme) keeps its panels apart. The looks the notation itself adds are named either way, withnamed.final - openVocabulary → bool
-
Whether a word the notation does not have is recorded and stands in
(a type as a column of its texts and children; a parameter, a flag, an
event or an action verb left out of the document), not refused. The
grammar is not open: a line that does not follow it is still an issue.
final
-
ownComponents
→ Set<
String> -
The components that are the app's own (withOwnComponents).
final
- pageFill → ({String fill, String page})?
-
A neutral fill written on the page itself (not inside a card) that the
theme reads as a color equal to the page's would not show: it is
written as
fillinstead (a theme'scolors.pageFill, withpagethe page color's name). Null: as read.final -
palette
→ Map<
String, String> -
The theme's colors by name →
#AARRGGBB(NotationOptions.fromTheme withnamed). Empty: the theme's looks are written as values.final - paneFill → String?
-
A tinted section's fill (
Section tint), what a website page is drawn on, an app's sidebar and top bar, and the tile behind an icon: a theme'scolors.band,pageFill,cardandiconTile. Null: none.final - progress → Json
-
What a theme's looks give
Progress:borderRadius(itsradii.progress) andheight(itssizes.progress). Empty: a 2 px corner at the bar's own height.final -
projectVariables
→ Map<
String, Json> -
The variables of the whole site (site.json's
variables), by name, each as the manifest has it (name,type,value): a page reads and sets them with no declaration and no copy of its own on the screen (which would hide the site's).project name=valueon a page does the same for one name.final - quietInks → (String, String, String)?
-
The inks of a sidebar's or a bar's items at rest, of their icons and of
what is fainter still, on a dark ground: its ink at 80, 60 and 40 %.
Null: a light theme's greys.
final
- reflow → bool
-
Whether a page (a canvas 700 wide or wider) is given the media rules
that lay it out on a tablet and a phone (
PageReflow): its rows wrap, its grids take fewer columns, its headlines shrink. False: the page is written for its one width only.final - ringStroke → num?
-
How thick a
Ringis drawn: a theme'ssizes.ring. Null: the control's own.final - roles → bool
-
Whether the notation's own parts are drawn in the theme's roles by
name (ThemeTokens.notationRoles:
line,card,band,hoverFill,quietText...), each light or dark as the site is shown: a site's theme with no design system (NotationOptions.fromThemeroles).final -
rowFrames
→ Set<
String> -
A design system's components whose children (the lines written under a
call) go into a row (their
Slotis a row's child: a toolbar, a dialog's footer): those lines are sized as a row's children are.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screen → String
-
The canvas's id (its variables' scope).
final
-
screens
→ Set<
String> -
The ids of the app's screens (a site's pages): a bare word after
gothat names one (notationScreen) is that screen, even where a variable has the same name. Empty when the page is expanded alone.final - sectionPad → double
-
The widths of a narrow section's content and of a sidebar, a
section's padding above and below, and a page's side gutter: a
theme's
sizes.narrow,sizes.sidebar,spacing.sectionandspacing.gutter.final - sectionRadius → num?
-
The corner of a
Cardthat is one section of a larger UI (a card on a page, beside others): a theme'sradii.panelwhen it also hasradii.card, which is then the corner of a card that is the whole UI (one card in a chat). Null: the same as card.final - selectedFill → String
-
The fill of a selected row and the hairline of a pane's edge and
a bar's rule: a theme's
neutralFillandline.final - selectedRow → String?
-
The fill of a chosen row (a Table's, a selectable list's, a line
written
selected={…}), where the theme names one: itsselectedRow. Null: selectedFill (the accent's tint), or for a Table under a theme with no tint the accent mixed into the surface. A design system whose chosen things are neutral with an accent mark (a ticked box, a bar at the row's start) gives its neutral here.final -
A design system's rail: how wide an app's sidebar written with no rule
for other widths is at a tablet's (its words fold to their icons
there): a theme's
sizes.rail. Null: as wide as written.final -
The widths of a narrow section's content and of a sidebar, a
section's padding above and below, and a page's side gutter: a
theme's
sizes.narrow,sizes.sidebar,spacing.sectionandspacing.gutter.final - sideFill → String?
-
What an app's
Sidebar(and a drawer's panel) is drawn on: a theme'scolors.sidebar, so the chrome can be a step off the panes and the cards (colors.card). Null: paneFill.final - siteFill → String?
-
A tinted section's fill (
Section tint), what a website page is drawn on, an app's sidebar and top bar, and the tile behind an icon: a theme'scolors.band,pageFill,cardandiconTile. Null: none.final - surface → String
-
What the UI is drawn on when its root is not a card.
final
-
textStyles
→ Map<
String, Object> -
Text.<variant>: a style object, or a theme text style's name.final -
themeColors
→ Set<
String> -
The names of the theme's colors (its
colors, whatever they are called): a bare word of them after a color key is the theme's, even where a variable has the name.final -
themeTextStyles
→ Map<
String, Json> -
The theme's text styles as it writes them, by name: a line's
style=serifover a variant changes only the keys that style sets.final - tile → Json?
-
What a
Cardinside a card adds (a row of options, a tile in a grid of cards): smaller corners, no shadow. Null: the same as card.final - track → String
-
What a progress bar's fill runs along.
final
- vocabulary → NotationVocabulary
-
The names read as a word the notation has (the alias table). It holds
with or without openVocabulary.
final
- width → double
-
The canvas's width.
final
Methods
-
colorName(
String hex, String kind) → String? -
The theme's name for
hexwritten as akind(fill,stroke,text), when one of the palette is close to it; else null. -
define(
Map< String, String> texts) → NotationOptions -
These options with the words defined in
texts(each a file's text by its name,StickyNote.txt; docs/design/20-defined-words.md) added to vocabulary. A defined word is a word we have, open or not. -
dictionary(
Map< String, String> texts, {required String name}) → NotationOptions -
These options with the dictionary
name(a folder of definition files,textsby file name): its words are words we have, after a page's own definitions and the design system's or site's, over the dictionaries given before it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
{bool openVocabulary = true, NotationVocabulary? vocabulary}) → NotationOptions -
These options with an open vocabulary (or not), and with
vocabularyas the alias table when given. -
sized(
{required double width, required String screen}) → NotationOptions - These looks for another canvas (an overlay's): its id and its width.
-
toString(
) → String -
A string representation of this object.
inherited
-
withOwnComponents(
Iterable< String> names) → NotationOptions -
These options with
namesas the components that are the app's own (a site's, not a design system's): a line that writes one of them where a word of the notation of the same name is read instead (Footer,Sidebar,Card) is an issue, not a silent frame. -
withScreens(
Iterable< String> screens) → NotationOptions -
These options with
screensas the ids of the app's screens.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited