TF-1798 Fix error message is displayed behind the keyboard on IOS platform only

(cherry picked from commit 615ff21ce96440cb1da47720116efacb5328cc13)
This commit is contained in:
dab246
2023-05-05 18:33:58 +07:00
committed by Dat Vu
parent fa5c4f35d4
commit 9471d5454f
4 changed files with 51 additions and 3 deletions
@@ -1457,6 +1457,8 @@ class ComposerController extends BaseController {
}
void insertImage(BuildContext context, double maxWith) async {
clearFocusEditor(context);
if (_responsiveUtils.isMobile(context)) {
maxWithEditor = maxWith - 40;
} else {
@@ -1470,6 +1472,10 @@ class ComposerController extends BaseController {
} else {
_insertImageOnMobileAndTablet(inlineImage);
}
} else {
if (context.mounted) {
_appToast.showToastErrorMessage(context, AppLocalizations.of(context).cannotSelectThisImage);
}
}
}
@@ -13,7 +13,7 @@ class PendingAttachmentUploadState extends Success {
PendingAttachmentUploadState(this.uploadId, this.progress, this.total);
@override
List<Object?> get props => [progress, total];
List<Object?> get props => [uploadId, progress, total];
}
class UploadingAttachmentUploadState extends Success {
@@ -24,7 +24,7 @@ class UploadingAttachmentUploadState extends Success {
UploadingAttachmentUploadState(this.uploadId, this.progress, this.total);
@override
List<Object?> get props => [progress, total];
List<Object?> get props => [uploadId, progress, total];
}
class SuccessAttachmentUploadState extends Success {