This commit is contained in:
2026-05-14 19:00:55 +02:00
parent 85ad36880c
commit 7f95b8a2ef
64 changed files with 2179 additions and 26 deletions
@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import '../services/information_service.dart';
class InformationProvider with ChangeNotifier {
final InformationService _service = InformationService();
List<dynamic> _informations = [];
bool _isLoading = false;
String? _error;
List<dynamic> get informations => _informations;
bool get isLoading => _isLoading;
String? get error => _error;
Future<void> fetchInformations() async {
_isLoading = true;
_error = null;
notifyListeners();
try {
_informations = await _service.getInformations();
} catch (e) {
_error = e.toString();
} finally {
_isLoading = false;
notifyListeners();
}
}
}