From b0812a7d4417264718df4c6ad47f0941ff84bf66 Mon Sep 17 00:00:00 2001 From: Tien Do Nam Date: Fri, 13 Nov 2020 19:08:08 +0100 Subject: [PATCH] feat: prepare release 2.1.0 --- CHANGELOG.md | 10 ++++++++++ README.md | 6 +++--- example/README.md | 6 +++--- pubspec.yaml | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89575d37..8949c6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.1.0 + +A rebuild is needed: `flutter pub run build_runner build`. + +- API change: LocaleSettings.useDeviceLocale() is no longer asynchronous and now returns the new locale (was `Future`) +- API change: LocaleSettings.setLocale(locale) now also returns the new locale (was `void`) + +Just in case you use internal API: +FastI18n.findDeviceLocale has been renamed to FastI18n.getDeviceLocale + ## 2.0.0 Thanks to @DenchikBY (https://github.com/DenchikBY). diff --git a/README.md b/README.md index 8c541df6..aa36672e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Lightweight i18n solution. Use JSON files to create typesafe translations. ```yaml dependencies: - fast_i18n: ^2.0.0 + fast_i18n: ^2.1.0 dev_dependencies: build_runner: any @@ -56,9 +56,9 @@ flutter pub run build_runner build a) use device locale ```dart -void main() async { +void main() { WidgetsFlutterBinding.ensureInitialized(); - await LocaleSettings.useDeviceLocale(); + LocaleSettings.useDeviceLocale(); runApp(MyApp()); } ``` diff --git a/example/README.md b/example/README.md index 49e3ba10..ea546acc 100644 --- a/example/README.md +++ b/example/README.md @@ -4,7 +4,7 @@ ```yaml dependencies: - fast_i18n: ^2.0.0 + fast_i18n: ^2.1.0 dev_dependencies: build_runner: any @@ -50,9 +50,9 @@ flutter pub run build_runner build a) use device locale ```dart -void main() async { +void main() { WidgetsFlutterBinding.ensureInitialized(); - await LocaleSettings.useDeviceLocale(); + LocaleSettings.useDeviceLocale(); runApp(MyApp()); } ``` diff --git a/pubspec.yaml b/pubspec.yaml index ff2521b6..8e942c04 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: fast_i18n description: Lightweight i18n solution. Use JSON files to create typesafe translations. -version: 2.0.0 +version: 2.1.0 homepage: https://github.com/Tienisto/flutter-fast-i18n environment: