探索为什么Scaffold没有设置resizeToAvoidBottomInset: false属性,页面仍然不会被软键盘撑开的问题(默认软键盘会撑开),问题在于ScreenUtilInit的useInheritedMediaQuery属性默认为false。
This commit is contained in:
parent
c5b41b207a
commit
af3d954e75
|
@ -19,6 +19,8 @@ class MyApp extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return ScreenUtilInit(
|
||||
designSize: Size(375, 812),
|
||||
// 如果不把这歌参数设为true 那么column就不会随着软键盘而变化
|
||||
// useInheritedMediaQuery: true,
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return RefreshConfiguration(
|
||||
headerBuilder: () => ClassicHeader(),
|
||||
|
|
|
@ -181,7 +181,7 @@ class SignUpPage extends GetView<SignUpController> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// resizeToAvoidBottomInset: false,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: transparentAppBar(
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
|
@ -206,15 +206,14 @@ class SignUpPage extends GetView<SignUpController> {
|
|||
Divider(height: 1),
|
||||
_buildLogo(),
|
||||
_buildInputForm(),
|
||||
// Spacer(),
|
||||
SizedBox(height: 200.h,),
|
||||
SizedBox(height: 80.h,),
|
||||
// _buildThirdPartyLogin(),
|
||||
// _buildHaveAccountButton(),
|
||||
ElevatedButton(onPressed: (){}, child: Text('测试'))
|
||||
Spacer(),
|
||||
_buildThirdPartyLogin(),
|
||||
_buildHaveAccountButton(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ dependencies:
|
|||
get: ^4.6.5
|
||||
|
||||
# 屏幕适配
|
||||
flutter_screenutil: ^5.0.0+2
|
||||
flutter_screenutil: ^5.7.0
|
||||
|
||||
# http
|
||||
dio: ^4.0.0
|
||||
|
|
Loading…
Reference in New Issue