Skip to content

After using importStateHistory, the fontFamily and fontScale of the text type will revert to its original state. #83

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

You must be logged in to vote

Thanks for sharing the code with me, it helped me a lot to resolve this issue. I have now released version 3.0.14 which should fix it.
For it to work, you need to remove the fit value that you add to the image (it is not needed because we set the exact width and height anyway). Below is the code I mean.

  _editorKey.currentState?.addLayer(
      StickerLayerData(
        offset: Offset.zero,
        scale: _initScale * 0.5,
        sticker: Image.memory(
          bytes,
          width: decodedImage.width.toDouble(),
          height: decodedImage.height.toDouble(),
          /// TODO: Remove this line =>  fit: BoxFit.cover,
        ),
      ),
    );

Please let me know if you still have…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@hm21
Comment options

hm21 Jun 14, 2024
Maintainer

@iOSyan
Comment options

@hm21
Comment options

hm21 Jun 14, 2024
Maintainer

@iOSyan
Comment options

@hm21
Comment options

hm21 Jun 15, 2024
Maintainer

Comment options

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

hm21 Jun 15, 2024
Maintainer

Answer selected by iOSyan
@iOSyan
Comment options

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