fix(android): 键盘弹出不再压缩整页
This commit is contained in:
1 parent
5160ab437d
commit
dbeb9883a5
3 files changed
+4
-2
No files matched your search
@@ -17,7 +17,7 @@
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustNothing">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
|
||||
@@ -184,7 +184,7 @@ class _AuthPageState extends State<AuthPage> {
|
||||
return Theme(
|
||||
data: AppTheme.light(),
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: AppColors.ink,
|
||||
body: Stack(
|
||||
children: [
|
||||
|
||||
@@ -389,6 +389,7 @@ void main() {
|
||||
final first = find.byKey(const Key('comment-item-10'));
|
||||
final sheetTop = tester.getTopLeft(sheet).dy;
|
||||
final inputTop = tester.getTopLeft(input).dy;
|
||||
final inputBottom = tester.getBottomLeft(input).dy;
|
||||
final firstTop = tester.getTopLeft(first).dy;
|
||||
|
||||
tester.view.viewInsets = const FakeViewPadding(bottom: 180);
|
||||
@@ -398,6 +399,7 @@ void main() {
|
||||
expect(tester.getTopLeft(sheet).dy, closeTo(sheetTop, 0.1));
|
||||
expect(tester.getTopLeft(first).dy, closeTo(firstTop, 0.1));
|
||||
expect(tester.getTopLeft(input).dy, lessThan(inputTop - 100));
|
||||
expect(tester.getBottomLeft(input).dy, closeTo(inputBottom - 180, 0.1));
|
||||
});
|
||||
|
||||
testWidgets('should_hide_comment_like_controls', (tester) async {
|
||||
|
||||
Reference in new issue
Block a user