Flutter implementation of the french government design system.

Overview

Flutter DSFR

Floating Dartists

Test workflow Coverage Status Join Flutter FR Community

Flutter implementation of the french government design system.

The full design specifications is available here: https://gouvfr.atlassian.net/wiki/spaces/DB/overview?homepageId=145359476

This project is not affiliated with the french government.

Getting Started

  • Add the package to your pubspec.yaml file:
dependencies:
    flutter_dsfr: any
  • Add the required extensions to your theme:
import 'package:flutter_dsfr/flutter_dsfr.dart';

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData.light().copyWith(
          extensions: dsfrExtensionsLight,
        ),
        darkTheme: ThemeData.dark().copyWith(
          extensions: dsfrExtensionsDark,
        ),
        home: const MyHomePage(),
    );
  }
}

Components

Buttons

  • Primary
DSFRPrimaryButton(onPressed: () {}, label: 'Label bouton');

primary_button.png

  • Secondary
DSFRSecondaryButton(onPressed: () {}, label: 'Label bouton');

secondary_button.png

  • FranceConnect
FranceConnectButton(onPressed: () {});

france_connect.png

  • FranceConnectPlus
FranceConnectButton(onPressed: () {}, variant: true);

france_connect_plus.png

Alerts

  • Alert
DSFRAlert(
      type: DSFRAlertType.success,
      title: "Success Alert",
      description:
          "this is a success alert",
      onClose: () {},
    )

alert.png

  • SmallAlert
DSFRSmallAlert(
      type: DSFRAlertType.success,
      description: "this is a small alert",
      onClose: () {},
    )

small_alert.png

Accordion

  • Accordion
DSFRAccordionData(
          title: "Accordion1",
          content: Padding(
            padding: EdgeInsets.all(8.0),
            child: Text("Im an awesome content, expanded by default"),
          ),
          isInitialyExpanded: true,
        )

accordion.png

Badges

  • Badge
DSFRBadge(
      type: DSFRBadgeType.success,
      label: "label",
      showIcon: true,
    )

badge.png

ButtonsGroup

  • ButtonsGroup
DSFRButtonsGroup(
  buttons: [
    DSFRButton(
      label: "Label Button",
      onPressed: () {},
    ),
    DSFRSecondaryButton(
      label: "Label Button",
      onPressed: () {},
    ),
  ],
)

buttons_group.png

Banners

  • Banner
DSFRBanner(
  text: "Im an awesome banner",
  link: DSFRBannerLink(
    text: "this is an awesome link",
    link: Uri.parse("https://http.cat/404"),
  ),
  onClose: () {},
)

banner.png

Radio

  • Single Radio button
DSFRRadioButton<bool>(
  label: 'Label radio',
  value: true,
  groupValue: false,
  onChanged: (_) {},
)

radio.png

  • Multiple Radio buttons
DSFRRadioGroup<bool>(
  title: "Légende pour l'ensemble de champs",
  onChanged: (_) {},
  items: [
    DSFRRadioData(label: 'Label radio', value: false),
    DSFRRadioData(label: 'Label radio', value: false),
    DSFRRadioData(label: 'Label radio', value: false)
  ],
)

Which also exists as a FormField to manage validation and error states:

DSFRRadioGroupFormField<bool>(
  title: "Légende pour l'ensemble de champs",
  onChanged: (_) {},
  items: [
    DSFRRadioData(label: 'Label radio', value: false),
    DSFRRadioData(label: 'Label radio', value: false),
    DSFRRadioData(label: 'Label radio', value: false)
  ],
   autovalidateMode: AutovalidateMode.always,
   validator: (selectedValue) =>
      selectedValue == null || !selectedValue
        ? "Texte d'erreur obligatoire"
        : null,
)

radio_group.png

Dependencies

  • url_launcher: Allows to open links in the browser.(used in the FranceConnectButton widget and in DSFRBanner)

Roadmap

Components we need to implement

  • Accordion
  • FileUpload
  • Alerts
  • Badges
  • Banner
  • SearchBar
  • Buttons
  • ButtonsGroup
  • FranceConnectButton
  • Radio
  • RichRadio
  • Checkbox
  • Card
  • Input
  • Quote
  • Header
  • Breadcrumb
  • ConscentBanner
  • StepIndicateur
  • ToggleSwitch
  • Links
  • SkipLinks
  • Select
  • SideMenu
  • Callout
  • Highlight
  • Modal
  • MainNavigation
  • Tabs
  • Display
  • Share
  • Footer
  • Pagination
  • Summary
  • Table
  • Tag
  • DownloadFile
  • Tile

Contributors

TesteurManiak
Guillaume Roux
Pierre-Monier
Null
Comments
  • Feat/banner

    Feat/banner

    • add banner
    • refacto close button to be shared accord multiple internal components
    • tiny alert refacto for better close button
    • add boldText typo for multiple use in internal component
    opened by Pierre-Monier 2
  • Refacto/remove url launcher

    Refacto/remove url launcher

    Removed url_launcher dependency, updated alchemist to latest version to work with flutter v3.3.0 and later.

    Breaking changes

    • Now DSFRBannerLink takes a onTap callback instead of a Uri.
    • FranceConnectButton exposes a FranceConnectButton.plus constructor instead of specifying the variant property (still exists but became private)
    • FranceConnectButton and FranceConnectButton.plus requires a onInfoLinkTap parameter instead of opening a pre-defined endpoint with url_launcher
    documentation enhancement 
    opened by TesteurManiak 1
  • Feat/radio

    Feat/radio

    • Added components DSFRRadioButton, DSFRRadioGroup and DSFRRadioGroupFormField
    • Added colors and typographies
    • Updated Icons
    • Created custom widgets builder based on DSFRThemeDataWidget to easily write golden tests and override properties:
      • DSFRButtonStyleTheme
      • DSFRColorsTheme
      • DSFRSizesTheme
      • DSFRTypographyTheme
    enhancement 
    opened by TesteurManiak 1
  • Feat/alert dialog

    Feat/alert dialog

    • add Alerts with golden test
    • add SmallAlerts with golden test
    • add new colors in ColorPalette and DSFRColors
    • fix colors golden test
    • add defaultText typographie
    • add DSFRIcons, which use remix icon pack
    • add vscode launch configuration
    opened by Pierre-Monier 1
  • Feat/tertiary button

    Feat/tertiary button

    • Added DSFRTertiaryButton (specs)
    • Added "icon only" variant to base buttons (specs)
    • Added "disabled state" to base buttons (specs)
    • Golden tests for light and dark variant of DSFRPrimaryButton, DSFRSecondaryButton & DSFRTertiaryButton
    • Removed params in DSFRColors.copyWith as those colors should never be changed to a different value than the base light & dark variant (specs)
    enhancement 
    opened by TesteurManiak 1
Owner
Floating Dartists
A bunch of weebs doing Dart & Flutter code
Floating Dartists
Design system flutter - A framework contains SBB (Swiss Federal Railways) UI elements for Flutter Apps

Design System Mobile for Flutter Design System Mobile in Flutter (yes, it could

Swiss Federal Railways (SBB) 14 Dec 22, 2022
Implements Microsoft's Fluent Design System in Flutter.

fluent_ui Design beautiful native windows apps using Flutter Unofficial implementation of Fluent UI for Flutter. It's written based on the official do

Bruno D'Luka 1.8k Dec 29, 2022
Flutter UI library based on IBM's Carbon Design System 💎

Flutter Carbon ‌Carbon is IBM’s open-source design system for products and experiences. With the IBM Design Language as its foundation, the system con

Nour El-Din Shobier 89 Jan 5, 2023
A Dart client for the NATS messaging system. Design to use with Dart and Flutter.

Dart-NATS A Dart client for the NATS messaging system. Design to use with Dart and flutter. Flutter Web Support by WebSocket client.connect(Uri.parse(

Chart Chongcharoen 32 Nov 18, 2022
Stacked UI design system built for Flutter.

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Lewis Eccles 0 Jan 2, 2022
Provide powerfull tools to help you build your Flutter design system.

Provide powerfull tools to help you build your design system. About flutter_design contains packages to help you bootstrap your design system with a w

Min Zhao 23 Dec 3, 2022
Canton Design System elements and resources for Flutter.

Canton UI Canton UI elements and resources for Flutter. Examples in Apps Notes App News App Elisha Description This includes things such as themes (co

Carlton Aikins 10 Dec 17, 2022
The company's design system

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Adby Santos 2 Nov 23, 2021
Implementation of different design challenges in flutter.

my_flutter_ui_challenges Different set of screens implemented using flutter. Home Screen Car Rental App Design concept taken from https://www.uplabs.c

Muhammad Adil 124 Dec 9, 2022
Simple UI design implementation of two pages.

dating_app_clone A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

null 4 Sep 22, 2021
This project is an implementation of a Design on Uplabs.com

Wallet Ui App This project is an implementation of a Design i found on Uplabs.com by Subramanian Art Getting Started This project is a starting point

Etornam Sunu 127 Nov 10, 2022
It's OK to love Flutter and hate hand-coding design elements. Parabeac-Core converts design files into Flutter code.

Parabeac-Core Parabeac-Core converts design files into Flutter code driven by open-source & community. Contribute · Discord Community · Designer Proto

Parabeac 536 Jan 4, 2023
NesPad-design-in-flutter - Create a design in flutter for a NesPad

NesPad Design in Flutter Diseño de un NesPad usando flutter nativo. Se hizo util

null 0 Jan 3, 2022
Excersises-app - Flutter excersises app design with 2 design pages

About The Project Flutter excersises app design with 2 design pages only Design

Muh Afrinal Hakim 0 Jan 2, 2022
Glass-Design - Glass Design on one page writing in Flutter

glassdesign writing in Flutter framework / GlassDesign fait en Flutter framework

Tommy 6 Jun 15, 2022
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code ✨ Featuring

Felt 307 Dec 24, 2022
RelativeScale is a simple custom sizing system for flutter widgets to achieve the same physical sizes across different devices.

RelativeScale is a simple custom sizing system for flutter widgets to achieve the same physical sizes across different devices. Usage It is VERY easy

xamantra 19 Nov 25, 2022
Flutter control system widgets, like on-off controller.

control_system Flutter control system widgets, like on-off controller. Introduction A control system manages, commands, directs, or regulates the beha

Amirreza Madani 0 Jan 9, 2022
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code ✨ Featuring

Felt 307 Dec 24, 2022