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/trials_data/crud_trials.dart';
|
2024-07-05 08:48:29 +00:00
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
|
|
|
class TrialsProvider extends ChangeNotifier {
|
|
|
|
final callapi = Callapi();
|
|
|
|
|
|
|
|
List trials = [];
|
|
|
|
|
|
|
|
List get trialsinfo => trials;
|
|
|
|
|
2024-08-30 12:24:54 +00:00
|
|
|
trialsdata(text) async {
|
|
|
|
final jsonres = await callapi.getalltrials(text);
|
2024-07-05 08:48:29 +00:00
|
|
|
trials = jsonres;
|
|
|
|
notifyListeners();
|
|
|
|
}
|
2024-10-07 12:41:28 +00:00
|
|
|
|
|
|
|
storeTrials(row) async {
|
|
|
|
final jsonres = await callapi.getalltrials(row);
|
|
|
|
await addTrials(jsonres);
|
|
|
|
}
|
2024-07-05 08:48:29 +00:00
|
|
|
}
|