Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into Fatima-New-Design
# Conflicts: # lib/pages/search_products_page.dartmerge-update-with-lab-changes
commit
42e74759e4
@ -0,0 +1,12 @@
|
|||||||
|
<svg id="calendar" xmlns="http://www.w3.org/2000/svg" width="16.407" height="16.407" viewBox="0 0 16.407 16.407">
|
||||||
|
<g id="Group_8220" data-name="Group 8220">
|
||||||
|
<g id="Group_8219" data-name="Group 8219">
|
||||||
|
<path id="Path_4987" data-name="Path 4987" d="M14.767,1.641h-.82V.82a.82.82,0,1,0-1.641,0v.82H4.1V.82A.775.775,0,0,0,3.281,0a.775.775,0,0,0-.82.82v.82H.82a.822.822,0,0,0-.82.82V13.946a.822.822,0,0,0,.82.82h5A6.53,6.53,0,0,1,15.587,6.4V2.461A.882.882,0,0,0,14.767,1.641Z" fill="#2e303a"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g id="Group_8222" data-name="Group 8222" transform="translate(6.563 6.563)">
|
||||||
|
<g id="Group_8221" data-name="Group 8221">
|
||||||
|
<path id="Path_4988" data-name="Path 4988" d="M209.722,204.8a4.922,4.922,0,1,0,4.922,4.922A4.937,4.937,0,0,0,209.722,204.8Zm1.641,5.743h-1.641a.775.775,0,0,1-.82-.82v-2.461a.82.82,0,0,1,1.641,0V208.9h.82a.82.82,0,1,1,0,1.641Z" transform="translate(-204.8 -204.8)" fill="#2e303a"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 953 B |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" width="124px" height="54px" viewBox="0 0 606.61 165.15" fill="#007c7f"><g>
|
||||||
|
<path class="cls-1" d="M152.63,74.48a9.57,9.57,0,0,0-9.57,9.57,62,62,0,1,1-123.91,0V60H58A9.58,9.58,0,0,0,58,40.8H19.15V9.57A9.58,9.58,0,0,0,0,9.57V84.05a81.11,81.11,0,0,0,162.21,0,9.57,9.57,0,0,0-9.58-9.57"></path><path class="cls-1" d="M94.55,60a9.59,9.59,0,0,0,9.57-9.58,9.67,9.67,0,0,0-2.82-6.77,9.15,9.15,0,0,0-1.44-1.18,8.49,8.49,0,0,0-1.66-.87A8.65,8.65,0,0,0,96.41,41a9.8,9.8,0,0,0-3.74,0,8.93,8.93,0,0,0-1.8.56,8.41,8.41,0,0,0-1.65.87,9.56,9.56,0,0,0-1.45,14.73A9.61,9.61,0,0,0,94.55,60"></path><path class="cls-1" d="M131.11,60a9.57,9.57,0,0,0,6.77-16.33,9.29,9.29,0,0,0-1.47-1.2,8.41,8.41,0,0,0-1.65-.87A8.65,8.65,0,0,0,133,41a9.8,9.8,0,0,0-3.74,0,9.13,9.13,0,0,0-1.8.56,8.41,8.41,0,0,0-1.65.87,8.72,8.72,0,0,0-1.45,1.2A9.57,9.57,0,0,0,131.11,60"></path><path class="cls-1" d="M250.06,98.93A5.11,5.11,0,0,0,245,104c0,10.75-8.19,19.5-18.26,19.5s-18.25-8.75-18.25-19.5V68.67h32.61a5.11,5.11,0,0,0,0-10.22H208.44v-27a5.11,5.11,0,1,0-10.22,0V104c0,16.39,12.77,29.72,28.47,29.72s28.48-13.33,28.48-29.72a5.11,5.11,0,0,0-5.11-5.11"></path><path class="cls-1" d="M551.34,64.91a5.1,5.1,0,0,0-.72-7.19,27.47,27.47,0,0,0-17.54-6.3c-15.7,0-28.47,13.33-28.47,29.71v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.75,8.19-19.49,18.25-19.49a17.31,17.31,0,0,1,11.07,4,5.11,5.11,0,0,0,7.19-.73"></path><path class="cls-1" d="M404.3,51.42a28.11,28.11,0,0,0-23.36,12.76,28.13,28.13,0,0,0-23.37-12.76c-15.7,0-28.47,13.33-28.47,29.71v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.74,8.19-19.49,18.25-19.49s18.26,8.75,18.26,19.49v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.74,8.18-19.49,18.25-19.49s18.25,8.75,18.25,19.49v47.08a5.11,5.11,0,1,0,10.22,0V81.13c0-16.38-12.77-29.71-28.47-29.71"></path><path class="cls-1" d="M291.28,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.15.19l.63.15,1,.28.64.22c.33.11.65.24,1,.38l.61.26c.33.16.65.33,1,.5l.52.29c.39.23.76.47,1.13.73l.28.19c.45.33.89.68,1.31,1,.12.1.24.22.35.33.3.27.6.55.88.85l.42.47c.24.26.47.54.7.82s.27.35.41.54.41.57.61.86.25.38.36.58.38.63.55,1,.21.38.3.57c.19.38.36.76.52,1.15.07.16.14.3.2.45.22.56.41,1.11.58,1.68,0,.12.05.23.08.34.11.4.21.81.3,1.22H290A27.21,27.21,0,0,0,262.81,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M273,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path><path class="cls-1" d="M467.23,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.14.19.22,0,.43.1.64.15l1,.28.64.22c.33.11.65.24,1,.38l.61.26c.33.16.65.33,1,.5l.52.29c.38.23.76.47,1.13.73l.28.19c.45.33.89.68,1.31,1,.12.1.23.22.35.33.3.27.6.55.88.85l.42.47c.24.26.47.54.7.82s.27.35.41.54.41.57.61.86.25.38.37.58.37.63.54,1,.21.38.3.57c.19.38.36.76.52,1.15.07.15.14.3.2.45.21.56.41,1.11.58,1.68,0,.12.05.23.08.34.11.4.21.81.3,1.22H465.94A27.21,27.21,0,0,0,438.76,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M449,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path><path class="cls-1" d="M578.14,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.14.19.22,0,.43.1.64.15l1,.28.64.22c.33.11.66.24,1,.38l.59.26c.34.16.66.33,1,.51l.52.28c.39.23.77.48,1.14.74l.27.18c.45.33.89.68,1.31,1l.35.32c.3.28.59.56.88.86l.42.46c.24.27.47.54.7.83s.28.35.41.54.41.57.6.86.26.38.38.58.36.62.53.94.22.39.32.59c.18.36.34.74.5,1.12.07.16.15.32.21.48.21.55.41,1.1.57,1.67,0,.13.07.27.1.4.11.38.2.77.29,1.16H576.85A27.21,27.21,0,0,0,549.67,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M559.89,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path>
|
||||||
|
|
||||||
|
</g></svg>
|
||||||
|
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1,35 @@
|
|||||||
|
class TamaraPaymentOption {
|
||||||
|
String name;
|
||||||
|
double minLimit;
|
||||||
|
double maxLimit;
|
||||||
|
int id;
|
||||||
|
|
||||||
|
String fullName() => '$name Months';
|
||||||
|
|
||||||
|
TamaraPaymentOption({
|
||||||
|
this.name,
|
||||||
|
this.minLimit,
|
||||||
|
this.maxLimit,
|
||||||
|
this.id});
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => fullName();
|
||||||
|
|
||||||
|
TamaraPaymentOption.fromJson(dynamic json) {
|
||||||
|
name = json["name"];
|
||||||
|
minLimit = json["min_limit"];
|
||||||
|
maxLimit = json["max_limit"];
|
||||||
|
id = json["id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
var map = <String, dynamic>{};
|
||||||
|
map["name"] = name;
|
||||||
|
map["min_limit"] = minLimit;
|
||||||
|
map["max_limit"] = maxLimit;
|
||||||
|
map["id"] = id;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,139 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
|
||||||
class SelectSearchCriteriaDialog extends StatefulWidget {
|
|
||||||
List<SearchCriteriaModel> searchCriteria = [
|
|
||||||
SearchCriteriaModel(name: "Identification Number",nameAr:"رقم الهوية",value: 1),
|
|
||||||
SearchCriteriaModel(name: "Referral Number",nameAr:"رقم الإحالة",value: 2),
|
|
||||||
];
|
|
||||||
final Function(SearchCriteriaModel) onValueSelected;
|
|
||||||
SearchCriteriaModel selectedCriteria;
|
|
||||||
ProjectViewModel projectViewModel;
|
|
||||||
|
|
||||||
SelectSearchCriteriaDialog(
|
|
||||||
{Key key, this.onValueSelected, this.selectedCriteria, this.projectViewModel});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectSearchCriteriaDialogState createState() => _SelectSearchCriteriaDialogState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectSearchCriteriaDialogState extends State<SelectSearchCriteriaDialog> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
widget.selectedCriteria = widget.selectedCriteria ?? widget.searchCriteria[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Text(TranslationBase.of(context).searchCriteria),
|
|
||||||
Divider(),
|
|
||||||
...List.generate(
|
|
||||||
widget.searchCriteria.length,
|
|
||||||
(index) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedCriteria = widget.searchCriteria[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(widget.projectViewModel.isArabic ? widget.searchCriteria[index].nameAr : widget.searchCriteria[index].name),
|
|
||||||
leading: Radio(
|
|
||||||
value: widget.searchCriteria[index],
|
|
||||||
groupValue: widget.selectedCriteria,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedCriteria = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(widget.selectedCriteria);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).ok,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
// todo 'sikander' remove useless code
|
|
||||||
// ignore: must_be_immutable
|
|
||||||
// class ConfirmAddAmountDialog extends StatefulWidget {
|
|
||||||
// final int amount;
|
|
||||||
// final String unit;
|
|
||||||
// final H2OViewModel model;
|
|
||||||
//
|
|
||||||
// ConfirmAddAmountDialog({Key key, this.model, this.amount, this.unit = "ml"});
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// _ConfirmAddAmountDialogState createState() => _ConfirmAddAmountDialogState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class _ConfirmAddAmountDialogState extends State<ConfirmAddAmountDialog> {
|
|
||||||
// @override
|
|
||||||
// void initState() {
|
|
||||||
// super.initState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return SimpleDialog(
|
|
||||||
// contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 8.0),
|
|
||||||
// titlePadding: EdgeInsets.fromLTRB(24.0, 16.0, 24.0, 8.0),
|
|
||||||
// title: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).confirm,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// color: Colors.black,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// children: [
|
|
||||||
// Column(
|
|
||||||
// children: [
|
|
||||||
// Divider(),
|
|
||||||
// Center(
|
|
||||||
// child: Texts(
|
|
||||||
// "${TranslationBase.of(context).areyousure} ${widget.amount} ${widget.unit} ?",
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// color: Colors.grey,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 16.0,
|
|
||||||
// ),
|
|
||||||
// Row(
|
|
||||||
// // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: <Widget>[
|
|
||||||
// Expanded(
|
|
||||||
// flex: 1,
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// },
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(8.0),
|
|
||||||
// child: Container(
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
// color: Colors.red,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Container(
|
|
||||||
// width: 1,
|
|
||||||
// height: 30,
|
|
||||||
// color: Colors.grey[500],
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// flex: 1,
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () async {
|
|
||||||
// InsertUserActivityRequestModel insertUserActivityRequestModel = InsertUserActivityRequestModel(quantityIntake: widget.amount);
|
|
||||||
// await widget.model.insertUserActivity(insertUserActivityRequestModel);
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// },
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(8.0),
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).ok.toUpperCase(),
|
|
||||||
// fontWeight: FontWeight.w400,
|
|
||||||
// )),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
// todo 'sikander' remove useless code
|
|
||||||
// ignore: must_be_immutable
|
|
||||||
// class SelectAmountDialog extends StatefulWidget {
|
|
||||||
// final Function(AmountModel) onValueSelected;
|
|
||||||
// AmountModel selectedAmount;
|
|
||||||
//
|
|
||||||
// SelectAmountDialog({Key key, this.onValueSelected, this.selectedAmount});
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// _SelectAmountDialogState createState() => _SelectAmountDialogState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class _SelectAmountDialogState extends State<SelectAmountDialog> {
|
|
||||||
// List<AmountModel> searchAmount = [
|
|
||||||
// AmountModel(name: "l", nameAr: "لتر", value: 1),
|
|
||||||
// AmountModel(name: "ml", nameAr: "مم لتر", value: 2),
|
|
||||||
// ];
|
|
||||||
// @override
|
|
||||||
// void initState() {
|
|
||||||
// super.initState();
|
|
||||||
// widget.selectedAmount = widget.selectedAmount ?? searchAmount[0];
|
|
||||||
// getLanguage();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// String languageID = "en";
|
|
||||||
//
|
|
||||||
// void getLanguage() async {
|
|
||||||
// languageID = await sharedPref.getString(APP_LANGUAGE);
|
|
||||||
// setState(() {});
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return SimpleDialog(
|
|
||||||
// children: [
|
|
||||||
// Column(
|
|
||||||
// children: [
|
|
||||||
// Texts(
|
|
||||||
// TranslationBase.of(context).preferredunit,
|
|
||||||
// fontSize: 20,
|
|
||||||
// ),
|
|
||||||
// Divider(),
|
|
||||||
// ...List.generate(
|
|
||||||
// searchAmount.length,
|
|
||||||
// (index) => Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// SizedBox(
|
|
||||||
// height: 2,
|
|
||||||
// ),
|
|
||||||
// Row(
|
|
||||||
// children: <Widget>[
|
|
||||||
// Expanded(
|
|
||||||
// flex: 1,
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// setState(() {
|
|
||||||
// widget.selectedAmount = searchAmount[index];
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// child: ListTile(
|
|
||||||
// title: Text(languageID == "ar" ? searchAmount[index].nameAr : searchAmount[index].name),
|
|
||||||
// leading: Radio(
|
|
||||||
// value: searchAmount[index],
|
|
||||||
// groupValue: widget.selectedAmount,
|
|
||||||
// activeColor: Colors.red[800],
|
|
||||||
// onChanged: (value) {
|
|
||||||
// setState(() {
|
|
||||||
// widget.selectedAmount = value;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 5.0,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 5.0,
|
|
||||||
// ),
|
|
||||||
// Row(
|
|
||||||
// // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: <Widget>[
|
|
||||||
// Expanded(
|
|
||||||
// flex: 1,
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// },
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(8.0),
|
|
||||||
// child: Container(
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
// color: Colors.red,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Container(
|
|
||||||
// width: 1,
|
|
||||||
// height: 30,
|
|
||||||
// color: Colors.grey[500],
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// flex: 1,
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// widget.onValueSelected(widget.selectedAmount);
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// },
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(8.0),
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).ok,
|
|
||||||
// fontWeight: FontWeight.w400,
|
|
||||||
// )),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class AmountModel {
|
|
||||||
// String name;
|
|
||||||
// String nameAr;
|
|
||||||
// int value;
|
|
||||||
//
|
|
||||||
// AmountModel({this.name, this.nameAr, this.value});
|
|
||||||
//
|
|
||||||
// AmountModel.fromJson(Map<String, dynamic> json) {
|
|
||||||
// name = json['name'];
|
|
||||||
// nameAr = json['nameAr'];
|
|
||||||
// value = json['value'];
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Map<String, dynamic> toJson() {
|
|
||||||
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
||||||
// data['name'] = this.name;
|
|
||||||
// data['nameAr'] = this.nameAr;
|
|
||||||
// data['value'] = this.value;
|
|
||||||
// return data;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -1,133 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'Dialog/select_amount_dialog.dart';
|
|
||||||
|
|
||||||
// todo 'sikander' remove useless code
|
|
||||||
// class AddCustomAmount extends StatefulWidget {
|
|
||||||
// final H2OViewModel model;
|
|
||||||
// final Function changePageViewIndex;
|
|
||||||
//
|
|
||||||
// const AddCustomAmount({Key key, this.model, this.changePageViewIndex})
|
|
||||||
// : super(key: key);
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// _AddCustomAmountState createState() => _AddCustomAmountState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class _AddCustomAmountState extends State<AddCustomAmount> {
|
|
||||||
// TextEditingController _nameTextController = TextEditingController();
|
|
||||||
// AmountModel selectedAmount;
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// void initState() {
|
|
||||||
// setState(() {
|
|
||||||
// _nameTextController.text = "0";
|
|
||||||
// });
|
|
||||||
// super.initState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return AppScaffold(
|
|
||||||
// isShowAppBar: true,
|
|
||||||
// appBarTitle:TranslationBase.of(context).customLabel,
|
|
||||||
// body: SingleChildScrollView(
|
|
||||||
// physics: ScrollPhysics(),
|
|
||||||
// child: Container(
|
|
||||||
// margin: EdgeInsets.all(12),
|
|
||||||
// child: Center(
|
|
||||||
// child: FractionallySizedBox(
|
|
||||||
// widthFactor: 0.94,
|
|
||||||
// child: Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// SizedBox(
|
|
||||||
// height: 12,
|
|
||||||
// ),
|
|
||||||
// NewTextFields(
|
|
||||||
// hintText: TranslationBase.of(context).h2oAmountOfWater,
|
|
||||||
// // type: "Number",
|
|
||||||
// controller: _nameTextController,
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 12,
|
|
||||||
// ),
|
|
||||||
// InkWell(
|
|
||||||
// onTap: () => confirmAmountTypeDialog(),
|
|
||||||
// child: Container(
|
|
||||||
// padding: EdgeInsets.all(12),
|
|
||||||
// width: double.infinity,
|
|
||||||
// height: 65,
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// borderRadius: BorderRadius.circular(12),
|
|
||||||
// color: Colors.white),
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// Texts(getAmountName()),
|
|
||||||
// Icon(Icons.arrow_drop_down)
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 12,
|
|
||||||
// ),
|
|
||||||
// SecondaryButton(
|
|
||||||
// textColor: Colors.white,
|
|
||||||
// label: TranslationBase.of(context).ok,
|
|
||||||
// onTap: () async {
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// showConfirmMessage (int.parse(_nameTextController.text), widget.model);
|
|
||||||
// },
|
|
||||||
// // loading: model.state == ViewState.BusyLocal,
|
|
||||||
// disabled: _nameTextController.text.isEmpty || selectedAmount == null),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 12,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// void confirmAmountTypeDialog() {
|
|
||||||
// showDialog(
|
|
||||||
// context: context,
|
|
||||||
// child: SelectAmountDialog(
|
|
||||||
// selectedAmount: selectedAmount,
|
|
||||||
// onValueSelected: (value) {
|
|
||||||
// setState(() {
|
|
||||||
// selectedAmount = value;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// String getAmountName() {
|
|
||||||
// if (selectedAmount != null)
|
|
||||||
// return selectedAmount.name;
|
|
||||||
// else
|
|
||||||
// return TranslationBase.of(context).selectUnit;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// void showConfirmMessage(int amount, H2OViewModel model) {
|
|
||||||
// showDialog(context: context, child: ConfirmAddAmountDialog(model: model,amount:amount,));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -1,201 +0,0 @@
|
|||||||
import 'dart:math' as math;
|
|
||||||
|
|
||||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../add_custom_amount.dart';
|
|
||||||
|
|
||||||
|
|
||||||
// todo 'sikander' remove useless code
|
|
||||||
|
|
||||||
|
|
||||||
// class H20FloatingActionButton extends StatefulWidget {
|
|
||||||
// const H20FloatingActionButton({Key key, @required AnimationController controller, @required this.model}) : super(key: key);
|
|
||||||
//
|
|
||||||
// final H2OViewModel model;
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// _H20FloatingActionButtonState createState() => _H20FloatingActionButtonState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with TickerProviderStateMixin {
|
|
||||||
// AnimationController _controller;
|
|
||||||
// @override
|
|
||||||
// void initState() {
|
|
||||||
// _controller = new AnimationController(
|
|
||||||
// vsync: this,
|
|
||||||
// duration: const Duration(milliseconds: 500),
|
|
||||||
// );
|
|
||||||
// super.initState();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// void showConfirmMessage(int amount, H2OViewModel model) {
|
|
||||||
// showDialog(
|
|
||||||
// context: context,
|
|
||||||
// child: ConfirmAddAmountDialog(
|
|
||||||
// model: model,
|
|
||||||
// amount: amount,
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return Container(
|
|
||||||
// margin: EdgeInsets.only(left: 20, right: 20),
|
|
||||||
// child: new Column(mainAxisSize: MainAxisSize.min, children: [
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
// children: [
|
|
||||||
// ActionButton(
|
|
||||||
// controller: _controller,
|
|
||||||
// text: "600${TranslationBase.of(context).ml}",
|
|
||||||
// onTap: () {
|
|
||||||
// showConfirmMessage(600, widget.model);
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ActionButton(
|
|
||||||
// controller: _controller,
|
|
||||||
// text: "330${TranslationBase.of(context).ml}",
|
|
||||||
// onTap: () {
|
|
||||||
// showConfirmMessage(330, widget.model);
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ActionButton(
|
|
||||||
// controller: _controller,
|
|
||||||
// text: "200${TranslationBase.of(context).ml}",
|
|
||||||
// onTap: () {
|
|
||||||
// showConfirmMessage(200, widget.model);
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// FloatingActionButton(
|
|
||||||
// heroTag: null,
|
|
||||||
// child: new AnimatedBuilder(
|
|
||||||
// animation: _controller,
|
|
||||||
// builder: (BuildContext context, Widget child) {
|
|
||||||
// return new Transform(
|
|
||||||
// transform: new Matrix4.rotationZ(_controller.value * 0.5 * math.pi),
|
|
||||||
// alignment: FractionalOffset.center,
|
|
||||||
// child: new Icon(_controller.isDismissed ? Icons.add : Icons.close),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// if (_controller.isDismissed) {
|
|
||||||
// _controller.forward();
|
|
||||||
// } else {
|
|
||||||
// _controller.reverse();
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// new Container(
|
|
||||||
// margin: EdgeInsets.only(left: 8, bottom: 4),
|
|
||||||
// alignment: FractionalOffset.topCenter,
|
|
||||||
// child: new ScaleTransition(
|
|
||||||
// scale: new CurvedAnimation(
|
|
||||||
// parent: _controller,
|
|
||||||
// curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
|
|
||||||
// ),
|
|
||||||
// child: new FloatingActionButton(
|
|
||||||
// backgroundColor: Colors.white,
|
|
||||||
// heroTag: null,
|
|
||||||
// // mini: true,
|
|
||||||
// child: Text(
|
|
||||||
// TranslationBase.of(context).custom,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// style: TextStyle(fontSize: 12, color: Colors.grey),
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.push(
|
|
||||||
// context,
|
|
||||||
// FadePage(
|
|
||||||
// page: AddCustomAmount(
|
|
||||||
// model: widget.model,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// new Container(
|
|
||||||
// margin: EdgeInsets.only(left: 8, bottom: 4),
|
|
||||||
// alignment: FractionalOffset.topCenter,
|
|
||||||
// child: new ScaleTransition(
|
|
||||||
// scale: new CurvedAnimation(
|
|
||||||
// parent: _controller,
|
|
||||||
// curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
|
|
||||||
// ),
|
|
||||||
// child: new FloatingActionButton(
|
|
||||||
// backgroundColor: Colors.white,
|
|
||||||
// heroTag: null,
|
|
||||||
// //mini: true,
|
|
||||||
// child: Text(
|
|
||||||
// TranslationBase.of(context).undo,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// style: TextStyle(fontSize: 12.0, color: Colors.grey),
|
|
||||||
// ),
|
|
||||||
// onPressed: undoVolume,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ]),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// void undoVolume() async {
|
|
||||||
// GifLoaderDialogUtils.showMyDialog(context);
|
|
||||||
// await widget.model.undoUserActivity();
|
|
||||||
// GifLoaderDialogUtils.hideDialog(context);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// class ActionButton extends StatelessWidget {
|
|
||||||
// const ActionButton({Key key, @required AnimationController controller, @required this.text, this.onTap})
|
|
||||||
// : _controller = controller,
|
|
||||||
// super(key: key);
|
|
||||||
//
|
|
||||||
// final AnimationController _controller;
|
|
||||||
// final String text;
|
|
||||||
// final Function onTap;
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return Container(
|
|
||||||
// margin: EdgeInsets.only(left: 4, bottom: 8),
|
|
||||||
// alignment: FractionalOffset.topCenter,
|
|
||||||
// child: new ScaleTransition(
|
|
||||||
// scale: new CurvedAnimation(
|
|
||||||
// parent: _controller,
|
|
||||||
// curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
|
|
||||||
// ),
|
|
||||||
// child: new FloatingActionButton(
|
|
||||||
// heroTag: null,
|
|
||||||
// backgroundColor: Colors.white,
|
|
||||||
// //mini: true,
|
|
||||||
// child: Text(
|
|
||||||
// text,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// style: TextStyle(fontSize: 12.0, color: Colors.grey),
|
|
||||||
// ),
|
|
||||||
// onPressed: onTap),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -1,328 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class SelectBloodDialog extends StatefulWidget {
|
|
||||||
|
|
||||||
final Blood bloodType;
|
|
||||||
final Function(Blood) onValueSelected;
|
|
||||||
|
|
||||||
SelectBloodDialog({Key key, this.bloodType, this.onValueSelected});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectBloodDialogState createState() => _SelectBloodDialogState(this.bloodType);
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectBloodDialogState extends State<SelectBloodDialog> {
|
|
||||||
_SelectBloodDialogState(this.bloodType);
|
|
||||||
Blood bloodType;
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Oplus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("O+"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Oplus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Ominus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("O-"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Ominus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.ABminus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("AB-"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.ABminus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.ABplus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("AB+"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.ABplus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Aplus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("A+"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Aplus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Aminus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("A-"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Aminus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Bplus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("B+"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Bplus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
bloodType = Blood.Bminus;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text("B-"),
|
|
||||||
leading: Radio(
|
|
||||||
value: Blood.Bminus,
|
|
||||||
groupValue: bloodType,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (Blood value) {
|
|
||||||
setState(() {
|
|
||||||
bloodType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(bloodType);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).ok,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
// todo 'sikander' remove useless code
|
|
||||||
// class ConfirmExitPageDialog extends StatelessWidget {
|
|
||||||
// final GestureTapCallback onTapYes;
|
|
||||||
// final GestureTapCallback onTapNo;
|
|
||||||
//
|
|
||||||
// const ConfirmExitPageDialog({Key key, this.onTapYes, this.onTapNo})
|
|
||||||
// : super(key: key);
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return SimpleDialog(
|
|
||||||
// contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
|
|
||||||
// title: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).confirm,
|
|
||||||
// color: Colors.black,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// children: [
|
|
||||||
// Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
// children: [
|
|
||||||
// Texts(
|
|
||||||
// "Are you sure you want to exit this page ?",
|
|
||||||
// color: Colors.grey,
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 5,
|
|
||||||
// ),
|
|
||||||
// Divider(),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 5.0,
|
|
||||||
// ),
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// onTapNo();
|
|
||||||
// },
|
|
||||||
// child: Container(
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(
|
|
||||||
// TranslationBase.of(context).no,
|
|
||||||
// color: Colors.red,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
//
|
|
||||||
// InkWell(
|
|
||||||
// onTap: () {
|
|
||||||
// Navigator.pop(context);
|
|
||||||
// onTapYes();
|
|
||||||
// },
|
|
||||||
// child: Container(
|
|
||||||
// child: Center(
|
|
||||||
// child: Texts(TranslationBase.of(context).yes),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 20.0,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
|
||||||
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
|
||||||
|
|
||||||
|
class ClinicTimingsPage extends StatefulWidget {
|
||||||
|
final clinicName;
|
||||||
|
final List<PatientERGetClinicsServiceTimingsList> patientERGetClinicsServiceTimingsList;
|
||||||
|
|
||||||
|
ClinicTimingsPage({@required this.clinicName, @required this.patientERGetClinicsServiceTimingsList});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LiveCarePatmentPageState extends State<ClinicTimingsPage> {
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: TranslationBase.of(context).clinicSchedule,
|
||||||
|
isShowAppBar: true,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
showNewAppBar: true,
|
||||||
|
description: TranslationBase.of(context).erConsultation,
|
||||||
|
body: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView.separated(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(top: index == 0 ? 12 : 0, bottom: (index == widget.patientERGetClinicsServiceTimingsList.length - 1) ? 12 : 0),
|
||||||
|
child: showItem(widget.patientERGetClinicsServiceTimingsList[index]),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return mHeight(12);
|
||||||
|
},
|
||||||
|
itemCount: widget.patientERGetClinicsServiceTimingsList.length,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
color: Colors.white,
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).back,
|
||||||
|
() {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showItem(PatientERGetClinicsServiceTimingsList item) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Text(
|
||||||
|
item.dayOfWeekStr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
letterSpacing: -0.42,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 3,
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: cardRadius(12),
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
for (int i = 0; i < item.shiftTimings.length; i++)
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).from + " " + item.shiftTimings[i].startTime + " " + TranslationBase.of(context).to + " " + item.shiftTimings[i].endTime,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
letterSpacing: -0.42,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,316 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
|
||||||
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
|
||||||
|
|
||||||
|
class LiveCarePatmentPage extends StatefulWidget {
|
||||||
|
GetERAppointmentFeesList getERAppointmentFeesList;
|
||||||
|
int waitingTime;
|
||||||
|
String clinicName;
|
||||||
|
|
||||||
|
LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
|
||||||
|
int _selected = 0;
|
||||||
|
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var size = MediaQuery.of(context).size;
|
||||||
|
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2;
|
||||||
|
final double itemWidth = size.width / 2;
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: TranslationBase.of(context).livecare,
|
||||||
|
isShowAppBar: true,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
showNewAppBar: true,
|
||||||
|
description: TranslationBase.of(context).erConsultation,
|
||||||
|
body: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
|
||||||
|
height: double.infinity,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(21),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
widget.clinicName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 19.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
letterSpacing: -1.44,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mHeight(8),
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).expectedWaiting,
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.56,
|
||||||
|
color: CustomColors.textColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
widget.waitingTime.toString() + " " + TranslationBase.of(context).minute,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: CustomColors.accentColor,
|
||||||
|
letterSpacing: -0.66,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mHeight(16),
|
||||||
|
Container(
|
||||||
|
decoration: cardRadius(12),
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).erConsultFee,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.64,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mHeight(10),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
TranslationBase.of(context).patientShareToDo,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10,
|
||||||
|
letterSpacing: -0.4,
|
||||||
|
color: CustomColors.textColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.getERAppointmentFeesList.amount + " " + widget.getERAppointmentFeesList.currency,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
mHeight(4),
|
||||||
|
mDivider(CustomColors.lightGreyColor),
|
||||||
|
mHeight(4),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
TranslationBase.of(context).patientTaxToDo,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10,
|
||||||
|
letterSpacing: -0.4,
|
||||||
|
color: CustomColors.textColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.getERAppointmentFeesList.tax + " " + widget.getERAppointmentFeesList.currency,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
mHeight(4),
|
||||||
|
mDivider(CustomColors.lightGreyColor),
|
||||||
|
mHeight(4),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
TranslationBase.of(context).patientShareTotalToDo,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10,
|
||||||
|
letterSpacing: -0.4,
|
||||||
|
color: CustomColors.textColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.getERAppointmentFeesList.total + " " + widget.getERAppointmentFeesList.currency,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mHeight(12),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
decoration: cardRadius(12),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
SvgPicture.asset(
|
||||||
|
"assets/images/new/services/raise_comp.svg",
|
||||||
|
color: CustomColors.green,
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
),
|
||||||
|
mWidth(10),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
TranslationBase.of(context).insuredPatient,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10.0,
|
||||||
|
letterSpacing: -0.4,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Radio(
|
||||||
|
value: 1,
|
||||||
|
groupValue: _selected,
|
||||||
|
onChanged: onRadioChanged,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).agreeTo,
|
||||||
|
style: new TextStyle(
|
||||||
|
fontSize: 12.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
color: CustomColors.textColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mWidth(4),
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).termsConditoins,
|
||||||
|
style: new TextStyle(
|
||||||
|
fontSize: 12.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
color: CustomColors.accentColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mFlex(1),
|
||||||
|
Text(
|
||||||
|
TranslationBase.of(context).upComingPayOption,
|
||||||
|
style: new TextStyle(
|
||||||
|
fontSize: 12.0,
|
||||||
|
letterSpacing: -0.36,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
||||||
|
child: getPaymentMethods(),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(12),
|
||||||
|
color: Colors.white,
|
||||||
|
child: Flex(
|
||||||
|
direction: Axis.horizontal,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).cancel,
|
||||||
|
() {
|
||||||
|
Navigator.pop(context, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
mWidth(12),
|
||||||
|
Expanded(
|
||||||
|
child: DefaultButton(
|
||||||
|
TranslationBase.of(context).next,
|
||||||
|
() {
|
||||||
|
if (_selected == 0) {
|
||||||
|
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
|
||||||
|
} else {
|
||||||
|
Navigator.pop(context, true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
color: CustomColors.green,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void onRadioChanged(int value) {
|
||||||
|
setState(() {
|
||||||
|
_selected = value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_getNormalText(text) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.0, right: 10.0),
|
||||||
|
child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, color: Colors.black)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_getMarginText(text) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0),
|
||||||
|
child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, fontWeight: FontWeight.bold, color: Colors.black)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,204 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../../../Constants.dart';
|
|
||||||
import '../advance_payment_page.dart';
|
|
||||||
|
|
||||||
class SelectBeneficiaryDialog extends StatefulWidget {
|
|
||||||
final BeneficiaryType beneficiaryType;
|
|
||||||
final Function(BeneficiaryType) onValueSelected;
|
|
||||||
|
|
||||||
SelectBeneficiaryDialog({Key key, this.beneficiaryType, this.onValueSelected});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectBeneficiaryDialogState createState() => _SelectBeneficiaryDialogState(this.beneficiaryType);
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
|
|
||||||
_SelectBeneficiaryDialogState(this.beneficiaryType);
|
|
||||||
|
|
||||||
BeneficiaryType beneficiaryType;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = BeneficiaryType.MyAccount;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
TranslationBase.of(context).myAccount,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: BeneficiaryType.MyAccount,
|
|
||||||
groupValue: beneficiaryType,
|
|
||||||
activeColor: secondaryColor,
|
|
||||||
onChanged: (BeneficiaryType value) {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = BeneficiaryType.MyFamilyFiles;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
TranslationBase.of(context).myFamilyFiles,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: BeneficiaryType.MyFamilyFiles,
|
|
||||||
groupValue: beneficiaryType,
|
|
||||||
activeColor: Color(0xffC5272D),
|
|
||||||
onChanged: (BeneficiaryType value) {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = BeneficiaryType.OtherAccount;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
TranslationBase.of(context).otherAccount,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: BeneficiaryType.OtherAccount,
|
|
||||||
groupValue: beneficiaryType,
|
|
||||||
activeColor: Color(0xffC5272D),
|
|
||||||
onChanged: (BeneficiaryType value) {
|
|
||||||
setState(() {
|
|
||||||
beneficiaryType = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
color: Color(0xffC5272D),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(beneficiaryType);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).ok.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,145 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../../../Constants.dart';
|
|
||||||
|
|
||||||
class SelectHospitalDialog extends StatefulWidget {
|
|
||||||
final List<HospitalsModel> hospitals;
|
|
||||||
final Function(HospitalsModel) onValueSelected;
|
|
||||||
HospitalsModel selectedHospital;
|
|
||||||
|
|
||||||
SelectHospitalDialog({Key key, this.hospitals, this.onValueSelected, this.selectedHospital});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectHospitalDialogState createState() => _SelectHospitalDialogState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
...List.generate(
|
|
||||||
widget.hospitals.length,
|
|
||||||
(index) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedHospital = widget.hospitals[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
widget.hospitals[index].name + ' ${widget.hospitals[index].distanceInKilometers} ' + TranslationBase.of(context).km,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: widget.hospitals[index],
|
|
||||||
groupValue: widget.selectedHospital,
|
|
||||||
activeColor: secondaryColor,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedHospital = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
color: Colors.red
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(widget.selectedHospital);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).ok,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,152 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../../../Constants.dart';
|
|
||||||
|
|
||||||
class SelectPatientFamilyDialog extends StatefulWidget {
|
|
||||||
final List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList;
|
|
||||||
final Function(GetAllSharedRecordsByStatusList) onValueSelected;
|
|
||||||
GetAllSharedRecordsByStatusList selectedPatientFamily;
|
|
||||||
|
|
||||||
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusApprovedList = new List();
|
|
||||||
|
|
||||||
SelectPatientFamilyDialog({Key key, this.getAllSharedRecordsByStatusList, this.onValueSelected, this.selectedPatientFamily});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectPatientFamilyDialogState createState() => _SelectPatientFamilyDialogState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
widget.selectedPatientFamily = widget.selectedPatientFamily ?? widget.getAllSharedRecordsByStatusList[0];
|
|
||||||
|
|
||||||
if (widget.getAllSharedRecordsByStatusList.isNotEmpty)
|
|
||||||
widget.getAllSharedRecordsByStatusList.forEach((element) {
|
|
||||||
if (element.status == 3) widget.getAllSharedRecordsByStatusApprovedList.add(element);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
...List.generate(
|
|
||||||
widget.getAllSharedRecordsByStatusApprovedList.length,
|
|
||||||
(index) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedPatientFamily = widget.getAllSharedRecordsByStatusApprovedList[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
widget.getAllSharedRecordsByStatusApprovedList[index].patientName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: widget.getAllSharedRecordsByStatusApprovedList[index],
|
|
||||||
groupValue: widget.selectedPatientFamily,
|
|
||||||
activeColor: secondaryColor,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedPatientFamily = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(widget.selectedPatientFamily);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).ok,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,146 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../../../Constants.dart';
|
|
||||||
|
|
||||||
class SelectPatientInfoDialog extends StatefulWidget {
|
|
||||||
final List<PatientInfo> patientInfoList;
|
|
||||||
|
|
||||||
final Function(PatientInfo) onValueSelected;
|
|
||||||
PatientInfo selectedPatientInfo;
|
|
||||||
|
|
||||||
SelectPatientInfoDialog({Key key, this.patientInfoList, this.onValueSelected, this.selectedPatientInfo});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_SelectPatientInfoDialogState createState() => _SelectPatientInfoDialogState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SelectPatientInfoDialogState extends State<SelectPatientInfoDialog> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
widget.selectedPatientInfo = widget.selectedPatientInfo ?? widget.patientInfoList[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
...List.generate(
|
|
||||||
widget.patientInfoList.length,
|
|
||||||
(index) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedPatientInfo = widget.patientInfoList[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Text(
|
|
||||||
widget.patientInfoList[index].fullName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: widget.patientInfoList[index],
|
|
||||||
groupValue: widget.selectedPatientInfo,
|
|
||||||
activeColor: secondaryColor,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedPatientInfo = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(widget.selectedPatientInfo);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).ok.toUpperCase(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.46,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,139 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class RadioStringDialog extends StatefulWidget {
|
|
||||||
final List<String> radioList;
|
|
||||||
final Function(String) onValueSelected;
|
|
||||||
final String title;
|
|
||||||
String selectedValue;
|
|
||||||
|
|
||||||
RadioStringDialog({Key key, this.radioList, this.onValueSelected, this.selectedValue, this.title});
|
|
||||||
|
|
||||||
@override
|
|
||||||
_RadioStringDialogState createState() => _RadioStringDialogState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _RadioStringDialogState extends State<RadioStringDialog> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
widget.selectedValue = widget.selectedValue ?? widget.radioList[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SimpleDialog(
|
|
||||||
title: Container(
|
|
||||||
width: double.infinity,
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
widget.title,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
))),
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: widget.radioList.length > 3 ? MediaQuery.of(context).size.height * 0.6 : null,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Divider(),
|
|
||||||
...List.generate(
|
|
||||||
widget.radioList.length,
|
|
||||||
(index) => Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
// SizedBox(
|
|
||||||
// height: 2,
|
|
||||||
// ),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedValue = widget.radioList[index];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ListTile(
|
|
||||||
title: Texts(
|
|
||||||
widget.radioList[index],
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
|
||||||
leading: Radio(
|
|
||||||
value: widget.radioList[index],
|
|
||||||
groupValue: widget.selectedValue,
|
|
||||||
activeColor: Colors.red[800],
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
widget.selectedValue = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.0,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Container(
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).cancel.toUpperCase(),
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 1,
|
|
||||||
height: 30,
|
|
||||||
color: Colors.grey[500],
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
widget.onValueSelected(widget.selectedValue);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
TranslationBase.of(context).ok,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/packages_offers/responses/tamara_payment_option.dart';
|
||||||
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:jiffy/jiffy.dart';
|
||||||
|
import 'package:manage_calendar_events/manage_calendar_events.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class SingleSelectionDialog<T> extends StatefulWidget {
|
||||||
|
final List<T> items;
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
SingleSelectionDialog(this.items, {Widget icon, @required this.title});
|
||||||
|
|
||||||
|
Future<T> show(BuildContext context) async {
|
||||||
|
return showDialog<T>(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: true, // user must tap button!
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)),
|
||||||
|
insetPadding: EdgeInsets.all(21),
|
||||||
|
child: this,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SingleSelectionDialogState createState() => _SingleSelectionDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SingleSelectionDialogState extends State<SingleSelectionDialog> {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
//width: MediaQuery.of(context).size.width / 0.8,
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.notifications_active,
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
size: 50,
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.clear),
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
mHeight(20),
|
||||||
|
Text(
|
||||||
|
widget.title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||||
|
child: optionList(widget.items),
|
||||||
|
),
|
||||||
|
|
||||||
|
mHeight(12),
|
||||||
|
DefaultButton(
|
||||||
|
TranslationBase.of(context).done,
|
||||||
|
() {
|
||||||
|
Navigator.pop(context, widget.items[i]);
|
||||||
|
},
|
||||||
|
color: CustomColors.green,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget optionList(List<dynamic> options){
|
||||||
|
return ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
children: List.generate(options.length, (index){
|
||||||
|
|
||||||
|
final opt = options[index];
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Radio<int>(
|
||||||
|
value: index,
|
||||||
|
groupValue: i,
|
||||||
|
onChanged: (int value) {
|
||||||
|
setState(() {
|
||||||
|
i = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
opt.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue