findRegion method

AtlasRegion? findRegion(
  1. String name
)

Returns the first region found with the specified name. This method uses String comparison to find the region, so the result should be cached rather than calling this method multiple times.

Returns The region, or nullptr.

Implementation

AtlasRegion? findRegion(String name) {
  final result = SpineBindings.bindings.spine_atlas_find_region(_ptr, name.toNativeUtf8().cast<Char>());
  return result.address == 0 ? null : AtlasRegion.fromPointer(result);
}