findBy method

  1. @override
SerializableFinder findBy(
  1. dynamic data,
  2. FindType type
)
override

Returns the correct finder type instance data can be String, Key or a Type findType denotes the type of finder returned

Implementation

@override
SerializableFinder findBy(
  dynamic data,
  FindType type,
) {
  switch (type) {
    case FindType.key:
      return find.byValueKey(data.toString());
    case FindType.text:
      return find.text(data);
    case FindType.tooltip:
      return find.byTooltip(data);
    case FindType.type:
      return find.byType(data.toString());
  }
}