optimus library

Classes

DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
Determinate
DialogController
DialogWrapper
DialogWrapperData
FieldWrapper
Indeterminate
ListDropdownTile<T>
NestedCheckboxData
OptimusAvatar
OptimusBadge
Badges are meant to give a subtle feedback about some state change. Typically used with buttons, tabs and icons.
OptimusBanner
Contextual banners display a notification relevant to a specific part of the system.
OptimusBrandColors
Brand colors
OptimusButton
Buttons are an element that let users trigger or perform an action. Button labels should inform users about what will happen upon interaction.
OptimusCaption
Captions provide a concise explanation of certain elements. Captions are most effective when they give new information to the user rather than describing the obvious.
OptimusCard
A card is a container that groups related pieces of information. It is intended as a short, linked representation of a conceptual unit.
OptimusCardChildPadding
OptimusCategoricalTag
Tags that are meant to help arrange information into distinct categories. Color option does not carry any semantic meaning. Color could be swapped without causing any effect on the tag's meaning.
OptimusChat
The chat components offer instant real-time communication between two (or multiple) parties. It also serves as a log or transcript of past conversations. Individual chat components assemble into a chat window layout.
OptimusChatBubble
Chat bubble component offers single configurable bubble. The main use of this widget is in OptimusChat widget but it can be used also stand-alone.
OptimusCheckbox
A checkbox is a binary form of input and is used to let a user select one or more options for a limited number of choices. Each selection is independent (with exceptions). If tristate is enabled, checkbox can be in three states: checked, unchecked and indeterminate.
OptimusCheckBoxFormField
OptimusCheckboxGroup<T>
Group of checkboxes with the same label and error messages.
OptimusChip
Chips are a visual representation of a keyword or phrase that the user has used for purposes of filtering the scope of content displayed in the application interface at any given time.
OptimusCircleLoader
The loader gives the user immediate feedback of the action or event being processed and in progress. It shows the events like processing, uploading, or downloading, and others.
OptimusCircleLoaderVariant
OptimusColors
OptimusCompactStepBar
The compact version of the OptimusStepBar that is using a modified vertical layout that can be expanded and collapsed.
OptimusDarkColors
OptimusDateInputField
A FormField meant to be used for the user to enter a date.
OptimusDateInputFormField
OptimusDateTimeField
OptimusDateTimeFormField
OptimusDialog
A dialog is an overlay on top of a main page which lets a user perform a short term task without losing the context of the underlying page.
OptimusDialogAction
OptimusDialogContentPadding
OptimusDivider
Divider is a visual representation of a separation between two areas.
OptimusDropdown<T>
OptimusDropDownButton<T>
Dropdown buttons trigger a dropdown menu with more actions related to the context of the button.
OptimusDropdownEmbeddedSearch
An embedded search that is designed to be used inside the dropdown menu. Is styled to be in line with the default dropdown list items. Will call for the focus on display.
OptimusDropdownGroupSeparator
OptimusDropdownTile<T>
OptimusEnabled
OptimusExpansionTile
A single-line ListTile with a trailing button that expands or collapses the tile to reveal or hide the children.
OptimusFonts
OptimusGroupItem<T>
Used with grouped items such as OptimusRadioGroup, OptimusCheckboxGroup and OptimusSegmentedControl.
OptimusHighlightMajor
Highlights are used to emphasize specific parts of the content that need to stand out from the rest. Highlights serve as a guide when users skim through the content, searching for relevant information, such as price or dates.
OptimusHighlightMinor
Highlights are used to emphasize specific parts of the content that need to stand out from the rest. Highlights serve as a guide when users skim through the content, searching for relevant information, such as price or dates.
OptimusHighlightModerate
Highlights are used to emphasize specific parts of the content that need to stand out from the rest. Highlights serve as a guide when users skim through the content, searching for relevant information, such as price or dates.
OptimusIcon
Icons are symbols that provide a visual representation of meaning in situations where text is not enough or we want to emphasize its impact.
OptimusIconButton
When you don’t have enough space for regular buttons, or the action is clear enough, you can use an icon button without text.
OptimusIconList
The icon list component serves as a static, non-interactable option and is used when you need to show an icon with a label and/or optional description.
OptimusIconListItem
Data that is provided to OptimusIconList.
OptimusIcons
OptimusInlineDialog
A dialog that is anchored to a specific widget.
A link widget that is used to display a link inside the body of text.
OptimusInputField
General input, used to allow users to enter data into the interface.
OptimusInputFormField
OptimusLabel
Labels are informative text that describes the function or purpose of an element. Labels are usually actionless and should always be visible in the interface. Precise labels contribute to a more convenient experience.
OptimusLabelSmall
Labels are informative text that describes the function or purpose of an element. Labels are usually actionless and should always be visible in the interface. Precise labels contribute to a more convenient experience.
OptimusLightColors
OptimusListTile
Lists are vertically organized groups of data. Optimized for reading comprehension, a list consists of a single continuous column of rows, with each row representing a list item (in some cases on bigger viewports it could use a multi-column layout).
OptimusMessage
OptimusMessageAuthor
Mews Logo component with clearly defined margins, size and color options.
OptimusNavListTile
Lists are vertically organized groups of data. Optimized for reading comprehension, a list consists of a single continuous column of rows, with each row representing a list item (in some cases on bigger viewports it could use a multi-column layout). OptimusNavListTile is meant to be used an a tile, which contains some interactable element, e.g. tile which leads to the new screen.
OptimusNestedCard
A card is a container that groups related pieces of information. It is intended as a short, linked representation of a conceptual unit.
OptimusNestedCheckbox
A checkbox that is a part of a OptimusNestedCheckboxGroup. It is a wrapper around OptimusCheckbox that overrides it's isEnabled property with the value from the parent checkbox group.
OptimusNestedCheckboxGroup
Group of checkboxes with a parent checkbox, which displays the current state of its children. Clicking on the parent checkbox will change the state of all its children.
OptimusNotification
Notification is used for showing a brief and concise message that communicates immediate feedback with optional action included. Notifications are noticeable but not intrusive to the use and can be temporary.
The notification link with custom action.
OptimusNotificationManager
OptimusNotificationsOverlay
OptimusNotificationsOverlay is an overlay that wraps child inside a stack and provides a method to show an in-app notification.
OptimusNumberPickerFormField
OptimusPageTitle
Titles provide a content hierarchy in any interface. These should be concise, precise, and easily scannable to deliver essential information quickly.
OptimusParagraph
Paragraphs are blocks of text that group related content concerning one topic or idea.
OptimusParagraphSmall
Paragraphs are blocks of text that group related content concerning one topic or idea.
OptimusRadio<T>
The radio is a binary form of input used in a list of mutually exclusive options. Users can make only one selection in a list at any given time.
OptimusRadioGroup<T>
OptimusScrollConfiguration
Removes platform native animations from scroll.
OptimusSearch<T>
An input field with a dropdown menu. items are displayed in the dropdown and could be filtered to show only matching items.
OptimusSectionTitle
Titles provide a content hierarchy in any interface. These should be concise, precise, and easily scannable to deliver essential information quickly.
OptimusSegmentedControl<T>
Segmented Control is a set of two or more segments, that provide closely related choices that affect an object, state, or view.
OptimusSelect<T>
OptimusSelectFormField<T>
OptimusSelectInput<T>
Select allows users to enter or select one or multiple options from the list of available options.
OptimusSelectInputFormField<T>
OptimusSemanticColors
Semantic Colors
OptimusSlidable
OptimusSlideAction
OptimusSplitButton<T>
Split buttons have a main action and a dropdown action. The main action is on the left. An arrow on the right opens a dropdown menu with more actions related to the main action.
OptimusStack
Use Stacks when you need to lay out components by choosing either a horizontal or vertical axis.
A link widget that is used to display a link on its own, not a part of the body of the text. Can be paired with an icon if it links somewhere external.
OptimusStepBar
Step-bars are used to communicate a sense of progress visually through a sequence of either numbered or logical steps.
OptimusStepBarItem
OptimusSubsectionTitle
Titles provide a content hierarchy in any interface. These should be concise, precise, and easily scannable to deliver essential information quickly.
OptimusSubtitle
Titles provide a content hierarchy in any interface. These should be concise, precise, and easily scannable to deliver essential information quickly.
OptimusSupplementaryIcon
Icons are symbols that provide a visual representation of meaning in situations where text is not enough or we want to emphasize its impact.
OptimusTab
OptimusTabBar
OptimusTag
Tags are used to highlight an item’s status or make it easier to recognize certain items in data-dense content. For system-specific feedback with semantic significance use OptimusTag. For data-dense content, where representation isn't carrying semantic significance use OptimusCategoricalTag.
OptimusTheme
OptimusThemeData
OptimusToggle
The toggle component serves as a visual representation of a binary choice, providing users with a clear way to control settings, preferences, or switch between different views. With its ability to instantly communicate changes and offer immediate feedback, the toggle component greatly enhances usability and interactivity.
OptimusTokens
OptimusTooltip
Tooltip displays contextual content upon the click or focus of a UI trigger element. Tooltip's content should be contextual, helpful, and nonessential while providing that extra ability to communicate and give clarity to a user.
OptimusTooltipWrapper
Wrapper for the OptimusTooltip widget. It is responsible for showing and hiding the tooltip. Will try to position the tooltip depending on the available space.
OptimusWideBanner
System-wide banners display critical notifications about the state of the entire system.
StepBarItem
StepBarItemIconIndicator
StepBarItemNumberIndicator
StepBarSpacer
TileBorders

Enums

Breakpoint
FontVariant
Font variant used for the tile. Will be set to FontVariant.normal, if not provided. FontVariant.normal - default typography preset FontVariant.bold - bold typography preset
MessageAlignment
MessageColor
MessageState
OptimusBannerVariant
OptimusBasicCardVariant
OptimusButtonVariant
OptimusCardAttachment
OptimusCardSpacing
OptimusCategoricalColorOption
Color options are designed so they won't carry any semantic meaning. Could be used in any case when displaying categorical data.
OptimusCheckboxSize
The Checkbox + Label component is available in two size variants to accommodate different environments with different requirements.
OptimusCircleLoaderAppearance
OptimusCircleLoaderSize
OptimusColorOption
OptimusDialogPosition
The position of a dialog is determined by functionality.
OptimusDialogSize
OptimusDialogType
OptimusDropdownButtonVariant
OptimusIconColorOption
OptimusIconListSize
OptimusIconSize
OptimusInputErrorVariant
The way of displaying the error message.
OptimusLinkVariant
Variant of the link. OptimusLinkVariant.primary - will use indigo as a base color. OptimusLinkVariant.basic - will use the bare (grey) color as its base.
OptimusMewsLogoAlignVariant
Mews logo alignment.
OptimusMewsLogoColorVariant
Mews logo color.
OptimusMewsLogoSizeVariant
Mews logo size.
OptimusMewsLogoVariant
Mews logo variant.
OptimusNestedCardVariant
OptimusNotificationPosition
The position of the notifications.
OptimusNotificationVariant
Describes a certain type of notification with its semantical meaning.
OptimusRadioSize
The radio component is available in two size variants to accommodate different environments with different requirements.
OptimusSplitButtonVariant
OptimusStackAlignment
OptimusStackDistribution
OptimusStackSpacing
OptimusStandaloneLinkSize
Standalone links are available in two size options to accommodate various environments with different requirements.
OptimusStepBarItemState
Both types of step have dedicated states. State is shown through a visual change in the step indicator and in the divider between steps. All of this forms a visual distinction between the finished and unfinished part of a process.
OptimusStepBarType
OptimusTooltipPosition
OptimusToolTipSize
OptimusWideBannerVariant
OptimusWidgetSize
TileSize
Variation

Mixins

ThemeGetter<T extends StatefulWidget>

Functions

createOptimusMaterialTheme(Brightness brightness) ThemeData
showOptimusDialog<T>({required BuildContext context, required Widget title, Widget? content, ContentWrapperBuilder? contentWrapperBuilder, List<OptimusDialogAction> actions = const [], OptimusDialogSize size = OptimusDialogSize.regular, OptimusDialogType type = OptimusDialogType.common, bool isDismissible = true, bool useRootNavigator = true}) Future<T?>
isDismissible – If a dialog contains a close icon, it can also be closed by clicking on background layer. Otherwise, only by buttons.

Typedefs

ContentWrapperBuilder = Widget Function(BuildContext context, Widget child)
CurrentValueBuilder<T> = Widget Function(BuildContext context, T value)
DateTimeFormatter = String Function(DateTime value)
FormatDate = String Function(DateTime value)
FormatTime = String Function(DateTime value)
GroupBuilder = Widget Function(String value)
Grouper<T> = String Function(T item)
TryAgainCallback = Future<MessageState> Function(OptimusMessage message)
ValueBuilder<T> = String Function(T value)