updateBody static method

String updateBody(
  1. String content
)

Implementation

static String updateBody(String content) {
  Map<String, dynamic>? map = json.decode(content);
  if (map != null) {
    Map<String, dynamic>? appDeviceMap = map['appDevice'];
    if (appDeviceMap != null) {
      appDeviceMap['t'] = DateTime.now().millisecondsSinceEpoch;
      appDeviceMap['sign'] = Sign.sign(appDevice.deviceNo, appDeviceMap['t'].toString());
    }
  }
  return json.encode(map);
}