BlockService class Null safety
A service to handle block-related operations.
Constructors
- BlockService(Database db)
Properties
- database → Database
-
read-only
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
commit(
BlockModel block) → void -
Persists the block into
db
. -
create(
Uint8List transactionRoot) → BlockModel - Creates a new block to be commited later.
-
get(
Uint8List id) → BlockModel? - Gets a BlockModel by BlockModel.id
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- version → const int
-
1