UICDetailsService class
Utilities for working with UIC numbers.
Constructors
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. Returnsnullfor 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 ifuic.lengthis invalid (ergo neither7nor12). -
extractUICValues(
String uic, [UICCategory category = UICCategory.passengerCoach]) → List< UICDescription> -
Splits a 12-digit
uicinto its UICDetails.categorydefaults 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
uicto match the common format oftype(defaults to UICType.twelveDigits) andcategory(defaults to UICCategory.passengerCoach, ignored with 7-digituic). -
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