m3e_core library
Material 3 Expressive (M3E) components and utilities for Flutter.
This library provides a set of high-performance, expressive UI components that follow the Material 3 design system with enhanced animations and interactions.
Classes
- ButtonGroupParentData
- ParentData for items inside a M3EToggleButtonGroup.
- DismissibleSlot
- Lightweight bookkeeping for a single card's position and lifecycle in the list.
- M3EButton
- M3EButtonDecoration
- Styling overrides for M3EButton.
- M3EButtonGroupAlign
- A widget that controls how a child of a M3EToggleButtonGroup aligns itself along the cross axis.
- M3EButtonGroupItemScope
- Provides per-button positional data within the group.
- M3EButtonGroupScope
- Provides group-level configuration to every descendant button.
- M3EButtonMeasurements
- Material 3 Button Measurements
- M3EButtonSize
- Standard size variants that map to Material 3 Expressive tokens.
- M3EButtonTokensAdapter
- Material 3 Button Tokens Adapter
- M3ECard
- A Material 3 Expressive card widget with flexible corner radii and interaction.
- M3ECardColumn
- A Material 3 static card column with dynamically rounded corners.
- M3ECardList
- A Material 3 interactive card list with dynamically rounded corners.
- M3EChipStyle
- Visual styling for chips displayed in the field.
- M3EClipper
-
This class takes a
shapewhich contains an SVG path data string. It then parses this string into a Flutter Path object and scales it to fit the dimensions of the widget it is clipping. - M3EContainer
- A container widget that clips its child into a predefined shape.
- M3EDismissibleCardColumn
- A dismissible M3E card list backed by a Column — the simplest variant, ideal for small, fixed-size lists (menus, settings groups, etc.).
- M3EDismissibleCardList
- A dismissible M3E card list backed by ListView.builder — suitable for large or lazily-loaded data sets.
- M3EDismissibleCardStyle
- Immutable visual and interaction configuration for dismissible M3E cards.
-
M3EDropdownController<
T> - Controls an M3EDropdownMenu programmatically.
- M3EDropdownFieldStyle
- Visual styling for the M3E dropdown field (the tap target).
-
M3EDropdownItem<
T> - A single item in an M3EDropdownMenu.
- M3EDropdownItemStyle
- Visual styling for individual items inside the dropdown list.
-
M3EDropdownMenu<
T> - A Material 3 Expressive dropdown menu.
- M3EDropdownStyle
- Visual styling for the dropdown panel (the list of items).
- M3EElevatedButton
- An elevated-style M3EButton.
-
M3EElevatedSplitButton<
T> - An elevated-style M3ESplitButton.
- M3EElevatedToggleButton
- An elevated-style M3EToggleButton.
- M3EExpandableCardColumn
- M3EExpandableCardList
- M3EExpandableData
- A data container used to configure items for M3EExpandableCardList, M3EExpandableCardColumn, and SliverM3EExpandableCardList.
- M3EExpandableItem
- M3EExpandableStyle
- M3EExpandableTheme
- An inherited widget that provides M3EExpandableThemeData to its descendants.
- M3EExpandableThemeData
- Defines the visual properties and motion configurations for expandable cards.
- M3EFilledButton
- A filled-style M3EButton.
-
M3EFilledSplitButton<
T> - A filled-style M3ESplitButton.
- M3EFilledToggleButton
- A filled-style M3EToggleButton.
- M3EMotion
- Spring animation configuration for Material 3 Expressive components.
- M3EOutlinedButton
- An outlined-style M3EButton.
-
M3EOutlinedSplitButton<
T> - An outlined-style M3ESplitButton.
- M3EOutlinedToggleButton
- An outlined-style M3EToggleButton.
- M3EOverflowBottomSheetDecoration
- Styling configuration for the overflow bottom sheet in M3EToggleButtonGroup.
- M3EOverflowPopupDecoration
- Styling configuration for the overflow popup menu in M3EToggleButtonGroup.
- M3ESearchStyle
- Visual styling for the search field inside the dropdown.
- M3EShape
- A container widget that clips its child into a predefined shape.
-
M3ESplitButton<
T> - Material 3 Expressive Split Button.
- M3ESplitButtonBottomSheetDecoration
- Styling options for split-button bottom-sheet menus.
- M3ESplitButtonCheckboxStyle
- Checkbox styling used for multi-select split-button bottom sheets.
- M3ESplitButtonDecoration
- Styling overrides for M3ESplitButton.
-
M3ESplitButtonItem<
T> - A selectable option used by M3ESplitButton menus.
- M3ESplitButtonPopupDecoration
- Styling options for split-button popup menus.
- M3ETextButton
- A text-style M3EButton.
- M3ETextToggleButton
- A text-style M3EToggleButton.
- M3EToggleButton
- Material 3 Expressive Toggle Button.
- M3EToggleButtonDecoration
- Styling overrides for M3EToggleButton and M3EToggleButtonGroup.
- M3EToggleButtonGroup
- A horizontal (or vertical) row of M3EToggleButtons with optional neighbor-squish animation and connected-group shape morphing.
- M3EToggleButtonGroupAction
- Declarative description of a single toggle button inside M3EToggleButtonGroup.
- NoOverflowStrategy
- Strategy for no overflow (all buttons always visible).
- OverflowStrategy
- Abstract base class for custom overflow implementations.
- RenderButtonGroup
- ScrollOverflowStrategy
- Strategy that scrolls overflowing buttons.
- SliverM3ECardList
- A Material 3 interactive card list for use in CustomScrollViews.
- SliverM3EDismissibleCardList
- A dismissible M3E card list that plugs into a CustomScrollView as a sliver.
- SliverM3EExpandableCardList
Enums
- ExpandDirection
- Controls the direction in which the dropdown overlay expands.
- IconPlacement
- Determines the placement of the expand/collapse icon in the header.
- M3EButtonGroupDensity
- Spacing compactness between adjacent buttons.
- M3EButtonGroupOverflow
- Controls how button groups handle overflow when wrap=false.
- M3EButtonGroupOverflowMenuStyle
- Style for the overflow menu.
- M3EButtonGroupType
- How buttons in the group are visually connected.
- M3EButtonShape
- Overall corner-radius strategy for buttons.
- M3EButtonStyle
- Visual styles for M3EButton and M3EToggleButton.
- M3ECardPosition
- The position of a card within a list, used to determine its corner radii.
- M3EHapticFeedback
- Haptic feedback intensity levels for Material 3 Expressive components.
- M3ESplitButtonTrailingAlignment
- Controls how the trailing (dropdown) button aligns with the leading button.
- Shapes
- Represents a collection of predefined geometric shapes.
- SplitButtonMenuStyle
- Menu presentation style used by M3ESplitButtonDecoration.menuStyle.
- SplitButtonSelectionMode
- Selection behavior for bottom-sheet split button menus.
Mixins
-
M3EDismissibleCardMixin<
T extends StatefulWidget> - A mixin that implements the full dismissible M3E card interaction model.
-
M3EExpandableStateMixin<
T extends M3EExpandableListBase>
Functions
-
applyExpandableHaptic(
M3EHapticFeedback haptic) → void -
applyHaptic(
M3EHapticFeedback haptic) → void - Helper function to apply haptic feedback based on M3EHapticFeedback.
-
buildM3EExpandableItem(
{required int index, required int totalCount, required bool isExpanded, required M3EExpandableHeaderBuilder headerBuilder, required M3EExpandableBodyBuilder bodyBuilder, required M3EExpandableStyle decoration, required M3EMotion expandMotion, required M3EMotion collapseMotion, required VoidCallback onToggle}) → Widget -
buildM3ESimpleBody(
BuildContext context, M3EExpandableData data, double progress, M3EExpandableStyle decoration) → Widget -
buildM3ESimpleHeader(
BuildContext context, M3EExpandableData data, double progress) → Widget -
calculateCardPosition(
int index, int total) → M3ECardPosition - Internal helper to calculate M3ECardPosition based on index and total.
-
calculateCardRadius(
{required M3ECardPosition position, required double outerRadius, required double innerRadius}) → BorderRadius - Internal helper to calculate BorderRadius based on M3ECardPosition.
-
m3eSimpleBodyBuilder(
List< M3EExpandableData> items, M3EExpandableStyle decoration) → M3EExpandableBodyBuilder -
m3eSimpleHeaderBuilder(
List< M3EExpandableData> items) → M3EExpandableHeaderBuilder
Typedefs
-
M3EDropdownFutureRequest<
T> = Future< List< Function()M3EDropdownItem< >T> > - Signature for a function that asynchronously returns dropdown items.
-
M3EDropdownItemBuilder<
T> = Widget Function(M3EDropdownItem< T> item, bool selected, VoidCallback onTap) - Signature for a custom item builder inside the dropdown list.
- M3EExpandableBodyBuilder = Widget Function(BuildContext context, int index, double progress)
- M3EExpandableHeaderBuilder = Widget Function(BuildContext context, int index, double progress)
- OverflowMenuItemBuilder = Widget Function(BuildContext context, M3EToggleButtonGroupAction action, bool isSelected)
- Callback type for building overflow menu content.