mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 18:13:31 +00:00
26 lines
610 B
Dart
26 lines
610 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../routes.dart';
|
|
|
|
class StandardAppBar {
|
|
static AppBar build(BuildContext context, String title,
|
|
{List<Widget>? actions}) {
|
|
return AppBar(
|
|
title: Text(
|
|
title,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
actions: [
|
|
if (actions != null) ...actions,
|
|
IconButton(
|
|
onPressed: () {
|
|
Navigator.of(context).popUntil((route) {
|
|
return route.settings.name == ScreenPaths.timelines;
|
|
});
|
|
},
|
|
icon: const Icon(Icons.home),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|