StoryElement constructor

StoryElement({
  1. String? id,
  2. int layerIndex = 0,
  3. required ItemType type,
  4. String value = '',
  5. Color containerColor = Colors.black,
  6. TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 16, letterSpacing: 1.0, fontWeight: FontWeight.normal, fontStyle: FontStyle.normal),
  7. Offset position = const Offset(0.4, 0.4),
  8. double scale = 1.0,
  9. double rotation = 0.0,
  10. TextAlign textAlign = TextAlign.center,
  11. Widget child = const SizedBox(),
  12. String customWidgetId = '',
  13. String customWidgetPayload = '',
  14. String customWidgetUniqueID = '',
  15. bool isVideoMuted = false,
  16. XFile? elementFile,
})

Creates a new story element.

Implementation

StoryElement({
  String? id,
  this.layerIndex = 0,
  required this.type,
  this.value = '',
  this.containerColor = Colors.black,
  this.textStyle = const TextStyle(
      color: Colors.white,
      fontSize: 16,
      letterSpacing: 1.0,
      fontWeight: FontWeight.normal,
      fontStyle: FontStyle.normal),
  this.position = const Offset(0.4, 0.4),
  this.scale = 1.0,
  this.rotation = 0.0,
  this.textAlign = TextAlign.center,
  this.child = const SizedBox(),
  this.customWidgetId = '',
  this.customWidgetPayload = '',
  this.customWidgetUniqueID = '',
  this.isVideoMuted = false,
  this.elementFile,
}) : id = id ?? UniqueKey().toString();