eufemia library

Implementation of the DNB's Eufemia design system.

Contains different libraries split into different realms of the design system itself:

  • Typography
  • Spacing
  • Components
  • Palette

To set up Eufemia:

Eufemia(
  data: EufemiaData(
    palette: EufemiaPaletteData.fallback(),
    spacing: EufemiaSpacingData.fallback(),
    button: EufemiaButtonThemeData.fallback(),
    darkPalette: EufemiaPaletteData.dark(),
  ),
  child: YourApp(),
),

And to access Eufemia properties:

final typography = EufemiaTypography.of(context);
final palette = EufemiaPalette.of(context);
final spacing = EufemiaSpacing.of(context);

// Alternatively:
final eufemia = Eufemia.of(context);
final palette = eufemia.palette; // etc..

Classes

Bar Components
A higher-order Bar widget that can be used to display any kind of bar.
BottomBar Components
A bottom app bar from the Eufemia design system.
BottomSheetService Components
A wrapper around helper methods for showing native bottom sheets.
CardBase Components
A plain base/background for a PaymentCard
Cell Components
A list cell from the Eufemia design system.
CellAction Components
An action to display as a result of platform gestures on a Cell.
Checkmark Components
A checkmark from the Eufemia design system.
ColoredIcon Components
A widget wrapping its child with a colored box.
ColorJsonConverter Palette
A converter class for converting Color to JSON and vice versa
ContentCard Components
A card from the Eufemia Design System.
DialogAction Components
An action to use with system dialogs.
DialogService Components
A wrapper around helper methods for showing system dialogs.
Eufemia Core
A widget wrapping its child with EufemiaData and providing an accessor to a context's nearest EufemiaData parent.
EufemiaButton Components
A generic button from the Eufemia design system used as a base for all buttons.
EufemiaButtonState<T> Components
A generic button state class used to provide different values for different states of an EufemiaButton
EufemiaButtonStyle Components
A style class for EufemiaButton that wraps EufemiaButtonState instances for the decorative parameters of a button.
EufemiaButtonTheme
A widget that provides its children with a EufemoaButtonThemeData instance.
EufemiaButtonThemeData Components
The ovverarching theme data each EufemiaButton derives its properties from.
EufemiaColors Palette
Static class containing all colors defined in the Eufemia design system.
EufemiaColumn Spacing
A subclass of EufemiaFlex that lays its children out on the vertical axis.
EufemiaData Core
A bundle of all Eufemia theme components.
EufemiaFlex Spacing
A supercharged Flex widget with Eufemia-specific properties like padding and children spacing.
EufemiaFloatingActionButton Components
A floating action button (FAB) from the Eufemia design system.
EufemiaGap Spacing
An empty spacing widget used to create padding or space.
EufemiaIconData Components
Static access class for EufemiaIcons data.
EufemiaIcons Components
A wrapper around all possible EufemiaIconData code points.
EufemiaInsets Spacing
An immutable set of offsets in each of the four cardinal directions. [...]
EufemiaPadding Spacing
A widget providing its child with Eufemia-specific padding.
EufemiaPalette Palette
Widget providing its children with EufemiaPaletteData as well as methods for loading and updating the palette during runtime.
EufemiaPaletteData Palette
A class containing the color scheme used by the Eufemia design system.
EufemiaPaletteProvider Palette
A provider wrapper around EufemiaPaletteData allowing its children to be notified and rebuilt when the palette changes.
EufemiaPrimaryButton Components
A primary button from the Eufemia design system.
EufemiaRow Spacing
A subclass of EufemiaFlex that lays its children out on the horizontal axis.
EufemiaSecondaryButton Components
A secondary button from the Eufemia design system.
EufemiaSides Spacing
A class defining an object which may or may not have a top, bottom, left or right side.
EufemiaSlider Components
Adaptive slider from the Eufemia Design System
EufemiaSpacing Spacing
Widget providing its children with EufemiaSpacingData as well as methods for loading and updating the palette during runtime.
EufemiaSpacingData Spacing
A class containing the collection of spacings defined by the Eufemia design system.
EufemiaSpacingProvider Spacing
A provider wrapper around EufemiaSpacingData allowing its children to be notified and rebuilt when the spacing changes.
EufemiaSwitch Components
Switch from the Eufemia design system.
EufemiaTab Components
Tab from the Eufemia design system.
EufemiaTabBar Components
A tab bar from the Eufemia design system.
EufemiaText Typography
A Text wrapper that takes an EufemiaTextStyle instead of a Flutter TextStyle.
EufemiaTextButton Components
A text button from the Eufemia design system.
EufemiaTextStyle Typography
A text style from the Eufemia design system.
EufemiaThemeAdapter Core
An adapter bridging Eufemia and ThemeData.
EufemiaTypography Typography
Widget providing its children with EufemiaTypographyData as well as methods for loading and updating the typography during runtime.
EufemiaTypographyData Typography
A class containing the collection of styles, sizes, families, heights and weights from the Eufemia design system.
EufemiaTypographyFamilies Typography
A data class containing the different typography families for the different styles.
EufemiaTypographyHeights Typography
A data class containing the different typography height for the different styles.
EufemiaTypographyProvider Typography
A provider wrapper around EufemiaTypographyData allowing its children to be notified and rebuilt when the typography changes.
EufemiaTypographySizes Typography
A data class containing the different typography sizes for the different styles.
EufemiaTypographyStyles Typography
A data class containing the different typography styles.
EufemiaTypographyWeights Typography
A data class containing the different typography weights for the different styles.
EufemiaVividButton Components
A vivid button from the Eufemia design system.
EufemiaWrap Spacing
A supercharged Wrap with Eufemia-specific properties.
Flag Components
A flag illustration widget from the Eufemia design system.
FlagData Components
Wrapper for flag illustrations
GradientWidget Components
A widget masking its child with a gradient. Can be used for overlay effects like fades, color gradients etc.
InputField Components
An input field from the Eufemia design system.
Language
Convenience class for language-related methods
A logo from the Eufemia design system.
LogoData Components
Static class wrapping asset paths for logo data
MessageBox Components
A message box from the Eufemia design system.
ModalAction Components
Helper class for actions to show on a modal sheet
A header or navigation bar from the Eufemia design system.
PageIndicator Components
Page indicator from the Eufemia Design System
PaymentCard Components
A payment card widget from the Eufemia design system
PaymentCardBackContent Components
A configuration class that defines the back side of a PaymentCard.
PaymentCardFrontContent Components
A configuration class that defines the front side of a PaymentCard.
PickerAction Components
An action to be used with a picker component.
PickerService Components
A wrapper around helper methods for picker components.
ScrollableList Components
A wrapper around ListView with Eufemia-specific customizations.
SearchField Components
Search bar from the Eufemia design system.
SegmentedControl<T> Components
An adaptive segmented control from the Eufemia design system.
Shimmer Components
A shimmer/skeleton placeholder component from the Eufemia design system.
Snacks Components
Wrapper around SnackBar helper methods.
Spinner Components
A spinner from the Eufemia design system.
StaticList Components
A static (non-scrollable) list from the Eufemia design system.
Tag Components
Tag from the Eufemia design system
Toggle Components
Toggle label from the Eufemia Design System
Toolbar Components
A toolbar from the Eufemia design system.
UpdateIcon Components
An adaptive illustration to signal an available update.

Extensions

EufemiaButtonSizeExtensions Components
An extension that converts Eufemia-specific values to default Flutter-friendly values
EufemiaContextExtension Components
Quality-of-life extensions on BuildContext.
EufemiaFontFamilyExtensions Typography
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaFontSizeExtensions Typography
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaFontWeightExtensions Typography
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaLineHeightExtensions Typography
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaPaletteDataExtension Palette
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaSpaceExtension Spacing
An extension that converts internal values from Eufemia to Flutter-friendly values.
EufemiaTextPredefinedStyleExtension Typography
An extension on EufemiaTextPredefinedStyle that converts internal Eufemia values to Flutter-friendly values.
EufemiaTextStyleExtensions Typography
An extension that converts internal values from Eufemia to Flutter-friendly values.
Extra
BuildContext extensions for performing SnackBar-related actions on the context instance.
Snack
SnackBar extension simplifying tasks like showing a SnackBar in a given context or ScaffoldState.
WidgetIterableExtension Spacing
An extension that converts internal values from Eufemia to Flutter-friendly values.

Constants

goldenRatio → const double Components
{@category Components} {@subCategory Graphics} The golden ratio. In mathematics, two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities.
1.618

Functions

adaptiveShadows(BuildContext context, {double spreadRadius, double blurRadius, Offset offset}) List<BoxShadow> Components
Creates a shadow based on the current EufemiaPalette's shadow colors.
fallbackTypography({Color captionColor, Color captionEmphasizedColor, Color footnoteColor, Color footnoteEmphasizedColor, Color subheadColor, Color subheadEmphasizedColor, Color bodyColor, Color bodyEmphasizedColor, Color titleColor, Color titleDemiColor, Color titleEmphasizedColor, Color titleMediumColor, Color titleMediumEmphasizedColor, Color titleLargeColor, Color buttonColor, Color buttonEmphasizedColor, Color buttonSmallColor, Color buttonSmallEmhpasizedColor}) EufemiaTypographyData Typography
Returns a default EufemiaTypographyData instance with Eufemia-specified default values.
paletteUrlLoader(String url, {Map<String, String> headers}) Future<EufemiaPaletteData> Palette
Loads EufemiaPaletteData from the given url

Enums

CardDesign Components
A pre-defined card design for PaymentCard widgets
A type of card issuer logo to display
CardPreset Components
A pre-defined preset of a DNB credit/debit-card
CardProgram Components
Different DNB memberships available
CardType Components
A card issuer and type combination
CaseType Core
Different casing types for a string
EufemiaButtonSize Components
The size of the EufemiaButton, according to the Eufemia specifications
EufemiaFontFamily Typography
A family of the DNB font.
EufemiaFontSize Typography
A font size from the Eufemia design system.
EufemiaFontWeight Typography
A font weight from the Eufemia design system.
EufemiaLineHeight Typography
A specific type of line height for a certain style.
EufemiaSpace Spacing
Defines the different spacing constants used within the design system. Often used in combination with the EufemiaGap or EufemiaPadding widgets. [...]
EufemiaTextPredefinedStyle Typography
A predefined Eufemia text style.
InputState Components
A state for an InputField.

Typedefs

EufemiaPaletteLoader = Future<EufemiaPaletteData> Function() Palette
Type definition for an EufemiaPaletteLoader
EufemiaTextStyleWidgetBuilder = Widget Function(BuildContext context, Widget child) Typography
Type definition for a widget builder