design issue

merge-requests/997/head
Elham Rababh 4 years ago
parent 5f7b52a529
commit 8b79b0041c

@ -65,124 +65,129 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
AppScaffold( AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: FractionallySizedBox(
children: [ widthFactor: .97,
Container( child: Center(
height: MediaQuery.of(context).size.height * 0.070, child: Column(
), children: [
NetworkBaseView( Container(
baseViewModel: model, height: MediaQuery.of(context).size.height * 0.070,
child: Container( ),
child: Padding( NetworkBaseView(
padding: EdgeInsets.all(12.0), baseViewModel: model,
child: Column( child: Container(
crossAxisAlignment: CrossAxisAlignment.start, child: Padding(
children: [ padding: EdgeInsets.all(12.0),
if (procedureType == ProcedureType.PROCEDURE) child: Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( if (procedureType == ProcedureType.PROCEDURE)
mainAxisAlignment: Column(
MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.pleaseEnterProcedure,
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
SizedBox(
height:
MediaQuery.of(context).size.height * 0.02,
),
Row(
children: [ children: [
Container( Row(
width: MediaQuery.of(context).size.width * mainAxisAlignment:
0.79, MainAxisAlignment.spaceBetween,
child: AppTextFieldCustom( children: [
hintText: TranslationBase.of(context) AppText(
.searchProcedureHere, TranslationBase.of(context)
isTextFieldHasSuffix: false, .pleaseEnterProcedure,
maxLines: 1, fontWeight: FontWeight.w700,
minLines: 1, fontSize: 20,
hasBorder: true, ),
controller: procedureName, ],
),
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * height:
0.02, MediaQuery.of(context).size.height * 0.02,
), ),
Expanded( Row(
child: InkWell( children: [
onTap: () async { Container(
if (procedureName.text.isNotEmpty && width: MediaQuery.of(context).size.width *
procedureName.text.length >= 3) { 0.79,
GifLoaderDialogUtils.showMyDialog( child: AppTextFieldCustom(
context); hintText: TranslationBase.of(context)
await model.getProcedureCategory( .searchProcedureHere,
patientId: patient.patientId, isTextFieldHasSuffix: false,
categoryName: procedureName.text, maxLines: 1,
isLocalBusy: true); minLines: 1,
if (model.state == hasBorder: true,
ViewState.ErrorLocal) { controller: procedureName,
DrAppToastMsg.showErrorToast( ),
model.error); ),
} SizedBox(
GifLoaderDialogUtils.hideDialog( width: MediaQuery.of(context).size.width *
context); 0.02,
} else { ),
DrAppToastMsg.showErrorToast( Expanded(
TranslationBase.of(context) child: InkWell(
.atLeastThreeCharacters, onTap: () async {
); if (procedureName.text.isNotEmpty &&
} procedureName.text.length >= 3) {
}, GifLoaderDialogUtils.showMyDialog(
child: Icon( context);
Icons.search, await model.getProcedureCategory(
size: 25.0, patientId: patient.patientId,
categoryName: procedureName.text,
isLocalBusy: true);
if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
}
GifLoaderDialogUtils.hideDialog(
context);
} else {
DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.atLeastThreeCharacters,
);
}
},
child: Icon(
Icons.search,
size: 25.0,
),
),
), ),
), ],
), ),
], ],
), ),
], if ((procedureType == ProcedureType.PROCEDURE
), ? procedureName.text.isNotEmpty
if ((procedureType == ProcedureType.PROCEDURE : true) &&
? procedureName.text.isNotEmpty model.categoriesList.length != 0)
: true) && NetworkBaseView(
model.categoriesList.length != 0) baseViewModel: model,
NetworkBaseView( child: EntityListCheckboxSearchWidget(
baseViewModel: model, model: widget.model,
child: EntityListCheckboxSearchWidget( masterList: model.categoriesList[0].entityList,
model: widget.model, removeProcedure: (item) {
masterList: model.categoriesList[0].entityList, setState(() {
removeProcedure: (item) { entityList.remove(item);
setState(() { });
entityList.remove(item); },
}); addProcedure: (history) {
}, setState(() {
addProcedure: (history) { entityList.add(history);
setState(() { });
entityList.add(history); },
}); addSelectedHistories: () {},
}, isEntityListSelected: (master) => widget.model
addSelectedHistories: () {}, .isEntityListSelected(master, entityList),
isEntityListSelected: (master) => widget.model )),
.isEntityListSelected(master, entityList), SizedBox(
)), height: 10,
SizedBox( )
height: 10, ],
) ),
], ),
), ),
), ),
), ],
), ),
], ),
), ),
), ),
bottomSheet: model.state == ViewState.BusyLocal || entityList.isEmpty bottomSheet: model.state == ViewState.BusyLocal || entityList.isEmpty

Loading…
Cancel
Save