loadRecipeLock function

Future<RecipeLock> loadRecipeLock([
  1. String? path
])

Loads the recipe lock shipped with this package.

Implementation

Future<RecipeLock> loadRecipeLock([String? path]) async {
  final content = path == null
      ? await _shippedRecipeLock()
      : await File(path).readAsString();
  return RecipeLock.fromJson(jsonDecode(content) as Map<String, dynamic>);
}