2020-12-02 09:16:23 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
|
2020-12-08 19:26:51 +00:00
|
|
|
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
|
2020-12-02 09:16:23 +00:00
|
|
|
|
|
|
|
class BrandHeader extends StatelessWidget {
|
|
|
|
const BrandHeader({
|
2021-03-15 15:39:44 +00:00
|
|
|
Key? key,
|
|
|
|
required this.title,
|
2020-12-02 09:16:23 +00:00
|
|
|
this.hasBackButton = false,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
final String title;
|
|
|
|
final bool hasBackButton;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
2020-12-03 16:52:53 +00:00
|
|
|
height: 52,
|
|
|
|
alignment: Alignment.centerLeft,
|
2020-12-02 09:16:23 +00:00
|
|
|
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),
|
|
|
|
],
|
2020-12-08 19:26:51 +00:00
|
|
|
BrandText.h4(title),
|
2020-12-02 09:16:23 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|