Files
social-app/apps/lib/features/settings/ui/widgets/settings_page_scaffold.dart
T
qzl 8d4a14150b feat(apps): update UI screens and shared components
- Update home screen with new composer and interactions
- Update settings screens with new profile flow
- Update calendar share dialog
- Update contacts screen
- Add new shared widgets: confirm_sheet, phone_prefix_selector
- Add new formatters: phone_display_formatter
- Update tests for modified components
2026-03-19 18:43:08 +08:00

70 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import '../../../../core/theme/design_tokens.dart';
import '../../../../shared/widgets/back_title_page_header.dart';
class SettingsPageScaffold extends StatelessWidget {
const SettingsPageScaffold({
super.key,
required this.title,
required this.body,
this.footer,
this.onBack,
this.resizeOnKeyboard = true,
this.maintainBottomViewPadding = false,
});
final String title;
final Widget body;
final Widget? footer;
final VoidCallback? onBack;
final bool resizeOnKeyboard;
final bool maintainBottomViewPadding;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.surfaceSecondary,
resizeToAvoidBottomInset: resizeOnKeyboard,
body: SafeArea(
maintainBottomViewPadding: maintainBottomViewPadding,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
BackTitlePageHeader(title: title, onBack: onBack),
Expanded(
child: SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(
AppSpacing.xl,
AppSpacing.sm,
AppSpacing.xl,
AppSpacing.xl,
),
child: body,
),
),
if (footer != null)
Padding(
padding: const EdgeInsets.fromLTRB(
AppSpacing.xl,
AppSpacing.none,
AppSpacing.xl,
AppSpacing.xl,
),
child: Container(
padding: const EdgeInsets.all(AppSpacing.md),
decoration: BoxDecoration(
color: AppColors.surfaceInfoLight,
borderRadius: BorderRadius.circular(AppRadius.xl),
border: Border.all(color: AppColors.borderTertiary),
),
child: footer,
),
),
],
),
),
);
}
}