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.
57 lines
2.0 KiB
Dart
57 lines
2.0 KiB
Dart
import 'package:cached_network_image/cached_network_image.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:hmg_nurses/classes/date-utils.dart';
|
|
import 'package:hmg_nurses/extensions/int_extensions.dart';
|
|
import 'package:hmg_nurses/extensions/string_extensions.dart';
|
|
import 'package:hmg_nurses/model/patient/patient_file_information_prm_list.dart';
|
|
import 'package:hmg_nurses/ui/patient/widgets/grid/profile_gird_for_search.dart';
|
|
import 'package:hmg_nurses/ui/patient/widgets/patient_profile_header.dart';
|
|
import 'package:hmg_nurses/widgets/app_bar_widget.dart';
|
|
import 'package:hmg_nurses/widgets/circular_avatar.dart';
|
|
import 'package:hmg_nurses/widgets/commen/cusom_row.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class PatientProfilePage extends StatelessWidget {
|
|
late GetPatientFileInformationPrmList patientProfile;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
patientProfile = ModalRoute.of(context)!.settings.arguments as GetPatientFileInformationPrmList;
|
|
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),
|
|
Container(
|
|
width: double.infinity,
|
|
margin: const EdgeInsets.all(21),
|
|
child: ProfileGridForSearch(
|
|
patient: patientProfile,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|