hyzp_ybqx-Commit012:已经较好地实现启动画面的一致性,不覆盖顶部状态栏
This commit is contained in:
+22
-3
@@ -220,11 +220,30 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Scaffold(
|
// return new Scaffold(
|
||||||
body: new Center(
|
// body: new Center(
|
||||||
child: new Image.asset('assets/images/hyzp_yibin_launche.png'),
|
// child: new Image.asset('assets/images/hyzp_yibin_launche.png', fit: BoxFit.fill),
|
||||||
|
// // child: new Image.asset('assets/images/hyzp_ybqx_cuipingqu_launche.png'),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// return Container(
|
||||||
|
// width: MediaQuery.of(context).size.width, // 屏幕宽度
|
||||||
|
// height: MediaQuery.of(context).size.height, // 屏幕高度
|
||||||
|
// child: Image.asset('assets/images/hyzp_yibin_launche.png', fit: BoxFit.cover),
|
||||||
|
// );
|
||||||
|
//final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||||
|
return Scaffold(
|
||||||
|
body: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(height: MediaQuery.of(context).padding.top), // 不覆盖顶部状态栏
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width, // 屏幕宽度
|
||||||
|
height: MediaQuery.of(context).size.height - MediaQuery.of(context).padding.top, // 屏幕高度
|
||||||
|
child: Image.asset('assets/images/hyzp_yibin_launche.png', fit: BoxFit.cover),
|
||||||
// child: new Image.asset('assets/images/hyzp_ybqx_cuipingqu_launche.png'),
|
// child: new Image.asset('assets/images/hyzp_ybqx_cuipingqu_launche.png'),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user