From c108dd7d2a97f3b3aa0087a1d5fdc997e1d53331 Mon Sep 17 00:00:00 2001 From: alper <29778028+iamalper@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:34:52 +0300 Subject: [PATCH] fix: add missing callback --- lib/screens/receive_page.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/screens/receive_page.dart b/lib/screens/receive_page.dart index 978cd0f..3e73ac8 100644 --- a/lib/screens/receive_page.dart +++ b/lib/screens/receive_page.dart @@ -52,14 +52,17 @@ class _ReceivePageInnerState extends ConsumerState setState(() {}); }); _receiveClass = Receiver( - downloadAnimC: _downloadAnimC, - onDownloadStart: () => uiStatus = _UiState.downloading, - onAllFilesDownloaded: (files) async { - await ref.read(filesProvider.notifier).addFiles(files); - _files = files; - uiStatus = _UiState.complete; - }, - ); + downloadAnimC: _downloadAnimC, + onDownloadStart: () => uiStatus = _UiState.downloading, + onAllFilesDownloaded: (files) async { + await ref.read(filesProvider.notifier).addFiles(files); + _files = files; + uiStatus = _UiState.complete; + }, + onDownloadError: (e) { + errorMessage = e.getErrorMessage(AppLocalizations.of(context)!); + uiStatus = _UiState.error; + }); _receive(); super.initState(); }