getOverlayAt method
Retrieve the overlay at the given index.
Parameters
index: Zero-based index of the overlay to retrieve.
Returns
- The corresponding OverlayInfo, or null if the index is out of bounds.
Example
final collection = OverlayService.getAvailableOverlays().$1;
final info = collection.getOverlayAt(0);
if (info != null) print(info.name);
Implementation
OverlayInfo? getOverlayAt(final int index) {
final OperationResult resultString = objectMethod(
pointerId,
'OverlayCollection',
'getOverlayAt',
args: index,
);
final int id = resultString['result'];
if (id == -1) {
return null;
}
return OverlayInfo.init(id);
}