getToPage function

dynamic getToPage(
  1. Map<String, dynamic> data
)

Implementation

getToPage(Map<String, dynamic> data) {
  switch (data['page']) {
    case 'doctor':
      return Get.to(() => DoctorProfile(
            doctorId: data['doc_id'],
            doctorName: data['doc_name'],
          ));
    case 'hospital':
      return Get.to(() => HospitalProfileMainScreen(
            hopitaladdress: data['hos_add'],
            hopitalpropic: data['hos_pro_pic'],
            hospitalId: data['hos_id'],
            hospitalname: data['hos_name'],
          ));
    case 'teleCons':
      return Get.to(() => TeleConsultationHome());
    case 'diagnostic':
      return Get.to(() => DiagnosticsHome());
    case 'medicine':
      return Get.to(() => MedicineHome());
    case 'claim':
      return Get.to(() => PolicyDetailPage());
    default:
      return Get.to(() => NotificationScreen());
  }
}