KeyArgs<R>.of constructor

KeyArgs<R>.of(
  1. MSchemaRef ref,
  2. dynamic args
)

Implementation

factory KeyArgs.of(MSchemaRef ref, final dynamic args) {
  if (args is KeyArgs<R>) return args;
  if (args is Map<String, dynamic>) return KeyArgs.fromArgs(ref, args);
  if (args is String) return KeyArgs.fromId(ref, args, args: {});
  return illegalState("Can't extract keyArgs");
}