frosty/lib/widgets/section_header.dart
Tommy Chow 9c1be7e121 clean up settings: move keep-awake to chat, improve labels and section headers
- move keepScreenAwake from video to chat settings (store + UI)
- mute section headers (lighter weight, smaller, reduced opacity)
- add breathing room between app bar and first setting
- improve labels across general, video, and chat settings
- reorder store fields to logical grouping with organized reset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:13:44 -07:00

53 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:frosty/utils/context_extensions.dart';
class SectionHeader extends StatelessWidget {
final String text;
final EdgeInsets? padding;
final double? fontSize;
final bool isFirst;
final double? topPadding;
const SectionHeader(
this.text, {
super.key,
this.padding,
this.fontSize,
this.isFirst = false,
this.topPadding,
});
@override
Widget build(BuildContext context) {
final isLandscape = context.isLandscape;
return Padding(
padding:
padding ??
EdgeInsets.fromLTRB(
isLandscape ? MediaQuery.of(context).padding.left : 16,
0,
isLandscape ? MediaQuery.of(context).padding.right : 16,
8,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (!isFirst) ...[SizedBox(height: topPadding ?? 32)],
Text(
text.toUpperCase(),
style: TextStyle(
fontSize: fontSize ?? 12,
fontWeight: FontWeight.w500,
letterSpacing: 0.8,
color: context.colorScheme.onSurfaceVariant.withValues(
alpha: 0.6,
),
),
),
],
),
);
}
}