Unable to add text layer #572
-
|
Thanks for this amazing package , We are actually developing an open source app to transfer images to an eink display, and I have already used your package to create an editor screen. Now i am creating a template screen ( Video Link: https://drive.google.com/file/d/1G6EaVjBfViXKMOd6vbR7dAp8qgtKCKS3/view?usp=sharing ) I am using widget layers and offset to align the text , and I would like to use the text layers to edit the fonts and styles in the editor. I am getting some errors when I tried adding the layers in the onAfterViewInit: () {} block, this is where I used the add layers using the widget layers. PR Link: fossasia/magic-epaper-app#96 Can you please suggest how to implement this ? text.layer.error.mp4════════ Exception caught by widgets library ═══════════════════════════════════ ════════ Exception caught by widgets library ═══════════════════════════════════ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Thanks for the detailed explanation. That issue actually comes from the editor, some parameters from the textLayer aren’t marked as required, even though they are. I’ll fix that in the next version. TextLayer(
/// Add below
color: Colors.black,
background: Colors.white,
colorMode: LayerBackgroundMode.backgroundAndColor,
text: 'Hello World',
interaction: LayerInteraction(
enableEdit: true,
enableMove: true,
enableRotate: true,
enableScale: true,
enableSelection: true,
),
), |
Beta Was this translation helpful? Give feedback.
Thanks for the detailed explanation. That issue actually comes from the editor, some parameters from the textLayer aren’t marked as required, even though they are. I’ll fix that in the next version.
In the meantime, here’s an example of what you need to add to make it work: