JulianAssmann / flutter_background

A flutter plugin to keep apps running in the background via foreground services. Android only.
https://pub.dev/packages/flutter_background
MIT License
86 stars 46 forks source link

What happens if you call initialize twice? #16

Closed Timmmm closed 3 years ago

Timmmm commented 3 years ago

Small clarification needed for the docs - what happens if you call initialize after it's already been called?

From the code it looks like it is fine to me - and probably a reasonable idea just to call initialize() before enable() every time. But it would be good to clarify that in the docs.

JulianAssmann commented 3 years ago

Thank you for the suggestion. I improved the initialize method and tried out calling it twice, and the code as well as the test suggest that there is no problem calling it as many times as you want. The documentation is now updated.