attribFromJson method Null safety
Implementation
static VertexAttrib attribFromJson(String name, Map<String, Object> json) {
final jsonSize = json['size'];
final jsonType = json['type'];
final jsonStride = json['stride'];
final jsonOffset = json['offset'];
if (jsonSize is int &&
jsonType is String &&
jsonStride is int &&
jsonOffset is int) {
return VertexAttrib._internal(
name, jsonSize, jsonType, jsonStride, jsonOffset);
} else {
throw UnimplementedError();
}
}