Skip to content

How to init the brush thickness in the drawing tool, and can the bar window for adjusting line thickness be customized on the right or left? #258

Answered by hm21
iop04329 asked this question in Q&A
Discussion options

You must be logged in to vote

To set the initial stroke width in the paint-editor, you can configure it within the ImageEditorTheme as shown below:

configs: ProImageEditorConfigs(
  imageEditorTheme: ImageEditorTheme(
    paintingEditor: PaintingEditorTheme(
      initialStrokeWidth: 10,
    ),
  ),
),

To add a bar for adjusting the stroke width, you can use CustomWidgets to create a custom widget, as shown below:

configs: ProImageEditorConfigs(
  customWidgets: ImageEditorCustomWidgets(
    paintEditor: CustomWidgetsPaintEditor(
      bodyItems: (editor, rebuildStream) => [
        ReactiveCustomWidget(
          stream: rebuildStream,
          builder: (_) {
            return Positioned(
              top: 10,
   …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iop04329
Comment options

Answer selected by iop04329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants