// Dart imports: import 'dart:convert'; import 'package:aku_new_community_manager/utils/websocket/fier_dialog.dart'; // Flutter imports: // Package imports: class JpushMessageParse { final Map message; String? subTitle; String type = '0'; JpushMessageParse(Map rawMessage) : message = Map.from(rawMessage); Future shot() async { subTitle = message['alert']; Map rawExtras = message['extras']; String? androidExtra = rawExtras['cn.jpush.android.EXTRA']; if (androidExtra == null) { return; } else { Map _innerMap = jsonDecode(androidExtra); type = _innerMap['type'] ?? '0'; switch (type) { case '1': await FireDialog.fireAlarm(subTitle!); break; default: } } } }