|
@@ -0,0 +1,36 @@
|
|
1
|
+import 'package:flutter/material.dart';
|
|
2
|
+import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
3
|
+
|
|
4
|
+///无数据Widget
|
|
5
|
+class EmptyWidget extends StatelessWidget {
|
|
6
|
+ final Widget? icon;
|
|
7
|
+ final String? text;
|
|
8
|
+
|
|
9
|
+ const EmptyWidget({super.key, this.text, this.icon});
|
|
10
|
+
|
|
11
|
+ @override
|
|
12
|
+ Widget build(BuildContext context) {
|
|
13
|
+ return Center(
|
|
14
|
+ child: Row(
|
|
15
|
+ mainAxisSize: MainAxisSize.min,
|
|
16
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
17
|
+ children: [
|
|
18
|
+ icon == null
|
|
19
|
+ ? Icon(
|
|
20
|
+ Icons.sentiment_dissatisfied,
|
|
21
|
+ size: 35.r,
|
|
22
|
+ )
|
|
23
|
+ : icon!,
|
|
24
|
+ SizedBox(
|
|
25
|
+ width: 10.w,
|
|
26
|
+ ),
|
|
27
|
+ text == null
|
|
28
|
+ ? SizedBox()
|
|
29
|
+ : Text(
|
|
30
|
+ text!,
|
|
31
|
+ )
|
|
32
|
+ ],
|
|
33
|
+ ),
|
|
34
|
+ );
|
|
35
|
+ }
|
|
36
|
+}
|