frosty/lib/stores/settings_store.dart
tommyxchow bbd810b0c5 Revise video/chat screen
- Added video overlay with controls for a cleaner look
- Added app bar when video is disabled
- Removed bottom back button in favor of a back button on the overlay
2021-11-11 23:00:32 -05:00

28 lines
839 B
Dart

import 'package:mobx/mobx.dart';
import 'package:shared_preferences/shared_preferences.dart';
part 'settings_store.g.dart';
class SettingsStore = _SettingsStoreBase with _$SettingsStore;
abstract class _SettingsStoreBase with Store {
late final SharedPreferences prefs;
late ReactionDisposer disposeSetter;
Future<void> init() async {
// debugPrint('Created settings provider!');
// prefs = await SharedPreferences.getInstance();
// // Initialize settings from stored preferences if any.
// videoEnabled = prefs.getBool('video_enabled') ?? videoEnabled;
// // Set up autorun to store setting anytime they're changed.
// disposeSetter = autorun((_) {
// debugPrint('video changed');
// prefs.setBool('video_enabled', videoEnabled);
// });
}
@observable
bool videoEnabled = true;
}