foundations/foundations library
Design tokens, theming hosts, and shared interaction primitives for Material 3 Expressive components.
Classes
- CornerRounding
- Defines the amount and quality around a given vertex of a shape. radius defines the radius of the circle which forms the basis of the rounding for the vertex. smoothing defines the amount by which the curve is extended from the circular arc around the corner to the edge between vertices.
- M3EButtonFontSize
- Per-size label font sizes for expressive buttons.
- M3EColorScheme
- The full set of Material 3 color roles used across expressive components.
- M3EColorUtils
- Color helpers shared across expressive components.
- M3EComponentTheme
- Registers an adaptive theme dependency for a single M3E component subtree.
- M3EDimensions
- Standardized spacing and corner-radius tokens for Material 3 Expressive.
- M3EDynamicColorHost
- Fetches device dynamic colors and refreshes them when the app resumes.
- M3EElevation
- Material 3 elevation tokens expressed in logical pixels (dp).
- M3EFocus
- Shared focus helpers for M3E input components.
- M3EFocusInteraction
- Tracks whether keyboard focus rings are allowed after the last interaction.
- M3EFocusRing
- Draws the Material 3 Expressive keyboard focus ring around child.
- M3EFocusRingTheme
- Shared tokens for the Material 3 Expressive keyboard focus ring.
- M3EHaptics
- Shared haptic helpers for Material 3 Expressive components.
- M3EIcons
-
A curated set of glyphs from the bundled
MaterialIconsfont. - M3EInheritedTheme
- Inherited theme handle used by M3ETheme.of.
- M3EInkSplashTheme
- Supplies expressive splash color for Material buttons that only expose overlay color to their ink layer.
- M3EInteractionState
- The mutually reinforcing interaction states of a component.
- M3EMaterialApp
-
A
MaterialAppwired to adaptive M3ETheme with minimal integration code. - M3EMaterialNewShapes
-
Foundation bridge to
material_new_shapesexpressive morph polygons. - M3EMotion
- Material 3 Expressive motion tokens.
- M3EResolvedTheme
- Applies a resolved M3EThemeData to a subtree.
- M3ESafeArea
- Keyboard-aware system safe insets from raw view metrics.
- M3EScrimSystemUi
- System UI overlay for modal surfaces shown over a dark scrim.
- M3EShapeClipper
- Clips a child to a catalog M3EShapeKind polygon, fitted to the clip size.
- M3EShapeContainer
- A box clipped to an M3EShapeKind polygon.
- M3EShapes
- Material 3 Expressive shape (corner radius) tokens.
- M3EShapeSet
- A five-step BorderRadius scale for a single shape family.
- M3ESpacing
- Material 3 Expressive spacing tokens.
- M3ESpring
- A serialisable description of a Material 3 Expressive spring.
- M3EStateLayer
- Resolves Material state-layer overlay colors using M3EStateOpacity tokens.
- M3EStateLayerOverlay
- Paints a Material ink splash clipped to shape behind child.
- M3EStateOpacity
- Material 3 state layer opacity tokens.
- M3ETappable
- A reusable interaction primitive powering expressive components.
- M3ETappableInkScope
- Supplies ink interaction callbacks from the tappable primitive to overlays.
- M3ETheme
- Provides an M3EThemeData to the widget subtree.
- M3EThemeController
-
Manual brightness control for an adaptive
M3EThemeroot. - M3EThemeData
- Immutable bundle of expressive design tokens and per-component themes.
-
M3EThemeExtension<
T extends M3EThemeExtension< T> > -
Base type for overridable component themes registered on
M3EThemeData. - M3EThemeScope
- Hosts adaptive theme listeners and resolves M3EThemeData for components.
- M3EThemeScopeState
- State for M3EThemeScope that resolves brightness and dynamic color.
- M3ETypefaceConfig
- Brand and plain typeface names for the M3 type scale.
- M3ETypeScale
- The Material 3 type scale (15 roles).
- M3ETypeScaleTokens
- Canonical M3 type scale token tables (material_ui gen_defaults v38.2.31).
- M3ETypeStyleConversion
- Converts arbitrary text styles to M3 type scale variants.
- M3ETypeStyleTokens
- Per-property tokens for one M3 type scale role.
- M3ETypography
- Baseline and emphasized Material 3 type scales (30 styles total).
- M3EVariableFontAxes
- Explicit OpenType axis values for variable fonts (Roboto Flex, Google Sans Flex).
- M3EVariableFontConfig
- Configuration for per-role variable-font axis resolution.
- Morph
- This class is used to animate between start and end polygons objects.
- RoundedPolygon
- The RoundedPolygon class allows simple construction of polygonal shapes with optional rounding at the vertices. Polygons can be constructed with either the number of vertices desired or an ordered list of vertices.
Enums
- M3EHapticFeedback
- Haptic feedback intensity levels for M3E interactions.
- M3EShapeKind
- Catalog of Material 3 Expressive morph polygons for clipping and fill.
- M3ETypeRole
- A role in the Material 3 type scale.
- M3ETypeScaleMode
- Whether token tables use static or variable-font tracking defaults.
- M3ETypeScaleVariant
- Which M3 token table to use when resolving a type style.
- M3ETypeVariations
- Named Roboto Flex axis presets for Material 3 Expressive type.
Extensions
- ColorHarmonization on Color
- ColorSchemeHarmonization on ColorScheme
- M3ETypeRoleX on M3ETypeRole
- Whether the role belongs to the brand typeface group (display/headline/title).
- M3ETypeScaleVariantX on M3ETypeScaleVariant
- Whether the variant is an emphasized token set.
- Matrix4PointTransformer on Matrix4
- MorphToPathExtension on Morph
- RoundedPolygonToPathExtension on RoundedPolygon
Functions
-
buildM3EThemeDefaults(
{M3EColorScheme? colorScheme, M3ETypography? typography, M3ETypeScale? typeScale, double visualDensity = 0, TargetPlatform? platform, bool useMaterial3 = true}) → M3EThemeData - Assembles a complete M3EThemeData from core tokens and component defaults.
-
pathFromCubics(
{required Path path, required int startAngle, required bool repeatPath, required bool closePath, required List< Cubic> cubics, required double rotationPivotX, required double rotationPivotY}) → Path -
Returns a Path for a
Cubiclist.
Typedefs
- M3EDynamicColorBuilder = Widget Function(ColorScheme? lightDynamic, ColorScheme? darkDynamic)
-
Builds a subtree from device light and dark dynamic
ColorSchemes. - M3EStateWidgetBuilder = Widget Function(BuildContext context, M3EInteractionState state)
-
Builds the visual for a tappable surface given its interaction
state.