import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; class Summary extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; final AmRequestViewModel amRequestViewModel; Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); @override _SummaryState createState() => _SummaryState(); } class _SummaryState extends State { @override Widget build(BuildContext context) { return SingleChildScrollView( child: Container( margin: EdgeInsets.only(left: 12, right: 12), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts('Summary'), SizedBox(height: 5,), Container( width: double.infinity, padding: EdgeInsets.all(10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Texts('Transportation Method',color: Colors.grey,), Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,), SizedBox(height: 8,), Texts('Direction',color: Colors.grey,), Texts('From Hospital',bold: true,), SizedBox(height: 8,), Texts('Pickup Location',color: Colors.grey,), Texts('SZR Medical Center',bold: true,), SizedBox(height: 8,), Texts('Drop off location',color: Colors.grey,), Texts('6199, Al Ameen wlfn nif',bold: true,), SizedBox(height: 8,), Texts('Select Ambulate',color: Colors.grey,), Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,), SizedBox(height: 8,), Texts('Note',color: Colors.grey,), Texts('${widget.patientER.requesterNote?? '---'}',bold: true,), SizedBox(height: 8,), ], ), ), SizedBox(height: 20,), Texts('Bill Amount',textAlign: TextAlign.start,), SizedBox(height: 5,), Container( height: 55, padding: EdgeInsets.all(10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8) ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Texts('Total amount payable:'), Texts('SR ${widget.patientER.patientERTransportationMethod.totalPrice}') ], ), ), SizedBox(height: 45,), Container( padding: EdgeInsets.all(15), width: double.maxFinite, height: 76, child:SecondaryButton( color: Colors.grey[800], textColor: Colors.white, label: 'Next', // onTap: ()=> widget.changeCurrentTab(2), ), ) ], ), ), ); } }