What is BuildContext used for?

 

It provides information about the location of a widget in the widget tree.
Used to:

  • Access Theme.of(context)

  • Navigate (Navigator.of(context))

  • Show dialogs/snackbars

Comments

Popular posts from this blog

1. What is Flutter?

What is FutureBuilder and StreamBuilder?