metro_ui library
A Flutter implementation of Microsoft's Windows 8 Modern UI design language.
Classes
- AnimatedMetroTheme
- Animates changes between complete Metro themes.
- MetroBackButton
- The circular Windows 8 navigation back button.
- MetroBackButtonStyle
- Stateful visual properties for a MetroBackButton.
- MetroBackButtonTheme
- Overrides back-button styling for a subtree.
- MetroBackButtonThemeData
- Application-level styling for Metro navigation back buttons.
- MetroButton
- A rectangular, zero-radius button with Metro interaction states.
- MetroButtonStyle
- Visual properties for a MetroButton.
- MetroButtonTheme
- Overrides button styling for a subtree.
- MetroButtonThemeData
- Theme overrides for standard and accented Metro buttons.
- MetroCheckBox
- A binary or tri-state square Metro check box.
- MetroCheckBoxTheme
- Overrides check-box styling for a subtree.
- MetroCheckBoxThemeData
- Application-level check-box theme values.
- MetroColors
- The high-saturation color palette commonly associated with Modern UI.
- MetroColorScheme
- Semantic colors used by Metro UI widgets.
-
MetroComboBox<
T extends Object> - A controlled, keyboard-navigable Metro drop-down selection field.
-
MetroComboBoxItem<
T extends Object> - Immutable value, content, and availability metadata for a combo-box item.
- MetroComboBoxStyle
- Visual, sizing, and popup-layout overrides for MetroComboBoxTheme.
- MetroComboBoxTheme
- Overrides combo-box styling for a subtree.
- MetroComboBoxThemeData
- Application-level theme values for Metro combo boxes.
- MetroCommandBar
- A high-contrast bottom bar for page-level commands.
- MetroCommandBarLayer
- Places a command bar over content using the Windows 8 AppBar interaction.
- MetroCommandBarTheme
- Applies command-bar theme overrides to a subtree.
- MetroCommandBarThemeData
- Theme values shared by a Metro bottom command bar and its command buttons.
- MetroCommandButton
- A Windows 8-style AppBar command with a circular glyph and a text label.
- MetroCommandButtonStyle
- Stateful visual properties for a MetroCommandButton.
-
MetroDataGrid<
T extends Object> - A flat, keyboard-navigable Modern UI data grid.
-
MetroDataGridColumn<
T extends Object> - Describes one fixed- or flexible-width data-grid column.
- MetroDataGridSort
- Controlled sort state for a MetroDataGrid.
- MetroDataGridStyle
- Visual and measurement overrides for Metro data grids.
- MetroDataGridTheme
- Overrides data-grid styling for a subtree.
- MetroDataGridThemeData
- Application-level data-grid theme values.
- MetroDatePicker
- A segmented Modern UI date field that opens a three-column picker.
- MetroDatePickerState
- State exposed so applications can open a keyed MetroDatePicker.
- MetroDialog
- A square, typography-led dialog surface for use with showMetroDialog.
- MetroDialogTheme
- Overrides Metro dialog styling for a subtree.
- MetroDialogThemeData
- Visual and route-barrier values for Metro dialogs.
- MetroFlipView
- A Windows 8-style single-item viewer with direct swipe navigation.
- MetroFlipViewItem
- Content, optional banner, and accessible label for one FlipView page.
- MetroFlipViewStyle
- Visual and measurement overrides for MetroFlipViewTheme.
- MetroFlipViewTheme
- Overrides FlipView styling for a subtree.
- MetroFlipViewThemeData
- Application-level theme values for Metro FlipView controls.
- MetroFlyout
- Content surface for a Windows 8-style edge flyout.
- MetroFlyoutTheme
- Overrides Metro flyout styling for a subtree.
- MetroFlyoutThemeData
- Visual, sizing, and route-barrier values for Metro flyouts.
- MetroFocusTraversalGroup
- Groups controls under a persistent focus scope with Metro-friendly edge behavior.
- MetroIconButton
- An accessible square Metro button for an icon or other compact glyph.
- MetroListTile
- A flat, keyboard-accessible row for primary and secondary content.
- MetroListTileStyle
- Visual and measurement overrides for Metro list tiles.
- MetroListTileTheme
- Overrides list-tile styling for a subtree.
- MetroListTileThemeData
- Application-level list-tile theme values.
- MetroLiveTile
- A Windows 8-inspired tile that cycles through notification content.
- MetroLiveTileFrame
- One notification-like content frame shown by a MetroLiveTile.
- MetroLocalizations
- Localized defaults used by Metro UI controls.
- MetroLocalizationsEn
- Built-in English defaults for Metro controls.
- MetroLocalizationsZh
- Built-in Simplified Chinese defaults for Metro controls.
- MetroMotion
- Motion tokens shared by Metro UI components.
-
MetroNumberBox<
T extends num> - A controlled numeric text field with inline Metro step buttons.
- MetroNumberBoxStyle
- Visual and sizing overrides for MetroNumberBoxTheme.
- MetroNumberBoxTheme
- Overrides number-box styling for a subtree.
- MetroNumberBoxThemeData
- Application-level theme values for Metro number boxes.
- MetroPage
- A Metro page surface with generous whitespace and an optional large title.
-
MetroPageRoute<
T> - A theme-capturing route with Windows 8-inspired navigation transitions.
- MetroPickerStyle
- Visual and measurement overrides for segmented picker fields.
- MetroPickerTheme
- Overrides date and time picker styling for a subtree.
- MetroPickerThemeData
- Application-level values shared by date and time pickers.
- MetroPivot
- Horizontal, swipeable navigation modeled after the Windows 8 Pivot.
- MetroPivotItem
- One header/content pair displayed by a MetroPivot.
- MetroPivotTheme
- Overrides Pivot typography and spacing for a subtree.
- MetroPivotThemeData
- Typography and spacing values used by MetroPivot.
- MetroProgressBar
- A determinate bar or Windows 8-style five-dot progress indicator.
- MetroProgressBarTheme
- Overrides progress-bar theme values for a subtree.
- MetroProgressBarThemeData
- Theme values for Metro progress bars.
- MetroProgressRing
- A five-dot Metro activity indicator, or a determinate circular indicator when value is supplied.
- MetroProgressRingTheme
- Overrides progress-ring theme values for a subtree.
- MetroProgressRingThemeData
- Theme values for Metro progress rings.
-
MetroRadioButton<
T> - A circular single-choice control with optional shared selection state.
- MetroRadioButtonTheme
- Overrides radio-button styling for a subtree.
- MetroRadioButtonThemeData
- Application-level radio-button theme values.
- MetroRangeSlider
- A two-thumb Modern UI slider. The selected segment can also be dragged.
- MetroRangeValues
- An immutable pair of ordered values used by MetroRangeSlider.
-
MetroSearchBox<
T extends Object> - A Windows 8-style search field with query submission and suggestions.
-
MetroSearchBoxItem<
T extends Object> - Immutable value, query text, content, and availability for one suggestion.
- MetroSearchBoxStyle
- Visual, sizing, and suggestion-popup overrides for MetroSearchBoxTheme.
- MetroSearchBoxTheme
- Overrides search-box styling for a subtree.
- MetroSearchBoxThemeData
- Application-level theme values for Metro search boxes.
-
MetroSelectableListTile<
T> - A MetroListTile bound to a MetroSelectionController.
-
MetroSelectionController<
T> - Mutable selection state shared by Metro selection controls.
- MetroSelectionControlStyle
- Visual and measurement overrides shared by check boxes and radio buttons.
-
MetroSelectionGroup<
T> - Provides a selection controller to descendant Metro controls.
- MetroSemanticZoom
- Switches between detailed and summarized views of the same information.
- MetroSemanticZoomStyle
- Visual and measurement overrides for MetroSemanticZoomTheme.
- MetroSemanticZoomTheme
- Overrides semantic-zoom styling for a subtree.
- MetroSemanticZoomThemeData
- Application-level styling for Metro semantic zoom controls.
- MetroSlider
- A Windows 8-style slider with a narrow rectangular thumb.
- MetroSliderStyle
- Visual properties shared by MetroSliderTheme slider controls.
- MetroSliderTheme
- Overrides slider styling for a subtree.
- MetroSliderThemeData
- Application-level theme values shared by Metro sliders.
- MetroSpacing
- Four-pixel spacing scale used by Metro UI components.
- MetroTextField
- A flat, square text input built on Flutter's native EditableText.
- MetroTextFieldStyle
- Visual overrides for Metro text fields.
- MetroTextFieldTheme
- Overrides text-field styling for a subtree without replacing the complete application theme.
- MetroTextFieldThemeData
- Application-level text-field theme values.
- MetroTextFormField
- A MetroTextField integrated with Flutter's Form validation lifecycle.
- MetroTheme
- Applies MetroThemeData to descendant Metro UI widgets.
- MetroThemeData
- Complete set of visual and motion tokens consumed by Metro UI widgets.
- MetroTile
- A signature Modern UI tile with optional location-aware press tilt.
- MetroTileGrid
- A responsive wrapping layout for square and wide Metro tiles.
- MetroTileStyle
- Visual properties for a MetroTile.
- MetroTileTheme
- Overrides tile styling and grid metrics for a subtree.
- MetroTileThemeData
- Application-level tile style, extent, and spacing values.
- MetroTime
- Immutable wall-clock time independent of a calendar date or time zone.
- MetroTimePicker
- A segmented Modern UI time field that opens scrolling time columns.
- MetroTimePickerState
- State exposed so applications can open a keyed MetroTimePicker.
- MetroToggleSwitch
- A square-edged on/off control with keyboard and assistive semantics.
- MetroToggleSwitchStyle
- Visual properties for MetroToggleSwitch.
- MetroToggleSwitchTheme
- Overrides toggle-switch styling for a subtree.
- MetroToggleSwitchThemeData
- Application-level toggle-switch theme values.
- MetroTooltip
- A square Metro tooltip shown by hover, descendant focus, or long press.
- MetroTooltipTheme
- Overrides Metro tooltip styling for a subtree.
- MetroTooltipThemeData
- Visual, timing, and placement values for Metro tooltips.
- MetroTypography
- Type ramp modeled after the typography-led hierarchy of Modern UI.
Enums
- MetroButtonVariant
- Visual emphasis used by a MetroButton.
- MetroCommandBarAlignment
- Logical alignment of commands within a MetroCommandBar.
- MetroCommandBarPlacement
- Screen edge used by a MetroCommandBarLayer.
- MetroDataGridSortDirection
- Direction reported by a sortable data-grid column.
- MetroDatePickerField
- Date segment shown by a Metro date field or picker wheel.
- MetroDayPeriod
- Day period used by a twelve-hour Metro time picker.
- Controls when FlipView previous and next buttons are displayed.
- MetroFlyoutSide
- Logical screen edge used by showMetroFlyout.
- MetroHourFormat
- Hour representation used by a Metro time picker.
- MetroLiveTileTransition
- Face-change recipe used by a MetroLiveTile.
- MetroNumberBoxInvalidInputBehavior
- Controls how committed text that cannot be parsed is handled.
- MetroPageTransition
- Motion recipe used by MetroPageRoute.
- MetroSearchBoxChangeReason
- Why the visible query in a MetroSearchBox changed.
- MetroSelectionMode
- Cardinality policy used by a MetroSelectionController.
- MetroSliderTickPlacement
- Controls where slider tick marks are painted relative to the track.
- MetroTextFieldValidationState
- Validation feedback shown by a MetroTextField.
- MetroTileSize
- Standard square or double-width Metro tile geometry.
Functions
-
metroDatePickerFieldOrderForLocale(
Locale? locale) → List< MetroDatePickerField> - Returns a practical date-field order for a locale without requiring intl.
-
showMetroDatePicker(
{required BuildContext context, required DateTime initialDate, required DateTime firstDate, required DateTime lastDate, List< MetroDatePickerField> ? fieldOrder, Map<MetroDatePickerField, int> ? fieldFlex, bool showMonth = true, bool showDay = true, bool showYear = true, MetroDatePartFormatter? monthFormatter, MetroDatePartFormatter? dayFormatter, MetroDatePartFormatter? yearFormatter, String? title, String? monthLabel, String? dayLabel, String? yearLabel, String? confirmLabel, String? cancelLabel}) → Future<DateTime?> - Shows a Metro date dialog and returns the confirmed date.
-
showMetroDialog<
T extends Object?> ({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = false, String? barrierLabel, Color? barrierColor, bool dismissOnEscape = true, RouteSettings? routeSettings, bool? requestFocus}) → Future< T?> - Shows a flat Metro dialog without depending on Material widgets.
-
showMetroFlyout<
T extends Object?> ({required BuildContext context, required WidgetBuilder builder, MetroFlyoutSide side = MetroFlyoutSide.end, bool barrierDismissible = false, String? barrierLabel, Color? barrierColor, bool dismissOnEscape = true, RouteSettings? routeSettings, bool? requestFocus}) → Future< T?> - Shows a full-height Metro panel from a logical screen edge.
-
showMetroTimePicker(
{required BuildContext context, required MetroTime initialTime, MetroHourFormat hourFormat = MetroHourFormat.twelveHour, int minuteIncrement = 1, MetroTimePartFormatter? hourFormatter, MetroTimePartFormatter? minuteFormatter, MetroDayPeriodFormatter? periodFormatter, String? title, String? hourLabel, String? minuteLabel, String? periodLabel, String? confirmLabel, String? cancelLabel, String? anteMeridiemLabel, String? postMeridiemLabel}) → Future< MetroTime?> - Shows a Metro time dialog and returns the confirmed wall-clock time.
Typedefs
-
MetroComboBoxSelectedItemBuilder<
T extends Object> = Widget Function(BuildContext context, MetroComboBoxItem< T> item) - Builds the closed-field presentation for a selected combo-box item.
-
MetroDataGridCellBuilder<
T extends Object> = Widget Function(BuildContext context, T row, int rowIndex) -
Builds one cell for
rowatrowIndex. -
MetroDataGridRowKeyBuilder<
T extends Object> = Object Function(T row) - Returns the stable identity used to retain row focus across data changes.
-
MetroDataGridRowSemanticLabelBuilder<
T extends Object> = String Function(T row, int rowIndex) - Builds the accessible label for a complete data-grid row.
- MetroDatePartFormatter = String Function(BuildContext context, int value)
- Formats one month, day, or year value in a Metro date picker.
- MetroDayPeriodFormatter = String Function(BuildContext context, MetroDayPeriod period)
- Formats an AM/PM period in a Metro time picker.
-
MetroNumberBoxFormatter<
T extends num> = String Function(T? value) - Formats a nullable numeric value for a MetroNumberBox.
-
MetroNumberBoxParser<
T extends num> = T? Function(String text) - Parses committed text for a MetroNumberBox.
-
MetroSearchBoxFilter<
T extends Object> = bool Function(String query, MetroSearchBoxItem< T> item) - Decides whether a search suggestion matches the current query.
- MetroSearchBoxQueryChanged = void Function(String query, MetroSearchBoxChangeReason reason)
- Reports a search query together with the reason it changed.
- MetroSliderValueFormatter = String Function(double value)
- Formats a slider value for assistive technologies.
- MetroTimePartFormatter = String Function(BuildContext context, int value)
- Formats an hour or minute value in a Metro time picker.