Event.fromJson constructor

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

Implementation

factory Event.fromJson(Map<String, dynamic> json) => Event(
      year: json['year'] as int?,
      month: json['month'] as int,
      day: json['day'] as int,
      label: _stringToEventLabel[json['label'] as String? ?? ''] ??
          EventLabel.birthday,
      customLabel: (json['customLabel'] as String?) ?? '',
    );