KonectarEvents/lib/contacts_module/provider_class/publications_provider.dart

36 lines
959 B
Dart
Raw Permalink Normal View History

2024-10-08 12:01:59 +00:00
import 'package:konectar_events/contacts_module/service.dart/service.dart';
import 'package:konectar_events/contacts_module/storage_hive/pub_data/curd_pub.dart';
import 'package:flutter/cupertino.dart';
class PublicatioProvider extends ChangeNotifier {
final apicall = Callapi();
List publist = [];
List get publicationlist => publist;
List allpublist = [];
List get allpublicationlist => allpublist;
publicatininfo(text) async {
final publication_result = await apicall.getpublicationsdata(text);
publist = publication_result;
notifyListeners();
}
allpublicatininfo() async {
final publication_result = await apicall.getallpublicationsdata();
allpublist = publication_result;
notifyListeners();
}
storePub(row) async {
final publication_result = await apicall.getpublicationsdata(row);
print("Affiliations_MyStoringData:$publication_result ");
await addPublication(publication_result);
}
}