fix loading issue

html_editor
Elham Rababah 5 years ago
parent 1bc01e0ad1
commit 3557e87b75

@ -108,18 +108,19 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
])), ])),
), ),
), ),
Expanded( model.state == ViewState.Idle
child: Container( ? Expanded(
child: model.filterData.isEmpty child: Container(
? Center( child: model.filterData.isEmpty
child: ErrorMessage( ? Center(
error: TranslationBase.of(context) child: ErrorMessage(
.youDontHaveAnyPatient, error: TranslationBase.of(context)
), .youDontHaveAnyPatient,
) ),
: ListView.builder( )
scrollDirection: Axis.vertical, : ListView.builder(
shrinkWrap: true, scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.filterData.length, itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Padding( return Padding(
@ -148,7 +149,8 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
), ),
); );
})), })),
), ) : Expanded(
child: AppLoaderWidget(containerColor: Colors.transparent,)),
], ],
), ),
), ),

@ -24,7 +24,7 @@ class _AppLoaderWidgetState extends State<AppLoaderWidget> {
child: Stack( child: Stack(
children: [ children: [
Container( Container(
color: Colors.grey.withOpacity(0.6), color: widget.containerColor??Colors.grey.withOpacity(0.6),
), ),
Container(child: GifLoaderContainer(), margin: EdgeInsets.only( Container(child: GifLoaderContainer(), margin: EdgeInsets.only(
bottom: MediaQuery.of(context).size.height * 0.09)) bottom: MediaQuery.of(context).size.height * 0.09))

Loading…
Cancel
Save