main
parent
c9ca6ac6e3
commit
b53e42a43f
|
@ -17,18 +17,28 @@ class _HomePageState extends State<HomePage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const AMapWidget map = AMapWidget(
|
const AMapWidget map = AMapWidget(
|
||||||
|
|
||||||
///必须正确设置的合规隐私声明,否则SDK不会工作,会造成地图白屏等问题。
|
///必须正确设置的合规隐私声明,否则SDK不会工作,会造成地图白屏等问题。
|
||||||
privacyStatement: ConstConfig.amapPrivacyStatement,
|
privacyStatement: ConstConfig.amapPrivacyStatement,
|
||||||
apiKey: ConstConfig.amapApiKeys,
|
apiKey: ConstConfig.amapApiKeys,
|
||||||
);
|
);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text("首页"),
|
title: const Text(
|
||||||
actions: const [Text("今日在线时长?小时")],
|
"首页",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
|
actions: const [
|
||||||
|
Text("今日在线时长?小时", style: TextStyle(color: Colors.white))
|
||||||
|
],
|
||||||
|
flexibleSpace: Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage("images/4.0x/home_top_bg.png"),
|
||||||
|
fit: BoxFit.cover)),
|
||||||
|
)),
|
||||||
|
backgroundColor: const Color(0xFFF3F3F3),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(10),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [buildTopWidget()],
|
children: [buildTopWidget()],
|
||||||
),
|
),
|
||||||
|
@ -36,7 +46,14 @@ class _HomePageState extends State<HomePage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildTopWidget() {
|
Widget buildTopWidget() {
|
||||||
return Column(
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(5))),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
@ -56,8 +73,7 @@ class _HomePageState extends State<HomePage> {
|
||||||
children: [
|
children: [
|
||||||
Switch(
|
Switch(
|
||||||
value: enabled,
|
value: enabled,
|
||||||
onChanged: (value) =>
|
onChanged: (value) => setState(() {
|
||||||
setState(() {
|
|
||||||
enabled = value;
|
enabled = value;
|
||||||
}),
|
}),
|
||||||
activeColor: Colors.red,
|
activeColor: Colors.red,
|
||||||
|
@ -80,7 +96,7 @@ class _HomePageState extends State<HomePage> {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(padding:const EdgeInsets.only(top:0), child: GridView.count(
|
GridView.count(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
|
@ -89,12 +105,14 @@ class _HomePageState extends State<HomePage> {
|
||||||
NumberBlock(title: "钱包(元)", number: "111"),
|
NumberBlock(title: "钱包(元)", number: "111"),
|
||||||
NumberBlock(title: "总订单数", number: "111"),
|
NumberBlock(title: "总订单数", number: "111"),
|
||||||
NumberBlock(title: "总金额(元)", number: "111"),
|
NumberBlock(title: "总金额(元)", number: "111"),
|
||||||
ImageBlock(title: "提现",imgUrl: "images/3.0x/tixian_ic.png"),
|
ImageBlock(title: "提现", imgUrl: "images/3.0x/tixian_ic.png"),
|
||||||
ImageBlock(title: "个人中心",imgUrl: "images/3.0x/gerenzhongxin_ic.png"),
|
ImageBlock(
|
||||||
ImageBlock(title: "设置",imgUrl: "images/3.0x/shezhi_ic.png"),
|
title: "个人中心", imgUrl: "images/3.0x/gerenzhongxin_ic.png"),
|
||||||
|
ImageBlock(title: "设置", imgUrl: "images/3.0x/shezhi_ic.png"),
|
||||||
],
|
],
|
||||||
),)
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue