Skip to content
Discussion options

You must be logged in to vote

The best way to do that is to use callbacks to check when the user moves a layer and then update the config values accordingly. For example:

 double _outsideOpacity = 1;

  @override
  Widget build(BuildContext context) {
    return ProImageEditor.asset(
      kImageEditorExampleAssetPath,
      key: editorKey,
      callbacks: ProImageEditorCallbacks(
        mainEditorCallbacks: MainEditorCallbacks(
          onScaleStart: (value) {
            if (editorKey.currentState!.isLayerBeingTransformed) {
              _outsideOpacity = 0;
              setState(() {});
            }
          },
          onScaleEnd: (value) {
            _outsideOpacity = 1.0;
            setState(() {});
  …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yangheecho
Comment options

@hm21
Comment options

hm21 Dec 31, 2025
Maintainer

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