toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'channelId': channelId,
    'channelName': channelName,
    'badge': badge,
    'channelDescription': channelDescription,
    'lights': lights,
    'lightColor': lightColor == null
        ? null
        : {
            'alpha': lightColor!.alpha,
            'red': lightColor!.red,
            'green': lightColor!.green,
            'blue': lightColor!.blue
          },
    'playSound': playSound,
    'importance': importance?.name,
    'visibility': visibility?.name,
    'vibrate': vibrate,
    'vibrationPattern': vibrationPattern
  };
}