Merge branch 'fixes_before_live' into 'development'

remove loader from InPatientPage.dart

See merge request Cloud_Solution/doctor_app_flutter!790
backup_development
Mohammad Aljammal 4 years ago
commit abfba6e292

@ -90,7 +90,7 @@ class _InPatientPageState extends State<InPatientPage> {
), ),
), ),
widget.patientSearchViewModel.state == ViewState.Idle?widget.patientSearchViewModel.filteredInPatientItems.length > 0 widget.patientSearchViewModel.state == ViewState.Idle?widget.patientSearchViewModel.filteredInPatientItems.length > 0
? Expanded( ? (widget.isMyInPatient && widget.patientSearchViewModel.myIinPatientList.length ==0 )?NoData():Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 16.0), margin: EdgeInsets.symmetric(horizontal: 16.0),
child: SingleChildScrollView( child: SingleChildScrollView(
@ -175,19 +175,11 @@ class _InPatientPageState extends State<InPatientPage> {
), ),
), ),
) )
: Expanded( : NoData(): Center(
child: SingleChildScrollView(
child: Container(
child: ErrorMessage(
error:
TranslationBase.of(context).noDataAvailable)),
),
): Center(
child: Container( child: Container(
height: 300, height: 300,
width: 300, width: 300,
child: Image.asset(
"assets/images/progress-loading-red.gif"),
), ),
), ),
], ],
@ -195,3 +187,21 @@ class _InPatientPageState extends State<InPatientPage> {
); );
} }
} }
class NoData extends StatelessWidget {
const NoData({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Expanded(
child: SingleChildScrollView(
child: Container(
child: ErrorMessage(
error:
TranslationBase.of(context).noDataAvailable)),
),
);
}
}

Loading…
Cancel
Save