fix(ui): move game-screen close button to its own top row (was overlapping HUD)
On device the floating top-left X (48px IconButton) overlapped the HUD moves chip. Move it into the column flow above the HUD, left-aligned, so it never collides. Found via on-device test build.
This commit is contained in:
@@ -256,6 +256,18 @@ class _GameScreenState extends ConsumerState<GameScreen>
|
|||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
// Close/back sits on its own top row so it never overlaps
|
||||||
|
// the HUD's moves chip (which lives at the top-left).
|
||||||
|
if (Navigator.of(context).canPop())
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: IconButton(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
icon: const Icon(Icons.close, color: Colors.white54),
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
),
|
||||||
|
),
|
||||||
HudWidget(view: view),
|
HudWidget(view: view),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
@@ -308,15 +320,6 @@ class _GameScreenState extends ConsumerState<GameScreen>
|
|||||||
ref.read(tutorialProvider.notifier).dismissHud(),
|
ref.read(tutorialProvider.notifier).dismissHud(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (Navigator.of(context).canPop())
|
|
||||||
Positioned(
|
|
||||||
top: 4,
|
|
||||||
left: 4,
|
|
||||||
child: IconButton(
|
|
||||||
icon: const Icon(Icons.close, color: Colors.white54),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user