toString method

  1. @override
String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.

Implementation

@override
String toString() {
  return '{'
      'productId: $productId, '
      'price: $price, '
      'pricePercentageChange24h: $pricePercentageChange24h, '
      'volume24h: $volume24h, '
      'volumePercentageChange24h: $volumePercentageChange24h, '
      'baseIncrement: $baseIncrement, '
      'quoteIncrement: $quoteIncrement, '
      'quoteMinSize: $quoteMinSize, '
      'quoteMaxSize: $quoteMaxSize, '
      'baseMinSize: $baseMinSize, '
      'baseMaxSize: $baseMaxSize, '
      'baseName: $baseName, '
      'quoteName: $quoteName, '
      'watched: $watched, '
      'isDisabled: $isDisabled, '
      'isNew: $isNew, '
      'status: $status, '
      'cancelOnly: $cancelOnly, '
      'limitOnly: $limitOnly, '
      'postOnly: $postOnly, '
      'tradingDisabled: $tradingDisabled, '
      'auctionMode: $auctionMode, '
      'productType: $productType, '
      'quoteCurrencyId: $quoteCurrencyId, '
      'baseCurrencyId: $baseCurrencyId, '
      'fcmTradingSessionDetails: $fcmTradingSessionDetails, '
      'midMarketPrice: $midMarketPrice, '
      'alias: $alias, '
      'aliasTo: $aliasTo, '
      'baseDisplaySymbol: $baseDisplaySymbol, '
      'quoteDisplaySymbol: $quoteDisplaySymbol, '
      'viewOnly: $viewOnly, '
      'priceIncrement: $priceIncrement, '
      'displayName: $displayName, '
      'productVenue: $productVenue, '
      'approximateQuote24hVolume: $approximateQuote24hVolume, '
      'newAt: $newAt, '
      'marketCap: $marketCap, '
      'futureProductDetails: $futureProductDetails, '
      'predictionMarketProductDetails: $predictionMarketProductDetails'
      '}';
}