Become a member
Sign in
Using FutureBuilder to Create a Better Widget
1K
9
Jimmy Ho
Ryan Adrig
Ryan Adrig
Sep 4, 2018 · 1 min read

I encountered an async exception while using this method of snapshot.hasData that froze my widget rendering, and occasionally crashed the app. I have had better results sticking to the documentation in the form of using a switch statement with ConnectionState.<connectionState>

    Ryan Adrig

    Written by

    Ryan Adrig

    Write the first response

    Discover Medium

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

    Make Medium yours

    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

    Become a member

    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade
    AboutHelpLegal