publicTransportFare property

String? get publicTransportFare

Public transport fare for the route.

Returns a localized fare string when available. This getter is nullable and returns null when no fare information is provided by the data source.

Returns

  • String?: A localized fare description or null if unavailable.

Implementation

String? get publicTransportFare {
  final OperationResult resultString = objectMethod(
    pointerId,
    'PTRoute',
    'getPTFare',
  );

  final dynamic result = resultString['result'];

  return (result == null || result is! String || result.isEmpty)
      ? null
      : result;
}