CellHighlightConfig.fromJson constructor

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

Implementation

factory CellHighlightConfig.fromJson(Map<String, dynamic> json) {
  if (json['highlight'] != true) {
    return const CellHighlightConfig();
  }

  return CellHighlightConfig(
    enabled: true,
    color: _parseColor(json['highlightColor']),
    userId: json['userId']?.toString(),
    userName: json['userName']?.toString(),
  );
}