ThemeParameters.fromJson constructor

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

Parses a ThemeParameters from TDLib JSON.

Implementation

factory ThemeParameters.fromJson(Map<String, dynamic> json) =>
    ThemeParameters(
      backgroundColor: _readInt(json['background_color']),
      secondaryBackgroundColor: _readInt(json['secondary_background_color']),
      headerBackgroundColor: _readInt(json['header_background_color']),
      sectionBackgroundColor: _readInt(json['section_background_color']),
      textColor: _readInt(json['text_color']),
      accentTextColor: _readInt(json['accent_text_color']),
      sectionHeaderTextColor: _readInt(json['section_header_text_color']),
      subtitleTextColor: _readInt(json['subtitle_text_color']),
      destructiveTextColor: _readInt(json['destructive_text_color']),
      hintColor: _readInt(json['hint_color']),
      linkColor: _readInt(json['link_color']),
      buttonColor: _readInt(json['button_color']),
      buttonTextColor: _readInt(json['button_text_color']),
    );