Removed language switch from release notes dialog (#198)

* Removed language switch from release notes dialog
This commit is contained in:
Vadim 2024-11-11 18:51:16 +01:00 committed by GitHub
parent 30418a9cfd
commit 1d22ec5439
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 '';
}