import 'package:discover_module/model_class/single_hcpinfo.dart'; import 'package:discover_module/service.dart/service.dart'; import 'package:flutter/foundation.dart'; class Singlehcpdetails extends ChangeNotifier { final apicall = Callapi(); List _singlehcplist = []; List get singlehcpinfo => _singlehcplist; Future hcpinfo() async { final getdata = await apicall.getsinglehcpdata(); print("Provider_data: $getdata"); // _singlehcplist = getdata; _singlehcplist.add(Userdetails.fromJson(getdata)); notifyListeners(); } }