StoryElement constructor
StoryElement({
- String? id,
- int layerIndex = 0,
- required ItemType type,
- String value = '',
- Color containerColor = Colors.black,
- TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 16, letterSpacing: 1.0, fontWeight: FontWeight.normal, fontStyle: FontStyle.normal),
- Offset position = const Offset(0.4, 0.4),
- double scale = 1.0,
- double rotation = 0.0,
- TextAlign textAlign = TextAlign.center,
- Widget child = const SizedBox(),
- String customWidgetId = '',
- String customWidgetPayload = '',
- String customWidgetUniqueID = '',
- bool isVideoMuted = false,
- 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();