Skip to content

Commit

Permalink
Merge pull request #6 from Pavel-Sulimau/bugfix/compilation-error-wit…
Browse files Browse the repository at this point in the history
…h-non-default-name-for-json-file

Use '$baseClassName' instead of 'Strings' as field type in 'InheritedLocaleData' widget
  • Loading branch information
Tienisto authored Feb 28, 2021
2 parents 80b74ff + 38bf361 commit fa09672
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.1

- Fix compilation error occurring when non-standard name (not 'strings.i18n.json') is used for json files.

## 2.2.0

- new config: `output_translate_var`, renames default `t` variable
Expand Down
2 changes: 1 addition & 1 deletion 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.2.0
fast_i18n: ^2.2.1

dev_dependencies:
build_runner: any
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```yaml
dependencies:
fast_i18n: ^2.2.0
fast_i18n: ^2.2.1

dev_dependencies:
build_runner: any
Expand Down
2 changes: 1 addition & 1 deletion lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void _generateHeader(StringBuffer buffer, I18nConfig config, List<I18nData> allL
// InheritedLocaleData
buffer.writeln();
buffer.writeln('class $inheritedClass extends InheritedWidget {');
buffer.writeln('\tfinal Strings translations;');
buffer.writeln('\tfinal $baseClassName translations;');
buffer.writeln('\t$inheritedClass({this.translations, Widget child}) : super(child: child);');
buffer.writeln();
buffer.writeln('\t@override');
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.2.0
version: 2.2.1
homepage: https://github.com/Tienisto/flutter-fast-i18n

environment:
Expand Down

0 comments on commit fa09672

Please sign in to comment.