getLockTemplate method

  1. @override
LockTemplate? getLockTemplate(
  1. String contract
)

Get the lock template associated to the given contract

contract A String label of the contract to get the lock template for Returns the lock template associated to the given contract if possible. Else null.

Implementation

@override
LockTemplate? getLockTemplate(String contract) {
  final contractResult = contractsStore.findFirstSync(_instance,
      finder: Finder(filter: Filter.equals("contract", contract)));

  if (contractResult == null) return null;
  return LockTemplate.fromJson(jsonDecode(contractResult["lock"]! as String));
}