Removed language switch from release notes dialog

This commit is contained in:
Vadim 2024-11-11 18:50:23 +01:00
parent 89ac3a49a8
commit fc93ac0b4f

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