selfprivacy.org.app/lib/ui/components/brand_header/brand_header.dart

40 lines
994 B
Dart
Raw Normal View History

2020-12-02 11:16:23 +02:00
import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart';
2020-12-08 21:26:51 +02:00
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
2020-12-02 11:16:23 +02:00
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(
2020-12-03 18:52:53 +02:00
height: 52,
alignment: Alignment.centerLeft,
2020-12-02 11:16:23 +02: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 21:26:51 +02:00
BrandText.h4(title),
2020-12-02 11:16:23 +02:00
],
),
),
);
}
}