2023-01-19 17:50:11 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2023-03-12 02:10:55 +00:00
|
|
|
import 'current_profile_button.dart';
|
2023-01-19 17:50:11 +00:00
|
|
|
|
|
|
|
class StandardAppBar {
|
2023-01-25 18:51:53 +00:00
|
|
|
static AppBar build(BuildContext context, String title,
|
2023-03-11 03:17:34 +00:00
|
|
|
{bool withDrawer = false, List<Widget>? actions}) {
|
2023-01-19 17:50:11 +00:00
|
|
|
return AppBar(
|
2023-03-12 02:10:55 +00:00
|
|
|
leading: withDrawer ? buildCurrentProfileButton(context) : null,
|
2023-01-25 18:51:53 +00:00
|
|
|
title: Text(
|
|
|
|
title,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
),
|
2023-03-11 03:17:34 +00:00
|
|
|
actions: actions,
|
2023-01-19 17:50:11 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|