35 lines
801 B
Dart
35 lines
801 B
Dart
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
|
import 'package:konectar_events/contacts_module/storage_hive/events_data/crud_event.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
class EventProvider extends ChangeNotifier {
|
|
final apicall = Callapi();
|
|
|
|
List eventlist = [];
|
|
|
|
List get EventsList => eventlist;
|
|
|
|
List alleventlist = [];
|
|
|
|
List get allEventsList => alleventlist;
|
|
|
|
geteventdata(text) async {
|
|
final events = await apicall.geteventsdata(text);
|
|
|
|
eventlist = events;
|
|
notifyListeners();
|
|
}
|
|
|
|
allgeteventdata() async {
|
|
final events = await apicall.allgeteventsdata();
|
|
|
|
alleventlist = events;
|
|
notifyListeners();
|
|
}
|
|
|
|
storeEvent(row) async {
|
|
final events = await apicall.geteventsdata(row);
|
|
await addEvent(events);
|
|
}
|
|
}
|