refactor: extract consistent AppBar builder, remove icon from EVENT LOG title

- Add buildTracPulseAppBar() helper in lib/app_bar.dart
  - Reads backgroundColor/elevation from ThemeData.appBarTheme
  - Consistent back button (#9e9e9e, size 20) via Navigator.pop
  - Monospace title style (14px, weight 700, letter-spacing 2)
  - Optional onTitleTap for tappable titles
- Update all screens to use the new helper, removing redundant overrides
- Remove terminal icon from status_screen title, use plain centered text
- Change appBarTheme centerTitle to false (left-aligned)
- Remove bottom dividers from all screens
This commit is contained in:
fiatcode 2026-05-06 08:01:12 +07:00
parent 2123df11c9
commit 4ce1f51062
No known key found for this signature in database
5 changed files with 66 additions and 86 deletions

View file

@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'app_bar.dart';
class InfoScreen extends StatelessWidget {
const InfoScreen({super.key});
@ -7,32 +9,7 @@ class InfoScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF0d0d0d),
appBar: AppBar(
backgroundColor: const Color(0xFF161616),
elevation: 0,
leading: IconButton(
icon: const Icon(
Icons.arrow_back,
color: Color(0xFF9e9e9e),
size: 20,
),
onPressed: () => Navigator.pop(context),
),
title: const Text(
'HOW IT WORKS',
style: TextStyle(
fontFamily: 'monospace',
fontSize: 14,
fontWeight: FontWeight.w700,
letterSpacing: 2,
color: Color(0xFFe0e0e0),
),
),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Container(height: 1, color: const Color(0xFF2a2a2a)),
),
),
appBar: buildTracPulseAppBar(title: 'HOW IT WORKS'),
body: ListView(
padding: const EdgeInsets.all(20),
children: [