Apply the drone status panel's header treatment to Missions & Drones
Same change as the drone status panel: drop the title row, float the close button over the tab row (reserving 48px on its right), and give the tabs more vertical padding so they don't look cramped without the title above them.
This commit is contained in:
@@ -36,41 +36,42 @@ class _MissionsDronesPanelState extends ConsumerState<MissionsDronesPanel> {
|
|||||||
return Material(
|
return Material(
|
||||||
color: const Color(0xEB080808),
|
color: const Color(0xEB080808),
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Column(
|
// Kein eigener Titel-Header mehr (Doku: analog zum Drone-Status-
|
||||||
|
// Panel, mehr Platz fuer den Inhalt) - der Schliessen-Knopf
|
||||||
|
// schwebt stattdessen ueber der Tab-Zeile, die dafuer rechts Platz
|
||||||
|
// frei laesst (siehe unten), statt eine ganze Zeile fuer
|
||||||
|
// Titel+Knopf zu opfern.
|
||||||
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Column(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 12, 8, 12),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
const Expanded(
|
|
||||||
child: Text(
|
|
||||||
'Missions & Drones',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
icon: const Icon(Icons.close, color: Colors.white),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
children: [
|
||||||
_tabButton('Missions', _ManagementTab.missions),
|
Padding(
|
||||||
_tabButton('Drones', _ManagementTab.drones),
|
// Rechts Platz fuer den schwebenden Schliessen-Knopf, damit
|
||||||
|
// "Drones" nicht darunter verschwindet.
|
||||||
|
padding: const EdgeInsets.only(right: 48),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
_tabButton('Missions', _ManagementTab.missions),
|
||||||
|
_tabButton('Drones', _ManagementTab.drones),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(color: Colors.white24, height: 1),
|
||||||
|
Expanded(
|
||||||
|
child: switch (_tab) {
|
||||||
|
_ManagementTab.missions => _missionsTab(),
|
||||||
|
_ManagementTab.drones => _dronesTab(),
|
||||||
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(color: Colors.white24, height: 1),
|
Positioned(
|
||||||
Expanded(
|
top: 4,
|
||||||
child: switch (_tab) {
|
right: 4,
|
||||||
_ManagementTab.missions => _missionsTab(),
|
child: IconButton(
|
||||||
_ManagementTab.drones => _dronesTab(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
},
|
icon: const Icon(Icons.close, color: Colors.white),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -84,7 +85,9 @@ class _MissionsDronesPanelState extends ConsumerState<MissionsDronesPanel> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => setState(() => _tab = tab),
|
onTap: () => setState(() => _tab = tab),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
// 18 statt vorher 10 (analog Drone-Status-Panel: Tabs wirkten
|
||||||
|
// seit dem Wegfall der Titelzeile zu gequetscht).
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 18),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
bottom: BorderSide(
|
bottom: BorderSide(
|
||||||
|
|||||||
Reference in New Issue
Block a user