getLockTemplate method

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

Get the lock template associated to the given template

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

Implementation

@override
LockTemplate? getLockTemplate(String template) {
  final templateResult = templatesStore.findFirstSync(_instance,
      finder: Finder(filter: Filter.equals("name", template)));

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