fromJson static method

DeviceTokenHuaweiPush? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static DeviceTokenHuaweiPush? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return DeviceTokenHuaweiPush(
    token: (json['token'] as String?) ?? '',
    encrypt: (json['encrypt'] as bool?) ?? false,
  );
}