civic_ui library
Civic: the plain, trustworthy look of public services, where the job is that anyone, on any device, in a hurry or with a disability, can finish the task. One thing per page, large type, a heavy yellow focus, errors said in words at the top and at the field, answers checked before they are sent.
Classes
- AnimatedCivicTheme
-
Animates to a new data over duration, as
AnimatedThemedoes: colours and type blend through CivicThemeData.lerp. - CivicAccordion
- Sections of one page a reader opens one at a time or all at once, as a public service's guidance does: "Show all sections" over them, each sections' heading a button (its title, its summary, then "Show" or "Hide" with a chevron) between rules, its content folding open beneath it on Civic's panel spring.
- CivicAccordionSection
- One section of a CivicAccordion: its title (a heading), a line of summary under it, and the child it shows when open.
- CivicActionBar
- What can be done to the rows picked in a list or a table: while count is more than 0 a band on the page's grey, an action-blue rule along its top, says how many are picked ("2 items selected", or label), then the actions in words (secondary CivicButtons: "Renew", "Cancel permits"), then a link that clears the picking (onClear). It opens and closes on Civic's panel spring as the first row is picked and the last let go; the count is said again to a screen reader each time it changes.
-
CivicActionSheetAction<
T> - One of an action sheet's actions: its label, the value it answers with, a glyph before it (icon), the error colour when it destroys something (isDestructiveAction).
- CivicAmount
- An amount of money in words' place: minorUnits in currency, in tabular figures so amounts in a column line up ("€62.50", "−€5"), read whole by a screen reader ("62 euros 50 cents"). Its figures are the reader's digits and separators (Arabic's "€٦٢٫٥٠"), kept in their order inside right-to-left words.
- CivicAreaChart
- CivicLineChart with each line's area washed down to zero in its colour: how much, more than where it went. Read, picked and tabled as the line chart is.
- CivicAvatar
- A person, round: their image when there is one, else the initials of their name in ink on a pale tint. A screen reader hears the name; put the name in words beside it too, where it matters who it is.
- CivicAvatarGroup
- People together, round and overlapping, each ringed in the page's colour: the first max of names, then "+3" for the rest. A screen reader hears them in words: "Ana Ruiz, Ben Okafor and 3 others".
- CivicBackLink
- The way back, above a page's heading: a chevron and "Back" (in the reader's language), in ink, underlined. The chevron points the way back in either reading direction.
- CivicBadge
- How many of something wait, after the words they belong to: count in white on a square ink plate (on the error red when needsAction), "99+" past max. A screen reader hears the words and the count with its noun as one: "Your applications, 2 need action". A count of 0 shows child alone.
- CivicBarChart
- Bars standing on zero for each of the chart's labels, a bar for each series side by side, each bar's value written over it. The series are told apart by more than their colour: the first solid, the second striped, …, named in the legend. Read, picked and tabled as CivicLineChart is.
- CivicBreadcrumb
- One place in a CivicBreadcrumbs trail.
- CivicBreadcrumbs
- Where a page sits in the service, above its heading: the places over it, each a quiet link in the smaller size, a chevron between them that points the reading way. It wraps rather than shrinks.
- CivicButton
- A button that says what happens next: a face with slightly rounded corners on a solid bottom edge of a deeper tone, which a press sinks onto. The unnamed constructor is the page's one action (Continue, Send application), solid in the action colour; CivicButton.secondary is an action beside it, a face of the action's tint with its words in the action colour and no stroke round it; CivicButton.start begins a service.
- CivicButtonGroup
- The acts that end a page, side by side: a button first (the one most readers want), then a second button or a link, each centred on the row; below 600 wide they stack, a button its full width so a thumb finds it. It wraps rather than shrinks at any width.
- CivicCalendar
- A month of days to choose from: the month's name between the ways to the month before and after, the weekdays, and the days on square faces. A month stands at most monthWidth wide from the start of its column, as Material's calendar does, wider only as far as larger text needs; its words grow at most textScaleMost times with the reader's text. The day chosen is solid in the action colour; a range's days between its ends stand on the action's tint; today's number is bold over a short rule; a pointer greys a day; the keyboard's day stands on the yellow plate over the ink bar. Days that can't be chosen are faded.
- CivicCard
- A card: the page's white face on the app's cool ground, a card's corners (8) and no stroke, holding one thing (a permit, a service, a figure) under its title.
- CivicCarousel
- Slides a reader turns through, one at a time: itemCount of them that itemBuilder builds, height tall in a frame with a card's corners; under them the page marks with "2 of 5", then "Previous" and "Next" as worded buttons. It never turns on its own. A swipe turns it too, and so do the arrow keys while the keyboard is on the slides (the frame then stands in the yellow ring). A screen reader hears "Slide 2 of 5" as each lands. ui_core's DesignCarousel, Civic's painting.
- CivicChartSeries
- A named run of values, one for each of a chart's labels; a null is a gap (no figure for that month).
- CivicCheckbox
-
A square box to tick, 40 points, inside a 2-point ink edge, its
labelText beside it and a helperText under that; the whole row takes
the press. A keyboard focus rings the box in yellow. Stand several in a
CivicFieldsetthat asks the question. - CivicChip
-
A small face that filters or chooses (Zone B, Open now, Under review):
the action's tint with its words in the action colour, and, once on,
solid in the action colour with a tick before its words, so the state
reads without colour. Smaller than a button and with no solid edge, so
it never reads as the page's action. Stand several in a
Wrap. - CivicChromeMetrics
- The chrome's measures, by the part that draws them.
- CivicCodeField
- A code sent to someone (by text message, by email) typed back: one well, as wide as the code, its figures in the mono face spread one to a place, a short rule under each place still to fill. One box, not one per figure: it takes a paste and a phone's offer of the code from a message, and a screen reader hears one field.
- CivicColorPicker
- A colour picked: named swatches first, each a square of its colour with its name beside it (the one picked ticked and on the chosen rule), then, with showCustom, any colour: a saturation and brightness area over a hue track, and the colour's hex code typed in a well. Every part works by keyboard; the area and the track step with the arrow keys.
- CivicColorSwatch
- A named colour a CivicColorPicker offers.
-
CivicCombobox<
T extends Object> - One answer from a long list, found by typing: a CivicTextField whose words narrow the options in a list under the box, floating on a hairline and a soft shadow, as a select's list is: the chosen row on the inset rule in the action colour, bold and ticked, a row under the pointer grey. The arrow keys walk the list, the row reached lies on the yellow plate, Enter or a press takes it, Escape closes the list; after Enter the box keeps the focus, and typing goes on in it. A screen reader hears the row reached and how many matched. When nothing matches the list says so ("No results").
- CivicConfirmationPanel
- The page that says it is done: a block in the success colour with the outcome as the page's heading in white and, under it, what the reader keeps (a reference number, in large bold figures). Once per service, at its end.
- CivicCurrency
- A currency an amount is in: its symbol on the page, and its names for a screen reader, so "€62.50" is read whole as "62 euros 50 cents".
- CivicDateInput
- A date the reader knows (a birthday, a date on a document), as three boxes sized for what they take: day, month, year, each with its own label, under the question. A picker is for a date the reader chooses; a date they know is quicker typed.
- CivicDatePicker
- A day typed or chosen: the date typed in the field's well in the reader's order (day, month and year where they write it so), with a "Choose date" button beside it that opens a CivicCalendar under it. Typing is quickest for a date someone knows; the calendar helps with one they need to see (an appointment, a start date).
- CivicDateRangePicker
- A range of days typed or chosen: a From and a To date, each typed in its well, and a button that opens a calendar of two months (one on a phone) where the first press chooses the start and the second the end.
- CivicDetails
- Help a reader may need and most will not, folded under its title: a small triangle and the title as an underlined link; a press opens the child beneath it on the inset rule, the triangle turning down. A pointer over the title or a press on it thickens its line, as a link's; a keyboard focus lays the title on the yellow plate over the ink bar.
- CivicDialog
- A question the page stops for: a card on the page's white (by night the raised surface), its corners rounded, floating on a hairline and a soft shadow over the scrim, its title as a heading, its content under it, its actions at the foot (the one that does what the title asks first; full width below 600).
- CivicEmptyState
- What a list or a page says when it has nothing to show, or cannot show it: a title in a heading's weight that says so plainly ("No applications yet", "No results for 'Harbour'", "Sorry, the service is unavailable"), then children: what it means and what to try, then actions, what the reader can do, as far under the words as a page's Continue stands. No picture: the words do the work.
- CivicErrorState
- What a page shows when its content could not be had: a title that says so plainly, the message (what happened, what to do), and with onRetry a button to try again, said by a screen reader as it appears.
- CivicErrorSummary
- What a page that was sent with problems shows first, at its top: a box in the error colour titled title (There is a problem), listing every problem as a link to its field. It takes the focus as it appears, so the keyboard and a screen reader start from it, and a screen reader hears the title and the count at once.
- CivicErrorSummaryItem
- One problem in a CivicErrorSummary: the field's error, word for word, and what takes the reader to the field.
- CivicFace
- A face round child: fill on a solid edge edgeHeight tall in edgeColor, which a press sinks onto. focused floods it to the theme's yellow plate over a CivicMetrics.bar-thick ink bar; pressed sinks it. Both move on Civic's press spring.
- CivicFieldset
- A question answered by more than one control: its labelText (the legend) names the group to a screen reader, its helperText says how to answer, its errorText says what to fix and stands the whole group on the error rule. Checkboxes, the three boxes of a date, an address's lines stand in it. isPageHeading makes the legend the page's heading. In an app its checkboxes stand on a card, each a row, as a radio group's answers do.
- CivicFileUpload
- A document the reader sends with their answers: the question, then a secondary button that chooses the file (onChoose; the app opens the platform's picker) and, once one is chosen, its name with a link to remove it. The file's name is words, so it reads at any size and in either direction. In error the control stands in the error's doubled edge, as a field's box does; the button keeps its own look.
- CivicFormat
- Formats dates, times and numbers in English for Civic services.
- CivicGrid
- children in columns that follow the room: one below 600 wide, two to 1024, three from there (maxColumns at most), each row's cells as tall as its tallest, so cards side by side line up. Reading order stays the children's order, row by row (mirrored right to left).
- CivicHost
-
Civic over a whole app: the theme for the brightness in force (light
by day, dark by night), the page's ground, words and glyphs, the
status bar's polarity, Civic's page change on every platform
(CivicPageTransitions) and a CivicToaster for
CivicToast.show. It never clamps the text scale: a reader at 200% gets 200%, and Civic's parts grow to hold it. - CivicIconButton
- A glyph that acts, on a squared face only the press and the focus show: a press sinks it into the page's band, a keyboard focus floods it yellow over the ink bar. Its semanticLabel is required: a glyph alone says nothing to someone who cannot see it.
- CivicImage
- A picture that tells the reader something (a permit zone's map, a sign): image cropped to aspectRatio in a card's corners, its caption under it. A screen reader hears description, which says what the picture shows; one that only decorates is CivicImage.decorative and says nothing.
- CivicInput
- A one-line answer, as generated code writes it: a CivicTextField with its label over the box, a hint under the label, an error above the box. A field always has words over it: with no label, the hint is the label.
- CivicInset
- Words set apart on the inset rule: a quotation, an example, a thing to know before going on. No box, no fill: the rule down the start edge (in the secondary words' colour, so it never fades from the page) says "this aside", and the words keep the page's colour.
- CivicKbd
- A key on the keyboard, named in help and in a list of shortcuts: its name in the mono face on a key cap, the band's grey with the solid bottom edge a button stands on, so it reads as a key and never as a button to press. Join keys pressed together with CivicKbd.combination.
- CivicKeyFigure
- One figure a page leads with ("1,240 permits issued this year"): its label over it, the value large in tabular figures, a line of detail under it. A screen reader hears it as one line, the value as semanticValue when the figures alone would be read wrong.
- CivicLayout
- Civic's page geometry: its window sizes, page margins and reading width.
- CivicLineChart
- A line for each series across the chart's labels (months, years): numbers up the start, the labels along the foot, hairlines at the numbers. Each series is told apart by more than its colour: its line's dash and its points' mark (the first solid and round, the second dashed and square, …), named in words in the legend over it.
- CivicLink
- Words that go somewhere: underlined, in the action colour. A press thickens the underline; a keyboard focus lays the words on the yellow plate over the ink bar, in ink.
- CivicListGroup
- A group of rows on a card: white (by night, slate) on the page's ground, its corners a little rounded, no stroke round it, hairlines between its rows from their words' start (a child that draws nothing, a row left out, takes no hairline); a title over it, outside the card, says what they are. A list of things (applications, tasks, settings, search results) stands in one, as an app's lists do.
- CivicListRow
- A row of a list: its title in bold ink, a subtitle (its meta line) under it, a leading glyph before them, a trailing status (a CivicTag). On a wide row the status stands at the end while the title and the meta line each still fit on one line beside it; on a phone's row (every row of the list alike), or when they would not fit, it stands on a line of its own under the title, so neither breaks for the status. A row that goes somewhere (onTap) is pressed whole, at least 56 high, and ends in a chevron in the action colour pointing the way the words read; never an underlined link. A pointer over it greys the row, a press a step deeper; a keyboard focus lays the whole row on the yellow plate over the ink bar.
- CivicLoadingState
- What a page shows while its content is on its way: the word "Loading" in the reader's language (or label), said once by a screen reader as it appears. Nothing spins: the words say it, and nothing moves for a reader who asked for less motion.
-
CivicMenu<
T> - A menu of worded items that opens from the control builder paints (a CivicButton.secondary saying what the menu holds: "Actions", "Download"), on the page's face floating on a hairline and the soft shadow, as an open list does: ui_core's DesignAnchoredOverlay as a menu, Civic's painting.
- CivicMenuDivider
- The hairline between two groups of a menu's rows.
-
CivicMenuItem<
T> - One choice of a CivicMenu: its label in words, a glyph before it (icon), quieter words at its end (trailing: a shortcut, a count), the error colour when it destroys something (isDestructiveAction), and the value the menu answers with. startsGroup lays a hairline over it.
- CivicMeter
- An amount against its limit, said in words first: its label over a bar ("Visitor days used this year"), the bar filled to value between min and max on the action's tint and its hairline, and under it the amount in words (valueLabel: "38 of 60 days used"). With high an ink mark stands across the bar where the amount gets high, and past it the bar turns to the error colour, with highLabel said under it in words ("You have 6 days left"), so the colour is never alone. A new value springs to it.
- CivicMetrics
- Civic's fixed measures: the edges, the focus bar and the boxes every part is drawn with.
- CivicMotion
- Civic's motion: critically damped springs, so nothing bounces or lingers, at three speeds.
-
CivicMultiSelect<
T extends Object> - Several answers chosen from a long list: the answers chosen so far stand over the field, each solid in the action colour with a cross after its words, and the field below them suggests more as someone types, in the combobox's list. Where the answers are few, checkboxes show them all at once and are quicker.
- The places of a service in an app, along the bottom under a hairline: each a glyph over its name (always shown: a glyph alone says too little), the current one in bold ink under a bar in the action colour, the rest in the secondary ink. A CivicScaffold from CivicLayout.medium wide (a tablet) stands the same places down the start as a rail, on the card's face beside a hairline, the current one's bar at its start. On the site (from CivicLayout.expanded wide) a page stands a CivicSideNavigation instead.
- One place a CivicNavigationBar or a CivicSideNavigation goes.
- One of an app's places, written as generated code writes it: its glyph, its name and the key its control carries.
- CivicNotificationBanner
- A message across the top of a page the reader should see before anything else: an outage, a deadline, a change made. A band with the title over a white well holding the words, the band in tone's colour: info the action colour, success the success colour, warning a deep amber (never the focus's yellow), error the error colour. The title says the tone in words (Important, Success, Warning, There is a problem), so it never rests on the colour. A success or an error is announced as it appears, unless announce says otherwise.
- CivicNumberField
- A number typed or stepped: the field's well between a minus and a plus in the secondary button's material, each a finger's 48 points. A step press moves it by step and a held one repeats; the arrow keys step it, Page Up and Page Down by ten steps, Home and End go to min and max where there are ones. A typed number is taken when Enter is pressed or the focus leaves, and kept between min and max.
-
CivicPage<
T> -
A page pushed on the one before it, for a navigator's pages or a
router's page builder (go_router's
pageBuilder), on Civic's ground. It changes as every Civic page does (CivicPageRoute: nothing travels), whatever app it stands in. A CivicTopBar on it derives the way back (CivicTopBar.autoLeading). - CivicPageBody
- A page's content in its reading column: backLink first, then the errorSummary when a send found problems, then a caption (Question 2 of 5, the section's name) over the title (the page's heading), then children, with the page's margins and at most maxWidth wide (the reading width: short lines read faster), scrolled when it is long. With no side navigation beside it, the column starts where a centred CivicLayout.pageWidth frame starts in a wide window, in line with the top bar's words. The heading sets at most half as large again at a large text size, so its longest word still fits the column; a screen reader hears it as the heading that names the page.
- CivicPageDots
- Which of count pages shows (index, from 0): a row of square marks, the shown one a longer bar in ink, the others on the rule, then the place in words ("2 of 5"), so no one has to count marks.
-
CivicPageRoute<
T> - A page on Civic's ground that changes as Civic's pages do, in any app (a MaterialApp, a CupertinoApp, a WidgetsApp): nothing travels. The page's ground first covers the page it leaves, then its own words fade in over that ground; going back is the same the other way. A service's page changes as a web page loads, in place, and a reader who is unsettled by motion is never moved. CivicPage and CivicSheetPage build on it; an app pushes it as it would any route.
- CivicPageTransitions
- Civic's page change as a widgets-level PageTransitionsBuilder, so a plain Material route changes as a CivicPageRoute does (civicPageTransitions puts it on every platform). CivicHost puts civicPageTransitions in the Material theme it builds.
- CivicPagination
- The way through a long list a page at a time: "Previous page" and "Next page" as links at either end, and the pages' numbers between them, each a square link; the page shown is a square in the action colour, the colour that marks where you are across the look, its number on it. Far pages fold into an ellipsis: the first and the last always show, with the page shown and its neighbours, so the next number is always there to press. The previous link is left out on the first page, the next on the last.
- CivicPasswordField
- A box for a password, its characters hidden, with a "Show password" checkbox under it: ticked, the password shows, so a reader can check what they typed (and a reader who types slowly or with a switch can see a mistake before sending it). The words are the reader's language's.
- CivicPieChart
- The parts of a whole, as a pie beside its key: each slice in its own colour and hatch (the first solid, the second striped, …), parted from the next by a gap of the page, and in the key its name, its value and its share in words ("Resident permits, 1,240, 62%"), so nothing rests on a colour. Below 480 of room the key stands under the pie.
- CivicPieSlice
- A part of a CivicPieChart's whole.
- CivicPopover
- A little more about something, on a panel beside the control builder paints: an explanation ("What counts as a visitor?"), a short form (a filter of two answers). The page's face floating on a hairline and the soft shadow, as an open list does, width wide, with its title as a heading over content: ui_core's DesignAnchoredOverlay as a popover, Civic's painting.
- CivicPreview
- One page as the app stands it, without its router: the same host, frame and route the app gives it live, so a preview's pixels are the app's. A place stands in the tabs' frame with activeIndex current; a pushed page beside the places from 600 wide, as the app stands it; a raised task over a blank stage, so its way out draws as it does live.
- CivicProgressBar
- How far a task the reader is waiting on has come, in words and a bar: its label over it ("Uploading proof of address"), a square-ended bar in the action colour filling a track of the action's tint on a hairline, and under it how far in words (valueLabel, or the share: "40%"). A new value springs the bar to it. With no value it is a wait without a measure: a block slides along the track (it stands still in the middle under Reduce Motion), and valueLabel says what is happening.
- CivicPullToRefresh
- A list a finger pulls down to fetch again: child, a scroll view, and over its top a band the pull opens, its ring filling as the pull goes, then "Refresh" once letting go will refresh, then the ring turning and "Refreshing" while onRefresh runs, the list moved down under the band so none of it is hidden, then "Refreshed" as the band closes and the list comes back up, both on Civic's panel spring. A screen reader gets a "Refresh" action on the list and hears when it starts and when it is done.
- CivicPullToRefreshState
- A CivicPullToRefresh's state: refresh runs a refresh as a pull would.
-
CivicRadio<
T> - One answer of a CivicRadioGroup: a 40-point circle, the words beside it, a hint under them. The chosen one shows a solid dot.
- CivicRadioDivider
- The word between a group's answers and the one that stands apart from them ("or", in the reader's language, passed by the page).
-
CivicRadioGroup<
T> -
A question with one answer: its labelText asks it (on a question page,
as the page's heading with isPageHeading), its CivicRadios are the
answers, each with a hint where the words alone don't decide it. The
group is one stop for Tab, as a browser's radios and Flutter's
RadioGroupare: Tab and Shift+Tab come to the chosen answer (the first, while none is) and leave the group, and the arrow keys move the choice between the answers that can be chosen, Left and Right swapped right to left. - CivicRangeSlider
- A range set along a scale: the slider's track filled between two thumbs, the range written over it in words (valueLabel at each end: "From £20 to £60"). The thumbs keep at least minGap apart.
- CivicRating
- A score out of a few: a row of numbered square marks, filled in the action colour up to the score, and the score said in words under it ("4 of 5: Easy", with labels, in the reader's words and figures). Numbers, not stars: a mark that says its own number reads the same to everyone, in every language.
-
CivicReorderableList<
T extends Object> - A list a reader puts in order (the order to visit offices, the documents to send first): items on a card, rules between them, each with a grip at its start and "Move up" and "Move down" at its end.
- CivicScaffold
- A page of a service, on the theme's ground: the topBar across the top, the places (navigationBar along the bottom on a phone and down the start as a rail from CivicLayout.medium wide, sideNavigation down the start from CivicLayout.expanded wide), the body in between. A service's flow (the question pages) gives neither: one thing per page, and the way out is the bar's back control (in an app) or the back link (on the site). In a wide window the side navigation's places start where a page with none starts its column, under the bar's words, so the bar stands still from page to page.
- CivicScreen
- A page of an app: the topBar across the top, then the body in the page's reading column (at most 640 wide, short lines read faster), scrolled when it is long, its foot clear of the device's edge and of whatever a frame stands under it (ShellInsets).
- CivicScrollArea
- A region that scrolls inside the page (terms, a long list of addresses), with a scrollbar a reader can always see and grab: a wide square thumb in ink on a pale track along its end edge, shown whenever there is more to scroll, never fading away. A pointer over the thumb darkens it and a drag deepens it further; a drag along the track moves the region.
- CivicSearchField
- A box to search with: a CivicTextField under its label with the search button joined at its end, square, in the action colour, a magnifier on it. The button and the keyboard's search key both search: onSubmitted is called with the words.
- CivicSectionBreak
- A hairline rule across the column that parts what is above from what is below, with size's room on either side. A heading parts sections better; a rule is for the page whose parts have none.
- CivicSectionHeader
- A heading over a section of a page, a screen reader's heading, with an action at its end (a link: View all, Change). title is the medium heading; isLarge makes it the large one, for a page's main sections.
-
CivicSegment<
T> - One choice of a CivicToggleGroup or a CivicSegmentedControl: its value, the label it says and an optional icon before the words.
-
CivicSegmentedControl<
T> - One answer of a few (two to five, said in a word or two each), all shown at once as one band of faces: the chosen face solid in the action colour with a tick before its words, the others the action's tint. Use it to switch what a page shows (Week, Month, Year); for a question on a form use radios, which hold a hint for each answer.
-
CivicSelect<
T> - One answer from a list too long for radios: the field's box with the answer in it and a chevron, opening the list under it, floating on a hairline and a soft shadow. The chosen row stands on the inset rule in the action colour, bold and ticked; a pointer greys a row; the focused row stands on the yellow plate. From 600 wide it keeps to 320 points: a select is as wide as its answers.
-
CivicSelectItem<
T> - One choice of a CivicSelect.
-
CivicSheetPage<
T> - A task raised over the whole app, for the pages of its root navigator (or a router's page builder there). Civic has no sheet that half covers a page: a task is a page of its own, with all of the reader's attention, so it stands over everything, comes in as any page does (CivicPageRoute: it does not rise), and its CivicTopBar.autoLeading closes it rather than going back. drawer asks for a short sheet; Civic gives the same page.
- CivicShellAction
- The app's one act beside its places (Apply, Report a problem): a square in the action colour at the end of the places on a phone, over them in a tablet's rail, a button under them from 1024 wide. Give it a label: it is what a screen reader says, and from 1024 wide what the button says.
- CivicShellFrame
-
An app's frame around its pages: the places along the bottom below 600
wide (as a CivicNavigationBar paints them), the same places down the
start as a rail from 600 (a tablet), the site's side navigation (as a
CivicSideNavigation paints it) from 1024, with the app's one action.
What
CivicShellstands a router's branches in, and CivicPreview one page; an app with its own navigation can stand its pages in it too. - The places of a service's site, down the start of the page on its ground: each a row of words in ink, the current one bold on a white face (by night, slate) with the inset rule in the action colour at its start; a pointer over a place lays a paler face under it. Words alone: beside a name this size a place's glyph would only decorate (the bar along a phone's foot keeps them, over its small names). A header and a footer may stand above and below the places.
- CivicSkeleton
- Where content is on its way, held in its shape so the page does not jump when it comes: child laid out as the content will be, of CivicSkeletonBlocks and CivicSkeletonText, plain grey (a wash of the ink, so they show on the ground and on a card alike), fading slowly together (still under Reduce Motion). A screen reader hears one "Loading" (or label), not the blocks.
- CivicSkeletonBlock
- A grey block in a CivicSkeleton: width by height (null: as wide as its room), with a control's corners, or round (circle: a picture of a person).
- CivicSkeletonText
- Lines of words still on their way, in a CivicSkeleton: lines grey bars of the body's height and line, the last shorter, as a paragraph ends.
- CivicSlider
- A value set along a scale where the exact figure matters less than where it falls: a well-edged track filled in the action colour up to a thumb in the button's material, the value always written over it in words (valueLabel: "40 minutes"), so no one has to judge it by eye. Where the exact figure matters, ask for it in a CivicNumberField.
- CivicSpacing
- Civic's spacing steps, on its 4 pt grid (DesignSpacingScope declares it): tight inside a group, loose between groups.
- CivicSparkline
- A trend in a line, without axes, beside a sentence: values in the action colour across its width, the last marked, and after it the last value in words (valueLabel, or the reader's number). It stands beside words that say what it is (label, which a screen reader hears with where the line starts and ends). For the figures themselves, a table or a CivicLineChart.
- CivicSpinner
- A short wait the reader must sit through, said in words: a square-ended arc turning in the action colour on a hairline ring, its label beside it ("Loading" in the reader's language). Under Reduce Motion the arc stands still; the words say it either way. A screen reader hears the words once, as it appears.
- CivicSplitAction
- One of a CivicSplitButton's other actions: its label on a menu row, what it runs (onPressed; null disables it), a glyph before it (icon), the error colour when it destroys something (isDestructiveAction).
- CivicSplitButton
- An action (label, onPressed) with, joined to it, a narrow face whose chevron opens a menu of the actions like it (actions): Send now, and in the menu Send later or Save as a draft. Two buttons in Civic's material, two tap targets and two tab stops: ui_core's DesignSplitButton, Civic's painting.
- CivicSplitView
- Two panes side by side (or stacked, axis vertical) with a divider a reader drags to share the room: a rule down a 24-wide gutter and, on it, a grip 24 by 48 with three lines on it, square at the corners. A pointer over the grip darkens its edge; a drag fills it in ink; a keyboard focus lays it on the yellow plate with the thick dark bar along its end, and the arrow keys move it (Enter folds the first pane away and back). A screen reader hears a slider with the first pane's share. ui_core's DesignSplitView, Civic's painting.
- CivicStepIndicator
- Where a reader is in a form of several pages: "Step 2 of 5" over a band of steps' segments, the steps done in the action colour, the current one in ink, those to come on the rule. From 600 wide each segment has its step's words under it, the done ones ticked and the current one bold; below 600 the count says the current step's words. A change of step moves on Civic's springs.
- CivicSummaryCard
- A CivicSummaryList under a title band, for a page that checks more than one thing (each person, each vehicle): the title in bold on the band's grey, actions at its end, the list under it on a white card, its corners rounded, no stroke round it. Civic's card: it holds a record, never decoration.
- CivicSummaryList
- The answers a reader gave, set out to check before sending: what was asked in bold, the answer beside it (under it, below 600), a Change link at the end that goes back to the question, each row over a rule. The signature of a Civic check-your-answers page, and of any record of facts (an application's details, an account's).
- CivicSummaryRow
- One answer in a CivicSummaryList: what was asked (label), the answer (value), and the way back to change it.
- CivicSwipeAction
- An action a CivicSwipeActions row holds: its words, what it runs, a glyph beside the words, and whether it destroys something.
- CivicSwipeActions
- A row with actions behind it, a swipe away: endActions behind its end edge (a swipe toward the start shows them) and startActions behind its start. Each stands on a worded ground (the action colour, slate, or red for one that destroys something), its glyph over its words. A pointer over one deepens its ground; a keyboard focus lays it on the yellow plate over the ink bar.
- CivicSwitch
- A setting that takes effect at once: its labelText and helperText at the start, the switch at the end, the whole row the target. The switch is a squared track inside the ink edge with a square knob: off, the ink knob at the start carries a cross; on, the track fills with the action colour and the knob, at the end, carries a tick, so the state reads without the colour.
- CivicTabBar
- A row of tabs with an underline beneath each unselected label and a solid bar beneath the selected tab. When the row scrolls, chevrons show which ends have more tabs. The chevrons follow the reading direction.
-
CivicTable<
R> - Rows of facts in columns: a caption in a heading's weight, the columns' names in bold over an ink rule, each row on a hairline rule, numbers lined up at the end. A column with a sort key sorts on a press of its name, which is a link with an arrow that says the way it runs.
- CivicTag
- A status in words on its tone's tint: Not started, In progress, Approved, Refused. Square, bold, its words in the tone's ink at better than 7 to 1, so the words carry the status and the tint only sorts it.
- CivicTextArea
- Words that need more than a line: the field's square well, minLines tall and growing to maxLines, and, with a maxLength, a count under it in words: "You can enter up to 500 characters", then "You have 12 characters remaining", then, past the limit, "You have 3 characters too many" in the error colour with the well's edge in it too. Typing past the limit is allowed, so nothing pasted is lost; the page says what to fix when it is sent.
- CivicTextField
- A box to write in: square, on the page's white, inside a 2-point ink edge, 48 tall, its labelText above it in bold, its helperText under that, and its errorText in words above the box with the whole field on the error rule and the box's edge doubled in the error colour. Focus, by any means, doubles the edge in ink and rings it in yellow; the box keeps its white so the words stay readable.
- CivicTextTheme
- Civic's type: the steps every part and page takes its words from.
- CivicTheme
-
Puts Civic in scope for everything under it, as Material's
Themedoes. It is the whole install: put one in any app'sbuilder:, under aMaterialApp, aCupertinoAppor aWidgetsAppalike. Under it, every text has Civic's body style to fall back on, Flutter's own text field wears Civic's caret and selection with no ink, taps reach 48 by 48 for a finger and 24 by 24 for a pointer, and spacing stands on a 4 pt grid. - CivicThemeData
-
Civic's design tokens, as Flutter's
ThemeData: immutable, with copyWith, lerp and value equality, and presets as named factories. - CivicThemeDataTween
- A tween between two Civic themes, through CivicThemeData.lerp.
- CivicTimeInput
- A time of day typed: the hour and the minute (and, on a 12-hour clock, AM or PM) in the field's well, in the reader's order. Each part takes figures and moves on when it is whole; the arrow keys step the part that has the focus. A time is quicker typed than chosen from a list.
- CivicTimeline
- A record's history, newest first: each event's title in bold, its date under it, then what it means, down an ink rule at the start edge with a solid square mark at each event (each has happened); where things stand now is the first.
- CivicTimelineEntry
- One event in a CivicTimeline: what happened (title), when (date), and anything more (child: a sentence, a document's link, an action).
- CivicToast
- A short word that something happened (Saved, Link copied), on the ink band at the foot of the screen, read out by a screen reader. Never the only place something important is said: a change that matters is on the page.
- CivicToaster
-
Hosts Civic's toasts over child: put it above the app's navigator
(
WidgetsApp.builder), under a CivicTheme, then call CivicToast.show. F6 moves the focus to the newest toast; Escape dismisses it. Where the toasts are taller than the screen (a long toast at twice the text, or one leaving as the next comes), they scroll, the newest in sight at the foot, rather than run off it. -
CivicToggleGroup<
T> - Several choices that each turn on or off: a row of faces in the button's material, each saying what it does, those turned on solid in the action colour with a tick before their words. Use it for settings that act at once and combine (Show closed, Show drafts); for one answer of several use CivicSegmentedControl or radios, for a question on a form use checkboxes.
- CivicTooltip
- A short message naming child (most often a CivicIconButton's glyph): an ink plate with the page's colour for its words (by night the light plate with dark words), shown while a pointer rests on child, at once when the keyboard reaches it, and after a long press: ui_core's DesignTooltip, Civic's painting.
- CivicTopBar
- The band across the top of every page: the title in bold white on a deep band of the action's hue (a navy for Civic's blue), an emblem before it, actions at its end, the action colour's rule under it (by night its deeper edge). On the site it says whose service this is and nothing more; the page's own heading says where the reader is. In an app (CivicLayout.isApp) it is the app's own bar: on an inner page the way back (leading, autoLeading) and the page's place as its title, the large heading in the page.
-
CivicTree<
T extends Object> - Nested things a reader opens level by level (a service's sections, a council's departments): controller's open rows, at least 48 tall, each level indented 24, a chevron before a row with rows under it that turns as it opens, a glyph from iconOf when it has one, then its words.
- CivicWarning
- A warning: the round mark with its exclamation in ink, the words in bold beside it. For what could cost the reader (a fine, a refused application), said once on a page. The mark is hidden from a screen reader, which hears assistiveLabel before the words instead.
- CivicWell
- A well round child: fill inside a CivicMetrics.edge edge in edgeColor, square, or round with circle. focused doubles the edge in the ink and rings it in the theme's yellow, on Civic's press spring.
- CivicWheelPicker
- Linked lists turned to a choice, a column each (hours and minutes, a month and its days): every column a flat well, the row chosen across its middle on the action's tint with the chosen rule down its start and its words in bold, so the choice reads as an open list's does. Flat, not a drum: the rows stand straight and whole, at every text size.
- DefaultDesignLocalizations
- The words in English, with no localizations package.
- DesignAdaptiveShell
- An app's frame: destinations in a bar, a rail or a sidebar by the shell's width (DesignNavigationMode.fromWidth, or mode), and the app's body beside it (above a bar). The look paints each destination (destinationBuilder) and the navigation round them (navigationBuilder); the shell gives them their keys, their meaning to a screen reader and their place.
- DesignAnchoredOverlay
- A surface anchored to anchorBuilder's widget: a popover (DesignOverlayTrigger.press, focusOnOpen), a hover card (DesignOverlayTrigger.hover) or a menu (arrowKeyNavigation on).
- DesignBandScale
- Categories side by side (bars): count bands from start to end, paddingInner of each step between bands and paddingOuter at the ends. A value is a band's index; map gives its centre.
- DesignBottomSheetController
-
Drives an open DesignBottomSheetRoute's size from outside it, as
DraggableScrollableControllerdrives a sheet, on the route's spring. The caller makes it, gives it to one route at a time, and disposes it. - DesignBottomSheetDetails
- What a DesignBottomSheetRoute's panel paints from.
- DesignBottomSheetDragHandle
- A bottom sheet's drag handle, painted by builder: a button that moves the sheet to its next size (from the largest back to the smallest; a sheet of one size closes), Up and Down to a larger or smaller size when focused, and a screen reader's increase and decrease. Put it in a DesignBottomSheetRoute's panel.
-
DesignBottomSheetRoute<
T> -
A modal bottom sheet. Push it with
Navigator.push; its panel is builder's, the screen's width, rising from the bottom edge. - DesignCalendar
- One or more month grids over a DesignCalendarController.
- DesignCalendarController
- A calendar's state: the shown month, the keyboard's day and the selection.
- DesignCalendarDay
- One day as the grid paints it.
- DesignCalendarHeader
- A month's header, as DesignCalendar.headerBuilder gets it.
- DesignCapCenter
- Draws a one-line label or text entry so that the middle of its capitals is the middle of its own box, as Baseline puts a baseline where it is told.
- DesignCarousel
- Slides itemBuilder builds, itemCount of them.
- DesignCarouselControls
- What a carousel's controls act on.
- DesignChart
- A cartesian chart (line, area, bars, a sparkline): the look draws series from the scales and ticks in builder's details; the chart picks points, says them, and springs from one set of data to the next.
- DesignChartDetails
- A DesignChart as its look draws it.
- DesignChartPoint
- A point of a DesignChartSeries: x and y, or a gap where y is null.
- DesignChartPointRef
- A point of a chart: the indexth point of the seriesth series.
- DesignChartSeries
- A named run of points, in order along x.
- DesignChartTable
- A chart's data as a table, the alternative an app shows instead of the chart (a screen reader's "Show data table"): a row per x value, a column per series (DesignChartTable.new), or a row per slice with its value and share (DesignChartTable.slices). A screen reader reads a table, its column headers and cells, a missing value as "Empty"; cellBuilder paints each cell, and the columns are as wide as their widest cell.
- DesignChartTableCellDetails
- A cell of a DesignChartTable.
- DesignColorArea
- A saturation (across) and brightness (up) area for controller's hue.
- DesignColorAreaDetails
- What the look paints the area from.
- DesignColorController
- A colour being picked, as hue, saturation, brightness and alpha.
- DesignColorPicker
- An area over a hue slider (and an alpha slider), on one controller.
- DesignColorSlider
- A slider for one channel of controller's colour.
-
DesignCombobox<
T extends Object> - A text field that suggests options as you type.
- DesignComboboxField
-
The field, as DesignCombobox.fieldBuilder gets it: wire controller
and focusNode to the look's text input, and submit to its
onEditingComplete(and give it noonSubmitted; see submit). - DesignCommand
- A command in a palette.
- DesignCommandPalette
- The palette's body: the field over the results. Put it in a route with showDesignCommandPalette, or anywhere (a sidebar's search).
- DesignCommandShortcut
- Opens a palette from anywhere under it on activators (Ctrl+K and Cmd+K).
- DesignContextMenu
- A menu of menuChildren that opens over child, where the user asks for it.
- DesignControlBox
- A control's box: at least minHeight tall, as wide as its child (or as the width it is told to be), with child placed by alignment and its text given even leading (TextLeadingDistribution.even).
-
DesignDataTable<
R> - The rows of a DesignTableController's page under a header row, with one tab stop for the rows. The look paints the header cells, the cells, and each row around its cells.
- DesignDateField
- A date typed in segments, in the reader's order: value is a calendar day (its time ignored), null when empty; onChanged gets the day once every segment holds one, and null when one is cleared.
- DesignDateRange
- A range of days, start to end inclusive; end is null while only the start is chosen.
- DesignDateSegmentDetails
- One segment of a DesignDateField or DesignTimeField, as the look paints it.
- DesignDensity
-
How compact a look's controls stand, as Material's
VisualDensity: each step of vertical takes heightStep from a control's height and each step of horizontal paddingStep from its padding at either side, from -4 (tightest) to 4 (roomiest). - DesignDestinationDetails
- What a look paints a destination from.
- DesignDialog
- An alert's or a simple dialog's layout: title and content scroll together over actions, which stay put. The actions sit side by side, sharing the row on a compact screen and aligned at the end on a larger screen. When their labels do not fit, including at a large text size, they stack, one to a line, the last given (the confirm) on top and the first (the dismissive one) at the bottom, as Material and iOS stack them.
- DesignDialogAction
- An action at the foot of a DesignDialog.
- DesignDialogActionDetails
- What the look paints a DesignDialogAction from.
- DesignDialogDetails
- What a DesignDialogRoute's builder paints from.
- DesignDialogFrameDetails
- What the look paints a DesignDialog's frame and action bar from.
-
DesignDialogRoute<
T> -
A modal dialog or alert. Push it with
Navigator.push; its page is builder's, over a barrier. - DesignField
- A control with its label, help and error.
- DesignFieldParts
- What a DesignField's builder lays out.
- DesignForm
- A Form that, on a submit that fails, shows every error, moves focus to the first field that is wrong (scrolling it into view) and tells a screen reader how many fields need attention; after that, errors update as the reader edits.
-
DesignFormField<
T> - A FormField whose control DesignForm can focus: give focusNode to the control.
- DesignFormState
- The state of a DesignForm: submit and reset it.
- DesignHaptics
- The haptics ui_core's behaviours play: one callback per moment; a null callback plays nothing.
- DesignHapticsScope
- Puts haptics in force for child: the table every ui_core behaviour below reads with DesignHaptics.of.
- DesignInputGroup
- A field and its add-ons as one control.
- DesignInventory
- A look's inventory: one entry per DesignInventoryRow.
- DesignInventoryEntry
- A look's answer to one row: a live specimen (builder) or the reason the look leaves it out (absentReason).
- DesignInventoryGallery
-
Lists an inventory, group by group in DesignInventoryRow.groups' order: each row's
live specimen, or
Deliberately absent: <reason>for a gap, or "Missing" for a row the inventory does not answer. Lazy: a row builds when it scrolls in. - DesignInventoryRow
- One row of the inventory: a component every look either carries or leaves out with a reason.
- DesignKeylineFace
-
Marks child as one face for the checks in
package:ui_core_test: a control's face or a well (a field's, a list's, a table's) whose pixels may not show it, or a picture with things placed on it. - DesignKeylineRegion
- Marks child as a card or a section whose contents share keylines: a keyline is the line that what starts a row (or ends one) sits on, so a card's title, its rows' words, its fields and its dividers start on one line, and its switches, chevrons and selects end on another.
- DesignLinearScale
- A number line: min at start, max at end.
-
DesignListDetail<
T extends Object> - A list (listBuilder) and the detail of selectedItem (detailBuilder), as Compose's ListDetailPaneScaffold.
- DesignLocalizations
-
The words a design system says on its own. The behaviours' words: the
names a screen reader hears for a part with no text of its own (a
carousel, a sheet's barrier, a split view's handle) and the messages they
announce (a slide turned, a row moved, the results found), each also a
parameter on its behaviour, which a null leaves to this. And the general
words a look shows or says by itself (Cancel, Close, Today, Next month,
"2 of 5"), under
MaterialLocalizations' names where Flutter has the word, so a look built on any app (MaterialApp,CupertinoApp,WidgetsApp) has them. - DesignMenuBar
- A row of menus.
- DesignMenuEntry
- An item of a menubar: a command, a submenu (children), or a divider.
- DesignMotionPolicy
- The Reduce Motion policy: which spring a component actually runs.
- A destination: its name and glyphs, as Material's NavigationDestination.
- What a look lays the navigation out from.
- DesignNumberField
- A number typed or stepped: value the number, null when empty; onChanged gets it as it is taken (Enter, the focus leaving, a step), not on each key typed.
- DesignNumberFieldButtonDetails
- One of a number field's step buttons, as the look paints it.
- DesignNumberFieldDetails
- The field, as DesignNumberField.fieldBuilder gets it: wire controller, focusNode, keyboardType, inputFormatters and onEditingComplete to the look's text input.
- DesignOtpController
- Holds a code: its text, its length, whether it is whole.
- DesignOtpField
- A one-time code drawn as boxes over one input.
- DesignOtpSlot
- One box, as DesignOtpField.slotBuilder gets it.
- DesignOverlayAnchor
- The anchor, as DesignAnchoredOverlay.anchorBuilder gets it.
- DesignOverlayInfo
- What DesignAnchoredOverlay.overlayBuilder paints the surface from.
- DesignOverlayPadding
- The edges a surface opened under it keeps clear of, beyond the screen's safe area and the on-screen keyboard: a look's own chrome over its pages, such as a desktop side bar a page's overlay runs under.
- DesignOverlayPlacement
- Where a surface goes relative to its anchor.
- DesignPasswordController
- Whether a password shows: true while it is hidden.
- DesignPasswordDetails
- What a DesignPasswordReveal's builder paints from.
- DesignPasswordReveal
- Holds whether a password shows and gives the field and its toggle what they need. The field keeps its focus and caret as it flips; with hideOnBlur a shown password hides again when focus leaves the field.
- DesignPieChart
- A pie or donut: the look draws slices from the angles in builder's details; the chart picks a slice, says it, and springs from one set of values to the next.
- DesignPieChartDetails
- A DesignPieChart as its look draws it.
- DesignPieSlice
- A slice of a DesignPieChart: a label and its value.
- DesignPieSliceDetails
- A slice as drawn.
- DesignPressable
- Makes any widget a control (press, focus, hover and what a screen reader hears), with no look of its own.
- DesignPressableState
- The state of a DesignPressable: states is what its builder was last given.
- DesignPullToRefresh
- child, a scroll view, refreshed by onRefresh on a pull.
- DesignPullToRefreshState
- The refresher's state: refresh runs one (a keyboard shortcut, a menu's "Refresh").
- DesignRangeSlider
- A slider of values between min and max.
- DesignRangeTrack
- The track's state, for the look to paint its rail and the filled part.
- DesignRangeValues
- A range's two ends.
- DesignRating
- A rating of itemCount items filled up to value (0, none, to itemCount): onChanged gets the value a tap, a drag, a key or a screen reader sets.
- DesignRatingItemDetails
- One item of a DesignRating, as the look paints it.
- DesignRefreshDetails
- What the look paints the indicator from.
-
DesignReorderableList<
T extends Object> -
A list of items the reader puts in order; onReorder gets an item's
place
fromand its new placeto(counted after it left). - DesignReorderItem
- An item's place and moves, as DesignReorderableList.itemBuilder gets them.
- DesignScale
- Values to positions and back.
- DesignScaleTick
- A tick on a scale: a value, its position, its label.
- DesignScrollArea
- child, a scroll view on controller, with a scrollbar from thumbBuilder (and trackBuilder) on its end edge (or bottom).
- DesignScrollThumb
- A scrollbar's geometry and state, for the look to paint.
- DesignSearchError
-
A search that failed, as a combobox's or a tag input's
errorBuildergets it: paint a message and a "Try again" (DesignLocalizations.retryButtonLabel) that calls retry, lit while focused. - DesignSheetInfo
- What a side sheet's panel gets to paint with.
-
DesignSheetPageRoute<
T> - A full-screen sheet presented as an opaque page of the navigator. The whole page rises on a spring and returns along the same path. With Reduce Motion it fades. Escape and Back respect the page's PopScope.
-
DesignSideSheetRoute<
T> -
A modal side sheet. Push it with
Navigator.push; its panel is builder's, sized to width (at most the screen less minGap) and the full height. - DesignSpacing
- The step a look's spacing stands on: every padding, gap and spacing token a multiple of grid.
- DesignSpacingScope
- Declares the spacing a look's parts stand on for the subtree, as a theme does; DesignSpacing.of reads it.
- DesignSplitAction
- An action in a split button's menu.
- DesignSplitButton
- A main action with a menu of actions beside it.
- DesignSplitView
- first and second side by side (or stacked, axis vertical), split at fraction of the room (the first pane's share).
- DesignStyle
-
How one part of a look looks, as Material's
ButtonStyleis: every slot resolves for the part's states (WidgetState.disabled, WidgetState.hovered, WidgetState.focused, WidgetState.pressed, WidgetState.selected, WidgetState.error). - DesignStyleOf
-
A part's style layers read at its states: its own
style:, then its component theme (first wins). Each getter is the first layer's value for states, or null, so the part goes on to the theme-wide knobs and its own default. - DesignSwipeAction
- An action behind a row.
- DesignSwipeActionDetails
- What the look paints an action from.
- DesignSwipeActions
- child with startActions behind its start edge and endActions behind its end edge.
- DesignSwipeActionsController
-
Opens and closes a DesignSwipeActions row from outside, and says
whether it is open, as
flutter_slidable's controller does. The caller makes it, gives it to one row, and disposes it; with no row it does nothing. - DesignSwipeBackPageTransitionsBuilder
- builder's page transition with iOS's swipe back from the screen's leading edge round it.
- DesignTab
- A tab: its name, and what a look paints it with.
- DesignTabBar
- A bar of tabs, controller choosing among them; the look paints each tab (tabBuilder) and the indicator under them (indicatorBuilder), or over them (indicatorPosition).
- DesignTabController
-
Which tab is selected, and where a swipe or a change has got to: Material's
TabControllerwithout Material. A DesignTabBar and a DesignTabView given the same one follow each other. The caller makes it, with a TickerProvider (TickerProviderStateMixin), and disposes it. - DesignTabDetails
- What a look paints a tab from.
- DesignTabIndicatorDetails
- Where a look paints the indicator, and the selected tab's states.
-
DesignTableColumn<
R> - A column of a DesignTableController.
-
DesignTableController<
R> - A table's data and its view of it: the filter, the sort, the selection and the page.
-
DesignTableRow<
R> - One row, as DesignDataTable.rowBuilder gets it.
- DesignTabView
-
The pages of controller's tabs, one per tab, swiped between: Material's
TabBarViewwithout Material. Swiping moves the controller's DesignTabController.animation, so a bar's indicator follows the finger; let go, the pages spring to the nearer page (or the next, flung) on the controller's spring. A change from the bar springs the pages the same way. Each page is its tab's panel to a screen reader; pages off screen are not built, unless a page keeps itself alive. - DesignTagDetails
- One tag, as DesignTagInput.tagBuilder gets it.
-
DesignTagInput<
T extends Object> - Values chosen as tags, with a field that suggests and makes more.
- DesignTapTarget
- Lays child out at least minSize (the floor for what reaches the controls, DesignTapTargets.of, when null), placed by alignment, and sends a tap anywhere in that area to the child's centre: the control's layout, the area a tap reaches and the box a screen reader outlines are one.
- DesignTapTargets
- The least area a tap must reach on a control, by what reaches it: 44 by 44 for a finger (Apple's Human Interface Guidelines), 24 by 24 for a pointer (WCAG 2.2, success criterion 2.5.8, level AA).
- DesignTapTargetScope
- Declares the targets a look's controls stand at for the subtree, as a theme does; DesignTapTargets.of reads them.
- DesignTextEntryBox
- A text entry's box: at least minHeight tall, holding child, an editable as wide as the box, with one line centred in it and hint on the typed text's baseline while controller is empty.
- DesignTimeField
- A time of day typed in segments, on the reader's clock: value the time, null when empty; onChanged gets it once every segment holds one, and null when one is cleared.
- DesignTimeOfDay
- A time of day with no date: an hour (0–23), a minute and a second.
- DesignTimeScale
- Time, in local dates: min at start, max at end. Its values are milliseconds since the epoch (DateTime.millisecondsSinceEpoch); its ticks fall on calendar steps (seconds to years) and read as the reader's times and dates.
- DesignToast
- What a toast says and does. The look reads the fields it paints; data carries anything else it needs (a tone, an icon).
- DesignToastDetails
- What the look's DesignToaster.toastBuilder paints one toast from.
- DesignToaster
-
Hosts toasts over child: put it above the app's navigator
(
WidgetsApp.builder), then call DesignToaster.of and DesignToasterState.show from anywhere below. - DesignToasterState
- The state of a DesignToaster: show and dismiss toasts through it.
- DesignToastHandle
- A shown or waiting toast, as DesignToasterState.show returns it.
-
DesignToggleGroup<
T> - A row (or column) of toggles over options.
- DesignTooltip
- A tooltip of message for child, painted by tooltipBuilder.
-
DesignTree<
T extends Object> - The open rows of controller, one tab stop for all of them.
-
DesignTreeController<
T extends Object> - A tree's nodes and which are open and selected.
-
DesignTreeItem<
T extends Object> - A row's paint state.
-
DesignTreeRow<
T extends Object> - A shown row of a tree.
- DesignValueHandle
- A focusable value between min and max.
- DesignWheelColumn
- One column of a DesignWheelPicker: its rows, their names and which of them can be chosen.
- DesignWheelColumnDetails
- One column of a DesignWheelPicker, as the look frames it: its lens, a band behind the centre row, a focus ring.
- DesignWheelItemDetails
- One row of a DesignWheelPicker, as the look paints it.
- DesignWheelPicker
- A wheel picker of linked columns: selection holds a row per column, columns gives the columns for a selection, and onChanged gets every pick as a whole, valid selection.
- RenderDesignCapCenter
- The render object of DesignCapCenter: keeps its child's size and paints it moved up or down so that its one-line label's capitals sit on the box's middle.
- RenderDesignTapTarget
- DesignTapTarget's render object: its child laid out as given, itself at least minSize, the child placed by alignment, a hit anywhere in it sent to the child's centre.
Enums
- CivicDatePart
- Which box of a CivicDateInput.
- CivicPresentation
- How a previewed page stands in its app: as one of its places, pushed over one, or raised over the whole app.
- CivicSectionBreakSize
- How far a CivicSectionBreak stands from what is round it.
- CivicTone
- What a status, a tag or a notice says about its subject: Civic's tones.
- DesignBranchBackBehavior
- Where back goes from a branch at its root page.
- DesignCalendarMode
- How a calendar selects.
- DesignChartXAxis
- What a DesignChart's x values are.
- DesignColorChannel
- A channel a DesignColorSlider sets.
- DesignDateSegmentType
- The kinds of segment a date or a time field is typed in.
- DesignInput
- What reaches a look's controls: a finger, or a pointer (a mouse, a trackpad, a stylus that hovers).
- DesignMenuLevel
- Where a DesignMenuBar's builder paints: the bar, a menu or a submenu.
- How a shell shows its destinations.
- DesignOverlayAlign
- How a surface lines up with its anchor along the side it sits on.
- DesignOverlaySide
- Which side of the anchor a surface sits on. start and end follow the text direction.
- DesignOverlayTrigger
- What opens an anchored surface.
- DesignRefreshMode
- Where a pull stands.
- DesignScrollbarVisibility
- When a DesignScrollArea's scrollbar shows.
- DesignSelection
- A page's selection, for its select-all checkbox.
- DesignSheetEdge
- Which edge a DesignSideSheetRoute comes from.
- DesignSortDirection
- Which way a column sorts.
- DesignSplitPart
- Which part of a split button a builder paints.
- DesignToastClosedReason
- Why a toast left.
- DesignWindowSizeClass
- Material's window size classes, by width in logical pixels.
Extensions
- CivicThemeContext on BuildContext
- The accessors every Civic part reads its tokens through.
- DesignSpringDrive on AnimationController
- Runs an AnimationController on a spring instead of a duration.
Constants
- civicFontPackage → const String?
-
The package that bundles Civic's faces, or null when the app does. Every
Civic text style passes it as
TextStyle.package. -
civicInventoryHeights
→ const Map<
String, double> - The specimens that fill the height they are given; a gallery frames each in a box of this height.
-
civicPageTransitions
→ const Map<
TargetPlatform, PageTransitionsBuilder> -
Civic's page change on every platform, for the
pageTransitionsThemeof the app's own Material theme, Flutter's or material_ui's: one map of widgets-level builders fits both. An app on Flutter'sMaterialApppushes Flutter'sMaterialPageRoute, which reads only the app's theme (on a Mac it would play the Cupertino slide), so the app puts it there. On iOS the change keeps the swipe back from the screen's leading edge round it (DesignSwipeBackPageTransitionsBuilder). - designSpringTolerance → const Tolerance
- When a spring-driven controller counts as settled, in the controller's own units (a 0–1 progress, or dp for a position):
Properties
- civicInventory → DesignInventory
-
Civic's inventory: every row of the shared component list, answered.
final
Functions
-
civicFontFamily(
String family) → String -
familyunder the name Flutter registers it by:AtkinsonNextwhen the app bundles it,packages/civic_ui/AtkinsonNextfrom the package. A test that loads the faces itself loads them under this name. -
civicLoadFonts(
) → Future< void> -
Loads the faces Civic bundles, so the first frame is set in them. Await
it before
runApp: on the web a bundled face otherwise arrives after the first frames, which flash in a fallback face. -
designMatchScore(
String text, String query) → int? -
How well
queryfindstext: null not at all, higher better. A prefix beats a word's start, which beats a substring, which beats the letters in order. -
designReduceMotionOf(
BuildContext context) → bool -
Whether the reader asked for reduced motion at
context: Android's Remove animations or the web's prefers-reduced-motion (MediaQuery.disableAnimationsOf), or iOS's Reduce Motion (dart:ui'sAccessibilityFeatures.reduceMotion, which MediaQuery does not carry). -
designShortcutKeys(
BuildContext context, MenuSerializableShortcut shortcut, {TargetPlatform? platform, bool appleSymbols = true}) → List< String> -
The keys of
shortcut(a SingleActivator or a CharacterActivator), one string a key, modifiers first, as Flutter'sMenuItemButtonlabels them: -
designShortcutLabel(
BuildContext context, MenuSerializableShortcut shortcut, {TargetPlatform? platform, bool appleSymbols = true}) → String - designShortcutKeys joined as a menu row shows them: "⌃ ⇧ N" with Apple's symbols (Flutter's spacing), "Shift+Command+N" in words on macOS and iOS, "Ctrl+Shift+N" elsewhere.
-
designSpring(
{required double dampingRatio, required double stiffness}) → SpringDescription -
The Flutter spring for the token (ζ =
dampingRatio, k =stiffness):SpringDescription.withDampingRatio(mass: 1, stiffness: k, ratio: ζ), so damping = 2ζ√k. Compose'sspring(dampingRatio, stiffness)is written against unit mass, so the two run the same curve. -
designSpringSimulation(
SpringDescription spring, {required double from, required double to, double velocity = 0, Tolerance tolerance = designSpringTolerance}) → SpringSimulation -
The simulation of
springfromfromtoto, starting atvelocityunits per second, that settles attoleranceand lands exactly onto. -
designSwipeBack(
Map< TargetPlatform, PageTransitionsBuilder> builders, {Set<TargetPlatform> platforms = const {TargetPlatform.iOS}}) → Map<TargetPlatform, PageTransitionsBuilder> -
builderswith the entries forplatforms(iOS, by default) wrapped in DesignSwipeBackPageTransitionsBuilder, so a page there pops with a swipe from the screen's leading edge and otherwise plays the look's push. -
showCivicActionSheet<
T> ({required BuildContext context, required List< CivicActionSheetAction< actions, String? title, String? message, String? cancelLabel, CivicStyle? style}) → Future<T> >T?> -
Raises a bottom sheet of worded
actionsfor one thing (an application, a document), with atitleand amessageover them and Cancel apart at the foot (cancelLabel; the localized Cancel by default); completes with the value chosen, or null on Cancel, Escape, Android's back or the scrim. The actions are rows: a pointer greys one, the keys move the yellow plate over the ink bar, one that destroys something says so in the error colour. -
showCivicBottomSheet<
T> ({required BuildContext context, required WidgetBuilder builder, String? title, List< Widget> actions = const [], List<double> ? snapSizes, double? initialSize, bool isDismissible = true, bool enableDrag = true, bool showClose = true, String? semanticLabel, CivicStyle? style}) → Future<T?> -
Raises
builder's content from the foot of the screen on a sheet: the page's face on a hairline and the soft shadow, its top corners rounded as a card's, a grabber over itstitleand a Close button at the title's end, the content under them scrolling,actionsat its foot over a hairline. From 600 wide it stands on the reading measure, centred. ui_core's DesignBottomSheetRoute, Civic's painting. -
showCivicCommandPalette(
{required BuildContext context, required List< DesignCommand> commands, String labelText = 'Find a page or action', String? hintText, CivicStyle? style}) → Future<void> -
Opens a palette over the page that finds a page or an action of the
service by its words: a text field (
labelText: "Find a page or action" by default) over thecommandsthat match what is typed, in their groups, each worded, its shortcut at its end. The panel is the dialog's card floating on its hairline and soft shadow, at most 560 wide: ui_core's showDesignCommandPalette, Civic's painting. -
showCivicDialog<
T> ({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, }) → Future< T?> -
Opens
builder's CivicDialog over the page, on a scrim of ink, and returns what it closes with: ui_core's DesignDialogRoute, Civic's painting. The scrim comes up on a spring under a dialog that stands whole from its first frame (under Reduce Motion, whichever platform asks for it, the two fade in together, settled within 150 ms). The keyboard's focus stays inside it until it closes, then goes back to what held it. Escape, Android's back and a press on the scrim close it, unlessbarrierDismissibleis false: a dialog that must be answered, which only its own buttons close and which a screen reader hears as an alert. -
showCivicSideSheet<
T> ({required BuildContext context, required WidgetBuilder builder, String? title, List< Widget> actions = const [], DesignSheetEdge edge = DesignSheetEdge.end, double width = 400, bool isDismissible = true, String? semanticLabel, CivicStyle? style}) → Future<T?> -
Slides
builder's content in from the page's end (its start withedgestart) on a sheet the screen's height: the page's face over a hairline and the soft shadow, itstitleat the top with a Close button at its end, the content scrolling under it,actionsat its foot over a hairline.widthwide from 600 (at most the screen less 56); below 600 it takes the screen's width, so its words keep their length at any text size. ui_core's DesignSideSheetRoute, Civic's painting. -
showDesignCommandPalette(
{required BuildContext context, required DesignCommandPalette palette(ValueChanged< DesignCommand> run), Widget surfaceBuilder(BuildContext context, Widget palette)?, Color barrierColor = const Color(0x66000000), DesignBarrierBuilder? barrierBuilder, String? barrierLabel, AlignmentGeometry alignment = const Alignment(0, -0.6)}) → Future<void> -
Opens
palettein a modal route over a barrier;surfaceBuilderpaints the panel around it. A command runs after the route has closed and focus is back where it was.
Typedefs
- CivicSpring = ({double dampingRatio, double stiffness})
-
One of Civic's springs: a damping ratio and a stiffness, as ui_core's
designSpringtakes them. - CivicStyle = DesignStyle
-
How a part of Civic looks: Civic's name for ui_core's DesignStyle, ten
slots that each resolve for the part's states, as Material's
ButtonStyledoes. A part reads itsstyle:first, then its component theme on CivicThemeData, then Civic's own default. -
DesignBarrierBuilder
= Widget Function(BuildContext context, Animation<
double> animation) - Paints a modal part's barrier in place of its barrier colour: a look's own screen over the page behind (Ben-Day dots, a blur, a grain).
- DesignBottomSheetBuilder = Widget Function(BuildContext context, DesignBottomSheetDetails details)
-
Builds a bottom sheet's panel from
details. -
DesignCalendarDayBuilder
= Widget Function(BuildContext context, DesignCalendarDay day, Set<
WidgetState> states) -
Paints one day for its
states(WidgetState.selected when chosen, WidgetState.focused while the keyboard is on it, hovered, pressed, disabled). - DesignChartBuilder = Widget Function(BuildContext context, DesignChartDetails details)
- Draws a chart from its details.
- DesignChartFormat = String Function(double value)
- Formats a value for labels, readouts and speech.
- DesignChartTableCellBuilder = Widget Function(BuildContext context, DesignChartTableCellDetails cell)
- Paints a cell of a DesignChartTable.
- DesignComboboxFieldBuilder = Widget Function(BuildContext context, DesignComboboxField field)
- Paints the field.
-
DesignDateFieldFrameBuilder
= Widget Function(BuildContext context, Set<
WidgetState> states, Widget segments) -
Frames a date or time field's laid-out
segments(its box, its focus ring);statesare the field's: focused (a segment has the focus), hovered, disabled, error. - DesignDateLiteralBuilder = Widget Function(BuildContext context, String literal)
- Paints the text between a field's segments ("/", ".", ":", Japanese's year mark U+5E74).
- DesignDateSegmentBuilder = Widget Function(BuildContext context, DesignDateSegmentDetails details)
- Paints one segment of a date or time field. A segment is a tap target: a look gives its face the floor (DesignTapTarget).
- DesignDestinationBuilder = Widget Function(BuildContext context, DesignNavigationDestination destination, DesignDestinationDetails details)
- Paints a destination.
- DesignDialogActionBuilder = Widget Function(BuildContext context, DesignDialogAction action, DesignDialogActionDetails details)
- Paints an action of a DesignDialog.
- DesignDialogBuilder = Widget Function(BuildContext context, DesignDialogDetails details)
-
Builds a dialog route's page: the look's dialog, which
detailslets it move as the route opens and closes. - DesignDialogPartBuilder = Widget Function(BuildContext context, DesignDialogFrameDetails details, Widget child)
- Wraps a part of a DesignDialog (its frame or its action bar) in the look's paint.
-
DesignDividerBuilder
= Widget Function(BuildContext context, Set<
WidgetState> states, Axis axis) -
Builds a split view's divider for its
states(focused while the keyboard is on it, hovered, pressed while dragged). - DesignFieldBuilder = Widget Function(BuildContext context, DesignFieldParts parts)
- Lays out a field's parts.
-
DesignHandleBuilder
= Widget Function(BuildContext context, Set<
WidgetState> states) -
Builds a handle's face for its
states(focused while the keyboard is on it, hovered, pressed while dragged, disabled). -
DesignInputGroupBuilder
= Widget Function(BuildContext context, Set<
WidgetState> states, Widget child) -
Builds the group's frame around
child(the field and its add-ons) forstates: WidgetState.focused while anything inside has focus, WidgetState.hovered, WidgetState.disabled and WidgetState.error. - DesignListSurfaceBuilder = Widget Function(BuildContext context, Widget list)
-
Paints the list's surface around
list(a panel, its shadow). -
DesignMenuItemBuilder
= Widget Function(BuildContext context, DesignMenuEntry entry, DesignMenuLevel level, Set<
WidgetState> states) -
Paints an item for its
states(WidgetState.focused while the keyboard is on it, WidgetState.selected for the active menu title, hovered, pressed, disabled). In a menu whose highlight follows the pointer, one item at most is focused or hovered: the current one. -
DesignMenuSurfaceBuilder
= Widget Function(BuildContext context, DesignOverlayInfo info, List<
Widget> items) -
Paints a menu's panel round its
items(scroll them when DesignOverlayInfo.maxSize is short): a menubar's menus, a context menu's. - Lays out and paints the navigation round its destinations.
- DesignNumberFieldBuilder = Widget Function(BuildContext context, DesignNumberFieldDetails details)
- Paints the field's text input.
- DesignNumberFieldButtonBuilder = Widget Function(BuildContext context, DesignNumberFieldButtonDetails details)
- Paints a step button: a look gives it a finger's floor (DesignTapTarget).
- DesignNumberFieldLayoutBuilder = Widget Function(BuildContext context, Widget field, Widget decrement, Widget increment)
-
Lays out the
fieldand itsdecrementandincrementbuttons. -
DesignOptionBuilder<
T> = Widget Function(BuildContext context, T option, Set< WidgetState> states) -
Paints one option for its
states: WidgetState.focused while it is highlighted (the keyboard's place in the list), WidgetState.selected when it is the combobox's value, WidgetState.disabled when it cannot be taken, and a pointer's hovered and pressed. -
DesignOptionSearch<
T> = FutureOr< Iterable< Function(String query)T> > -
Searches for the options matching
query. -
DesignOtpContextMenuBuilder
= Widget Function(BuildContext context, TextSelectionToolbarAnchors anchors, List<
ContextMenuButtonItem> items) -
Draws the field's edit menu: Flutter's toolbar arguments, so a look can
hand them on (Material's
AdaptiveTextSelectionToolbar.buttonItems, Cupertino'sCupertinoAdaptiveTextSelectionToolbar.buttonItems) or draw its own.itemsis the Paste item (its label from its ContextMenuButtonType, in the app's language); pressing it pastes and closes the menu. -
DesignOtpLayoutBuilder
= Widget Function(BuildContext context, List<
Widget> slots) - Lays out the boxes (a row; a look may put a dash in the middle).
- DesignOtpSlotBuilder = Widget Function(BuildContext context, DesignOtpSlot slot)
- Paints one box.
- DesignOverlayAnchorBuilder = Widget Function(BuildContext context, DesignOverlayAnchor anchor)
- Paints the anchor.
- DesignOverlaySurfaceBuilder = Widget Function(BuildContext context, DesignOverlayInfo info)
- Paints the surface.
- DesignPaletteLayoutBuilder = Widget Function(BuildContext context, Widget field, Widget results)
- A palette's list, as DesignCommandPalette.layoutBuilder lays it out.
- DesignPieChartBuilder = Widget Function(BuildContext context, DesignPieChartDetails details)
- Draws a pie chart from its details.
-
DesignPressableBuilder
= Widget Function(BuildContext context, Set<
WidgetState> states, Widget? child) -
Builds a pressable's face for its current
states(hovered, focused, pressed, disabled, selected, error).childis the pressable's own child, passed through so a face that does not change with state is built once. - DesignRatingItemBuilder = Widget Function(BuildContext context, DesignRatingItemDetails details)
- Paints one item of a rating.
-
DesignRatingLayoutBuilder
= Widget Function(BuildContext context, List<
Widget> items) -
Lays out a rating's
items, in reading order. - DesignScrollbarBuilder = Widget Function(BuildContext context, DesignScrollThumb thumb)
- Paints a scrollbar's thumb or track.
- DesignSearchErrorBuilder = Widget Function(BuildContext context, DesignSearchError error)
-
Paints a failed search (
error) in the list's surface. - DesignSwipeActionBuilder = Widget Function(BuildContext context, DesignSwipeAction action, DesignSwipeActionDetails details)
- Paints an action.
- DesignTabBuilder = Widget Function(BuildContext context, DesignTab tab, DesignTabDetails details)
- Paints a tab.
- DesignTabIndicatorBuilder = Widget Function(BuildContext context, DesignTabIndicatorDetails details)
- Paints the indicator, laid out in DesignTabIndicatorDetails.rect.
-
DesignTableHeaderBuilder<
R> = Widget Function(BuildContext context, DesignTableColumn< R> column, DesignSortDirection? sort, Set<WidgetState> states) - A sortable header, as DesignDataTable.headerBuilder gets it.
-
DesignTagBuilder<
T> = Widget Function(BuildContext context, T value, DesignTagDetails tag) - Paints one tag.
-
DesignTagLayoutBuilder
= Widget Function(BuildContext context, List<
Widget> tags, Widget field) - Lays out the tags and the field (a wrap, by default).
- DesignToastBuilder = Widget Function(BuildContext context, DesignToastDetails details)
- Paints one toast.
-
DesignToastStackBuilder
= Widget Function(BuildContext context, List<
Widget> toasts) - Lays out the shown toasts, oldest first.
-
DesignToggleItemBuilder<
T> = Widget Function(BuildContext context, T value, Set< WidgetState> states) -
Builds an item's face for its
states(selected, focused while the keyboard is on it, hovered, pressed, disabled). - DesignWheelColumnBuilder = Widget Function(BuildContext context, DesignWheelColumnDetails details, Widget wheel)
-
Frames one column of a DesignWheelPicker round its
wheel. - DesignWheelItemBuilder = Widget Function(BuildContext context, DesignWheelItemDetails details)
- Builds one row of a DesignWheelPicker.