alibaba / alibaba/flutter_boost

在FlutterBoostFragment中showModalBottomSheet被弹出的键盘遮挡

Open
#1,640 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

在FlutterBoostFragment中showModalBottomSheet被弹出的键盘遮挡。

Flutter中代码如下:

showModalBottomSheet(
context: context,
isDismissible: true,
isScrollControlled: true,
builder: (BuildContext context) {
return AnimatedPadding(
padding: MediaQuery.of(context).viewInsets,
duration: const Duration(milliseconds: 100),
child: SizedBox(
height: 100,
// color: Colors.white,
child: TextField(
maxLength: 100,
maxLines: 5,
),
),
);
});

MediaQuery.of(context).viewInsets 通过设置padding也无效。
通过WidgetsBindingObserver监听键盘的弹出动态设置padding也无效。
Fragment所在的Activity已经设置过 android:windowSoftInputMode="adjustPan"

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in FlutterBoostFragment with the provided showModalBottomSheet and TextField example, while the Android Activity uses adjustPan. Investigate how the fragment and its Activity handle keyboard insets; done means the bottom sheet remains usable and is not covered by the keyboard when it opens.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.