KonectarEvents/lib/contacts_module/provider_class/single_hcpprovider.dart

24 lines
625 B
Dart
Raw Normal View History

2024-10-08 12:01:59 +00:00
import 'package:konectar_events/contacts_module/model_class/single_hcpinfo.dart';
import 'package:konectar_events/contacts_module/service.dart/service.dart';
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();
}
}