findBy method
Returns the correct finder type instance
data
can be String
, Key
or a Type
findType
denotes the type of finder returned
Implementation
@override
Finder findBy(
dynamic data,
FindType type,
) {
switch (type) {
case FindType.key:
return find.byKey(data is Key ? data : Key(data));
case FindType.text:
return find.text(data);
case FindType.tooltip:
return find.byTooltip(data);
case FindType.type:
return find.byType(data);
}
}