AnnouncementData.fromJson constructor Null safety

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

Implementation

factory AnnouncementData.fromJson(Map<String, dynamic> json) =>
    AnnouncementData(
      data: json['data'] == null
          ? null
          : List<Announcement>.from(
              (json['data'] as List<dynamic>).map<Announcement>(
                // ignore: always_specify_types
                (x) => Announcement.fromJson(x as Map<String, dynamic>),
              ),
            ),
    );