fromKeyValue static method
Implementation
static DartDeclaration fromKeyValue(key, val) {
var dartDeclaration = DartDeclaration();
dartDeclaration = fromCommand(
Commands.valueCommands,
dartDeclaration,
testSubject: val,
key: key,
value: val,
);
dartDeclaration = fromCommand(Commands.keyComands, dartDeclaration,
testSubject: key, key: key, value: val);
if (dartDeclaration.type == null || dartDeclaration.name == null) {
exit(0);
}
return dartDeclaration;
}