feat(i18n): draw the Catalan and Basque flags in the language picker
Build & Deploy Farolero / Análisis de código (push) Successful in 11s
Build & Deploy Farolero / Build APK + AAB release (push) Successful in 1m18s

Every language showed its flag except those two, which fell back to a plain
black flag. Unicode does define subdivision sequences for both, but outside
England, Scotland and Wales they are not in the recommended set, so almost
no system renders them.

Both flags are simple geometry, so they are painted rather than shipped as
images: crisp at any size, no new assets, no licensing question. The senyera
is nine equal stripes; the ikurriña is the green saltire under the white
cross on red. The rest keep their emoji, now boxed to the same size so the
list lines up.

Not seen on a device: verified by build and analysis only.
This commit is contained in:
2026-07-26 00:18:06 +02:00
parent 0a6ac6cba0
commit b551c85edb
2 changed files with 133 additions and 1 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../tema/banderas_idioma.dart';
import 'package:farolero/l10n/generated/app_localizations.dart';
import 'package:provider/provider.dart';
import '../servicios/servicio_idioma.dart';
@@ -95,6 +96,7 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
const SizedBox(height: 12),
_opcionIdioma(
context,
codigoBandera: 'sistema',
bandera: '\u{1F310}',
nombre: '${l10n.automaticLanguage} (${_nombreIdiomaDelSistema()})',
codigo: 'sistema',
@@ -105,6 +107,7 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
...ServicioIdioma.idiomasSoportados.entries.map((entrada) {
return _opcionIdioma(
context,
codigoBandera: entrada.key,
bandera: entrada.value.bandera,
nombre: entrada.value.nombre,
codigo: entrada.key,
@@ -126,6 +129,7 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
Widget _opcionIdioma(
BuildContext context, {
required String codigoBandera,
required String bandera,
required String nombre,
required String codigo,
@@ -133,7 +137,7 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
required VoidCallback onTap,
}) {
return ListTile(
leading: Text(bandera, style: const TextStyle(fontSize: 24)),
leading: BanderaIdioma(codigo: codigoBandera, emoji: bandera),
title: Text(nombre),
trailing: seleccionado
? IconoFarolero(Icons.check_circle, color: TemaApp.colorAcento)