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/medical/prescriptions/prescription_details_page.dart

188 lines
7.2 KiB
Dart

import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
4 years ago
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PrescriptionDetailsPage extends StatelessWidget {
final PrescriptionReport prescriptionReport;
PrescriptionDetailsPage({Key key, this.prescriptionReport});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
4 years ago
appBarTitle: TranslationBase.of(context).prescriptions,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
prescriptionReport.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN),
),
),
)
],
),
),
Container(
margin: EdgeInsets.all(8),
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PharmacyForPrescriptionsPage(
prescriptionReport: prescriptionReport),
),
),
child: Center(
child: Column(
children: <Widget>[
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white, shape: BoxShape.rectangle),
child: Column(
children: <Widget>[
Icon(
Icons.pin_drop,
color: Colors.red[800],
size: 55,
),
],
),
),
SizedBox(
height: 5,
),
4 years ago
Texts(TranslationBase.of(context).ports)
],
),
)),
),
Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
outside: BorderSide(width: 0.5)),
children: [
TableRow(
children: [
Container(
color: Colors.white,
height: 30,
width: double.infinity,
4 years ago
child: Center(child: Texts(TranslationBase.of(context).way))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
4 years ago
child: Center(child: Texts(TranslationBase.of(context).average))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
4 years ago
child: Center(child: Texts(TranslationBase.of(context).dailyDoses))),
Container(
color: Colors.white,
height: 30,
width: double.infinity,
4 years ago
child: Center(child: Texts(TranslationBase.of(context).period))),
],
),
TableRow(
children: [
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text(prescriptionReport.routeN))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(prescriptionReport.frequencyN))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(
child: Text(
'${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child:
Center(child: Text('${prescriptionReport.days}')))
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(5),
child: Center(
child: Column(
children: <Widget>[
4 years ago
Texts(TranslationBase.of(context).notes),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[300],
),
SizedBox(
height: 5,
),
Texts(prescriptionReport.remarks),
],
),
),
)
],
),
),
);
}
}