Intermediate
Flutter
Q47 / 100
What is a GlobalKey used for in Flutter?
Correct! Well done.
Incorrect.
The correct answer is B) Accessing a widget's State or RenderObject from outside its build method, and preserving identity across rebuilds
B
Correct Answer
Accessing a widget's State or RenderObject from outside its build method, and preserving identity across rebuilds
Explanation
GlobalKey uniquely identifies a widget in the entire app. It allows accessing a widget's State (GlobalKey<FormState> for form.validate()), its RenderObject size/position, or a specific widget across the tree.
Progress
47/100