eufemia_components 1.1.5+2

  • Readme
  • Changelog
  • Installing
  • 71

DNB Design System 👨‍🎨 #

eufemia_flutter pub style: pedantic

preview

DISCLAIMER: This package is in an early stage

Eufemia #

pub

How to use #

Wrap your app in an Eufemia widget, and provide the EufemiaData with the palette, spacing, button and optionally darkPalette parameters:

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

To use Material widgets, e.g. in a MaterialApp tree, use the provided adapter to provide a Material Theme:

final adapter = EufemiaThemeAdapter(context);

return MaterialApp(
  theme: adapter.theme,
  ...
);

The Eufemia provider with all the theming data can be accessed using

final eufemia = Eufemia.of(context)

Components #

pub

There are multiple UI components

Palette #

pub

This API is subject to change

The EufemiaPaletteData class is a collection of colors that are used throughout the library of components. You can create your own, or use several presets, like the saga, standard, dark and privateBanking factories.

The palette provider can be accessed using

final palette = EufemiaPalette.of(context)

Typography #

pub

If using the included themes, fonts are automatically set up. Otherwise, specify the fontFamily and package properties:

TextStyle(
  fontFamily: 'DNB Sans',
  package: 'eufemia_typography',
)

The typography provider can be accessed using

final typography = EufemiaTypography.of(context)

Spacing #

pub

The EufemiaSpacingData class defines the different kinds of spacing used throughout the app. By default, it provides the standard spacings defined by the Eufemia design system:

  • extraSmall: 4.0
  • small: 8.0
  • medium : 16.0
  • large: 24.0
  • extraLarge: 32.0
  • extraExtraLarge: 40.0

The spacing provider can be accessed using

final spacing = EufemiaSpacing.of(context)

Desktop #

Desktop targets are supported but not currently tested extensively, but may be prioritized in the future. a

Web #

Web targets are supported, but the Web APIs are unstable, and the target is not tested at all. If building a web application, check out eufemia for web for a web native version.

1.1.5+2 #

  • Update EufemiaTabBar controller on dependency change

1.1.5+1 #

  • Use font size * line height for shimmer height calculation

1.1.5 #

  • Add Shimmer factory fromTextStyle
  • Fix sync issue with EufemiaTabBar not updating tabs on swipe

1.1.4 #

  • Add new PageIndicator
  • Fix Navbar bugs
  • Set EufemiaTab active parameter to default false
  • Add EufemiaTabBar

1.1.3+2 #

  • Navbar: fix leading button hidden when systemNavigation is set to true

1.1.3+1 #

  • Update eufemia_palette constraint

1.1.3 #

  • Add Navbar component

1.1.2 #

  • Allow for non-text titles on list components
  • Update version constraints

1.1.1+3 #

  • Fix incorrect subtitle alignment relative to leading widget in Cell component

1.1.1+2 #

  • Remove non-stable API references

1.1.1+1 #

  • Update README

1.1.1 #

  • Refactor extensions

1.1.0 #

  • Set Flutter version constraint to >1.17

1.0.0 #

  • Initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  eufemia_components: ^1.1.5+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:eufemia_components/eufemia_components.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform android

Because:

  • package:eufemia_components/eufemia_components.dart that imports:
  • package:eufemia_components/src/system/picker_service.dart that imports:
  • package:eufemia_palette/eufemia_palette.dart that imports:
  • package:eufemia_palette/src/palette.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:eufemia_components/eufemia_components.dart that imports:
  • package:eufemia_components/src/system/picker_service.dart that imports:
  • package:eufemia_palette/eufemia_palette.dart that imports:
  • package:eufemia_palette/src/palette.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform macos

Because:

  • package:eufemia_components/eufemia_components.dart that imports:
  • package:eufemia_components/src/system/picker_service.dart that imports:
  • package:eufemia_palette/eufemia_palette.dart that imports:
  • package:eufemia_palette/src/palette.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform web

Because:

  • package:eufemia_components/eufemia_components.dart that imports:
  • package:eufemia_components/src/system/picker_service.dart that imports:
  • package:eufemia_palette/eufemia_palette.dart that imports:
  • package:eufemia_palette/src/palette.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform windows

Because:

  • package:eufemia_components/eufemia_components.dart that imports:
  • package:eufemia_components/src/system/picker_service.dart that imports:
  • package:eufemia_palette/eufemia_palette.dart that imports:
  • package:eufemia_palette/src/palette.dart that imports:
  • package:shared_preferences/shared_preferences.dart that declares support for platforms: android, ios, linux, macos, web

Package not compatible with SDK dart

Because:

  • eufemia_components that is a package requiring null.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (flutter_svg, freezed_annotation).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and eufemia_components.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
derived_colors ^0.2.4 0.2.4
eufemia_palette >=1.1.2 <2.0.0 1.1.2
eufemia_spacing >=1.0.0 <2.0.0 1.1.1
eufemia_typography >=1.1.3 <2.0.0 1.1.3
flippable_box ^1.0.6 1.0.6
flutter 0.0.0
flutter_slidable ^0.5.4 0.5.4
flutter_svg ^0.17.4 0.17.4 0.18.0
freezed_annotation ^0.7.1 0.7.1 0.11.0
http ^0.12.1 0.12.1
json_annotation ^3.0.1 3.0.1
path_drawing ^0.4.1 0.4.1
provider ^4.1.0 4.3.0
recase ^3.0.0 3.0.0
shared_preferences ^0.5.7 0.5.8
shimmer ^1.1.1 1.1.1
smooth_page_indicator ^0.1.5 0.1.5
snack ^1.0.4 1.0.4
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
file 5.2.1
flutter_web_plugins 0.0.0
http_parser 3.1.4
intl 0.16.1
meta 1.1.8 1.2.2
nested 0.0.4
path 1.7.0
path_parsing 0.1.4
path_provider_linux 0.0.1+2
path_provider_platform_interface 1.0.2
petitparser 3.0.4
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
xdg_directories 0.1.0
xml 3.7.0 4.2.0
Dev dependencies
build_runner ^1.9.0
flutter_test
freezed ^0.10.7
json_serializable ^3.3.0
pedantic ^1.9.0 1.9.0 1.9.2