DiscoverModule/lib/contacts_module/provider_class/single_hcpprovider.dart

24 lines
625 B
Dart
Raw Permalink Normal View History

2024-10-07 12:41:28 +00:00
import 'package:discover_module/contacts_module/model_class/single_hcpinfo.dart';
import 'package:discover_module/contacts_module/service.dart/service.dart';
2024-06-27 08:38:43 +00:00
import 'package:flutter/foundation.dart';
class Singlehcpdetails extends ChangeNotifier {
final apicall = Callapi();
List<Userdetails> _singlehcplist = [];
List<Userdetails> get singlehcpinfo => _singlehcplist;
Future<void> hcpinfo() async {
final getdata = await apicall.getsinglehcpdata();
print("Provider_data: $getdata");
// _singlehcplist = getdata;
_singlehcplist.add(Userdetails.fromJson(getdata));
notifyListeners();
}
}