Flutter
Context in initstate()
2 views 0 comments
2 views 0 comments
I have an app which takes in a URL from a qrcode and is added to provider model.
I have socketio client connection in initstate() of a home page.
If a hard coded URL string is used in initstate() everything is fine and dandy.
If the provider value is used then the socketio is not working.
I've tried WidgetsBinding.instance.addPostFrameCallback((_).
and Future.delayed(Duration.zero).then((_) but no joy.
Any ideas