ComponentData constructor

ComponentData({
  1. String? id,
  2. Offset position = Offset.zero,
  3. Size size = const Size(80, 80),
  4. Size minSize = const Size(4, 4),
  5. String? type,
  6. dynamic data,
})

Represents data of a component in the model.

Implementation

ComponentData({
  String? id,
  this.position = Offset.zero,
  this.size = const Size(80, 80),
  this.minSize = const Size(4, 4),
  this.type,
  this.data,
})  : assert(minSize <= size),
      id = id ?? const Uuid().v4();