prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
691 B
Dart
27 lines
691 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
import 'package:prosapp_web_app/models/setting.dart';
|
|
|
|
class SettingsProvider extends ChangeNotifier {
|
|
Setting? settings;
|
|
bool isLoading = true;
|
|
|
|
final _settingsCollection = FirebaseFirestore.instance.collection('settings');
|
|
|
|
SettingsProvider() {
|
|
getSettings();
|
|
}
|
|
|
|
getSettings() async {
|
|
try {
|
|
final querySnapshot = await _settingsCollection.doc('global').get();
|
|
settings = Setting.fromDocument(querySnapshot.data()!);
|
|
} catch (e) {
|
|
print('Error obteniendo los settings: $e');
|
|
} finally {
|
|
isLoading = false;
|
|
notifyListeners();
|
|
}
|
|
}
|
|
}
|