Skip to content

Commit

Permalink
feat: prepare release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Nov 13, 2020
1 parent c4289f9 commit b0812a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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<void>`)
- 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).
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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());
}
```
Expand Down
6 changes: 3 additions & 3 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```yaml
dependencies:
fast_i18n: ^2.0.0
fast_i18n: ^2.1.0

dev_dependencies:
build_runner: any
Expand Down Expand Up @@ -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());
}
```
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit b0812a7

Please sign in to comment.