logo和名称替换
This commit is contained in:
@@ -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))),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user