NoticePayload.fromJson constructor

NoticePayload.fromJson(
  1. String? json
)

Implementation

factory NoticePayload.fromJson(String? json) {
  Map<String, dynamic>? map;
  NoticePayload payload = NoticePayload();
  try {
    map = jsonDecode(json ?? '');
    payload.path = map?['path'];
    payload.data = map?['data'];
  } catch (e) {
    AppLog.w(e);
  }
  return payload;
}