feat(i18n): draw the Catalan and Basque flags in the language picker
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user