在main.dart文件的materialAPP.home属性返回一个UI,这个UI就是启动页,启动页的scanffold的body,返回一张图片
- in main.dart
1 | return MaterialApp( |
in SplashPage
1
2
3
4
5
6
7
8
9
10
11
12
13@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Image.asset(
'assets/images/launch_image.png',
fit: BoxFit.fill,
width: double.infinity,
height: double.infinity,
),
),
);
}