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

[PROPOSAL] Move initialization into it's own function for AgoraClient #13

Closed
Ascenio opened this issue Jul 1, 2021 · 0 comments
Closed

Comments

@Ascenio
Copy link
Contributor

Ascenio commented Jul 1, 2021

In the AgoraClient's constructor there is an implicit call to a initialization function.

https://github.com/AgoraIO-Community/Flutter-UIKit/blob/4ab388978f322caf99234420f5e8f510ebcd0a34/lib/src/agora_client.dart#L32-L44

If you dive more deep you see there are some async stuff going on which makes the constructor unexpectedly heavy.
Other packages have the same need (e.g.: camera and video_player) and do so by giving the client the work of calling initialize. It does seem more work from the client's perspective but it's just an one liner and gives the client the power to choose when to kick off the setup.

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

Successfully merging a pull request may close this issue.

2 participants