Block class

Annotations
  • @JsonSerializable(checked: true, explicitToJson: true)

Constructors

Block(BlockHeader header, BlockBody body, int blockSize)
Block.fromJson(Map<String, dynamic> json)
A necessary factory constructor for creating a new Block instance from a map. Pass the map to the generated _$BlockFromJson() constructor. The constructor is named after the source class, in this case, Block.
factory

Properties

blockSize int
final
body → BlockBody
final
hashCode int
The hash code for this object.
no setteroverride
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({BlockHeader? header, BlockBody? body, int? blockSize}) Block
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toJson is the convention for a class to declare support for serialization to JSON. The implementation simply calls the private, generated helper method _$BlockToJson.
toString() String
A string representation of this object.
override

Operators

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