DiscoverModule/lib/contacts_module/provider_class/trials_provider.dart

23 lines
588 B
Dart

import 'package:discover_module/contacts_module/service.dart/service.dart';
import 'package:discover_module/contacts_module/storage_hive/trials_data/crud_trials.dart';
import 'package:flutter/cupertino.dart';
class TrialsProvider extends ChangeNotifier {
final callapi = Callapi();
List trials = [];
List get trialsinfo => trials;
trialsdata(text) async {
final jsonres = await callapi.getalltrials(text);
trials = jsonres;
notifyListeners();
}
storeTrials(row) async {
final jsonres = await callapi.getalltrials(row);
await addTrials(jsonres);
}
}