23 lines
592 B
Dart
23 lines
592 B
Dart
|
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<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();
|
||
|
}
|
||
|
}
|