utils/field_spec library

Classes

FieldSpec
A single field parsed from a --fields spec, e.g. title:String or age:int? (the trailing ? marks the field nullable), or inferred from a JSON sample (where isModel flags fields whose type is a generated model that exposes fromJson / toJson).

Functions

parseFields(String? raw) List<FieldSpec>
Parses a --fields value like "title:String, done:bool, age:int?" into a list of FieldSpec. Whitespace is tolerated; a missing type defaults to String. Returns an empty list for null/blank input.