frosty/lib/widgets/app_bar.dart
2023-10-28 18:13:23 -04:00

31 lines
709 B
Dart

import 'package:flutter/material.dart';
class FrostyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Widget title;
final bool? centerTitle;
final List<Widget>? actions;
const FrostyAppBar({
super.key,
required this.title,
this.centerTitle,
this.actions,
});
@override
Widget build(BuildContext context) {
return AppBar(
leading: IconButton(
tooltip: 'Back',
icon: Icon(Icons.adaptive.arrow_back_rounded),
onPressed: Navigator.of(context).pop,
),
title: title,
centerTitle: centerTitle,
actions: actions,
);
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}