fix: resolve 2 remaining strict analysis errors

- introPage.dart: Convert fireItems to proper static function closure
- mainDrawer.dart: Convert unreadCount int to String for Text widget
This commit is contained in:
vjrj 2026-03-06 11:21:06 +01:00
parent 1864e5b105
commit 7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions

View file

@ -2,7 +2,7 @@ import 'dart:async';
import 'package:flutter/services.dart' show rootBundle;
final esRegExp = new RegExp("^es-");
final RegExp esRegExp = RegExp('^es-');
String getFallbackLang(String lang) {
if (lang == 'ast' ||
@ -10,7 +10,7 @@ String getFallbackLang(String lang) {
lang == 'eu' ||
lang == 'es' ||
lang == 'ca' ||
(esRegExp).allMatches(lang).length > 0) {
esRegExp.allMatches(lang).isNotEmpty) {
return 'es';
}
return 'en';
@ -21,8 +21,8 @@ Future<String> getFileNameOfLang(
required String fileName,
required String ext,
required String lang}) async {
String base = '$dir/$fileName';
String fallback = getFallbackLang(lang);
final String base = '$dir/$fileName';
final String fallback = getFallbackLang(lang);
String file = '$base-$lang.$ext';
if (await assetNotExists(file)) {
file = '$base-$fallback.$ext';