flume library

The Flume design system implemented in Dart/Flutter.

Classes

Ambiance Ambiance
A widget that provides the current AmbianceState to its descendants.
AmbiancePalette Ambiance
Palette of ambiance colors.
AmbianceProvider Foundation
A provider wrapper around FlumeTheme allowing its children to be notified and rebuilt when the theme changes.
AmbianceState Ambiance
A data class that holds the current Ambiance state.
Button Components
A regular button, with a variety of sizes and variants.
Cell Components
A list cell from the Flume design system.
Checkbox Components
A checkbox that can be checked or unchecked.
CIELAB Ambiance
A color in the CIELAB color space.
CIEXYZ Ambiance
Class representing the CIEXYZ colorspace.
DatePicker
EdgeInsetsData
Utility class for using Flume spacing with Flutter's EdgeInsets.
FlatButton Components
A flat button is a button that has a "flat" appearance, meaning it looks like regular text, but has some button states and capabilities.
Flume Foundation
A widget wrapping its child with FlumeTheme and providing an accessor to a context's nearest FlumeTheme parent.
FlumeBreakpoints Foundation
Breakpoints defined by Flume.
FlumeColors Foundation
Color scheme defined by Flume.
FlumeIcons Components
FlumeMotion Foundation
Motion durations defined by Flume.
FlumePalette Foundation
All colors defined by Flume.
FlumeRawTypography Foundation
Raw typography data.
FlumeShadows Foundation
Shadows defined by Flume.
FlumeShapes Foundation
Shapes and borders defined by Flume.
FlumeSpacing Foundation
Spacing defined by Flume.
FlumeTheme Foundation
A theme instance containing all Flume design tokens.
FlumeThemeProvider Foundation
A provider wrapper around FlumeTheme allowing its children to be notified and rebuilt when the theme changes.
FlumeTypography Foundation
Typography defined by Flume.
FlumeTypographyData Foundation
Baseline typography data.
FormGroup Components
A widget that groups a label and child together.
Gap Components
An empty spacing widget used to create padding or space. Requires a Provider of Axis to determine the direction.
GhostButton
HSL Ambiance
Class representing the HSL colorspace.
IconButton Components
A button that displays an icon.
InputField Components
An input field from the Flume design system.
LCH Ambiance
Class representing the LCH colorspace.
RGB Ambiance
Class representing the RGB colorspace.
ScrollableList Components
A wrapper around ListView with Flume-specific customizations.
A widget that displays a search bar.
Skeleton Components
A shimmer/skeleton placeholder component from the Flume design system.
SymbolButton
Backwards-compatible alias for IconButton.
TabButton Components
A tab button that can be tabbed (selected or unselected).
ToggleButton Components
A button that can be toggled on and off.
TonalSwitch Components
A widget that displays a switch that adapts to the current platform, and uses the current Ambiance to determine its colors.
ValidationMessage Components
A widget that displays a validation message.

Enums

ButtonSize Components
The size of a button.
ButtonState Components
The state of a button.
ButtonVariant Components
The variant of a button.
CheckboxState
Checkbox state values
IconPosition Components
The position of an icon in a button, relative to its child widget.
InputState Components
A state for an InputField.
ToggleButtonVariant Components
The variant of a ToggleButton.
ValidationState Components
The state of a validation message.

Extensions

AmbianceExtension on BuildContext Ambiance
BrightenExtension on Color Ambiance
Extension on Color to add brightness algorithm.
Date on DateTime
FlumeContextExtension on BuildContext Components
Quality-of-life extensions on BuildContext.
HSLColorExtension on Color Ambiance
Extension that adds HSL conversion methods to Color.
LuminanceExtension on Color Ambiance
Extension on Color to get luminance values.
RGBExtension on Color Ambiance
Extension that adds RGB conversion methods to Color.
SaturateExtension on Color Ambiance
Extension on Color that adds saturation methods.
WidgetIterableExtension on Iterable<Widget> Components

Constants

eps → const double
kn → const int
maxIter → const int
t0 → const double
t1 → const double
t2 → const double
t3 → const double
xn → const double
yn → const double
zn → const double

Functions

calculateSize(String text, TextStyle style) Size Components
Calculates and returns the Size of the given text and its style.
computeMean(Image img, [bool squared = false]) Future<Color>
Returns the same result as mean, but runs in an isolate.
computeModal(Image img, [bool squared = false]) Future<Color>
Returns the same result as modal, but runs in an isolate.
getColorFromElevation(Color color, int elevation) Color Ambiance
A function that returns a Color from the given color's ambiance palette given the elevation.
getPaletteFromColor(Color color) AmbiancePalette Ambiance
A function that returns an AmbiancePalette from a given Color.
lightColor(Color color) Color Ambiance
The lightest color, tweaked by a custom algorithm.
mean(Image img, [bool squared = false]) Future<Color>
Returns the mean average color from an image (average of all colors). If squared is true, the mean is calculated using the squared value of each color channel. This is useful for calculating the mean of a color palette. If squared is false, the mean is calculated using the raw value of each color channel. This is useful for calculating the mean of an image. All colors with an alpha value less than 5 are ignored, as well as colors that are very close to white or black: (r > 245 && g > 245 && b > 245) || (r < 15 && g < 15 && b < 15)
meanFromUrl(String url, [bool squared = false]) Future<Color>
Loads an image from a network url and returns the mean average color.
Returns the mode average color from an image (most commonly occurring color). If squared is true, the mode is calculated using the squared value of each color channel. This is useful for calculating the mode of a color palette. If squared is false, the mode is calculated using the raw value of each color channel. This is useful for calculating the mode of an image. All colors with an alpha value less than 5 are ignored, as well as colors that are very close to white or black: (r > 245 && g > 245 && b > 245) || (r < 15 && g < 15 && b < 15) If there are multiple colors with the same frequency, the first color encountered is returned.
modalFromUrl(String url, [bool squared = false]) Future<Color>
Loads an image from a network url and returns the modal average color.

Typedefs

ColorCallback = Color Function() Ambiance
A callback that returns a Color.
ColorCallbackWithArg = Color Function(int) Ambiance
A callback that takes an int argument and returns a Color.