feat: 首页,收藏页的UI,字体 组件封装

This commit is contained in:
chengsiwen committed 2026-07-03 15:38:01 +08:00
1 parent f233f1c642
commit 7f329aef44
32 files changed
+1110 -41

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:novyronst/root/lib_export.dart';
class AppBgPage extends StatelessWidget {
const AppBgPage({
super.key,
this.child,
});
final Widget? child;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
SizedBox(
width: double.infinity,
height: double.infinity,
child: HelpImage.asset(ConstImage.pageBg, fit: BoxFit.fill),
),
child ?? SizedBox()
],
),
);
}
}
+39
View File
@@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:novyronst/common/const/const_string.dart';
import 'package:novyronst/common/help/help_image.dart';
import 'package:novyronst/tools/widgets/extend_widget.dart';
import 'package:novyronst/tools/widgets/novy_com_widget.dart';
class NovyButtonBg extends StatelessWidget {
const NovyButtonBg({super.key,
this.width,
required this.text,
this.onTap,
this.type = 1,
});
final double? width;
final String text;
final VoidCallback? onTap;
final int type;
@override
Widget build(BuildContext context) {
return Stack(
children: [
HelpImage.asset(type==1 ? ConstImage.btnBgRad1 : ConstImage.btnBgRad2,
width: width, height: 33,
fit: BoxFit.fill,
),
Positioned.fill(child: Center(
child: NovyText(text,
fontSize: 14,
color: Colors.black,
fontFamily: ConstFont.montBold
),
)),
],
).addInkWell(onTap: onTap);
}
}
+3
View File
@@ -13,6 +13,7 @@ class NovyText extends StatelessWidget {
this.shadow,
this.decoration,
this.decorationColor,
this.decorationThickness,
this.textAlign,
this.fontWeight,
this.maxLines,
@@ -29,6 +30,7 @@ class NovyText extends StatelessWidget {
final double? fontSize;
final TextDecoration? decoration;
final Color? decorationColor;
final double? decorationThickness;
final TextAlign? textAlign;
final FontWeight? fontWeight;
final int? maxLines;
@@ -52,6 +54,7 @@ class NovyText extends StatelessWidget {
color: color,
shadows: shadow == null ? null : [shadow!],
decorationColor: decorationColor,
decorationThickness: decorationThickness ?? 1,
height: lineHeight,
letterSpacing: letterSpacing,
), maxLines: maxLines,
+27
View File
@@ -0,0 +1,27 @@
import 'package:flutter/material.dart';
import 'package:novyronst/common/help/help_image.dart';
class NovyImgBg extends StatelessWidget {
const NovyImgBg({super.key,
required this.imgBg,
this.width,
this.height,
this.child
});
final String imgBg;
final double? width;
final double? height;
final Widget? child;
@override
Widget build(BuildContext context) {
return Stack(
children: [
HelpImage.asset(imgBg, width: width, height: height),
Positioned.fill(child: Center(child: child) ?? Container()),
],
);
}
}