website
website copied to clipboard
Unclear how to handle conditional UI, when resolving the condition is async
@mit-mit commented on Fri Dec 08 2017
Occasionally apps need to render different UI depending on some condition that is resolved asynchronously, for example:
-
Dependent on device vs. emulator: The
device_infopackage has anisEmulatorAPI, but this is async -
Dependent on login state: The
firebase_authpackage handles login, but asking if the user is logged in or not is async
It would be great if flutter.io has documentation for how to generally render UI that is conditional on async state.
@goderbauer commented on Fri Dec 28 2018
The cookbook would be a great place to add this (https://flutter.io/docs/cookbook).
Should this be moved to the website repo?