From cb105e75b975d6a5f98fedd637e2e0b32490d210 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Fri, 9 Apr 2021 14:38:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=88=86=E4=BA=AB=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF=E5=9B=BE=E7=89=87=E9=85=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share_content/share_content_widget.dart | 66 +++++++++---------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/lib/widgets/custom/share_content/share_content_widget.dart b/lib/widgets/custom/share_content/share_content_widget.dart index 9646853..ac17814 100644 --- a/lib/widgets/custom/share_content/share_content_widget.dart +++ b/lib/widgets/custom/share_content/share_content_widget.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:zhiying_base_widget/widgets/custom/multi_nav/cached_network_image_util.dart'; import 'package:zhiying_base_widget/widgets/custom/share_content/model/custom_share_content_model.dart'; import 'package:zhiying_base_widget/widgets/custom/share_content/share_content_sk.dart'; import 'package:zhiying_base_widget/widgets/share/models/share_alert_model.dart'; @@ -90,40 +91,37 @@ class _CustomShareContentContainerWidgetState extends State<_CustomShareContentC topLeft: Radius.circular(ParseUtil.stringParseDouble(model?.topLeftRadius)), topRight: Radius.circular(ParseUtil.stringParseDouble(model?.topRightRadius)), )), - child: Container( - padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 14), - height: 200, - width: double.infinity, - decoration: BoxDecoration( - image: DecorationImage( - image: CachedNetworkImageProvider(model?.bgImageUrl ?? '') - ) - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // 标题 - CachedNetworkImage(imageUrl: model?.titleImageUrl, width: 90,), - // SizedBox(height: 20), - // 文案 - Text(model?.text?? '', style: TextStyle(color: HexColor.fromHex(model?.textColor), fontSize: 15),), - // SizedBox(height: 22), - // 复制按钮 or 分享 按钮 - Visibility( - visible: (model?.isShowShareFriend ?? '0') == '1', - // 仅仅复制按钮 - replacement: GestureDetector( onTap: () => _clickCopyButton(model?.text) ,child: CachedNetworkImage(imageUrl: model?.copyLongImageUrl ?? '', width: double.infinity)), - child: Row( - children: [ - // 复制按钮 - Flexible(flex: 1, child: GestureDetector(onTap: () => _clickCopyButton(model?.text),child: CachedNetworkImage(imageUrl: model?.copyImageUrl, width: double.infinity,))), - SizedBox(width: 20), - // 分享按钮 - Flexible(flex: 1,child: GestureDetector(onTap: ()=> _clickShareButton(model?.text), child: CachedNetworkImage(imageUrl: model?.shareImageUrl, width: double.infinity,))) - ], - )) - ], - ), + child: Stack( + children: [ + CachedNetworkImage(imageUrl: model?.bgImageUrl ?? '', width: double.infinity), + Padding( + padding: const EdgeInsets.only(left: 12.5, right: 12.5, top: 12.5, bottom: 14), + child: Column( + children: [ + // 标题 + CachedNetworkImage(imageUrl: model?.titleImageUrl, width: 90,), + SizedBox(height: 20), + // 文案 + Text(model?.text?? '', style: TextStyle(color: HexColor.fromHex(model?.textColor), fontSize: 15), maxLines: 4, overflow: TextOverflow.ellipsis,), + SizedBox(height: 22), + // 复制按钮 or 分享 按钮 + Visibility( + visible: (model?.isShowShareFriend ?? '0') == '1', + // 仅仅复制按钮 + replacement: GestureDetector( onTap: () => _clickCopyButton(model?.text) ,child: CachedNetworkImage(imageUrl: model?.copyLongImageUrl ?? '', width: double.infinity)), + child: Row( + children: [ + // 复制按钮 + Flexible(flex: 1, child: GestureDetector(onTap: () => _clickCopyButton(model?.text),child: CachedNetworkImage(imageUrl: model?.copyImageUrl, width: double.infinity,))), + SizedBox(width: 20), + // 分享按钮 + Flexible(flex: 1,child: GestureDetector(onTap: ()=> _clickShareButton(model?.text), child: CachedNetworkImage(imageUrl: model?.shareImageUrl, width: double.infinity,))) + ], + )) + ], + ), + ), + ], ) ); }