optimize function
Create an optimization context.
Implementation
Optimize optimize({Map<String, Object> params = const {}}) {
final result = currentContext.optimize();
final paramsObj = currentContext.emptyParams();
for (final entry in params.entries) {
paramsObj[entry.key] = entry.value;
}
result.setParams(paramsObj);
return result;
}