import 'package:flutter/material.dart'; import '../theme.dart'; import 'pv_icons.dart'; /// A plain portrait scaffold with a back title and a centered empty state — /// shared chrome for the Routes and Flight-logs library screens (which have no /// persisted content yet). class SimpleListPage extends StatelessWidget { const SimpleListPage({ super.key, required this.title, required this.emptyIcon, required this.emptyText, this.child, }); final String title; final String emptyIcon; final String emptyText; final Widget? child; @override Widget build(BuildContext context) { final PVScheme s = PVScheme.of(context); return Scaffold( backgroundColor: s.bgApp, body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.fromLTRB(12, 6, 20, 12), child: Row(children: [ IconButton(onPressed: () => Navigator.of(context).maybePop(), icon: PVIcon('chevronLeft', size: 24, color: s.textSecondary)), Text(title, style: TextStyle(fontFamily: PV.fontSans, fontSize: 20, fontWeight: FontWeight.w700, letterSpacing: -0.4, color: s.textPrimary)), ]), ), Expanded( child: child ?? Center( child: Column(mainAxisSize: MainAxisSize.min, children: [ PVIcon(emptyIcon, size: 40, stroke: 1.4, color: s.textTertiary), const SizedBox(height: 12), Text(emptyText, textAlign: TextAlign.center, style: TextStyle(fontFamily: PV.fontSans, fontSize: 14, color: s.textSecondary)), ]), ), ), ], ), ), ); } }