MessageField constructor
Implementation
MessageField(this.message, this.name, dynamic fieldType, this.optional, this.array) {
if (fieldType is String && reBinary.hasMatch(fieldType)) {
final int length = int.tryParse(fieldType.substring(6)) ?? 0;
if (length <= 0) throw Exception('Invalid binary data length for "$name" in "${message.filename}".');
type = 'binary';
binary = true;
binaryLength = length;
}
else {
type = fieldType;
binary = false;
binaryLength = 0;
}
}