fix: alot
This commit is contained in:
@@ -37,6 +37,15 @@ class BarScreenViewModel extends ChangeNotifier {
|
||||
BarTab? get selectedTab =>
|
||||
_tabs.firstWhereOrNull((tab) => tab.id == _selectedTabId);
|
||||
|
||||
bool hasOpenTabNamed(String name, {String? exceptTabId}) {
|
||||
final normalized = name.trim().toLowerCase();
|
||||
return _tabs.any(
|
||||
(tab) =>
|
||||
tab.id != exceptTabId &&
|
||||
tab.customerName.trim().toLowerCase() == normalized,
|
||||
);
|
||||
}
|
||||
|
||||
void ensureLoaded() {
|
||||
if (_subscription != null) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user