page_loading.dart
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/widgets/v_empty_view.dart';
class LoadingPage extends StatefulWidget {
final Color defalutColor;
final String showMsg;
const LoadingPage(
{Key key, this.defalutColor = MyColours.color_ffffff, this.showMsg})
: super(key: key);
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return LoadingPageState();
}
}
class LoadingPageState extends State<LoadingPage> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
backgroundColor: widget.defalutColor,
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
SizedBox(
width: ScreenUtil().setWidth(80),
height: ScreenUtil().setWidth(80),
child: CupertinoActivityIndicator()),
VEmptyView(30),
Text(
widget.showMsg,
style: TextStyle(
color: MyColours.color_666666,
fontSize: ScreenUtil().setSp(24)),
)
],
),
),
);
}
}