import 'package:flutter/material.dart'; import 'package:smoke_cess_app/services/settings_service.dart'; import '../models/settings.dart'; class SettingsProvider extends ChangeNotifier { Settings? _settings; bool _initialized = false; Settings? get settings => _settings; bool get initialized => _initialized; SettingsProvider() { initSettings(); } void initSettings() async { _settings = await loadSettings(); _initialized = _settings != null ? true : false; notifyListeners(); } }