[Question] Is there a possibility to change the erease corner widget? #253
Answered
by
hm21
Thesergiolg99
asked this question in
Q&A
-
I want to move the corner erase widget to the bottom center of the screen. Modify it as I want. Is it possible? Thank you!! |
Beta Was this translation helpful? Give feedback.
Answered by
hm21
Oct 31, 2024
Replies: 1 comment
-
To edit a widget, such as the “remove area” widget, you can use custom widgets as demonstrated below. I recommend using version configs: ProImageEditorConfigs(
designMode: platformDesignMode,
customWidgets: ImageEditorCustomWidgets(
mainEditor: CustomWidgetsMainEditor(
removeLayerArea: (removeAreaKey, editor, rebuildStream) {
return Align(
alignment: Alignment.bottomCenter,
child: StreamBuilder(
stream: rebuildStream,
builder: (context, snapshot) {
return Container(
key: removeAreaKey,
height: kToolbarHeight,
width: kToolbarHeight,
margin: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: editor.layerInteractionManager.hoverRemoveBtn
? editor.imageEditorTheme.layerInteraction
.removeAreaBackgroundActive
: editor.imageEditorTheme.layerInteraction
.removeAreaBackgroundInactive,
borderRadius: BorderRadius.circular(kToolbarHeight),
),
child: Center(
child: Icon(
editor.icons.removeElementZone,
size: 28,
),
),
);
},
),
);
},
),
),
), |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hm21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To edit a widget, such as the “remove area” widget, you can use custom widgets as demonstrated below. I recommend using version
6.1.1
, as older versions require additional code for full functionality.