update onboarding; add missing safe areas

This commit is contained in:
Fabian Freund
2026-03-17 08:46:09 +01:00
parent 79b68f137e
commit 25f4d27f0d
49 changed files with 3938 additions and 2430 deletions
@@ -99,38 +99,40 @@ class CountryPickerScreen extends HookWidget {
),
),
),
body: ListView.builder(
itemCount: filteredCountries.length + 1,
itemBuilder: (context, index) {
if (index == 0) {
final isSelected = selectedCountryCode == null;
body: SafeArea(
child: ListView.builder(
itemCount: filteredCountries.length + 1,
itemBuilder: (context, index) {
if (index == 0) {
final isSelected = selectedCountryCode == null;
return ListTile(
leading: const SizedBox(
width: 32,
height: 24,
child: Center(child: Icon(Icons.public)),
),
title: const Text('Automatic'),
trailing: isSelected ? const Icon(Icons.check) : null,
onTap: () => context.pop(automaticCountry),
);
}
final country = filteredCountries[index - 1];
final isSelected = country.alpha2Code == selectedCountryCode;
return ListTile(
leading: const SizedBox(
width: 32,
height: 24,
child: Center(child: Icon(Icons.public)),
),
title: const Text('Automatic'),
leading: country.alpha2Code != null
? CountryFlag.fromCountryCode(
country.alpha2Code!,
theme: const EmojiTheme(size: 28),
)
: const SizedBox(width: 32),
title: Text(country.label),
trailing: isSelected ? const Icon(Icons.check) : null,
onTap: () => context.pop(automaticCountry),
onTap: () => context.pop(country.alpha2Code),
);
}
final country = filteredCountries[index - 1];
final isSelected = country.alpha2Code == selectedCountryCode;
return ListTile(
leading: country.alpha2Code != null
? CountryFlag.fromCountryCode(
country.alpha2Code!,
theme: const EmojiTheme(size: 28),
)
: const SizedBox(width: 32),
title: Text(country.label),
trailing: isSelected ? const Icon(Icons.check) : null,
onTap: () => context.pop(country.alpha2Code),
);
},
},
),
),
);
}