Keep chat controls readable and expose labeled app navigation
This commit is contained in:
@@ -64,6 +64,12 @@ class ShellBarSpec {
|
||||
/// on a run event) then rebuilds nothing, and a badge change rebuilds only
|
||||
/// the tab bar.
|
||||
class ShellBarRegistry extends ChangeNotifier {
|
||||
ValueChanged<AppDestination>? onNavigate;
|
||||
bool get canNavigate => onNavigate != null && !_disposed;
|
||||
void navigateTo(AppDestination destination) {
|
||||
if (!_disposed) onNavigate?.call(destination);
|
||||
}
|
||||
|
||||
final Map<AppDestination, (Object, ShellBarSpec)> _specs = {};
|
||||
final Map<(AppDestination, ShellBadgeKind), int> _badges = {};
|
||||
final _Notifier _bar = _Notifier();
|
||||
|
||||
Reference in New Issue
Block a user