Files
rootandClaude Sonnet 5 e3aa088bc2 Notrufnummern-Datenbasis, Ländererkennung, State-Management und Lokalisierung (AP1-AP7)
Implementiert den kompletten Kern-Flow der Emergency App gemäß docs/plan.md:
- Notrufnummern-Datenbasis für 199 Länder + Modelle/Repository (AP1)
- DialerService für tel:-Notrufe ohne Auto-Dial (AP2)
- Statisches UI mit Panik-Button-Fallback (AP3)
- Priorisierte Ländererkennung: SIM/Netz -> GPS/Geocoding -> Cache (AP4)
- EmergencyProvider verdrahtet Repository/LocationService mit der UI (AP5)
- Manuelle Länderauswahl als Fallback samt eigener Priorität (AP6)
- UI-Lokalisierung (de/en/fr/es), an erkanntes Land gekoppelt (AP7)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 11:29:38 +02:00

36 lines
1.1 KiB
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
import '../../../models/country.dart';
/// Kompakter Header, der Flagge und Name eines [Country] anzeigt.
class CountryHeader extends StatelessWidget {
const CountryHeader({super.key, required this.country});
final Country country;
/// Wählt `nameDe`/`nameEn` (AP1-Datenfeld, keine ARB-Übersetzung die
/// Notrufnummern-Datenbasis kennt bewusst nur diese zwei Sprachen, siehe
/// `docs/plan.md` Abschnitt 4) passend zur aktuellen App-Locale aus.
String _localizedName(BuildContext context) {
final languageCode = Localizations.localeOf(context).languageCode;
return languageCode == 'de' ? country.nameDe : country.nameEn;
}
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 12),
child: Row(
children: [
Text(country.flag, style: const TextStyle(fontSize: 32)),
const SizedBox(width: 12),
Text(
_localizedName(context),
style: Theme.of(context).textTheme.titleLarge,
),
],
),
);
}
}