int getAttrInt(String attribute) => ResourceScope.scope(() { final attr = getAttr(attribute); return attr.asInt(); });