toMap method

Map<String, dynamic> toMap()

Converts the object to a Map<String, dynamic>

Implementation

Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'id': id,
    'object': object,
    'created': created,
    'model': model,
    'choices': choices.map((x) => x.toMap()).toList(),
    'usage': usage.toMap(),
  };
}