mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-27 01:40:40 +00:00
Removed language switch from release notes dialog (#198)
* Removed language switch from release notes dialog
This commit is contained in:
parent
30418a9cfd
commit
1d22ec5439
1 changed files with 1 additions and 12 deletions
|
@ -1,8 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart' show rootBundle;
|
||||
import 'package:lightmeter/data/models/supported_locale.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/providers/user_preferences_provider.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
|
||||
class ReleaseNotesDialog extends StatelessWidget {
|
||||
|
@ -40,17 +38,8 @@ class ReleaseNotesDialog extends StatelessWidget {
|
|||
}
|
||||
|
||||
Future<String> loadReleaseNotes(BuildContext context) async {
|
||||
late final String localeName;
|
||||
|
||||
switch (UserPreferencesProvider.localeOf(context)) {
|
||||
case SupportedLocale.ru:
|
||||
localeName = SupportedLocale.ru.name;
|
||||
default:
|
||||
localeName = SupportedLocale.en.name;
|
||||
}
|
||||
|
||||
try {
|
||||
return rootBundle.loadString('assets/release_notes/release_notes_${localeName}_$version.md');
|
||||
return rootBundle.loadString('assets/release_notes/release_notes_en_$version.md');
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue