A Key is an identifier for Widgets, Elements and SemanticsNodes. A new widget will only be used to update an existing element if its key is the same as the key of the current widget associated with the element. It keeps a reference to state and access the state at different times or maintains it while modifying the widget tree.