You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:hmg_nurses/model/patient/patient_file_information_prm_list.dart';
|
|
import 'package:hmg_nurses/provider/patient_provider_model.dart';
|
|
import 'package:hmg_nurses/ui/patient/widgets/patient_profile_header.dart';
|
|
import 'package:hmg_nurses/widgets/app_bar_widget.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class VitalSignsPage extends StatelessWidget {
|
|
late GetPatientFileInformationPrmList patientProfile;
|
|
late PatientProviderModel provider;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
patientProfile = ModalRoute.of(context)!.settings.arguments as GetPatientFileInformationPrmList;
|
|
provider = context.read<PatientProviderModel>();
|
|
provider.fetchVitalSignsHistory(patientProfile);
|
|
return Scaffold(
|
|
appBar: AppBarWidget(
|
|
context,
|
|
title: "${patientProfile.firstName!} ${patientProfile.lastName!}",
|
|
actions: [
|
|
SvgPicture.asset(
|
|
patientProfile.gender == 1 ? "assets/images/svgs/male.svg" : "assets/images/svgs/female.svg",
|
|
),
|
|
IconButton(
|
|
onPressed: () async {
|
|
String url = "tel://${patientProfile.mobileNumber}";
|
|
if (!await launchUrl(Uri.parse(url))) {
|
|
throw 'Could not launch $url';
|
|
}
|
|
},
|
|
icon: const Icon(Icons.call),
|
|
),
|
|
],
|
|
),
|
|
body: SingleChildScrollView(
|
|
child: Column(
|
|
children: [
|
|
PatientProfileHeader(patientProfile),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|