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
21 lines
408 B
import 'package:flutter/foundation.dart';
|
|
|
|
class Settings {
|
|
bool? _isDarkMode;
|
|
|
|
bool? get isDarkMode => _isDarkMode;
|
|
}
|
|
|
|
class SettingsProvider extends Settings with ChangeNotifier {
|
|
void setProps({
|
|
bool? isDarkMode,
|
|
}) {
|
|
bool changed = false;
|
|
if (this._isDarkMode != isDarkMode) {
|
|
this._isDarkMode = isDarkMode;
|
|
changed = true;
|
|
}
|
|
if (changed) notifyListeners();
|
|
}
|
|
}
|