key property

Key? key
finalinherited

Key for preserving widget identity.

When null, the framework matches widgets by position and runtimeType during reconciliation (like Flutter). Provide an explicit key only when you need to move a widget to a different position while preserving its state.

Implementation

final Key? key;