import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; class RadiologyDetailsPage extends StatelessWidget { final FinalRadiology finalRadiology; final PatiantInformtion patient; final String patientType; final String arrivalType; RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType}); @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getRadImageURL( patient: patient, projectId: finalRadiology.projectID, lineItem: finalRadiology.invoiceLineItemNo, invoiceNo: finalRadiology.invoiceNo), builder: (_, model, widget) => AppScaffold( isShowAppBar: false, baseViewModel: model, body: SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ PatientProfileHeaderWhitAppointment(patient: patient, patientType: patientType??"0", arrivalType: arrivalType??"0", orderNo: finalRadiology.orderNo.toString(), appointmentDate:finalRadiology.orderDate, doctorName: finalRadiology.doctorName, profileUrl: finalRadiology.doctorImageURL, invoiceNO: finalRadiology.invoiceNo.toString(), ), SizedBox( height: MediaQuery.of(context).size.height * 0.2, ), Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox(height: 5,), Texts(TranslationBase.of(context).generalResult), SizedBox(height: 5,), Texts( '${finalRadiology.reportData}', textAlign: TextAlign.start, fontSize: 17, color: Colors.grey, ), SizedBox(height: 25,), Container( width: MediaQuery.of(context).size.width * 0.8, child: Button( color: Colors.red, onTap: () { launch(model.radImageURL); }, title: TranslationBase.of(context).openRad, ), ), ], ), ), ], ), ), ), ); } }