智慧养老缺省页

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 =>
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
AssetGenImage get houseAttestation =>
const AssetGenImage('assets/images/house_attestation.png');

@ -1,6 +1,7 @@
import 'package:aku_new_community/constants/api.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/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/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
@ -60,7 +61,9 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
.make(),
],
);
return BeeScaffold(
return _model == null
? _emptyScaffold()
: BeeScaffold(
title: 'X5手环',
extendBody: true,
actions: [
@ -83,7 +86,10 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.white, Color(0xFFC0E5DC).withOpacity(0.355)]),
colors: [
Colors.white,
Color(0xFFC0E5DC).withOpacity(0.355)
]),
),
child: _model == null
? Container()
@ -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