readProp<T> method
Implementation
T? readProp<T>(String label) {
dynamic head = _context.first;
if (head is Map) {
dynamic prop = head[label];
head.remove(label);
if (prop is T) {
return prop;
} else {
return null;
}
} else if (head is List) {
dynamic prop = head.removeAt(0);
if (prop is T) {
return prop;
} else {
return null;
}
}
return null;
}