lookup method

String? lookup(
  1. String typename,
  2. Map<String, Arg> args
)

Entity key a lookup field points at, e.g. launch(id: "x") → Launch:x. Returns null when the arguments do not carry the key.

Implementation

String? lookup(String typename, Map<String, Arg> args) {
  if (!enabled) return null;
  final id = args[keyField]?.value;
  if (id == null) return null;
  return '$typename:$id';
}