Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got this error when clicking the download link, tell me how to fix this, please!!!! #676

Closed
harshasuraweera opened this issue Feb 9, 2021 · 4 comments

Comments

@harshasuraweera
Copy link

I got this error when clicking the download link, tell me how to fix this, please!!!!

Here is the console log

I/flutter ( 9448): onDownloadStart https://courseweb.sliit.lk/pluginfile.php/49/mod_forum/attachment/32848/SLIIT%20Covid19%20Reminder%20Students%20-%20Jan%202021.pdf
E/flutter ( 9448): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: 'package:flutter_downloader/src/downloader.dart': Failed assertion: line 73 pos 12: '_initialized': FlutterDownloader.initialize() must be called first
E/flutter ( 9448): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
E/flutter ( 9448): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
E/flutter ( 9448): #2 FlutterDownloader.enqueue (package:flutter_downloader/src/downloader.dart:73:12)
E/flutter ( 9448): #3 _MyIndexPage.build. (package:am_sliit/index.dart:366:61)

@pichillilorenzo
Copy link
Owner

This is not related to my plugin.. As you can see it is related to flutter_downloader plugin.
However, as you can see from the error, you should call FlutterDownloader.initialize() before you use it. Probably in your main function (see https://pub.dev/packages/flutter_downloader#usage).

@harshasuraweera
Copy link
Author

This is not related to my plugin.. As you can see it is related to flutter_downloader plugin.
However, as you can see from the error, you should call FlutterDownloader.initialize() before you use it. Probably in your main function (see https://pub.dev/packages/flutter_downloader#usage).

I did that already. But did not working. thanks for the quick response 😊

@bibek-magar
Copy link

This is not related to my plugin.. As you can see it is related to flutter_downloader plugin.
However, as you can see from the error, you should call FlutterDownloader.initialize() before you use it. Probably in your main function (see https://pub.dev/packages/flutter_downloader#usage).

I did that already. But did not working. thanks for the quick response 😊

how you solve it.. I am getting same error though this is not related to this package.. just asking quick question

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants