keyWithData method
Returns a new widget whose key is based on this widget's icon
Useful when combined with AnimatedSwitcher to allow for automatic transitions when the icon changes.
Implementation
Widget keyWithData() => KeyedSubtree(
key: ValueKey(icon),
child: this,
);