Asset class

Representing an active symbol retrieved from the API.

Constructors

Asset({required String name, String market = '', String subMarket = '', String? displayName, String? marketDisplayName, String? subMarketDisplayName, bool isOpen = true, bool isFavourite = false})
Initializes a class representing an active symbol retrieved from the API.
Asset.fromJson(Map<String, dynamic> json)
Creates an Asset object from JSON map.
factory

Properties

displayName String
The displaying name of the active symbol.
final
hashCode int
The hash code for this object.
no setterinherited
isFavourite bool
Whether the market is favorited by the user or not.
getter/setter pair
isOpen bool
Whether the market is currently open or not.
final
market String
The name of the active symbol's market.
final
marketDisplayName String
The displaying name of the active symbol's market.
final
name String
The name of the active symbol.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subMarket String
The name of the active symbol's sub-market.
final
subMarketDisplayName String
The displaying name of the active symbol's sub-market.
final

Methods

containsText(String text) bool
Checks if the displayName contains the given text.
copyWith({String? name, String? displayName, String? market, String? marketDisplayName, String? subMarket, String? subMarketDisplayName, bool? isOpen, bool? isFavourite}) Asset
Copies the class with changes to given attributes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toggleFavourite() → void
Toggles the is isFavourite property of the class.
toJson() Map<String, dynamic>
Converts this object to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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