fromJson static method

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

Switch-based factory that dispatches to the correct subclass.

Implementation

static ResponseWebSearchCallSearching fromJson(Map<String, dynamic> json) {
  switch (json['type']) {
    case 'response.web_search_call.searching':
      return ResponseWebSearchCallSearching(json);
    default:
      throw ArgumentError(
        'Unknown web-search event type "${json['type']}".',
      );
  }
}