MerkleTree<T>.fromList constructor
Creates a Merkle tree from a list of data items
Implementation
factory MerkleTree.fromList(
List<T> items, {
String Function(T)? hashFunction,
String salt = '',
}) {
if (items.isEmpty) {
return MerkleTree<T>(hashFunction: hashFunction, salt: salt);
}
final tree = MerkleTree<T>(hashFunction: hashFunction, salt: salt);
return tree._buildTree(items);
}