You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
408 B

4 years ago
import 'package:flutter/foundation.dart';
class Settings {
4 years ago
bool? _isDarkMode;
4 years ago
4 years ago
bool? get isDarkMode => _isDarkMode;
4 years ago
}
4 years ago
class SettingsProvider extends Settings with ChangeNotifier {
4 years ago
void setProps({
bool? isDarkMode,
}) {
bool changed = false;
4 years ago
if (this._isDarkMode != isDarkMode) {
this._isDarkMode = isDarkMode;
4 years ago
changed = true;
}
if (changed) notifyListeners();
}
}