getName method

String? getName(
  1. int index
)

Returns the name of the bookmarked route at index, or null when the index is invalid.

Parameters

  • index: Index of the route in the current sort order.

Returns

  • String?: the route name when present, otherwise null.

Implementation

String? getName(final int index) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteBookmarks',
    'getName',
    args: index,
  );

  final GemError err = GemErrorExtension.fromCode(
    resultString.data['gemApiError'],
  );

  if (err != GemError.success) {
    return null;
  }

  return resultString['result'];
}