optionalFlags method

OptionalFlags optionalFlags(
  1. List<String> keys
)

Implementation

OptionalFlags optionalFlags(List<String> keys) {
  final flagStartAt = keys.indexWhere((e) => e.startsWith('-'));
  final flagArgs = flagStartAt == -1 ? <String>[] : keys.sublist(flagStartAt);

  return OptionalFlags(flagArgs);
}