redesign for settings page

This commit is contained in:
Arseni
2026-03-13 23:01:57 +03:00
parent 70bd7a6214
commit d601f245d4
36 changed files with 1151 additions and 262 deletions

View File

@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class RolesHeader extends StatelessWidget {
final String title;
final String subtitle;
final VoidCallback? onBack;
const RolesHeader({
super.key,
required this.title,
required this.subtitle,
this.onBack,
});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final loc = AppLocalizations.of(context)!;
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (onBack != null) ...[
IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: onBack,
tooltip: loc.back,
color: theme.colorScheme.primary,
),
const SizedBox(width: 8),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: theme.textTheme.headlineSmall?.copyWith(fontWeight: FontWeight.w600),
),
const SizedBox(height: 6),
Text(
subtitle,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
],
),
),
],
);
}
}