ThreadData.fromNewThread constructor

ThreadData.fromNewThread(
  1. List<Comment> comments,
  2. PrimitiveWrapper<Offset> threadPosition,
  3. Uint8List pngData
)

Implementation

factory ThreadData.fromNewThread(List<Comment> comments, PrimitiveWrapper<Offset> threadPosition, Uint8List pngData) {
  String seed = DateTime.now().toString();
  var randomString = const Uuid().v5(Uuid.NAMESPACE_NIL, seed);
  return ThreadData()
    .._imageNameWithoutContainer = randomString
    ..comments = comments
    ..threadPosition = threadPosition
    ..pngData = pngData;
}