createNestedRecordListByName method
Create a nested RecordList with the specified field name.
It throw exceptions in the following cases.
- If you specify a field name that is not defined.
- If the specified field is not a nested RecordList.
Implementation
RecordList createNestedRecordListByName(String name){
FieldSchema? fs = _schema?.fieldMap[name];
if(fs == null){
throw Exception("The specified field does not exist. name=$name, schema=$_schema");
}
if(fs.schema == null || fs.type != RecordList){
throw Exception("The specified field does not recordlist. name=$name, schema=$_schema");
}
if(_dataSet == null){
throw Exception("DataSet is null. name=$name, schema=$_schema");
}
return _dataSet!.createNestedRecordList(fs.schema!);
}