load static method

Future<Cookbook> load(
  1. String id
)

Async: Retrieve the cookbook with the provided ID from the chain, and then returns it. Returns an error if the cookbook cannot be loaded.

Implementation

static Future<Cookbook> load (String id) async {
  final lowLevel = await PylonsWallet.instance.getCookbook(id);
  if (lowLevel.success) {
    return _current = Cookbook(lowLevel.data!);
  } else {
    return Future.error(lowLevel.error);
  }
}