You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.6 KiB
63 lines
1.6 KiB
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
class NoDataView extends StatelessWidget { |
|
final bool isShowBtn; |
|
final String text; |
|
final double fontSize; |
|
final double iconWidth; |
|
final double iconHeight; |
|
final EdgeInsets margin; |
|
|
|
NoDataView({ |
|
this.isShowBtn = true, |
|
this.text, |
|
this.fontSize, |
|
this.iconWidth = 270, |
|
this.iconHeight = 180, |
|
this.margin = const EdgeInsets.only(top: 30), |
|
}); |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return Container( |
|
margin: margin, |
|
alignment: Alignment.center, |
|
child: Column( |
|
children: [ |
|
Image( |
|
image: AssetImage("assets/image/icon_empty.png"), |
|
width: iconWidth, |
|
height: iconHeight, |
|
), |
|
SizedBox( |
|
height: 35.h, |
|
), |
|
Text( |
|
text, |
|
style: TextStyle( |
|
fontSize: fontSize, |
|
color: Color(0xFF353535), |
|
), |
|
), |
|
SizedBox( |
|
height: 10.h, |
|
), |
|
if (isShowBtn) |
|
Container( |
|
margin: EdgeInsets.symmetric(horizontal: 16.w), |
|
child: RoundButton( |
|
text: "返回首页", |
|
textColor: Colors.white, |
|
fontSize: 14.sp, |
|
padding: EdgeInsets.all(12.w), |
|
backgroup: Color(0xFF32A060), |
|
radius: 4, |
|
), |
|
), |
|
], |
|
), |
|
); |
|
} |
|
}
|
|
|