Split constructor
Split()
Implementation
Split()
: super(
methodName: "split",
arity: 1,
targetType: NativeMethodTarget.string,
function: (target, _, args) {
final arg = args[0];
if (arg is! String) {
throw RuntimeError("split() takes a string as an argument.");
}
return target.split(arg);
},
);