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.
PatientApp-KKUMC/lib/pages/InPatientServices/medical_instructions.dart

130 lines
5.5 KiB
Dart

import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../models/InPatientServices/get_medical_instructions_response_model.dart';
class MedicalInstructionsPage extends StatefulWidget {
List<GetMedicalInstructions> getMedicalInstructionsList;
MedicalInstructionsPage({@required this.getMedicalInstructionsList});
@override
State<MedicalInstructionsPage> createState() => _MedicalInstructionsPageState();
}
class _MedicalInstructionsPageState extends State<MedicalInstructionsPage> {
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).InPatientServicesHeader,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(21.0),
child: Text(
TranslationBase.of(context).medicalInstructions,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 21.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
),
Expanded(
child: Container(
width: MediaQuery.of(context).size.width,
child: Card(
elevation: 0.0,
margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: BorderSide(color: Colors.transparent, width: 0.0),
),
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ListView.separated(
shrinkWrap: true,
itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length,
itemBuilder: (BuildContext context, int index) {
return Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"),
),
Container(
width: MediaQuery.of(context).size.width * 0.75,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
)),
),
],
));
},
separatorBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: mHeight(16.0),
);
},
),
mHeight(21),
Text(
TranslationBase.of(context).remarks + ":",
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 21.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
mHeight(12),
Text(
widget.getMedicalInstructionsList[0].medicalRemarksField,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
],
),
),
),
),
)
],
));
}
}