resolveArgs static method

ArgsSimple resolveArgs(
  1. Object? args
)

Implementation

static ArgsSimple resolveArgs(Object? args) {
  if (args == null) return ArgsSimple();
  if (args is ArgsSimple) return args;

  if (args is List) {
    return ArgsSimple.parse(args.map((e) => e.toString()).toList());
  } else if (args is String) {
    return ArgsSimple.fromEncodedJson(args);
  }

  return ArgsSimple();
}