feat: Conditionally display debug tools button based on debug mode and engine difficulty
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -218,11 +218,13 @@ class _GameScreenState extends State<GameScreen> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: kDebugMode && _engine.difficulty != null
|
||||||
|
? FloatingActionButton(
|
||||||
onPressed: _openDebugTools,
|
onPressed: _openDebugTools,
|
||||||
tooltip: 'Open Debug Tools',
|
tooltip: 'Open Debug Tools',
|
||||||
child: const Icon(Icons.bug_report),
|
child: const Icon(Icons.bug_report),
|
||||||
),
|
)
|
||||||
|
: null,
|
||||||
body: LayoutBuilder(
|
body: LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
return Listener(
|
return Listener(
|
||||||
|
|||||||
Reference in New Issue
Block a user