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

Need to throw an exception if initialize not called. #271

Closed
bsutton opened this issue Apr 7, 2020 · 2 comments
Closed

Need to throw an exception if initialize not called. #271

bsutton opened this issue Apr 7, 2020 · 2 comments

Comments

@bsutton
Copy link
Contributor

bsutton commented Apr 7, 2020

I've just upgraded to 3.x.

My code did not call the initialize method before calling startRecorder.

The result was a no suchMethodError.

It would be helpful if the public api threw an exception if initialize hadn't been called.

On the other hand why can't this be handled internally? Why do we need to force the user to call it when the package could initialise itself?

@Larpoux
Copy link
Collaborator

Larpoux commented Apr 7, 2020

Yes, you are right.
I will add this check in next release.

@Larpoux
Copy link
Collaborator

Larpoux commented Apr 8, 2020

Flutter Sound 3.1.6 calls initialise() itself if the App did not do it.

@Larpoux Larpoux closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants