logo和名称替换

This commit is contained in:
谢宇宁
2026-10-14 11:23:36 +07:00
parent 1cb514cd02
commit c5c04a7967
478 changed files with 8990 additions and 4948 deletions
+39 -15
View File
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/widget/card_swiper/src/swiper.dart';
import 'package:hgmj/tools_base/widget/image_browser_page.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/widget/card_swiper/src/swiper.dart';
import 'package:wydj/tools_base/widget/image_browser_page.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
import '../../hj_model/splash/ads_model.dart';
import 'ads_item.dart';
@@ -73,7 +73,13 @@ class _AdsBannerState extends State<AdsBanner> {
SizedBox(height: 256, child: _swiper()),
12.sizeBoxH,
if (_count > 1)
Center(child: _indicator(space: 4, dotSize: 4, selectWidth: 8, color: widget.color, selectColor: widget.selectColor)),
Center(
child: _indicator(
space: 4,
dotSize: 4,
selectWidth: 8,
color: widget.color,
selectColor: widget.selectColor)),
],
),
);
@@ -98,15 +104,22 @@ class _AdsBannerState extends State<AdsBanner> {
dotSize: 2,
selectWidth: 5,
//视频广告 cell:主题黄(未选中半透明,选中实心)
color: widget.color ?? const Color(0xffFFD900).withValues(alpha: 0.4),
selectColor: widget.selectColor ?? const Color(0xffFFD900),
color: widget.color ??
const Color(0xffFFD900).withValues(alpha: 0.4),
selectColor:
widget.selectColor ?? const Color(0xffFFD900),
),
),
)
: Positioned(
bottom: 7,
right: 7,
child: _indicator(space: 4, dotSize: 4, selectWidth: 8, color: widget.color, selectColor: widget.selectColor),
child: _indicator(
space: 4,
dotSize: 4,
selectWidth: 8,
color: widget.color,
selectColor: widget.selectColor),
),
],
),
@@ -189,8 +202,12 @@ class DotIndicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isBar = style == IndicatorStyle.bar;
final activeColor = selectColor ?? (isBar ? const Color(0xffE1351F) : Colors.white);
final inactiveColor = color ?? (isBar ? const Color(0xffE1351F).withValues(alpha: 0.3) : Colors.white.withValues(alpha: 0.5));
final activeColor =
selectColor ?? (isBar ? const Color(0xffE1351F) : Colors.white);
final inactiveColor = color ??
(isBar
? const Color(0xffE1351F).withValues(alpha: 0.3)
: Colors.white.withValues(alpha: 0.5));
return Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -248,7 +265,8 @@ class _ImageSwiperState extends State<ImageSwiper> {
loop: _count > 1,
itemBuilder: (_, index) => InkWell(
enableFeedback: false,
onTap: () => ImageBrowserPage.open(widget.imgs ?? [], index: index),
onTap: () =>
ImageBrowserPage.open(widget.imgs ?? [], index: index),
child: NetworkImageLoader(imageUrl: widget.imgs![index]),
),
onIndexChanged: (index) => _index.value = index,
@@ -260,7 +278,8 @@ class _ImageSwiperState extends State<ImageSwiper> {
right: 12,
child: ValueListenableBuilder<int>(
valueListenable: _index,
builder: (_, index, __) => DotIndicator(count: _count, index: index, space: 6),
builder: (_, index, __) =>
DotIndicator(count: _count, index: index, space: 6),
),
),
],
@@ -303,8 +322,12 @@ class _AiBannerState extends State<AiBanner> {
final item = widget.models?[index];
//左:原图 右:AI 生成图
return Row(children: [
Expanded(child: NetworkImageLoader(imageUrl: item?.cover ?? '', borderRadius: 0)),
Expanded(child: NetworkImageLoader(imageUrl: item?.newUrl ?? '', borderRadius: 0)),
Expanded(
child: NetworkImageLoader(
imageUrl: item?.cover ?? '', borderRadius: 0)),
Expanded(
child: NetworkImageLoader(
imageUrl: item?.newUrl ?? '', borderRadius: 0)),
]);
},
onIndexChanged: (index) => _index.value = index,
@@ -316,7 +339,8 @@ class _AiBannerState extends State<AiBanner> {
right: 10,
child: ValueListenableBuilder<int>(
valueListenable: _index,
builder: (_, index, __) => DotIndicator(count: _count, index: index),
builder: (_, index, __) =>
DotIndicator(count: _count, index: index),
),
),
],
+2 -2
View File
@@ -2,8 +2,8 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_infinite_marquee/flutter_infinite_marquee.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/ad_manager.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/ad_manager.dart';
import '../../hj_model/splash/ads_model.dart';
import 'ads_banner.dart';
+29 -11
View File
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_utils/api_service/common_service.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_utils/api_service/common_service.dart';
import 'package:wydj/hj_utils/screen.dart';
import '../../hj_model/splash/ads_model.dart';
import '../../routers/jump_router.dart';
@@ -70,7 +70,8 @@ class _AdsItemState extends State<AdsItem> {
width: Get.width,
height: Get.height,
fit: BoxFit.cover,
placeHolderWidget: Image.asset('ic_splash_bg.webp'.launchPath, fit: BoxFit.cover, width: Get.width, height: Get.height),
placeHolderWidget: Image.asset('ic_splash_bg.webp'.launchPath,
fit: BoxFit.cover, width: Get.width, height: Get.height),
);
}
@@ -80,7 +81,8 @@ class _AdsItemState extends State<AdsItem> {
children: [
AspectRatio(
aspectRatio: widget.aspectRatio ?? 1,
child: NetworkImageLoader(imageUrl: adInfo.cover ?? '', borderRadius: 12),
child: NetworkImageLoader(
imageUrl: adInfo.cover ?? '', borderRadius: 12),
),
const Spacer(),
Text(
@@ -111,7 +113,10 @@ class _AdsItemState extends State<AdsItem> {
10.sizeBoxH,
Text(
adInfo.title ?? '',
style: const TextStyle(color: Color(0xffdddfdf), fontWeight: FontWeight.w300, fontSize: 12),
style: const TextStyle(
color: Color(0xffdddfdf),
fontWeight: FontWeight.w300,
fontSize: 12),
),
],
);
@@ -125,7 +130,9 @@ class _AdsItemState extends State<AdsItem> {
fit: BoxFit.fill,
);
final ratio = widget.aspectRatio;
return ratio == null ? image : AspectRatio(aspectRatio: ratio, child: image);
return ratio == null
? image
: AspectRatio(aspectRatio: ratio, child: image);
}
//水平样式:左图 + 标题,右「立即下载」按钮
@@ -136,19 +143,30 @@ class _AdsItemState extends State<AdsItem> {
Row(
children: [
//图片自己切 10 的圆角
NetworkImageLoader(imageUrl: adInfo.cover ?? '', borderRadius: 10, width: 50, height: 50),
NetworkImageLoader(
imageUrl: adInfo.cover ?? '',
borderRadius: 10,
width: 50,
height: 50),
10.sizeBoxW,
Text(
adInfo.title ?? '',
style: const TextStyle(color: Colors.white, fontWeight: FontWeight.w300, fontSize: 12),
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w300,
fontSize: 12),
),
],
),
Container(
width: 72,
height: 28,
decoration: BoxDecoration(color: const Color(0xff3476FF), borderRadius: BorderRadius.circular(14)),
child: const Center(child: Text('立即下载', style: TextStyle(color: Colors.white, fontSize: 12))),
decoration: BoxDecoration(
color: const Color(0xff3476FF),
borderRadius: BorderRadius.circular(14)),
child: const Center(
child: Text('立即下载',
style: TextStyle(color: Colors.white, fontSize: 12))),
),
],
);