UserMessagingVO.fromModel constructor

UserMessagingVO.fromModel(
  1. UserMessagingModel model
)

Implementation

factory UserMessagingVO.fromModel(UserMessagingModel model) {
  return UserMessagingVO(
    uid: model.uid!,
    snapshot: model.snapshot,
    fcmTokens: model.fcmTokens,
    userId: model.userId,
    createdAt: model.createdAt is double
        ? DateTime.fromMillisecondsSinceEpoch(model.createdAt!.toInt())
        : null,
    updatedAt: model.updatedAt is double
        ? DateTime.fromMillisecondsSinceEpoch(model.updatedAt!.toInt())
        : null,
  );
}