rework ui
This commit is contained in:
@@ -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.go(path),
|
||||
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),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user