rework ui

This commit is contained in:
verboomp
2026-01-29 12:37:44 +01:00
parent 38979c99e5
commit e062b4c688
18 changed files with 462 additions and 246 deletions

View File

@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import 'package:fotodocumentation/pages/ui_utils/general_style.dart';
import 'package:fotodocumentation/utils/di_container.dart';
import 'package:go_router/go_router.dart';
import 'package:fotodocumentation/l10n/app_localizations.dart';
class CustomerBackButton extends StatelessWidget {
GeneralStyle get _generalStyle => DiContainer.get();
final String path;
const CustomerBackButton({super.key, required this.path});
@override
Widget build(BuildContext context) {
return ElevatedButton.icon(
onPressed: () => context.pop(),
icon: Icon(
Icons.chevron_left,
color: _generalStyle.secondaryTextLabelColor,
size: 24,
),
label: Text(
AppLocalizations.of(context)!.backButtonLabel,
style: TextStyle(
fontFamily: _generalStyle.fontFamily,
fontWeight: FontWeight.normal,
fontSize: 16,
color: _generalStyle.secondaryTextLabelColor,
),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
);
}
}

View File

@@ -20,42 +20,72 @@ class PageHeaderWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(top: 24.0, bottom: 24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
child: LayoutBuilder(
builder: (context, constraints) {
final isNarrow = constraints.maxWidth < 600;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
key: Key("PageHeaderTextHeadline"),
text,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 50,
fontFamily: _generalStyle.fontFamily,
color: _generalStyle.primaryTextLabelColor,
if (isNarrow) ...[
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
_logoutButton(context),
Image.asset(
'assets/images/logo.png',
height: 48,
),
],
),
),
const Spacer(),
_logoutButton(context),
Image.asset(
'assets/images/logo.png',
height: 48,
),
const SizedBox(height: 16),
Text(
key: Key("PageHeaderTextHeadline"),
text,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 50,
fontFamily: _generalStyle.fontFamily,
color: _generalStyle.primaryTextLabelColor,
),
),
] else ...[
Row(
children: [
Expanded(
child: Text(
key: Key("PageHeaderTextHeadline"),
text,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 50,
fontFamily: _generalStyle.fontFamily,
color: _generalStyle.primaryTextLabelColor,
),
),
),
_logoutButton(context),
Image.asset(
'assets/images/logo.png',
height: 48,
),
],
),
],
if (subText.isNotEmpty) ...[
const SizedBox(height: 16),
Text(
key: Key("PageHeaderTextSubHeadline"),
subText,
style: TextStyle(
fontSize: 16,
fontFamily: _generalStyle.fontFamily,
color: _generalStyle.secondaryTextLabelColor,
),
),
],
],
),
if (subText.isNotEmpty) ...[
const SizedBox(height: 16),
Text(
key: Key("PageHeaderTextSubHeadline"),
subText,
style: TextStyle(
fontSize: 16,
fontFamily: _generalStyle.fontFamily,
color: _generalStyle.secondaryTextLabelColor,
),
),
],
],
);
},
),
);
}