TGoogleStructuredFormat.fromJson constructor

TGoogleStructuredFormat.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TGoogleStructuredFormat.fromJson(Map<String, dynamic> json) {
  return TGoogleStructuredFormat(
    mainText: json['mainText'] != null
        ? TGooglePredictionText.fromJson(json['mainText'] as Map<String, dynamic>)
        : null,
    secondaryText: json['secondaryText'] != null
        ? TGooglePredictionText.fromJson(json['secondaryText'] as Map<String, dynamic>)
        : null,
  );
}