智慧养老缺省页

hmxc
张萌 3 years ago
parent a6e21dbe24
commit 822e31d505

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

@ -1039,6 +1039,10 @@ class $AssetsImagesGen {
AssetGenImage get drawings => AssetGenImage get drawings =>
const AssetGenImage('assets/images/drawings.png'); const AssetGenImage('assets/images/drawings.png');
/// File path: assets/images/equipment_empty.png
AssetGenImage get equipmentEmpty =>
const AssetGenImage('assets/images/equipment_empty.png');
/// File path: assets/images/house_attestation.png /// File path: assets/images/house_attestation.png
AssetGenImage get houseAttestation => AssetGenImage get houseAttestation =>
const AssetGenImage('assets/images/house_attestation.png'); const AssetGenImage('assets/images/house_attestation.png');

@ -1,6 +1,7 @@
import 'package:aku_new_community/constants/api.dart'; import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/bracelet/bracelet_model.dart'; import 'package:aku_new_community/models/bracelet/bracelet_model.dart';
import 'package:aku_new_community/pages/services/old_age/add_equipment_page.dart';
import 'package:aku_new_community/pages/services/old_age/equipment_list_page.dart'; import 'package:aku_new_community/pages/services/old_age/equipment_list_page.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
@ -60,63 +61,68 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
.make(), .make(),
], ],
); );
return BeeScaffold( return _model == null
title: 'X5手环', ? _emptyScaffold()
extendBody: true, : BeeScaffold(
actions: [ title: 'X5手环',
IconButton( extendBody: true,
icon: Icon(CupertinoIcons.repeat), actions: [
iconSize: 30.w, IconButton(
color: Colors.black, icon: Icon(CupertinoIcons.repeat),
onPressed: () { iconSize: 30.w,
Get.to(() => EquipmentListPage()); color: Colors.black,
}, onPressed: () {
) Get.to(() => EquipmentListPage());
], },
body: Container( )
width: double.infinity, ],
height: double.infinity, body: Container(
decoration: BoxDecoration( width: double.infinity,
image: DecorationImage( height: double.infinity,
alignment: Alignment.topCenter, decoration: BoxDecoration(
image: AssetImage(Assets.static.braceletHeader.path)), image: DecorationImage(
gradient: LinearGradient( alignment: Alignment.topCenter,
begin: Alignment.topCenter, image: AssetImage(Assets.static.braceletHeader.path)),
end: Alignment.bottomCenter, gradient: LinearGradient(
colors: [Colors.white, Color(0xFFC0E5DC).withOpacity(0.355)]), begin: Alignment.topCenter,
), end: Alignment.bottomCenter,
child: _model == null colors: [
? Container() Colors.white,
: SafeArea( Color(0xFFC0E5DC).withOpacity(0.355)
child: ListView( ]),
padding: EdgeInsets.symmetric(horizontal: 32.w),
children: [
400.w.heightBox,
open,
16.w.heightBox,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
'数据更新自 ${DateUtil.formatDate(_date!, format: DateFormats.full)}'
.text
.size(22.sp)
.color(Colors.black.withOpacity(0.25))
.make(),
40.w.heightBox,
],
),
40.w.heightBox,
overview(),
24.w.heightBox,
statusCard(),
40.w.heightBox,
bottomCard(),
40.w.heightBox,
],
),
), ),
), child: _model == null
); ? Container()
: SafeArea(
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 32.w),
children: [
400.w.heightBox,
open,
16.w.heightBox,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
'数据更新自 ${DateUtil.formatDate(_date!, format: DateFormats.full)}'
.text
.size(22.sp)
.color(Colors.black.withOpacity(0.25))
.make(),
40.w.heightBox,
],
),
40.w.heightBox,
overview(),
24.w.heightBox,
statusCard(),
40.w.heightBox,
bottomCard(),
40.w.heightBox,
],
),
),
),
);
} }
Future getData() async { Future getData() async {
@ -517,4 +523,39 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
), ),
); );
} }
Widget _emptyScaffold() {
return BeeScaffold(
title: '智慧养老',
body: SafeArea(
child: Center(
child: Column(
children: [
Assets.images.equipmentEmpty.image(width: 480.w, height: 480.w),
'当前没有绑定任何设备'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.25))
.make(),
],
),
),
),
bottomNavi: Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: MaterialButton(
onPressed: () {
Get.to(() => AddEquipmentPage());
},
color: Color(0xFF5096F1),
padding: EdgeInsets.symmetric(vertical: 24.w),
minWidth: 686.w,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
),
child: '添加设备'.text.size(28.sp).white.make(),
),
),
);
}
} }

Loading…
Cancel
Save