operator [] method

dynamic operator [](
  1. String fieldName
)

Implementation

operator [](String fieldName) {
  return fields.firstWhere((field) => field.name == fieldName).value;
}