target static method

PlaybookFinder target(
  1. Object target
)

The finder for a loose step target: a String, Key, Type, IconData or PlaybookFinder.

A String is resolved the way a person reads the screen; see PlaybookFinder.target. Throws an ArgumentError for anything else.

Implementation

static PlaybookFinder target(Object target) => switch (target) {
  final PlaybookFinder finder => finder,
  final String text => _ReadingFinder(text),
  final Key key => _KeyFinder(key),
  final Type type => _TypeFinder(type),
  final IconData icon => _IconFinder(icon),
  _ => throw ArgumentError.value(
    target,
    'target',
    'must be a String, Key, Type, IconData or PlaybookFinder',
  ),
};