fromKeyValue static method

DartDeclaration fromKeyValue(
  1. String key,
  2. dynamic val
)

Implementation

static DartDeclaration fromKeyValue(String key, dynamic val) {
  var dartDeclaration = DartDeclaration();
  dartDeclaration = fromCommand(
    Commands.valueCommands,
    dartDeclaration,
    testSubject: val,
    key: key.cleaned(),
    value: val,
  );

  dartDeclaration = fromCommand(
    Commands.keyComands,
    dartDeclaration,
    testSubject: key,
    key: key.cleaned(),
    value: val,
  );

  return dartDeclaration;
}