early return if added

ipd-changes-for-vida-plus
taha 1 month ago
parent 3ac87af2c3
commit 9446565779

@ -171,8 +171,12 @@ class LabsViewModel extends BaseViewModel {
}
Future<void> openPDF() async {
if(this.attachments?.isNotEmpty == true ){
if(this.attachments?.first.base64Content == null || this.attachments?.first.base64Content?.isEmpty == true){
if (this.attachments?.isEmpty == true) {
Utils.showErrorToast("Unable to show Attachments");
return;
}
if(this.attachments?.first.base64Content == null || this.attachments?.first.base64Content?.isEmpty == true){
Utils.showErrorToast("Unable to show Attachments");
return;
}
@ -183,6 +187,5 @@ class LabsViewModel extends BaseViewModel {
} catch (ex) {
Utils.showErrorToast("Unable to show Attachments");
}
}
}
}

Loading…
Cancel
Save