UICDetailsService class

Utilities for working with UIC numbers.

Constructors

UICDetailsService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

determineCategory(String uic) UICCategory?
Tries to determine the UICCategory of uic. Returns null for 7-digit long and invalid UIC numbers, as well as UIC number whose category couldn't be determined.
determineType(String uic) UICType?
Tries to determine the UICType of uic. Returns null if uic.length is invalid (ergo neither 7 nor 12).
extractUICValues(String uic, [UICCategory category = UICCategory.passengerCoach]) List<UICDescription>
Splits a 12-digit uic into its UICDetails. category defaults to UICCategory.passengerCoach. Returns an empty list for non-12-digit UIC numbers.
formatUIC(String uic, {UICType? type = UICType.twelveDigits, UICCategory? category = UICCategory.passengerCoach}) String
Formats uic to match the common format of type (defaults to UICType.twelveDigits) and category (defaults to UICCategory.passengerCoach, ignored with 7-digit uic).
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