fromMap method

void fromMap(
  1. Map<String, dynamic> map
)

Implementation

void fromMap(Map<String, dynamic> map) {
  _mid = map["mid"] ?? HycopUtils.genMid(type);
  _updateTime =
      map["updateTime"] == null ? DateTime.now() : HycopUtils.dateTimeFromDB(map["updateTime"]);
  _createTime =
      map["createTime"] == null ? _updateTime : HycopUtils.dateTimeFromDB(map["createTime"]);

  //print("createTime = $createTime, $mid");
  parentMid.setDD(map["parentMid"] ?? '', save: false, noUndo: true);
  order.setDD((map[HycopFactory.serverType == ServerType.supabase ? "order_" : "order"] ?? 1 as num).toDouble(),
      save: false, noUndo: true);
  hashTag.setDD(map["hashTag"] ?? '', save: false, noUndo: true);
  isRemoved.setDD(map["isRemoved"] ?? false, save: false, noUndo: true);
  String? rtKey = map["realTimeKey"];
  if (rtKey != null && rtKey.isNotEmpty) _realTimeKey = rtKey;
}