2024-06-15 21:29:51 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class AppSettings extends ChangeNotifier {
|
|
|
|
bool groupNotifications = true;
|
|
|
|
int messagePageSize = 128;
|
|
|
|
bool showDebugButton = true;
|
2024-06-18 17:36:41 +02:00
|
|
|
bool backgroundRefreshMessageListOnPop = false;
|
|
|
|
bool alwaysBackgroundRefreshMessageListOnLifecycleResume = true;
|
2024-06-15 21:29:51 +02:00
|
|
|
|
|
|
|
static AppSettings? _singleton = AppSettings._internal();
|
|
|
|
|
|
|
|
factory AppSettings() {
|
|
|
|
return _singleton ?? (_singleton = AppSettings._internal());
|
|
|
|
}
|
|
|
|
|
|
|
|
AppSettings._internal() {
|
|
|
|
load();
|
|
|
|
}
|
|
|
|
|
|
|
|
void clear() {
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
|
|
|
|
void load() {
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
|
|
|
|
Future<void> save() async {
|
|
|
|
//TODO
|
|
|
|
}
|
|
|
|
}
|