optimize function

Optimize optimize({
  1. Map<String, Object> params = const {},
})

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;
}