firstByKey method
Returns the first mounted element whose widget key equals key, or null.
Implementation
Element? firstByKey(Key key) {
final matches = byKey(key);
return matches.isEmpty ? null : matches.first;
}
Returns the first mounted element whose widget key equals key, or null.
Element? firstByKey(Key key) {
final matches = byKey(key);
return matches.isEmpty ? null : matches.first;
}