2024-06-13 17:00:08 +02:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
|
|
class AppBarState extends ChangeNotifier {
|
|
|
|
static AppBarState? _singleton = AppBarState._internal();
|
|
|
|
|
|
|
|
factory AppBarState() {
|
|
|
|
return _singleton ?? (_singleton = AppBarState._internal());
|
|
|
|
}
|
|
|
|
|
|
|
|
AppBarState._internal() {}
|
|
|
|
|
|
|
|
bool _loadingIndeterminate = false;
|
|
|
|
bool get loadingIndeterminate => _loadingIndeterminate;
|
|
|
|
|
2024-06-16 00:46:46 +02:00
|
|
|
bool _showSearchField = false;
|
|
|
|
bool get showSearchField => _showSearchField;
|
|
|
|
|
2024-06-13 17:00:08 +02:00
|
|
|
void setLoadingIndeterminate(bool v) {
|
|
|
|
if (_loadingIndeterminate == v) return;
|
|
|
|
_loadingIndeterminate = v;
|
|
|
|
notifyListeners();
|
|
|
|
}
|
2024-06-16 00:46:46 +02:00
|
|
|
|
|
|
|
void setShowSearchField(bool v) {
|
|
|
|
if (_showSearchField == v) return;
|
|
|
|
_showSearchField = v;
|
|
|
|
notifyListeners();
|
|
|
|
}
|
2024-06-13 17:00:08 +02:00
|
|
|
}
|