TransitLine class

Contains information about the transit line used in this step, and may include the following properties:

  • name contains the full name of this transit line. eg. "7 Avenue Express".
  • shortName contains the short name of this transit line. This will normally be a line number, such as "M7" or "355".
  • color contains the color commonly used in signage for this transit line. The color will be specified as a hex string such as: #FF0033.
  • agencies is an array containing a single TransitAgency object. The TransitAgency object provides information about the operator of the line, including the following properties:
    • name contains the name of the transit agency.
    • phone contains the phone number of the transit agency.
    • url contains the URL for the transit agency.

You must display the names and URLs of the transit agencies servicing the trip results.

  • url contains the URL for this transit line as provided by the transit agency.
  • icon contains the URL for the icon associated with this line.
  • textColor contains the color of text commonly used for signage of this line. The color will be specified as a hex string.
  • vehicle contains the type of vehicle used on this line. This may include the following properties:
    • name contains the name of the vehicle on this line. eg. "Subway."
    • type contains the type of vehicle that runs on this line. See the Vehicle Type documentation for a complete list of supported values.
    • icon contains the URL for an icon associated with this vehicle type.
    • localIcon contains the URL for the icon associated with this vehicle type, based on the local transport signage.

Constructors

TransitLine({String? name, String? shortName, String? color, List<TransitAgency>? agencies, String? url, String? icon, String? textColor, Vehicle? vehicle})
const
TransitLine.fromMap(Map<String, dynamic> map)
factory

Properties

agencies List<TransitAgency>?
Is an array containing a single TransitAgency object. The TransitAgency object provides information about the operator of the line, including the following properties:
final
color String?
Contains the color commonly used in signage for this transit line. The color will be specified as a hex string such as: #FF0033.
final
hashCode int
The hash code for this object.
no setterinherited
icon String?
Contains the URL for the icon associated with this line.
final
name String?
Contains the full name of this transit line. eg. "7 Avenue Express".
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortName String?
Contains the short name of this transit line. This will normally be a line number, such as "M7" or "355".
final
textColor String?
Contains the color of text commonly used for signage of this line. The color will be specified as a hex string.
final
url String?
Contains the URL for this transit line as provided by the transit agency.
final
vehicle Vehicle?
Contains the type of vehicle used on this line. This may include the following properties:
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited