feat: 搜索页的数据,缺省页
This commit is contained in:
1 parent
9b0fe51fa4
commit
b5bce6edcf
18 files changed
+1101
-171
No files matched your search
@@ -0,0 +1,81 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:novyronst/common/const/const_color.dart';
|
||||
import 'package:novyronst/common/help/help_image.dart';
|
||||
import 'package:novyronst/tools/widgets/novy_com_widget.dart';
|
||||
|
||||
class NyEmptyView extends StatelessWidget {
|
||||
|
||||
const NyEmptyView({super.key,
|
||||
this.title = 'No Data',
|
||||
// 'Nothing here yet.\nCome back later for more fun!',
|
||||
// Something went wrong.\nPlease try again.
|
||||
this.subtitle = 'Nothing here yet.\nCome back later for more fun!',
|
||||
this.btnText = 'RETRY',
|
||||
this.imgName,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String subtitle;
|
||||
final String btnText;
|
||||
final String? imgName;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 100),
|
||||
HelpImage.asset(ConstImage.emptyImg, width: 136),
|
||||
const SizedBox(height: 14),
|
||||
// _customText(title),
|
||||
// const SizedBox(height: 10),
|
||||
NovyText( title,
|
||||
fontSize: 16,
|
||||
color: Colors.white.withAlpha(127),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
// const SizedBox(height: 14),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_customText(String text) {
|
||||
return Text(
|
||||
text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.white, // 内部字体白色
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black, // 描边颜色
|
||||
offset: Offset(1, 1), // 偏移量
|
||||
blurRadius: 0, // 不模糊,形成硬边描边
|
||||
),
|
||||
Shadow(
|
||||
color: Colors.black,
|
||||
offset: Offset(-1, -1),
|
||||
blurRadius: 0,
|
||||
),
|
||||
Shadow(
|
||||
color: Colors.black,
|
||||
offset: Offset(1, -1),
|
||||
blurRadius: 0,
|
||||
),
|
||||
Shadow(
|
||||
color: Colors.black,
|
||||
offset: Offset(-1, 1),
|
||||
blurRadius: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -36,9 +36,11 @@ class NyTagWidget extends StatelessWidget {
|
||||
class NyHotWidget extends StatelessWidget {
|
||||
const NyHotWidget({super.key,
|
||||
required this.text,
|
||||
this.textColor,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final Color? textColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -47,7 +49,7 @@ class NyHotWidget extends StatelessWidget {
|
||||
HelpImage.asset(ConstImage.hot, width: 12),
|
||||
NovyText(text,
|
||||
fontSize: 10,
|
||||
color: Colors.black,
|
||||
color: textColor ?? Colors.black,
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user