@ -2,9 +2,10 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoRespo
import ' package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart ' ;
import ' package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart ' ;
import ' package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/ widgets/buttons/defaultButton .dart' ;
import ' package:diplomaticquarterapp/ uitl/utils_new .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 ' ;
@ -37,57 +38,66 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
return AppScaffold (
appBarTitle: TranslationBase . of ( context ) . covidTest ,
isShowAppBar: true ,
showNewAppBar: true ,
showNewAppBarTitle: true ,
body: SingleChildScrollView (
child: Container (
margin: EdgeInsets . fromLTRB ( 15.0 , 15.0 , 15.0 , 100.0 ) ,
showNewAppBar: true ,
backgroundColor: CustomColors . appBackgroudGrey2Color ,
body: Container (
/ / margin: EdgeInsets . fromLTRB ( 15.0 , 15.0 , 15.0 , 100.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container (
height: 150.0 ,
decoration: BoxDecoration (
image: DecorationImage (
image: AssetImage ( " assets/images/new-design/covid-19-big-banner-bg.png " ) ,
fit: BoxFit . fill ,
) ,
color: Colors . white . withOpacity ( 0.3 ) ,
borderRadius: BorderRadius . all ( Radius . circular ( 10 ) ) ) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container (
margin: EdgeInsets . only ( left: 15.0 , right: 15.0 , top: 30.0 ) ,
child: SvgPicture . asset ( ' assets/images/new-design/covid-19-car.svg ' , width: 90.0 , height: 90.0 ) ,
) ,
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container (
margin: EdgeInsets . only ( left: 20.0 , right: 20.0 , top: 20.0 ) ,
child: Text ( TranslationBase . of ( context ) . covidTest , style: TextStyle ( color: Colors . white , fontWeight: FontWeight . bold , fontSize: 24.0 ) ) ,
) ,
Container (
margin: EdgeInsets . only ( left: 20.0 , right: 20.0 , top: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . driveThru , style: TextStyle ( color: Colors . white , fontSize: 24.0 ) ) ,
) ,
] ,
) ,
] ,
) ,
) ,
Container (
decoration: BoxDecoration ( borderRadius: BorderRadius . circular ( 10.0 ) , color: Colors . white ) ,
margin: EdgeInsets . fromLTRB ( 0.0 , 10.0 , 0.0 , 5.0 ) ,
padding: EdgeInsets . fromLTRB ( 10.0 , 0.0 , 10.0 , 20.0 ) ,
children: [
Expanded (
child: Padding (
padding: EdgeInsets . all ( 16 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container (
alignment: Alignment . center ,
margin: EdgeInsets . only ( left: 0.0 , right: 20.0 , top: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . covidSelectProcedure , style: TextStyle ( color: Colors . black , fontSize: 20.0 , fontWeight: FontWeight . bold ) ) ,
) ,
/ / Container (
/ / height: 150.0 ,
/ / decoration: BoxDecoration (
/ / image: DecorationImage (
/ / image: AssetImage (
/ / " assets/images/new-design/covid-19-big-banner-bg.png " ) ,
/ / fit: BoxFit . fill ,
/ / ) ,
/ / color: Colors . white . withOpacity ( 0.3 ) ,
/ / borderRadius: BorderRadius . all ( Radius . circular ( 10 ) ) ) ,
/ / child: Row (
/ / crossAxisAlignment: CrossAxisAlignment . start ,
/ / children: < Widget > [
/ / Container (
/ / margin:
/ / EdgeInsets . only ( left: 15.0 , right: 15.0 , top: 30.0 ) ,
/ / child: SvgPicture . asset (
/ / ' assets/images/new-design/covid-19-car.svg ' ,
/ / width: 90.0 ,
/ / height: 90.0 ) ,
/ / ) ,
/ / Column (
/ / crossAxisAlignment: CrossAxisAlignment . start ,
/ / children: < Widget > [
/ / Container (
/ / margin: EdgeInsets . only (
/ / left: 20.0 , right: 20.0 , top: 20.0 ) ,
/ / child: Text ( TranslationBase . of ( context ) . covidTest ,
/ / style: TextStyle (
/ / color: Colors . white ,
/ / fontWeight: FontWeight . bold ,
/ / fontSize: 24.0 ) ) ,
/ / ) ,
/ / Container (
/ / margin: EdgeInsets . only (
/ / left: 20.0 , right: 20.0 , top: 10.0 ) ,
/ / child: Text ( TranslationBase . of ( context ) . driveThru ,
/ / style: TextStyle (
/ / color: Colors . white , fontSize: 24.0 ) ) ,
/ / ) ,
/ / ] ,
/ / ) ,
/ / ] ,
/ / ) ,
/ / ) ,
Text ( TranslationBase . of ( context ) . covidSelectProcedure , style: TextStyle ( color: Colors . black , fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . bold ) ) ,
. . . List . generate (
widget . proceduresList . length ,
( index ) = > Column (
@ -107,7 +117,14 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
} ) ;
} ,
child: ListTile (
title: Text ( widget . proceduresList [ index ] . procedureName , style: TextStyle ( fontSize: 14.0 ) ) ,
title: Text (
widget . proceduresList [ index ] . procedureName ,
style: TextStyle (
fontSize: 12.0 ,
letterSpacing: - 0.48 ,
fontWeight: FontWeight . w600 ,
) ,
) ,
leading: Radio (
value: widget . proceduresList [ index ] ,
groupValue: widget . selectedProcedure ,
@ -116,6 +133,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onChanged: ( value ) {
setState ( ( ) {
widget . selectedProcedure = value ;
print ( widget . selectedProcedure . procedureName ) ;
getPaymentInfo ( context , widget . projectID . toString ( ) , widget . selectedProcedure . procedureID ) ;
} ) ;
} ,
@ -128,33 +146,72 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
] ,
) ,
) ,
Divider ( ) ,
Card (
shape: cardRadius ( 12 ) ,
child: Padding (
padding: const EdgeInsets . all ( 12.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Text ( TranslationBase . of ( context ) . testFee ,
style: TextStyle (
color: Colors . black ,
fontSize: 16.0 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.64 ,
) ) ,
Container (
alignment: Alignment . center ,
margin: EdgeInsets . only ( left: 0.0 , right: 20.0 , top: 0.0 ) ,
child: Text ( TranslationBase . of ( context ) . testFee , style: TextStyle ( color: Colors . black , fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
width: double . infinity ,
padding: EdgeInsets . only ( top: 10 , bottom: 3 ) ,
child: Row (
children: [
Expanded (
child: _getNormalText ( TranslationBase . of ( context ) . patientShareToDo ) ,
) ,
Expanded (
child: _getNormalText ( widget . covidPaymentInfoResponse . patientShareField . toString ( ) , isBold: true ) ,
)
] ,
) ,
) ,
Table (
mDivider ( Colors . grey [ 200 ] ) ,
Container (
width: double . infinity ,
padding: EdgeInsets . only ( top: 3 , bottom: 3 ) ,
child: Row (
children: [
TableRow ( children: [
TableCell ( child: _getNormalText ( TranslationBase . of ( context ) . patientShareToDo ) ) ,
TableCell ( child: _getNormalText ( widget . covidPaymentInfoResponse . patientShareField . toString ( ) ) ) ,
] ) ,
TableRow ( children: [
TableCell ( child: _getNormalText ( TranslationBase . of ( context ) . patientTaxToDo ) ) ,
TableCell ( child: _getNormalText ( widget . covidPaymentInfoResponse . patientTaxAmountField . toString ( ) ) ) ,
] ) ,
TableRow ( children: [
TableCell ( child: _getNormalText ( TranslationBase . of ( context ) . patientShareTotalToDo ) ) ,
TableCell ( child: _getNormalText ( widget . covidPaymentInfoResponse . patientShareWithTaxField . toString ( ) ) ) ,
] ) ,
Expanded (
child: _getNormalText ( TranslationBase . of ( context ) . patientTaxToDo ) ,
) ,
Expanded (
child: _getNormalText ( widget . covidPaymentInfoResponse . patientTaxAmountField . toString ( ) , isBold: true ) ,
)
] ,
) ,
) ,
mDivider ( Colors . grey [ 200 ] ) ,
Container (
width: double . infinity ,
padding: EdgeInsets . only ( top: 3 , bottom: 3 ) ,
child: Row (
children: [
Expanded (
child: _getNormalText ( TranslationBase . of ( context ) . patientShareTotalToDo ) ,
) ,
Expanded (
child: _getNormalText ( widget . covidPaymentInfoResponse . patientShareWithTaxField . toString ( ) , isBold: true ) ,
)
] ,
) ,
) ,
] ,
) ,
) ,
) ,
Container (
margin: EdgeInsets . fromLTRB ( 0.0 , 15.0 , 0.0 , 5.0 ) ,
margin: EdgeInsets . fromLTRB ( 0.0 , 0.0, 0.0 , 0 .0) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . center ,
mainAxisAlignment: MainAxisAlignment . start ,
@ -168,71 +225,121 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
} ,
activeColor: Color ( 0xffB8382C ) ,
) ,
Texts ( TranslationBase . of ( context ) . iAgreeToTheTermsAndConditions ) ,
Text (
TranslationBase . of ( context ) . agreeTo ,
style: TextStyle (
fontSize: 12 ,
letterSpacing: - 0.48 ,
fontWeight: FontWeight . w600 ,
) ,
) ,
mWidth ( 3 ) ,
Text (
TranslationBase . of ( context ) . termsConditoins ,
style: TextStyle (
fontSize: 12 ,
letterSpacing: - 0.48 ,
color: CustomColors . accentColor ,
fontWeight: FontWeight . w600 ,
decoration: TextDecoration . underline ,
) ,
) ,
] ,
) ,
) ,
Divider (
color: Colors . grey ,
mFlex ( 1 ) ,
Text (
TranslationBase . of ( context ) . payOptions ,
textAlign: TextAlign . center ,
style: TextStyle (
fontSize: 12.0 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.46 ,
) ,
Container (
alignment: Alignment . center ,
margin: EdgeInsets . fromLTRB ( 20.0 , 15.0 , 20.0 , 5.0 ) ,
child: Text ( TranslationBase . of ( context ) . payOptions , textAlign: TextAlign . center , style: TextStyle ( fontSize: 16.0 , fontWeight: FontWeight . bold , fontFamily: " Open-Sans " ) ) ,
) ,
Container (
alignment: Alignment . center ,
margin: EdgeInsets . fromLTRB ( 20.0 , 10.0 , 20.0 , 5.0 ) ,
margin: EdgeInsets . only ( top: 12 , bottom: 12 ) ,
child: Image . asset ( " assets/images/new-design/payment_options_invoice_confirmation.png " , width: 300 ) ,
) ,
] ,
) ,
) ,
) ,
bottomSheet: Container (
color: Colors . grey [ 100 ] ,
padding: EdgeInsets . fromLTRB ( 10.0 , 5.0 , 10.0 , 10.0 ) ,
child: Flex (
direction: Axis . horizontal ,
children: < Widget > [
Container (
width: double . infinity ,
child: Card (
elevation: 20 ,
margin: EdgeInsets . zero ,
child: Padding (
padding: const EdgeInsets . only ( top: 12 , bottom: 12 , left: 12 , right: 12 ) ,
child: Row (
children: [
Expanded (
flex: 1 ,
child: Container (
margin: EdgeInsets . fromLTRB ( 10.0 , 0.0 , 5.0 , 0.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 10.0 ) ,
) ,
minWidth: MediaQuery . of ( context ) . size . width * 0.7 ,
height: 45.0 ,
child: DefaultButton ( TranslationBase . of ( context ) . cancel , ( ) {
child: RaisedButton (
color: CustomColors . darkGreyColor ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: Colors . grey [ 500 ] ,
onPressed: ( ) {
cancel ( ) ;
} , color: Color ( 0xffEAEAEA ) , textColor: Color ( 0xff000000 ) ) ,
} ,
child: Text (
TranslationBase . of ( context ) . cancel ,
style: TextStyle (
fontSize: 16.0 ,
letterSpacing: - 0.48 ,
color: Colors . black ,
fontWeight: FontWeight . w600 ,
) ,
) ,
) ,
) ,
) ,
) ,
mWidth ( 12 ) ,
Expanded (
flex: 1 ,
child: Container (
margin: EdgeInsets . fromLTRB ( 10.0 , 0.0 , 5.0 , 0.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 10.0 ) ,
) ,
minWidth: MediaQuery . of ( context ) . size . width * 0.7 ,
height: 45.0 ,
child: DefaultButton (
child: RaisedButton (
color: CustomColors . accentColor ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: Colors . grey [ 500 ] ,
onPressed: isAgree ? next : null ,
child: Text (
TranslationBase . of ( context ) . next ,
isAgree
? ( ) {
next ( ) ;
}
: null ,
disabledColor: Color ( 0x8ac5272d ) ,
style: TextStyle (
fontSize: 16.0 ,
letterSpacing: - 0.48 ,
fontWeight: FontWeight . w600 ,
) ,
) ,
) ,
) ,
) ,
) ,
] ,
) ,
) ,
) ,
)
] ,
) ,
) ,
@ -268,10 +375,15 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
} ) ;
}
_getNormalText ( text ) {
return Container (
margin: EdgeInsets . only ( top: 20.0 , right: 10.0 ) ,
child: Text ( text , textAlign: TextAlign . end , style: TextStyle ( fontSize: 15 , fontFamily: ' Open-Sans ' , letterSpacing: 0.5 , color: Colors . grey [ 700 ] ) ) ,
_getNormalText ( text , { bool isBold = false } ) {
return Text (
text ,
style: TextStyle (
fontSize: isBold ? 12 : 10 ,
letterSpacing: - 0.5 ,
color: isBold ? Colors . black : Colors . grey [ 700 ] ,
fontWeight: FontWeight . w600 ,
) ,
) ;
}
}