OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.9k stars 495 forks source link

v5.51: open soft keyboard covers content #385

Closed techouse closed 2 years ago

techouse commented 2 years ago

Hi,

I've noticed that upgrading to v5.5.1 somehow prevents the content from being pushed upwards. Reverting back to v5.4.0+1 fixes it.

Example:

@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Padding(
      padding: EdgeInsets.symmetric(
        horizontal: 24.w,
      ),
      child: Column(
        children: [
          Expanded(
            child: AnimatedList(
              reverse: true,
              itemBuilder: (context, index, animation) => ChatMessageBubble(
                animation: animation,
                message: _chatMessages.reversed.elementAt(index),
              ),
            ),
          ),
          SizedBox(height: 48.h),
          CupertinoTextField(
            autofocus: true,
            // ... other conf
          )
        ],
      ),
    ),
  );

Working v5.4.0+1 v5 4 0+1

Broken v5.5.1 v5 5 1

Mounir-Bouaiche commented 2 years ago

@techouse You are using ScreenUtilInit() or ScreenUtil.init()

techouse commented 2 years ago

@Mounir-Bouaiche I'm using ScreenUtilInit

Mounir-Bouaiche commented 2 years ago

@Mounir-Bouaiche I'm using ScreenUtilInit

Did you set useInheritedMediaQuery: true?

techouse commented 2 years ago

@Mounir-Bouaiche I'm using ScreenUtilInit

Did you set useInheritedMediaQuery: true?

Yes.

Mounir-Bouaiche commented 2 years ago

@Mounir-Bouaiche I'm using ScreenUtilInit

Did you set useInheritedMediaQuery: true?

Yes.

Remove it then or set it to false.

techouse commented 2 years ago

@Mounir-Bouaiche I'm using ScreenUtilInit

Did you set useInheritedMediaQuery: true?

Yes.

Remove it then or set it to false.

Yep, that fixed it. Thanx!