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.

55 lines
1.4 KiB

4 years ago
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/round_button.dart';
3 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
4 years ago
class NoDataView extends StatelessWidget {
final bool isShowBtn;
final String text;
final double fontSize;
final EdgeInsets margin;
3 years ago
NoDataView(
3 years ago
{this.isShowBtn = true,
this.text,
this.fontSize,
this.margin = const EdgeInsets.only(top: 30)});
4 years ago
@override
Widget build(BuildContext context) {
return Container(
margin: margin,
4 years ago
alignment: Alignment.center,
child: Column(
children: [
Image(image: AssetImage("assets/image/icon_empty.png")),
SizedBox(
3 years ago
height: 35.h,
4 years ago
),
Text(
text,
3 years ago
style: TextStyle(
fontSize: fontSize,
color: Color(0xFF353535),
),
4 years ago
),
SizedBox(
3 years ago
height: 10.h,
4 years ago
),
if (isShowBtn)
Container(
3 years ago
margin: EdgeInsets.symmetric(horizontal: 16.w),
child: RoundButton(
text: "返回首页",
textColor: Colors.white,
3 years ago
fontSize: 14.sp,
padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
),
)
4 years ago
],
),
);
}
}