ods_flutter 0.8.1 ods_flutter: ^0.8.1 copied to clipboard
ODS Flutter provides Orange Flutter components for Android and iOS to developers, and a demo application.
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 thelib
directory- It will regenerate:
ods_flutter_localizations.dart
ods_flutter_localizations_en.dart
- other languages files
- It will regenerate:
- 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 generateods_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,
],
)