add method
Adds an ImageOperator or a TensorOperator into the Operator chain.
Throws UnsupportedError if op
is neither an ImageOperator nor a
TensorOperator
Implementation
ImageProcessorBuilder add(Operator op) {
if (op is ImageOperator) {
super.add(op);
return this;
} else if (op is TensorOperator) {
return this.add(TensorOperatorWrapper(op));
} else {
throw UnsupportedError(
'${op.runtimeType} is not supported, only ImageOperator and TensorOperator is supported');
}
}