setCurrentIndices method

  1. @override
Indices? setCurrentIndices(
  1. String fellowship,
  2. String template,
  3. int interaction
)

Implementation

@override
m.Indices? setCurrentIndices(
    String fellowship, String template, int interaction) {
  final fellowshipResult = fellowshipsStore.findFirstSync(_instance,
      finder: Finder(filter: Filter.equals("name", fellowship)));

  final templateResult = templatesStore.findFirstSync(_instance,
      finder: Finder(filter: Filter.equals("name", template)));

  // TODO: Incorrect implementation
  if (fellowshipResult != null && templateResult != null) {
    cartesiansStore.add(
        _instance,
        Cartesian(
          x: fellowshipResult["x"]! as int,
          y: templateResult["y"]! as int,
          z: interaction,
          lockPredicate: "", // TODO
          address: "", // TODO
        ).toSembast);
  }
  return null;
}