extended_image icon indicating copy to clipboard operation
extended_image copied to clipboard

Resized when keyboard shows/hides Duplicate #412

Open SmirnovM91 opened this issue 2 years ago • 4 comments

Do you have any ideas how to fix it?

SmirnovM91 avatar May 21 '22 12:05 SmirnovM91

I can't get you

zmtzawqlp avatar May 23 '22 07:05 zmtzawqlp

I have same problem.

For example:

class Demo extends StatelessWidget {
  const Demo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: false,
      backgroundColor: const Color(0xffd9eeff),
      body: Stack(children: [
        Positioned(
          top: 0,
          left: 0,
          right: 0,
          // when keyboard show/hide will rebuild Image
          child: ExtendedImage.asset('assets/images/common/header.png'),
        ),
        Positioned(
          top: 0,
          left: 0,
          right: 0,
          // when keyboard show/hide won't rebuild Image
          child: Image.asset('assets/images/common/footer.png'),
        ),
        Center(
          child: Container(
            height: 100,
            color: Colors.white,
            child: const TextField(),
          ),
        ),
      ]),
    );
  }
}

https://user-images.githubusercontent.com/48408513/176419795-eadee7aa-a377-4b28-985d-2a8b58f8efad.mp4

gujintao1900 avatar Jun 29 '22 10:06 gujintao1900

I have same problem.

For example:

class Demo extends StatelessWidget {
  const Demo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: false,
      backgroundColor: const Color(0xffd9eeff),
      body: Stack(children: [
        Positioned(
          top: 0,
          left: 0,
          right: 0,
          // when keyboard show/hide will rebuild Image
          child: ExtendedImage.asset('assets/images/common/header.png'),
        ),
        Positioned(
          top: 0,
          left: 0,
          right: 0,
          // when keyboard show/hide won't rebuild Image
          child: Image.asset('assets/images/common/footer.png'),
        ),
        Center(
          child: Container(
            height: 100,
            color: Colors.white,
            child: const TextField(),
          ),
        ),
      ]),
    );
  }
}

1656499871198336.mp4

set https://github.com/fluttercandies/extended_image/blob/d24600b5fbd4e68a4cd34eaf8ac9ce67319874c7/lib/src/extended_image.dart#L773 to true

zmtzawqlp avatar Jun 29 '22 11:06 zmtzawqlp

it works, thanks a lot.

gujintao1900 avatar Jun 29 '22 12:06 gujintao1900