fluttercommunity / fluttercommunity/flutter_downloader
FlutterDownloader.initialize() throw exception on open the downloadScreen again
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
Flutter: 1.12.13+hotfix.8
IDE: VSCode
How to check if the plugin is already initialize? I have read about #154 but I cannot get how to do it.
I have a screen page let's called it downloadScreen.dart. On initState, I will call a Future method to initialize the plugin based from the documentation part
WidgetsFlutterBinding.ensureInitialized();
await FlutterDownloader.initialize();
Note: the plugin must be initialized before using.
If I'm pop the downloadScreen and push back the screen at homeScreen, the run will be exception with FlutterDownloader.initialize() must be called only once!
How to check on initState the plugin has already been initialized?
I'm using VSCode writing for Android device only.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with downloadScreen.dart and the plugin initialization call from initState, then read the initialization guidance referenced in the issue and related issue #154. Reproduce opening the screen, popping it, and opening it again on Android; done means the plugin is initialized safely without the second-call exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100