-
Is it possible init the painterConfig to int the brush thickness , and the bar window for adjusting line thickness be customized on the right or left ? |
Beta Was this translation helpful? Give feedback.
Answered by
hm21
Nov 6, 2024
Replies: 1 comment 1 reply
-
To set the initial stroke width in the paint-editor, you can configure it within the configs: ProImageEditorConfigs(
imageEditorTheme: ImageEditorTheme(
paintingEditor: PaintingEditorTheme(
initialStrokeWidth: 10,
),
),
), To add a bar for adjusting the stroke width, you can use configs: ProImageEditorConfigs(
customWidgets: ImageEditorCustomWidgets(
paintEditor: CustomWidgetsPaintEditor(
bodyItems: (editor, rebuildStream) => [
ReactiveCustomWidget(
stream: rebuildStream,
builder: (_) {
return Positioned(
top: 10,
left: 10,
/// TODO: Replace with your own widget to set the stroke width
child: GestureDetector(
onTap: () {
editor.setStrokeWidth(1);
},
),
);
},
),
],
),
),
), |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
iop04329
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To set the initial stroke width in the paint-editor, you can configure it within the
ImageEditorTheme
as shown below:To add a bar for adjusting the stroke width, you can use
CustomWidgets
to create a custom widget, as shown below: