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.
RSGDoctorApp/lib/widgets/patients/profile/profile_medical_info_widget...

134 lines
4.0 KiB
Dart

import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param:
*@return:ProfileMedicalInfoWidget
*@desc: Profile Medical Info Widget
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
String url = "assets/images/";
final double contWidth = SizeConfig.realScreenWidth * 0.70;
final double contHeight = SizeConfig.screenHeight * 0.30;
return RoundedContainer(
child: ListView(
children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Patient Medical Information ',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.w700,
color: Hexcolor('#58434F'),
),
SizedBox(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
InkWell(
onTap: () {
navigator(context,VITAL_SIGN);
},
child: CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
),
CircleAvatarWidget(
des: 'Lab Result',
url: url + 'lab.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
CircleAvatarWidget(
des: 'Prescription',
url: url + 'note.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
CircleAvatarWidget(
des: 'Radiology',
url: url + 'radiology-1.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
],
)
],
),
),
],
),
width: contWidth,
height: contHeight,
);
}
void navigator(BuildContext context,route) {
Navigator.of(context).pushNamed(VITAL_SIGN,
arguments: {'patient': patient});
}
}
class CircleAvatarWidget extends StatelessWidget {
const CircleAvatarWidget(
{Key key,
@required this.url,
@required this.des,
this.height,
this.width})
: super(key: key);
final String url;
final String des;
final double height;
final double width;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Container(
height: height,
width: width,
decoration: new BoxDecoration(
// color: Colors.green, // border color
shape: BoxShape.circle,
border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)),
child: CircleAvatar(
radius: SizeConfig.imageSizeMultiplier * 12,
child: Image.asset(url),
backgroundColor: Colors.transparent,
),
),
SizedBox(
height: 10,
),
AppText(des)
],
);
}
}