fieldPath property
String?
get
fieldPath
Dot-separated path to the field that triggered a validation failure
(e.g. "STTOptions.sampleRate"). Populated by the generated
validate() helpers under lib/generated/convenience/ so callers can
programmatically identify the failing field without parsing the
human-readable message.
Backed by the typed error.context.fieldPath proto field — the
wire-canonical carrier shared with Swift / Kotlin / TS.
Implementation
String? get fieldPath {
if (!error.hasContext()) return null;
final fieldPath = error.context.fieldPath;
return fieldPath.isNotEmpty ? fieldPath : null;
}