KonectarEvents/lib/contacts_module/provider_class/nih_provider.dart

23 lines
621 B
Dart

import 'package:konectar_events/contacts_module/service.dart/service.dart';
import 'package:konectar_events/contacts_module/storage_hive/nih_grant_data/crud_nih.dart';
import 'package:flutter/cupertino.dart';
class NIHGrantsProvider extends ChangeNotifier {
final apicall = Callapi();
List nihlist = [];
List get nihgrantslist => nihlist;
nihinfo(text) async {
print("Location_Text");
final nih_result = await apicall.getnihdata(text);
nihlist = nih_result;
notifyListeners();
}
storeNih(row) async {
final nihresult = await apicall.getnihdata(row);
await addNih(nihresult);
}
}