fix(block2): sharing sheet overflow + location button feedback/robustness

Reported: sheet overflowed 7.7px with the keyboard up, and 'use my location'
seemed to do nothing.
- Config sheet is now scrollable (SingleChildScrollView) — no keyboard overflow.
- 'Use my location' shows an inline spinner + inline error (the old snackbar was
  hidden BEHIND the bottom sheet, so failures were invisible). Message is now
  actionable ('check location is on and the permission is granted').
- Provider hardening: request permission first; on permanent denial open app
  settings; if location services are off open location settings; time-limit the
  fix and fall back to last-known position so it doesn't hang indoors.

Analyzer clean; market tests green.
This commit is contained in:
vjrj 2026-07-10 11:09:12 +02:00
parent 7cba4f7fcf
commit 1a81db9bf0
9 changed files with 69 additions and 31 deletions

View file

@ -357,7 +357,7 @@
"sharedCount": "Shared {n} seeds nearby",
"nothingToShare": "Mark some seeds to give, swap or sell first",
"useLocation": "Use my approximate location",
"locationFailed": "Couldn't get your location",
"locationFailed": "Couldn't get your location — check that location is on and the permission is granted",
"queued": "Saved — we'll share these when you're connected"
},
"chat": {

View file

@ -357,7 +357,7 @@
"sharedCount": "Compartidas {n} semillas",
"nothingToShare": "Marca antes algunas semillas para regalar, cambiar o vender",
"useLocation": "Usar mi ubicación aproximada",
"locationFailed": "No se pudo obtener tu ubicación",
"locationFailed": "No se pudo obtener tu ubicación — comprueba que la ubicación está activada y el permiso concedido",
"queued": "Guardado — las compartiremos cuando tengas conexión"
},
"chat": {

View file

@ -353,7 +353,7 @@
"sharedCount": "Partilhadas {n} sementes",
"nothingToShare": "Marca primeiro algumas sementes para dar, trocar ou vender",
"useLocation": "Usar a minha localização aproximada",
"locationFailed": "Não foi possível obter a tua localização",
"locationFailed": "Não foi possível obter a tua localização — verifica se a localização está ativa e a permissão concedida",
"queued": "Guardado — vamos partilhá-las quando tiveres ligação"
},
"chat": {

View file

@ -6,7 +6,7 @@
/// Locales: 3
/// Strings: 986 (328 per locale)
///
/// Built on 2026-07-10 at 09:03 UTC
/// Built on 2026-07-10 at 09:08 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import

View file

@ -1132,8 +1132,8 @@ class Translations$market$en {
/// en: 'Use my approximate location'
String get useLocation => 'Use my approximate location';
/// en: 'Couldn't get your location'
String get locationFailed => 'Couldn\'t get your location';
/// en: 'Couldn't get your location check that location is on and the permission is granted'
String get locationFailed => 'Couldn\'t get your location — check that location is on and the permission is granted';
/// en: 'Saved — we'll share these when you're connected'
String get queued => 'Saved — we\'ll share these when you\'re connected';
@ -1960,7 +1960,7 @@ extension on Translations {
'market.sharedCount' => ({required Object n}) => 'Shared ${n} seeds nearby',
'market.nothingToShare' => 'Mark some seeds to give, swap or sell first',
'market.useLocation' => 'Use my approximate location',
'market.locationFailed' => 'Couldn\'t get your location',
'market.locationFailed' => 'Couldn\'t get your location — check that location is on and the permission is granted',
'market.queued' => 'Saved — we\'ll share these when you\'re connected',
'chat.title' => 'Chat',
'chat.hint' => 'Write a message…',

View file

@ -629,7 +629,7 @@ class _Translations$market$es extends Translations$market$en {
@override String sharedCount({required Object n}) => 'Compartidas ${n} semillas';
@override String get nothingToShare => 'Marca antes algunas semillas para regalar, cambiar o vender';
@override String get useLocation => 'Usar mi ubicación aproximada';
@override String get locationFailed => 'No se pudo obtener tu ubicación';
@override String get locationFailed => 'No se pudo obtener tu ubicación — comprueba que la ubicación está activada y el permiso concedido';
@override String get queued => 'Guardado — las compartiremos cuando tengas conexión';
}
@ -1320,7 +1320,7 @@ extension on TranslationsEs {
'market.sharedCount' => ({required Object n}) => 'Compartidas ${n} semillas',
'market.nothingToShare' => 'Marca antes algunas semillas para regalar, cambiar o vender',
'market.useLocation' => 'Usar mi ubicación aproximada',
'market.locationFailed' => 'No se pudo obtener tu ubicación',
'market.locationFailed' => 'No se pudo obtener tu ubicación — comprueba que la ubicación está activada y el permiso concedido',
'market.queued' => 'Guardado — las compartiremos cuando tengas conexión',
'chat.title' => 'Chat',
'chat.hint' => 'Escribe un mensaje…',

View file

@ -625,7 +625,7 @@ class _Translations$market$pt extends Translations$market$en {
@override String sharedCount({required Object n}) => 'Partilhadas ${n} sementes';
@override String get nothingToShare => 'Marca primeiro algumas sementes para dar, trocar ou vender';
@override String get useLocation => 'Usar a minha localização aproximada';
@override String get locationFailed => 'Não foi possível obter a tua localização';
@override String get locationFailed => 'Não foi possível obter a tua localização — verifica se a localização está ativa e a permissão concedida';
@override String get queued => 'Guardado — vamos partilhá-las quando tiveres ligação';
}
@ -1312,7 +1312,7 @@ extension on TranslationsPt {
'market.sharedCount' => ({required Object n}) => 'Partilhadas ${n} sementes',
'market.nothingToShare' => 'Marca primeiro algumas sementes para dar, trocar ou vender',
'market.useLocation' => 'Usar a minha localização aproximada',
'market.locationFailed' => 'Não foi possível obter a tua localização',
'market.locationFailed' => 'Não foi possível obter a tua localização — verifica se a localização está ativa e a permissão concedida',
'market.queued' => 'Guardado — vamos partilhá-las quando tiveres ligação',
'chat.title' => 'Conversa',
'chat.hint' => 'Escreve uma mensagem…',