needCheckItemNotification method Null safety

bool needCheckItemNotification(
  1. ReportType reportType
)

Implementation

bool needCheckItemNotification(ReportType reportType) {
  Map<String, dynamic>? data = getJson(PrefsConstants.PREFS_KEY_NEED_CHECK_NOTIFICATION);
  List<dynamic> items = data!["items"] as List<dynamic>;
  Map<String, dynamic>? item = items.firstWhere((item) => item["action"] == reportType.code);
  return item?["on"] == true;
}