Skip to content

[Question] Apply a selected filter by simply tapping a point on the image #202

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

You must be logged in to vote

You just need to wrap the content from the editor with a GestureDetector and set the filterShowHelper from the WhatsAppHelper class to 0. In the code below, I demonstrate how to do this with animation in a loop, but you can also implement it without animation.

customWidgets: ImageEditorCustomWidgets(
  mainEditor: CustomWidgetsMainEditor( 
    wrapBody: (editor, rebuildStream, content) {
      return Stack(
        alignment: Alignment.center,
        fit: StackFit.expand,
        clipBehavior: Clip.none,
        children: [
          Transform.scale(
            transformHitTests: false,
            scale: 1 /
                constraints.maxHeight *
                (constraints.maxHeight -

Replies: 1 comment 1 reply

Comment options

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

Answer selected by mbenci
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