getBlock method

Future<Block?> getBlock(
  1. String blockHash
)

Gets a block by hash.

Implementation

Future<Block?> getBlock(String blockHash) async {
  final data = await provider.getBlockByHash(blockHash, true);
  return data != null ? Block.fromJson(data) : null;
}