DartDeclaration.fromKeyValue constructor

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

Implementation

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

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

  return dartDeclaration;
}