construct method

void construct(
  1. Map<String, dynamic> data
)

Construct from the supplied Map, only check for the keys we need.

Implementation

void construct(Map<String, dynamic> data) {
  if (data[EthereumConstants.ethResultKey] is! bool) {
    _syncing = true;
    if (data.containsKey('startingBlock')) {
      _startingBlock = EthereumUtilities.hexToInt(data['startingBlock']);
    }
    if (data.containsKey('currentBlock')) {
      _currentBlock = EthereumUtilities.hexToInt(data['currentBlock']);
    }
    if (data.containsKey('highestBlock')) {
      _highestBlock = EthereumUtilities.hexToInt(data['highestBlock']);
    }
  }
}