fix(android): target API level 35 as required by Google Play
Play rejected version code 54 for still targeting 34. From API 35 Android forces edge-to-edge: content is drawn behind the system bars and it is up to each screen to keep clear of them. Seven screens had no SafeArea and their bottom action button would have ended up under the gesture bar, so FondoFarolero gains a respetarBarras flag that insets the content while the background still paints full bleed. The seventeen screens that already handle it are untouched. The navigation bar colour is ignored under edge-to-edge, so its icons are now forced light to stay visible over the dark background. Verified on the merged manifest: targetSdkVersion 35, and the release bundle builds. The visual result has not been checked on a device.
This commit is contained in:
@@ -30,7 +30,10 @@ android {
|
||||
defaultConfig {
|
||||
applicationId = "es.freetimelab.farolero.game"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
// Google Play exige 35 como mínimo. A partir de aquí Android impone el
|
||||
// dibujado de borde a borde: el contenido va detrás de las barras del
|
||||
// sistema y son las pantallas las que deben apartarse.
|
||||
targetSdk = 35
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@ void main() {
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
systemNavigationBarColor: TemaApp.colorFondo,
|
||||
// Con el dibujado de borde a borde de Android 15 el color de la barra de
|
||||
// navegación se ignora y queda transparente sobre un fondo oscuro, así
|
||||
// que sus iconos tienen que ser claros para verse.
|
||||
systemNavigationBarIconBrightness: Brightness.light,
|
||||
),
|
||||
);
|
||||
runApp(const FaroleroApp());
|
||||
|
||||
@@ -28,6 +28,7 @@ class _PantallaAjustesState extends State<PantallaAjustes> {
|
||||
appBar: AppBar(title: Text(l10n.settingsTitle)),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
||||
@@ -345,6 +345,7 @@ class _PantallaCrearPartidaState extends State<PantallaCrearPartida> {
|
||||
appBar: AppBar(title: Text(l10n.createGame)),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.fromLTRB(18, 18, 18, 28),
|
||||
child: Column(
|
||||
|
||||
@@ -309,6 +309,7 @@ class _PantallaGestorHostState extends State<PantallaGestorHost> {
|
||||
),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
||||
@@ -89,6 +89,7 @@ class _PantallaNotasState extends State<PantallaNotas> {
|
||||
),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: _jugadorSeleccionadoId == null
|
||||
? _construirSelectorJugador(partida)
|
||||
: _construirNotas(partida),
|
||||
|
||||
@@ -118,6 +118,7 @@ class _PantallaNotasOnlineState extends State<PantallaNotasOnline> {
|
||||
),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: _autor == null ? _buildSelector(context) : _buildNotas(context),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -66,6 +66,7 @@ class _PantallaResultadoState extends State<PantallaResultado>
|
||||
),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(32),
|
||||
|
||||
@@ -102,6 +102,7 @@ class _PantallaVotacionClienteState extends State<PantallaVotacionCliente> {
|
||||
),
|
||||
body: FondoFarolero(
|
||||
intenso: true,
|
||||
respetarBarras: true,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
|
||||
@@ -139,10 +139,20 @@ class FondoFarolero extends StatelessWidget {
|
||||
final Widget child;
|
||||
final bool intenso;
|
||||
|
||||
/// Aparta el contenido de las barras del sistema.
|
||||
///
|
||||
/// A partir de targetSdk 35 la app dibuja de borde a borde, así que sin esto
|
||||
/// lo que quede abajo —normalmente el botón de acción— acaba debajo de la
|
||||
/// barra de gestos. El fondo se sigue pintando entero; solo se aparta el
|
||||
/// contenido. Las pantallas que ya envuelven su contenido en SafeArea no
|
||||
/// necesitan activarlo.
|
||||
final bool respetarBarras;
|
||||
|
||||
const FondoFarolero({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.intenso = false,
|
||||
this.respetarBarras = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -163,7 +173,9 @@ class FondoFarolero extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned.fill(child: child),
|
||||
Positioned.fill(
|
||||
child: respetarBarras ? SafeArea(child: child) : child,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user