toMap method

  1. @override
Map<String, Object?> toMap()
override

Implementation

@override
Map<String, Object?> toMap() {
  final data = <String, Object?>{
    'category': category,
    'action': action,
    'label': label,
    'property': property,
    'value': value,
  };
  data.removeWhere((key, value) => value == null);
  return data;
}