checkOptions method Null safety

Options checkOptions(
  1. dynamic method,
  2. dynamic options
)

Implementation

static Options checkOptions(method, options) {
  options ??= Options();
  options.method = method;
  return options;
}