DiscoverModule/lib/contacts_module/provider_class/events_provider.dart

35 lines
801 B
Dart
Raw Normal View History

2024-10-07 12:41:28 +00:00
import 'package:discover_module/contacts_module/service.dart/service.dart';
import 'package:discover_module/contacts_module/storage_hive/events_data/crud_event.dart';
2024-07-05 08:48:29 +00:00
import 'package:flutter/cupertino.dart';
class EventProvider extends ChangeNotifier {
final apicall = Callapi();
List eventlist = [];
List get EventsList => eventlist;
List alleventlist = [];
List get allEventsList => alleventlist;
2024-08-30 12:24:54 +00:00
geteventdata(text) async {
final events = await apicall.geteventsdata(text);
2024-07-05 08:48:29 +00:00
eventlist = events;
notifyListeners();
}
allgeteventdata() async {
final events = await apicall.allgeteventsdata();
alleventlist = events;
notifyListeners();
}
2024-10-07 12:41:28 +00:00
storeEvent(row) async {
final events = await apicall.geteventsdata(row);
await addEvent(events);
}
2024-07-05 08:48:29 +00:00
}