feat: Refactor client hubs to centralize hub actions and update UI styling.

This commit is contained in:
Achintha Isuru
2026-02-24 13:59:55 -05:00
parent e78d5938dd
commit e084dad4a7
3 changed files with 178 additions and 124 deletions

View File

@@ -8,6 +8,7 @@ class UiAppBar extends StatelessWidget implements PreferredSizeWidget {
const UiAppBar({
super.key,
this.title,
this.subtitle,
this.titleWidget,
this.leading,
this.actions,
@@ -21,6 +22,9 @@ class UiAppBar extends StatelessWidget implements PreferredSizeWidget {
/// The title text to display in the app bar.
final String? title;
/// The subtitle text to display in the app bar.
final String? subtitle;
/// A widget to display instead of the title text.
final Widget? titleWidget;
@@ -53,7 +57,19 @@ class UiAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar(
title:
titleWidget ??
(title != null ? Text(title!, style: UiTypography.headline4b) : null),
(title != null
? Column(
crossAxisAlignment: centerTitle
? CrossAxisAlignment.center
: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(title!, style: UiTypography.headline4b),
if (subtitle != null)
Text(subtitle!, style: UiTypography.body3r.textSecondary),
],
)
: null),
leading:
leading ??
(showBackButton