fromDynamicNullable static method

TestStep? fromDynamicNullable(
  1. dynamic map, {
  2. bool ignoreImages = false,
})

Attempts to parse a TestStep using the fromDynamic function, but if for any reason that function throws an error, this will return null rather that propagating the error.

Implementation

static TestStep? fromDynamicNullable(
  dynamic map, {
  bool ignoreImages = false,
}) {
  TestStep? result;

  try {
    result = fromDynamic(map, ignoreImages: ignoreImages);
  } catch (e) {
    // no-op; this is explicitly allowed
  }

  return result;
}