mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-08-24 14:01:51 +00:00
40 lines
994 B
Dart
40 lines
994 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
|
|
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
|
|
|
|
class BrandHeader extends StatelessWidget {
|
|
const BrandHeader({
|
|
Key? key,
|
|
required this.title,
|
|
this.hasBackButton = false,
|
|
}) : super(key: key);
|
|
|
|
final String title;
|
|
final bool hasBackButton;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 52,
|
|
alignment: Alignment.centerLeft,
|
|
padding: EdgeInsets.only(
|
|
left: hasBackButton ? 1 : 15,
|
|
),
|
|
child: Container(
|
|
child: Row(
|
|
children: [
|
|
if (hasBackButton) ...[
|
|
IconButton(
|
|
icon: Icon(BrandIcons.arrow_left),
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
),
|
|
SizedBox(width: 10),
|
|
],
|
|
BrandText.h4(title),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|