探索为什么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) {
|
Widget build(BuildContext context) {
|
||||||
return ScreenUtilInit(
|
return ScreenUtilInit(
|
||||||
designSize: Size(375, 812),
|
designSize: Size(375, 812),
|
||||||
|
// 如果不把这歌参数设为true 那么column就不会随着软键盘而变化
|
||||||
|
// useInheritedMediaQuery: true,
|
||||||
builder: (BuildContext context, Widget? child) {
|
builder: (BuildContext context, Widget? child) {
|
||||||
return RefreshConfiguration(
|
return RefreshConfiguration(
|
||||||
headerBuilder: () => ClassicHeader(),
|
headerBuilder: () => ClassicHeader(),
|
||||||
|
|
|
@ -181,7 +181,7 @@ class SignUpPage extends GetView<SignUpController> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
// resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: transparentAppBar(
|
appBar: transparentAppBar(
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
@ -206,15 +206,14 @@ class SignUpPage extends GetView<SignUpController> {
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
_buildLogo(),
|
_buildLogo(),
|
||||||
_buildInputForm(),
|
_buildInputForm(),
|
||||||
// Spacer(),
|
Spacer(),
|
||||||
SizedBox(height: 200.h,),
|
_buildThirdPartyLogin(),
|
||||||
SizedBox(height: 80.h,),
|
_buildHaveAccountButton(),
|
||||||
// _buildThirdPartyLogin(),
|
|
||||||
// _buildHaveAccountButton(),
|
|
||||||
ElevatedButton(onPressed: (){}, child: Text('测试'))
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ dependencies:
|
||||||
get: ^4.6.5
|
get: ^4.6.5
|
||||||
|
|
||||||
# 屏幕适配
|
# 屏幕适配
|
||||||
flutter_screenutil: ^5.0.0+2
|
flutter_screenutil: ^5.7.0
|
||||||
|
|
||||||
# http
|
# http
|
||||||
dio: ^4.0.0
|
dio: ^4.0.0
|
||||||
|
|
Loading…
Reference in New Issue