first commit
This commit is contained in:
39
lib/components/notifiers/app_settings.dart
Normal file
39
lib/components/notifiers/app_settings.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
// Flutter imports:
|
||||
import 'package:flutter/material.dart' show ChangeNotifier;
|
||||
|
||||
///
|
||||
/// Динамические параметры для конфигурирования приложения
|
||||
///
|
||||
class AppSettingsNotifier extends ChangeNotifier {
|
||||
///
|
||||
/// Динамические параметры для конфигурирования приложения
|
||||
///
|
||||
AppSettingsNotifier({
|
||||
this.debugMode = false,
|
||||
this.showFps = false,
|
||||
});
|
||||
|
||||
/// Включение дебаг мода
|
||||
bool debugMode;
|
||||
|
||||
/// Отображение FPS
|
||||
bool showFps;
|
||||
|
||||
///
|
||||
/// Переключение режима "Дебаг"
|
||||
///
|
||||
void toggleDebugMode() {
|
||||
debugMode = !debugMode;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
///
|
||||
/// Переключение режима "Дебаг"
|
||||
///
|
||||
void toggleFps() {
|
||||
showFps = !showFps;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user