dilog list & procedure changes

procedure_changes
hussam al-habibeh 4 years ago
parent 00b7aaf32a
commit c5eac79522

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -1,18 +1,22 @@
class GetOrderedProcedureRequestModel { class GetOrderedProcedureRequestModel {
String vidaAuthTokenID; String vidaAuthTokenID;
int patientMRN; int patientMRN;
int appointmentNo;
GetOrderedProcedureRequestModel({this.vidaAuthTokenID, this.patientMRN}); GetOrderedProcedureRequestModel({this.vidaAuthTokenID, this.patientMRN, this.appointmentNo});
GetOrderedProcedureRequestModel.fromJson(Map<String, dynamic> json) { GetOrderedProcedureRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
return data; return data;
} }
} }

@ -28,16 +28,12 @@ class ProcedureService extends BaseService {
List<ProcedureTempleteDetailsModel> templateList = List(); List<ProcedureTempleteDetailsModel> templateList = List();
List<ProcedureTempleteDetailsModel> _templateDetailsList = List(); List<ProcedureTempleteDetailsModel> _templateDetailsList = List();
List<ProcedureTempleteDetailsModel> get templateDetailsList => List<ProcedureTempleteDetailsModel> get templateDetailsList => _templateDetailsList;
_templateDetailsList;
GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel();
GetOrderedProcedureRequestModel();
ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel();
ProcedureTempleteRequestModel(); ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = ProcedureTempleteDetailsRequestModel();
ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel =
ProcedureTempleteDetailsRequestModel();
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
// clinicId: 17, // clinicId: 17,
@ -63,8 +59,7 @@ class ProcedureService extends BaseService {
//search: ["DENTAL"], //search: ["DENTAL"],
); );
Future getProcedureTemplate( Future getProcedureTemplate({int doctorId, int projectId, int clinicId, String categoryID}) async {
{int doctorId, int projectId, int clinicId, String categoryID}) async {
_procedureTempleteRequestModel = ProcedureTempleteRequestModel( _procedureTempleteRequestModel = ProcedureTempleteRequestModel(
// tokenID: "@dm!n", // tokenID: "@dm!n",
patientID: 0, patientID: 0,
@ -72,19 +67,18 @@ class ProcedureService extends BaseService {
); );
hasError = false; hasError = false;
await baseAppClient.post(GET_TEMPLETE_LIST/*GET_PROCEDURE_TEMPLETE*/, await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
templateList.clear(); templateList.clear();
response['DAPP_TemplateGetList'].forEach((template) { response['DAPP_TemplateGetList'].forEach((template) {
ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template); ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template);
if(categoryID != null){ if (categoryID != null) {
if(categoryID == templateElement.categoryID){ if (categoryID == templateElement.categoryID) {
templateList.add(templateElement); templateList.add(templateElement);
} }
} else { } else {
templateList.add(templateElement); templateList.add(templateElement);
} }
}); });
// response['HIS_ProcedureTemplateList'].forEach((template) { // response['HIS_ProcedureTemplateList'].forEach((template) {
// _templateList.add(ProcedureTempleteModel.fromJson(template)); // _templateList.add(ProcedureTempleteModel.fromJson(template));
@ -95,21 +89,17 @@ class ProcedureService extends BaseService {
}, body: _procedureTempleteRequestModel.toJson()); }, body: _procedureTempleteRequestModel.toJson());
} }
Future getProcedureTemplateDetails( Future getProcedureTemplateDetails({int doctorId, int projectId, int clinicId, int templateId}) async {
{int doctorId, int projectId, int clinicId, int templateId}) async {
_procedureTempleteDetailsRequestModel = _procedureTempleteDetailsRequestModel =
ProcedureTempleteDetailsRequestModel( ProcedureTempleteDetailsRequestModel(templateID: templateId, searchType: 1, patientID: 0);
templateID: templateId, searchType: 1, patientID: 0);
hasError = false; hasError = false;
//insuranceApprovalInPatient.clear(); //insuranceApprovalInPatient.clear();
_templateDetailsList.clear(); _templateDetailsList.clear();
await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
//prescriptionsList.clear(); //prescriptionsList.clear();
response['HIS_ProcedureTemplateDetailsList'].forEach((template) { response['HIS_ProcedureTemplateDetailsList'].forEach((template) {
_templateDetailsList _templateDetailsList.add(ProcedureTempleteDetailsModel.fromJson(template));
.add(ProcedureTempleteDetailsModel.fromJson(template));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -117,15 +107,12 @@ class ProcedureService extends BaseService {
}, body: _procedureTempleteDetailsRequestModel.toJson()); }, body: _procedureTempleteDetailsRequestModel.toJson());
} }
Future getProcedure({int mrn}) async { Future getProcedure({int mrn, int appointmentNo}) async {
_getOrderedProcedureRequestModel = _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(patientMRN: mrn, appointmentNo: appointmentNo);
GetOrderedProcedureRequestModel(patientMRN: mrn);
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(GET_PROCEDURE_LIST, await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _procedureList.add(GetOrderedProcedureModel.fromJson(response['OrderedProcedureList']));
_procedureList.add(
GetOrderedProcedureModel.fromJson(response['OrderedProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -135,8 +122,7 @@ class ProcedureService extends BaseService {
Future getCategory() async { Future getCategory() async {
hasError = false; hasError = false;
await baseAppClient.post(GET_LIST_CATEGORISE, await baseAppClient.post(GET_LIST_CATEGORISE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
categoryList = []; categoryList = [];
categoryList = response['listProcedureCategories']['entityList']; categoryList = response['listProcedureCategories']['entityList'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -145,7 +131,7 @@ class ProcedureService extends BaseService {
}, body: Map()); }, body: Map());
} }
Future getProcedureCategory({String categoryName, String categoryID,patientId}) async { Future getProcedureCategory({String categoryName, String categoryID, patientId}) async {
_getProcedureCategoriseReqModel = GetProcedureReqModel( _getProcedureCategoriseReqModel = GetProcedureReqModel(
search: ["$categoryName"], search: ["$categoryName"],
patientMRN: patientId, patientMRN: patientId,
@ -156,10 +142,8 @@ class ProcedureService extends BaseService {
); );
hasError = false; hasError = false;
_categoriesList.clear(); _categoriesList.clear();
await baseAppClient.post(GET_CATEGORISE_PROCEDURE, await baseAppClient.post(GET_CATEGORISE_PROCEDURE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _categoriesList.add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
_categoriesList
.add(CategoriseProcedureModel.fromJson(response['ProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -169,8 +153,7 @@ class ProcedureService extends BaseService {
Future postProcedure(PostProcedureReqModel postProcedureReqModel) async { Future postProcedure(PostProcedureReqModel postProcedureReqModel) async {
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(POST_PROCEDURE_LIST, await baseAppClient.post(POST_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("Success"); print("Success");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -178,12 +161,10 @@ class ProcedureService extends BaseService {
}, body: postProcedureReqModel.toJson()); }, body: postProcedureReqModel.toJson());
} }
Future updateProcedure( Future updateProcedure(UpdateProcedureRequestModel updateProcedureRequestModel) async {
UpdateProcedureRequestModel updateProcedureRequestModel) async {
hasError = false; hasError = false;
_procedureList.clear(); _procedureList.clear();
await baseAppClient.post(UPDATE_PROCEDURE, await baseAppClient.post(UPDATE_PROCEDURE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
print("ACCEPTED"); print("ACCEPTED");
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -191,14 +172,11 @@ class ProcedureService extends BaseService {
}, body: updateProcedureRequestModel.toJson()); }, body: updateProcedureRequestModel.toJson());
} }
Future valadteProcedure( Future valadteProcedure(ProcedureValadteRequestModel procedureValadteRequestModel) async {
ProcedureValadteRequestModel procedureValadteRequestModel) async {
hasError = false; hasError = false;
_valadteProcedureList.clear(); _valadteProcedureList.clear();
await baseAppClient.post(GET_PROCEDURE_VALIDATION, await baseAppClient.post(GET_PROCEDURE_VALIDATION, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _valadteProcedureList.add(ProcedureValadteModel.fromJson(response['ValidateProcedureList']));
_valadteProcedureList.add(
ProcedureValadteModel.fromJson(response['ValidateProcedureList']));
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -23,8 +23,7 @@ import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' as cpe;
as cpe;
class ProcedureViewModel extends BaseViewModel { class ProcedureViewModel extends BaseViewModel {
//TODO Hussam clean it //TODO Hussam clean it
@ -61,13 +60,13 @@ class ProcedureViewModel extends BaseViewModel {
List<PatientLabOrdersList> _patientLabOrdersListClinic = List(); List<PatientLabOrdersList> _patientLabOrdersListClinic = List();
List<PatientLabOrdersList> _patientLabOrdersListHospital = List(); List<PatientLabOrdersList> _patientLabOrdersListHospital = List();
Future getProcedure({int mrn, String patientType}) async { Future getProcedure({int mrn, String patientType, int appointmentNo}) async {
hasError = false; hasError = false;
await getDoctorProfile(); await getDoctorProfile();
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedure(mrn: mrn); await _procedureService.getProcedure(mrn: mrn, appointmentNo: appointmentNo);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
if (patientType == "7") if (patientType == "7")
@ -78,15 +77,12 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getProcedureCategory( Future getProcedureCategory({String categoryName, String categoryID, patientId}) async {
{String categoryName, String categoryID, patientId}) async {
if (categoryName == null) return; if (categoryName == null) return;
hasError = false; hasError = false;
setState(ViewState.Busy); setState(ViewState.Busy);
await _procedureService.getProcedureCategory( await _procedureService.getProcedureCategory(
categoryName: categoryName, categoryName: categoryName, categoryID: categoryID, patientId: patientId);
categoryID: categoryID,
patientId: patientId);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -321,8 +317,7 @@ class ProcedureViewModel extends BaseViewModel {
List<cpe.EntityList> entityList, List<cpe.EntityList> entityList,
ProcedureType procedureType}) async { ProcedureType procedureType}) async {
PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel(); PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel();
ProcedureValadteRequestModel procedureValadteRequestModel = ProcedureValadteRequestModel procedureValadteRequestModel = new ProcedureValadteRequestModel();
new ProcedureValadteRequestModel();
procedureValadteRequestModel.patientMRN = patient.patientMRN; procedureValadteRequestModel.patientMRN = patient.patientMRN;
procedureValadteRequestModel.episodeID = patient.episodeNo; procedureValadteRequestModel.episodeID = patient.episodeNo;
procedureValadteRequestModel.appointmentNo = patient.appointmentNo; procedureValadteRequestModel.appointmentNo = patient.appointmentNo;
@ -337,21 +332,13 @@ class ProcedureViewModel extends BaseViewModel {
procedureValadteRequestModel.procedure = [element.procedureId]; procedureValadteRequestModel.procedure = [element.procedureId];
List<Controls> controls = List(); List<Controls> controls = List();
controls.add( controls.add(
Controls( Controls(code: "remarks", controlValue: element.remarks != null ? element.remarks : ""),
code: "remarks",
controlValue: element.remarks != null ? element.remarks : ""),
); );
controls.add( controls.add(
Controls( Controls(code: "ordertype", controlValue: procedureType == ProcedureType.PROCEDURE ? element.type ?? "1" : "0"),
code: "ordertype",
controlValue: procedureType == ProcedureType.PROCEDURE
? element.type ?? "1"
: "0"),
); );
controlsProcedure.add(Procedures( controlsProcedure
category: element.categoryID, .add(Procedures(category: element.categoryID, procedure: element.procedureId, controls: controls));
procedure: element.procedureId,
controls: controls));
}); });
postProcedureReqModel.procedures = controlsProcedure; postProcedureReqModel.procedures = controlsProcedure;
@ -371,8 +358,7 @@ class ProcedureViewModel extends BaseViewModel {
Helpers.showErrorToast(error); Helpers.showErrorToast(error);
getProcedure(mrn: patient.patientMRN); getProcedure(mrn: patient.patientMRN);
} else if (state == ViewState.Idle) { } else if (state == ViewState.Idle) {
Helpers.showErrorToast( Helpers.showErrorToast(valadteProcedureList[0].entityList[0].warringMessages);
valadteProcedureList[0].entityList[0].warringMessages);
} }
} }
} else { } else {

@ -35,12 +35,9 @@ class ProcedureScreen extends StatelessWidget {
bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isFromLiveCare = routeArgs['isFromLiveCare'];
bool isInpatient = routeArgs['isInpatient']; bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure( onModelReady: (model) =>
mrn: patient.patientId, model.getProcedure(mrn: patient.patientId, patientType: patientType, appointmentNo: patient.appointmentNo),
patientType: patientType, builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold(
),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
baseViewModel: model, baseViewModel: model,
@ -56,8 +53,7 @@ class ProcedureScreen extends StatelessWidget {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
if (model.procedureList.length == 0 && if (model.procedureList.length == 0 && patient.patientStatusType != 43)
patient.patientStatusType != 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -77,8 +73,7 @@ class ProcedureScreen extends StatelessWidget {
], ],
), ),
), ),
if (patient.patientStatusType != null && if (patient.patientStatusType != null && patient.patientStatusType == 43)
patient.patientStatusType == 43)
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
@ -98,20 +93,19 @@ class ProcedureScreen extends StatelessWidget {
], ],
), ),
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null && patient.patientStatusType == 43) ||
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null)) (isFromLiveCare && patient.appointmentNo != null))
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => BaseAddProcedureTabPage( builder: (context) => BaseAddProcedureTabPage(
patient: patient, patient: patient,
model: model, model: model,
procedureType: ProcedureType.PROCEDURE, procedureType: ProcedureType.PROCEDURE,
), settings: RouteSettings(name: 'AddProcedureTabPage') ),
), settings: RouteSettings(name: 'AddProcedureTabPage')),
); );
}, },
child: Container( child: Container(
@ -159,32 +153,21 @@ class ProcedureScreen extends StatelessWidget {
...List.generate( ...List.generate(
model.procedureList[0].rowcount, model.procedureList[0].rowcount,
(index) => ProcedureCard( (index) => ProcedureCard(
categoryID: categoryID: model.procedureList[0].entityList[index].categoryID,
model.procedureList[0].entityList[index].categoryID,
entityList: model.procedureList[0].entityList[index], entityList: model.procedureList[0].entityList[index],
onTap: () { onTap: () {
if (model.procedureList[0].entityList[index].categoryID == if (model.procedureList[0].entityList[index].categoryID == 2 ||
2 ||
model.procedureList[0].entityList[index].categoryID == 4) model.procedureList[0].entityList[index].categoryID == 4)
updateProcedureForm(context, updateProcedureForm(context,
model: model, model: model,
patient: patient, patient: patient,
remarks: model remarks: model.procedureList[0].entityList[index].remarks,
.procedureList[0].entityList[index].remarks, orderType: model.procedureList[0].entityList[index].orderType.toString(),
orderType: model orderNo: model.procedureList[0].entityList[index].orderNo,
.procedureList[0].entityList[index].orderType procedureName: model.procedureList[0].entityList[index].procedureName,
.toString(), categoreId: model.procedureList[0].entityList[index].categoryID.toString(),
orderNo: model procedureId: model.procedureList[0].entityList[index].procedureId,
.procedureList[0].entityList[index].orderNo, limetNo: model.procedureList[0].entityList[index].lineItemNo);
procedureName: model.procedureList[0]
.entityList[index].procedureName,
categoreId: model
.procedureList[0].entityList[index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList[index].procedureId,
limetNo: model.procedureList[0].entityList[index]
.lineItemNo);
// } else // } else
// Helpers.showErrorToast( // Helpers.showErrorToast(
// 'You Cant Update This Procedure'); // 'You Cant Update This Procedure');
@ -194,8 +177,7 @@ class ProcedureScreen extends StatelessWidget {
), ),
), ),
if (model.state == ViewState.ErrorLocal || if (model.state == ViewState.ErrorLocal ||
(model.procedureList.isNotEmpty && (model.procedureList.isNotEmpty && model.procedureList[0].entityList.isEmpty))
model.procedureList[0].entityList.isEmpty))
Center( Center(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -206,9 +188,7 @@ class ProcedureScreen extends StatelessWidget {
Image.asset('assets/images/no-data.png'), Image.asset('assets/images/no-data.png'),
Padding( Padding(
padding: const EdgeInsets.all(22.0), padding: const EdgeInsets.all(22.0),
child: AppText(model.procedureList.isEmpty child: AppText(model.procedureList.isEmpty ? model.error : 'No Procedure Found '),
? model.error
: 'No Procedure Found '),
) )
], ],
), ),

@ -71,43 +71,48 @@ class _ListSelectDialogState extends State<ListSelectDialog> {
Widget createDialogList() { Widget createDialogList() {
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.5, height: MediaQuery.of(context).size.height * 0.5,
child: SingleChildScrollView( child: Column(
child: Column( children: [
children: [ if (widget.searchWidget != null) widget.searchWidget,
if (widget.searchWidget != null) widget.searchWidget, if (widget.usingSearch)
if(widget.usingSearch) Container(
Container(
height: MediaQuery.of(context).size.height * 0.070, height: MediaQuery.of(context).size.height * 0.070,
child: TextField( child: TextField(
decoration: Helpers.textFieldSelectorDecoration( decoration: Helpers.textFieldSelectorDecoration(
widget.hintSearchText ?? TranslationBase widget.hintSearchText ?? TranslationBase.of(context).search, null, false,
.of(context) suffixIcon: Icon(
.search, null, false, suffixIcon: Icon(Icons.search,)), Icons.search,
enabled: true, )),
keyboardType: TextInputType.text, enabled: true,
onChanged: (value) { keyboardType: TextInputType.text,
filterSearchResults(value); onChanged: (value) {
}, filterSearchResults(value);
)), },
...items )),
.map((item) => RadioListTile( Expanded(
title: Text("${item[widget.attributeName].toString()}"), child: SingleChildScrollView(
groupValue: widget.selectedValue[widget.attributeValueId] child: Column(
.toString(), children: [
value: item[widget.attributeValueId].toString(), ...items
activeColor: Colors.blue.shade700, .map((item) => RadioListTile(
selected: item[widget.attributeValueId].toString() == title: Text("${item[widget.attributeName].toString()}"),
widget.selectedValue[widget.attributeValueId] groupValue: widget.selectedValue[widget.attributeValueId].toString(),
.toString(), value: item[widget.attributeValueId].toString(),
onChanged: (val) { activeColor: Colors.blue.shade700,
setState(() { selected: item[widget.attributeValueId].toString() ==
widget.selectedValue = item; widget.selectedValue[widget.attributeValueId].toString(),
}); onChanged: (val) {
}, setState(() {
)) widget.selectedValue = item;
.toList() });
], },
), ))
.toList()
],
),
),
),
],
), ),
); );
} }

Loading…
Cancel
Save