chico_kit library
Chico Kit — helpers that cut boilerplate on top of Chico UI.
Everyday app glue: context shortcuts, forms, formatters, async, cache,
platform, and more — Flutter SDK + chico_ui only (no plugins).
import 'package:chico_kit/chico_kit.dart';
await context.submitForm(formKey, action: save, successMessage: 'Saved');
context.showToast('Saved');
Re-exports package:chico_ui/chico_ui.dart so one import is enough.
Classes
- ChicoActionSheet
- iOS-style action list that slides up from the bottom.
- ChicoAdaptiveScaffold
- ChicoScaffold that swaps ChicoBottomNav and ChicoRail at breakpoint (defaults to ChicoBreakpoint.md).
- ChicoApp
- Root widget for a Chico application.
- ChicoAsync
-
Runs
taskand shows ChicoBusy viashowBusy/hideBusycallbacks. -
ChicoAsyncBuilder<
T> - Loads future once and builds loading / data / error UI.
- ChicoAutocomplete
- Text field that filters options and opens a ChicoMenu of matches.
- ChicoAvatar
- Circular identity mark. Pass child for a photo, or initials / use ChicoAvatar.name to derive letters from a display name.
- ChicoAvatarStack
-
Overlapping row of avatars. Extra people collapse into a
+Nmark. - ChicoBadge
- Count pill, custom label, or a dot. Overlay it on child (avatar, icon) or use it standalone.
- ChicoBanner
- Inline notice. Not a toast — it lives in the page flow.
- ChicoBar
- Compact navigation chrome. Centered title, start leading, end trailing. Hairline under the bar. No shadow.
- ChicoBarButton
- Tint icon or label for ChicoBar slots. No fill — it reads as system chrome, not a button.
- ChicoBidi
-
Unicode first-strong bidi helper. No
intldependency. - iOS-style tab bar. Equal-width items, hairline on top, tint when selected.
- ChicoBreadcrumb
- Horizontal trail of tappable segments. The last item is the current page and is not interactive.
- ChicoBreadcrumbs
- Compact breadcrumb trail.
- ChicoBreakpoints
- Default breakpoint widths. Override via ChicoThemeData.breakpoints.
-
ChicoBus<
T> - Tiny typed pub/sub for in-app events (not for cross-isolate work).
- ChicoBusSubscription
- Cancel handle from ChicoBus.listen / ChicoChannels.on.
- ChicoBusy
- Blocking overlay with a spinner. Call hide when the task finishes.
- ChicoButton
- A labeled control. Defaults are enough:
-
ChicoCache<
V> - In-memory cache with optional TTL. Not persisted — no plugins.
- ChicoCard
- Grouped surface: fill, hairline, small radius. No drop shadow.
- ChicoCarousel
- Horizontal pager with optional ChicoPageControl dots.
- ChicoChannels
- Named typed channels shared across the app.
- ChicoCheckbox
- Binary check control. Pass label to make the whole row tappable.
- ChicoChip
- Compact pill for filters, tags, and choices.
- ChicoClipboard
- Clipboard helpers (Flutter SDK only — no plugins).
- ChicoCodec
-
Encoding helpers (
dart:convertonly). - ChicoColors
- Semantic color roles for light and dark interfaces.
- ChicoColumn
- Vertical stack with a gap between children.
- ChicoCompact
-
Compact counts (
999,1.2k,3.4M). - ChicoContextMenu
- Long-press / right-click wrapper that opens a ChicoMenu.
- ChicoDatePicker
- Month calendar. Prefer show to present it in a sheet.
- ChicoDateRange
-
Inclusive start/end pair for ChicoDatePicker.range /
showRange. - ChicoDebouncer
-
Debounces calls so
actionruns once after duration of quiet. - ChicoDialog
- Centered modal card. Prefer show over placing this in a page.
- ChicoDialogAction
- One action in a ChicoDialog. Tapping it pops the route with result.
- ChicoDisclosure
- Expandable block. The header is always visible; child animates open.
- ChicoDivider
- Hairline rule. No shadow, no thickness token beyond one device pixel.
- ChicoEmptyState
- Centered placeholder when a list or screen has nothing to show.
-
ChicoErr<
T> - Failed ChicoResult.
- ChicoForm
- Kit Form wrapper. Use FormState.validate via formKey or ChicoForm.maybeOf.
- ChicoFormat
- Lightweight string / number / date formatters (no locale plugins).
- ChicoFormatters
- Common TextInputFormatters for fields (Flutter SDK only).
- ChicoGap
- Empty space along the parent Flex axis.
- ChicoGlyph
- Vector glyph painted at size.
- ChicoGrid
- Adaptive tile grid. Column count follows breakpoints unless columns is set: 2 on phone, 3 from ChicoBreakpoint.md, 4 from ChicoBreakpoint.lg.
- ChicoHaptics
- Thin wrappers around HapticFeedback. No-ops on platforms without a taptic engine.
- ChicoHitTarget
- Minimum interactive size (Apple HIG).
- ChicoIconButton
- Icon-only control with a 44pt hit target.
- ChicoImage
- Image with a ChicoSkeleton until the first frame, and an optional error placeholder.
- ChicoIndexedList
- ChicoStickyList with an A–Z rail on the end edge. Tapping a letter scrolls that section into view.
- ChicoLargeTitle
- Compact bar plus a large start-aligned title that lives in the scroll view. The compact title fades in as the large title scrolls away.
- ChicoLink
- Inline text action. Looks like a system link (tint, no underline).
-
ChicoListen<
T> - Short ValueListenableBuilder for one listenable.
- ChicoListSection
- Settings-style grouped list: caption, rounded card, optional footer.
- ChicoListTile
- One row in a grouped list. Leading, title, subtitle, trailing, optional chevron. Min height 44pt. Tapping the row calls onPressed.
- ChicoLoadMore
- Footer for paged lists. Shows a spinner while loading, otherwise a control that calls onPressed.
- ChicoLocales
- Locale helpers for kit-wide RTL.
- ChicoLocalizations
- Chrome copy for kit widgets (search, pickers, toolbars, …).
- ChicoLog
-
Debug-only logger. No-ops in release / profile unless
forceis true. - ChicoMedia
- Provides ChicoMediaData to descendants and rebuilds when the window or MediaQuery changes.
- ChicoMediaData
- Snapshot of window size, breakpoint, and scale factors.
- ChicoMenu
- Anchored action list. Prefer show over placing this in a page.
- ChicoMenuAction
- One row in a ChicoMenu. Tapping it pops the route with result and then calls onPressed if set.
- ChicoMotion
- Durations and curves shared by interactive widgets.
- One destination in a ChicoBottomNav.
- ChicoNumberField
-
Parsed numeric field. Empty input reports
null. -
ChicoOk<
T> - Successful ChicoResult.
- ChicoOnce
- Runs an action at most once until reset.
- ChicoOnceKey
- Named one-shot gates shared across the app.
- ChicoPad
- Directional padding that scales with the window.
- ChicoPage
- A screen body: background, safe area, readable max width, optional title.
- ChicoPageControl
- Page dots. Selected is tint; the rest use fill.
-
ChicoPagedList<
T> - Infinite list with pull-to-refresh and load-more footer.
-
ChicoPageRoute<
T> - Themed push. Slides from the end edge (flips in RTL). Set fullscreenDialog to slide up from the bottom.
- ChicoPaging
- Simple 1-based page state for lists / APIs.
- ChicoPinField
- One-time code / PIN boxes. Digits only.
- ChicoPlatform
- Platform / build-mode shortcuts (Flutter SDK only).
- ChicoPopover
- Anchored card for arbitrary content. Prefer show over placing this in a page.
- ChicoProgress
-
Horizontal progress track. Pass value 0–1 for determinate; omit it
(or pass
null) for an indeterminate sweep. -
ChicoRadio<
T> - Exclusive choice in a set. Compare value to groupValue.
- ChicoRadius
- Corner radii for the minimal system look.
- ChicoRail
- Vertical destinations for tablet and desktop. Reuses ChicoNavItem.
- ChicoRangeSlider
- Two-thumb range along a track. Flips in RTL.
- ChicoRating
- Star rating. Tap a star to set the value (1…max).
- ChicoRefresh
- Pull-to-refresh wrapper. Works with any vertical scrollable child.
- ChicoReorderableList
- Long-press (or handle) to drag rows into a new order.
- ChicoResponsive
- Builds different children from ChicoMedia breakpoints.
-
ChicoResult<
T> - Success or failure without throwing.
- ChicoRow
- Horizontal cluster with a gap between children.
- ChicoScaffold
- Screen chrome: optional rail, bar, expanding body, optional bottomNav.
- ChicoScrollbar
- Themed RawScrollbar using fill / label tokens. No Material scrollbar.
- ChicoSearch
- Rounded search well with a magnifying-glass glyph and a clear control.
-
ChicoSelect<
T> - Closed field that opens a ChicoMenu of options.
-
ChicoSelectOption<
T> - One choice in a ChicoSelect.
- ChicoSheet
- Modal panel that slides up from the bottom. Prefer show over placing this in a page. Drag the grabber down to dismiss. Pass detent for half / full snap points.
- ChicoShortcutItem
- One row in a ChicoShortcuts overlay.
- ChicoShortcuts
- Desktop-style keyboard cheat sheet. Prefer show over placing this in a page.
- ChicoSkeleton
- Pulsing placeholder for loading content.
- ChicoSlider
- Continuous value along a track. Flips in RTL (min on the end side).
- ChicoSpace
- 4-point spacing scale used by every Chico layout and control.
- ChicoSpinner
- Rotating activity indicator. Use while a short task has no known duration.
- ChicoSplitView
- Master-detail layout. Side-by-side from breakpoint up; one pane on compact widths.
- ChicoStatusPage
- Full-page empty / error / offline using ChicoEmptyState.
- ChicoStepIndicator
- Horizontal wizard steps. Completed marks use a check; the current step is tint-filled.
- ChicoStepper
- Integer quantity control: minus, value, plus.
- ChicoStickyGroup
- One pinned group in a ChicoStickyList.
- ChicoStickyList
- Grouped list whose section captions stay pinned while you scroll.
- ChicoStroke
- Border widths for the flat system look.
- ChicoSwipe
- Horizontal swipe toward the start reveals trailing actions (Mail-style).
- ChicoSwipeAction
- One trailing button revealed by ChicoSwipe.
- ChicoSwitch
- iOS-like toggle. Pass label to make the whole row tappable.
- ChicoTable
- Hairline data table. Strings only — compose widgets yourself for rich cells by wrapping the table, or pass formatted copy.
- ChicoTableColumn
- Column spec for ChicoTable.
- ChicoTabs
- iOS-style segmented control. Equal-width labels on a fill track; the selected segment uses the page background.
- ChicoTabView
- ChicoTabs plus an IndexedStack of pages.
- ChicoText
- Styled text that reads ChicoTheme and ChicoMedia.
- ChicoTextField
- Single-line or multiline field with auto writing direction.
- ChicoTextFormField
- ChicoTextField that participates in a ChicoForm / Form.
- ChicoTextSelectionControls
- Circular tint handles for EditableText.selectionControls.
- ChicoTextToolbar
- Cut / copy / paste / select-all chrome for EditableText.
- ChicoTheme
- Provides ChicoThemeData to descendants.
- ChicoThemeData
- Immutable visual configuration for a Chico tree.
- ChicoThrottler
-
Throttles calls so
actionruns at most once per duration. - ChicoTime
- Clock time independent of a calendar day.
- ChicoTimeAgo
-
Relative and compact time / number strings (no
intl). - ChicoTimePicker
- Hour / minute wheels. Prefer show to present them in a sheet.
- ChicoToast
- Short-lived status pill. Does not block input. Auto-hides.
- ChicoTokenField
- Chip row plus a field. Enter or a comma adds a token.
- ChicoTooltip
- Inverted caption that appears on long-press or hover.
- ChicoTypography
- Tokenized TextStyles without color.
- ChicoUnfocus
- Dismisses the software keyboard when the pointer lands outside the focused control.
- ChicoUri
- Query-string and Uri helpers without networking plugins.
- ChicoValidators
-
Common FormField validators. Return
nullwhen valid. - ChicoWidgetsLocalizations
- WidgetsLocalizations that set textDirection from the locale.
- ChicoWritingDirection
- Tracks writing direction for one focused field across keystrokes.
Enums
- ChicoBreakpoint
- Named window widths used by ChicoMedia and responsive layout widgets.
- ChicoButtonTone
- Color treatment for ChicoButton.
- ChicoControlSize
- Visual density for controls (buttons, fields, chips).
- ChicoGlyphKind
- Stroke glyphs for icon buttons. No icon font, so the kit stays independent of Material Icons.
- ChicoNumberStyle
- Digit, decimal, or currency input on top of ChicoTextField.
- ChicoSheetDetent
- Snap height for ChicoSheet.show when a detent is passed.
- ChicoTextRole
- Semantic color for ChicoText when ChicoText.color is omitted.
- ChicoTextVariant
- Type roles matching a condensed San Francisco scale.
- ChicoThemeMode
- How ChicoApp chooses between ChicoApp.theme and ChicoApp.darkTheme.
Extensions
- ChicoClipboardContextX on BuildContext
- Context shortcuts for clipboard + toast.
- ChicoContextX on BuildContext
- Context shortcuts for Chico chrome — toast, dialogs, sheets, navigation.
- ChicoDurationX on int
- Duration sugar for delays and timeouts.
- ChicoFormSubmitX on BuildContext
-
Validates a Form, runs
actionunder busy, toasts on success/error. -
ChicoIterableX
on Iterable<
E> - Common Iterable helpers without extra packages.
-
ChicoListX
on List<
E> - List mutation helpers that return a new list.
-
ChicoMapX
on Map<
K, V> - Map helpers.
- ChicoNullableStringX on String?
- Nullable string ergonomics.
- ChicoNumX on num
- Number ergonomics.
- ChicoResponsiveContextX on BuildContext
- Picks a value from breakpoints without building widgets.
- ChicoScrollControllerX on ScrollController
- Scroll helpers.
- ChicoStringX on String
- String ergonomics used in forms and lists.
- ChicoUriX on Uri
- Fluent Uri helpers.
Properties
- chicoTextSelectionControls → TextSelectionControls
-
Shared handles used by kit fields.
final
Functions
-
chicoAfterFrame(
VoidCallback callback) → void -
Runs
callbackafter the current frame.
Typedefs
- FormFieldStringValidator = String? Function(String? value)
- Signature used by ChicoValidators.