feat: Remove redundant PDF file validation before certificate upload
This commit is contained in:
@@ -228,19 +228,6 @@ class _CertificateUploadPageState extends State<CertificateUploadPage> {
|
|||||||
isUploading: state.status == CertificateUploadStatus.uploading,
|
isUploading: state.status == CertificateUploadStatus.uploading,
|
||||||
hasExistingCertificate: widget.certificate != null,
|
hasExistingCertificate: widget.certificate != null,
|
||||||
onUploadPressed: () {
|
onUploadPressed: () {
|
||||||
final String? err = _validatePdfFile(
|
|
||||||
context,
|
|
||||||
state.selectedFilePath!,
|
|
||||||
);
|
|
||||||
if (err != null) {
|
|
||||||
UiSnackbar.show(
|
|
||||||
context,
|
|
||||||
message: err,
|
|
||||||
type: UiSnackbarType.error,
|
|
||||||
margin: const EdgeInsets.all(UiConstants.space4),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
BlocProvider.of<CertificateUploadCubit>(context)
|
BlocProvider.of<CertificateUploadCubit>(context)
|
||||||
.uploadCertificate(
|
.uploadCertificate(
|
||||||
UploadCertificateParams(
|
UploadCertificateParams(
|
||||||
|
|||||||
Reference in New Issue
Block a user