Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Files

Latest commit

Oct 1, 2024
0abc407 · Oct 1, 2024

History

History

library

README.md

Orange Design System Flutter Library

ODS Flutter provides Orange Flutter components for Android and iOS to developers.
Visit ODS Flutter

Report bug · Request feature

Table of contents

Build

Generate l10n files

Development process

  • Developer modify ods_flutter_en.arb (and/or other languages files)
  • In order to have the translations in the app launched locally, flutter gen-l10n must be launched in the lib directory
    • It will regenerate:
      • ods_flutter_localizations.dart
      • ods_flutter_localizations_en.dart
      • other languages files
  • Those files need must not be committed and pushed

Release the library

  • Pre-step: run flutter gen-l10n before creating and publishing the package to generate ods_flutter_localizations*.dart

How to use

Localization

To setup localization of the ods_flutter library, you need to set the OdsLocalizations.delegate in the localizationsDelegates properties of the MaterialApp.

MaterialApp(
  title: 'Title of your app',
  // ...
  // Localization setup
  supportedLocales: AppLocalizations.supportedLocales,
  localizationsDelegates: [
    AppLocalizations.delegate,
    OdsLocalizations.delegate,
  ],
)