newModel static method
Creates a model.
model
is the model path or the model text.
Implementation
static Model newModel([String model = '']) {
var m = Model();
if (model.trim().endsWith('.conf') && File(model).existsSync()) {
m.loadModel(model);
} else if (model.isNotEmpty) {
m.loadModelFromText(model);
}
return m;
}