diff --git a/lib/article/hot_article_item.dart b/lib/article/hot_article_item.dart index eb3a502d..bf9a17e8 100644 --- a/lib/article/hot_article_item.dart +++ b/lib/article/hot_article_item.dart @@ -1,14 +1,12 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/article.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/hot_item.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -83,13 +81,13 @@ class _HotArticlePage extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: MyAppBar( - background: Color(0xFFF7F7F7), - leadingColor: Colors.black, - title: S.of(context).huixiangtoutiao, - titleColor: Colors.black, - titleSize: 18.sp, - ), + // appBar: MyAppBar( + // background: Color(0xFFF7F7F7), + // leadingColor: Colors.black, + // title: S.of(context).huixiangtoutiao, + // titleColor: Colors.black, + // titleSize: 18.sp, + // ), body: Container( child: SmartRefresher( controller: refreshController, diff --git a/lib/community/community_page.dart b/lib/community/community_page.dart index 03a696d9..0afd229b 100644 --- a/lib/community/community_page.dart +++ b/lib/community/community_page.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:huixiang/article/hot_article_item.dart'; import 'package:huixiang/community/community_child_page.dart'; +import 'package:huixiang/home/home_view/hot_article.dart'; import 'package:huixiang/home/huixiang_brand_page.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -89,6 +91,8 @@ class _CommunityPage extends State children: lables.map((e) { if (e == "关于我们") { return BrandPage(); + }else if(e == "头条"){ + return HotArticlePage(); } else { return CommunityChildPage(); } diff --git a/lib/store/store_view/settlement.dart b/lib/store/store_view/settlement.dart new file mode 100644 index 00000000..564a42d2 --- /dev/null +++ b/lib/store/store_view/settlement.dart @@ -0,0 +1,1339 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/order/order_view/order_commodity.dart'; +import 'package:huixiang/order/order_view/order_info.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; +import 'package:huixiang/retrofit/data/placeOrderFirst.dart'; +import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; +import 'package:huixiang/retrofit/data/settlement_bean.dart'; +import 'package:huixiang/retrofit/data/shoppingCart.dart'; +import 'package:huixiang/retrofit/data/store_info.dart'; +import 'package:huixiang/retrofit/min_api.dart'; +import 'package:huixiang/store/store_view/settlement_order_commodity.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:huixiang/view_widget/rename_dialog.dart'; +import 'package:huixiang/view_widget/rename_dialog_content.dart'; +import 'package:huixiang/view_widget/round_button.dart'; +import 'package:huixiang/view_widget/separator.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class Settlement extends StatefulWidget { + final arguments; + + Settlement({this.arguments}); + + @override + State createState() { + return _Settlement(); + } +} + +class _Settlement extends State { + MinApiService minService; + int selectedBtn = 0; + Function(int type) callback; + StoreInfo storeInfo; + SettleOrderInfo settleOrderInfo; + int selectedCouponIndex = -1; + + List shopCar = []; + List> shopCarGoods = []; + + TextEditingController _vc; + List addressBgs = [ + "assets/svg/dingdan_ziqu.svg", + "assets/svg/dingdan_waimai.svg", + "assets/svg/dingdan_wuliu.svg", + ]; + + @override + void initState() { + super.initState(); + storeInfo = widget.arguments["storeInfo"]; + shopCar = widget.arguments["shopProduct"]; + shopCarGoods = widget.arguments["shopGoods"]; + + _vc = TextEditingController( + text: storeInfo != null ? storeInfo.headMobile : ""); + + SharedPreferences.getInstance().then((value) { + String minToken = value.getString("minToken"); + String tenant = value.getString("tenant"); + minService = MinApiService( + Dio(), + context: context, + token: minToken, + tenant: tenant, + ); + queryOrderInfo(); + }); + } + + ///订单结算信息 + queryOrderInfo() async { + BaseData baseData = await minService.getOrderInfo({ + "addressId": null, + "isTake": 0, + "memberCouponId": null, + "orderId": 0, + "promotionId": null + }); + if (baseData != null && baseData.isSuccess) { + setState(() { + settleOrderInfo = baseData.data; + }); + } + } + + ///小程序下单 + queryPlaceOrderFirst() async { + PlaceOrderFirst placeOrderFirst = PlaceOrderFirst(); + placeOrderFirst.addressId = null; + placeOrderFirst.isSubscribe = false; + placeOrderFirst.isTakeOut = 0; + placeOrderFirst.notes = ""; + placeOrderFirst.numberOfPeople = null; + placeOrderFirst.orderSource = 0; + placeOrderFirst.orderType = 0; + placeOrderFirst.orderTypeId = 0; + placeOrderFirst.parentCode = ""; + placeOrderFirst.parentId = 0; + placeOrderFirst.payChannel = 1; + placeOrderFirst.promotionInfoDTO = PlaceOrderFirstPromotionInfoDTO(); + placeOrderFirst.promotionInfoDTO.couponId = selectedCouponIndex == -1?null : settleOrderInfo.couponList[selectedCouponIndex].couponId; + placeOrderFirst.promotionInfoDTO.promotionId = "0"; + placeOrderFirst.recMobile = storeInfo.headMobile; + placeOrderFirst.shoppingCartSkuItemList = []; + placeOrderFirst.skuItemDTOList = []; + shopCarGoods.forEach((e0) { + SkuItemDTOList skuItemDTOListBean = SkuItemDTOList(); + skuItemDTOListBean.skuId = e0["skuId"]; + skuItemDTOListBean.buyNum = e0["count"]; + PlatterList platterListBean = PlatterList(); + platterListBean.skuId = e0["skuId"]; + platterListBean.productId = e0["id"]; + skuItemDTOListBean.platterList = []; + skuItemDTOListBean.platterList.add(platterListBean); + placeOrderFirst.skuItemDTOList.add(skuItemDTOListBean); + ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean(); + shoppingCartSkuItemListBean.buyNum = e0["count"]; + shoppingCartSkuItemListBean.productId = e0["id"]; + shoppingCartSkuItemListBean.productName = e0["name"]; + shoppingCartSkuItemListBean.skuId = e0["skuId"]; + placeOrderFirst.shoppingCartSkuItemList.add(shoppingCartSkuItemListBean); + }); + placeOrderFirst.source = 1; + placeOrderFirst.storeId = storeInfo.id; + placeOrderFirst.subcribeTime = null; + placeOrderFirst.tableId = 0; + BaseData baseData = await minService.placeOrderFirst( + placeOrderFirst.toJson()).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + querySettlement(); + } + } + + ///结算 + querySettlement() async { + SettlementBean settlementBean = SettlementBean(); + settlementBean.addressId = 0; + settlementBean.buyNum = 0; + settlementBean.id = 0; + settlementBean.isLogistics = true; + settlementBean.orderProductVOList = []; + shopCarGoods.forEach((e0) { + OrderProductVOList orderProductVOListBean = OrderProductVOList(); + orderProductVOListBean.skuId = e0["skuId"]; + orderProductVOListBean.buyNum = e0["count"]; + ActInfo actInfoBean = ActInfo(); + actInfoBean.couponDiscountAmount = 0; + actInfoBean.couponDiscountRate = 0; + actInfoBean.couponId = 0; + actInfoBean.couponType = 0; + actInfoBean.discountAmount = 0; + actInfoBean.discountRate = 0; + actInfoBean.promotionId = 0; + actInfoBean.promotionType = 0; + AdditionalComment additionalCommentBean = AdditionalComment(); + additionalCommentBean.bizType = 0; + additionalCommentBean.commentImgs = ""; + additionalCommentBean.commentImgsFlag = false; + additionalCommentBean.commentStar = 0; + additionalCommentBean.commentText = ""; + additionalCommentBean.descStar = 0; + additionalCommentBean.hideFlag = true; + additionalCommentBean.id = 0; + additionalCommentBean.isDelete = true; + additionalCommentBean.likeNum = 0; + additionalCommentBean.logisticsStar = 0; + additionalCommentBean.mid = 0; + additionalCommentBean.orderProductId = 0; + additionalCommentBean.parentId = 0; + additionalCommentBean.productId = 0; + additionalCommentBean.sensitiveFlag = true; + additionalCommentBean.serviceStar = 0; + additionalCommentBean.storeId = 0; + settlementBean.buyNum = 0; + Comment commentBean = Comment(); + commentBean.bizType = 0; + commentBean.commentImgs = ""; + commentBean.commentImgsFlag = true; + commentBean.commentStar = 0; + commentBean.commentText = ""; + commentBean.descStar = 0; + commentBean.hideFlag = true; + commentBean.id = 0; + commentBean.isDelete = true; + commentBean.logisticsStar = 0; + commentBean.mid = 0; + commentBean.orderProductId = 0; + commentBean.parentId = 0; + commentBean.productId = 0; + commentBean.sensitiveFlag = true; + commentBean.serviceStar = 0; + commentBean.storeId = 0; + orderProductVOListBean.commentStatus = 0; + orderProductVOListBean.discountAmount = 0; + orderProductVOListBean.id = 0; + orderProductVOListBean.productId = 0; + orderProductVOListBean.productName = ""; + orderProductVOListBean.returnCode = ""; + orderProductVOListBean.returnStatus = 0; + orderProductVOListBean.returnType = 0; + orderProductVOListBean.sellPrice = 0; + orderProductVOListBean.skuId = 0; + orderProductVOListBean.skuImg = ""; + orderProductVOListBean.skuNameStr = ""; + settlementBean.orderProductVOList.add(orderProductVOListBean); + }); + settlementBean.payChannel = 0; + settlementBean.promotionInfoDTO = PromotionInfoDTO(); + settlementBean.promotionInfoDTO.couponId = 0; + settlementBean.promotionInfoDTO.promotionId = 0; + BaseData baseData = await minService.settlementApi({ + }).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + + } + } + + bool isEdit = false; + + String totalPrice(bool discountFlag) { + if (shopCarGoods == null) return ""; + double totalPrice = 0; + shopCarGoods.forEach((element) { + totalPrice += double.tryParse(element["price"]) * element["count"]; + }); + if(selectedCouponIndex != -1 && discountFlag){ + double discountA = double.parse(settleOrderInfo.couponList[selectedCouponIndex].discountAmount); + totalPrice -= discountA; + } + return totalPrice.toStringAsFixed(2); + } + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Positioned( + top: 0, + left: 0, + right: 0, + child: Container( + height: 175.h, + color: Color(0xFF3A405A), + width: MediaQuery.of(context).size.width, + ), + ), + Positioned( + child: Scaffold( + backgroundColor: Colors.transparent, + appBar: MyAppBar( + background: Color(0xFF3A405A), + leadingColor: Colors.white, + title: S.of(context).dingdanjiesuan, + titleColor: Colors.white, + brightness: Brightness.dark, + titleSize: 18.sp, + ), + body: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + child: Column( + children: [ + distributionMode(), + SizedBox( + height: 16, + ), + + /// 预留的手机号, 可修改 + phoneWidget(), + + ///订单商品 + SettlementOrderCommodity(shopCar, 0,shopCarGoods,settleOrderInfo), + // if (payStatus == 0) couponRemarks(), + /*(payStatus == 0) ? paySelector() : */ + + ///优惠券/备注 + activityRemarks(), + + ///支付方式 + payMethod(), + ], + ), + ), + ), + ), + ), + left: 0, + right: 0, + top: 0, + bottom: 0, + ), + Positioned( + bottom: 0, + left: 0, + right: 0, + child: Container( + height: 54.h, + color: Colors.white, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Spacer(), + Text( + S.of(context).heji, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Colors.black, + ), + ), + Text( + "¥19.00", + style: TextStyle( + fontSize: 20.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF32A060), + ), + ), + SizedBox( + width: 28, + ), + RoundButton( + width: 103.w, + height: 54.h, + text: S.current.jiesuan, + textColor: Colors.white, + fontWeight: MyFontWeight.regular, + backgroup: Color(0xFF32A060), + fontSize: 16.sp, + padding: EdgeInsets.symmetric(vertical: 5.h,), + callback: () {}, + ), + ], + ), + ), + ) + ], + ); + } + + /// 预留的手机号, 可修改 + Widget phoneWidget() { + return Container( + margin: EdgeInsets.only( + left: 16, + right: 16, + ), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x0D000000), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + padding: EdgeInsets.symmetric( + horizontal: 12.w, + vertical: 15.h, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).yuliudianhua, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4C4C4C), + ), + ), + SizedBox( + width: 50, + ), + Expanded( + child: isEdit + ? Container( + height: 25.h, + alignment: Alignment.centerRight, + child: TextField( + controller: _vc, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF4C4C4C), + ), + textAlign: TextAlign.right, + textAlignVertical: TextAlignVertical.center, + keyboardType: TextInputType.phone, + decoration: InputDecoration( + errorBorder: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + hintText: "", + hintStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), + ), + textInputAction: TextInputAction.next, + inputFormatters: [LengthLimitingTextInputFormatter(11)], + cursorColor: Colors.grey, + ), + ) + : Container( + height: 25.h, + alignment: Alignment.centerRight, + child: Text( + storeInfo != null ? storeInfo.headMobile : "", + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4C4C4C), + ), + ), + ), + ), + GestureDetector( + onTap: () { + setState(() { + this.isEdit = !this.isEdit; + }); + }, + child: Container( + padding: EdgeInsets.all(8), + child: isEdit + ? Icon( + Icons.check, + size: 14.w, + color: Color(0xFF32A060), + ) + : Image.asset( + "assets/image/pen.png", + height: 14.h, + width: 14.w, + ), + ), + ), + ], + ), + ); + } + + ///配送方式+地址 + Widget distributionMode() { + return Container( + height: 143.h, + margin: EdgeInsets.only( + left: 16, + right: 16, + top: 10, + ), + child: Stack( + children: [ + Container( + decoration: BoxDecoration( + color: Color(0x80FFFFFF), + boxShadow: [ + BoxShadow( + color: Color(0x0D000000), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + child: SvgPicture.asset( + addressBgs[selectedBtn], + width: double.infinity, + height: double.infinity, + fit: BoxFit.fill, + ), + ), + Column( + children: [ + Container( + height: 50.h, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + flex: 1, + child: GestureDetector( + onTap: () { + setState(() { + selectedBtn = 0; + }); + }, + child: Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + S.of(context).daodianziqu, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Colors.black, + ), + ), + ), + ), + ), + Expanded( + flex: 1, + child: GestureDetector( + onTap: () { + setState(() { + selectedBtn = 1; + }); + }, + child: Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + S.of(context).waimaipeisong, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Colors.black, + ), + ), + ), + ), + ), + Expanded( + flex: 1, + child: GestureDetector( + onTap: () { + SmartDialog.showToast("该功能暂未开放!", + alignment: Alignment.center); + }, + child: Container( + height: 50.h, + alignment: Alignment.center, + child: Text( + S.of(context).kuaidiwuliu, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Colors.black, + ), + ), + ), + ), + ), + ], + ), + ), + selectedBtn == 0 + ? Container( + width: double.infinity, + padding: EdgeInsets.only(left: 16, right: 16, top: 15), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + storeInfo != null + ? (storeInfo.storeName ?? "") + : "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF4C4C4C), + ), + ), + SizedBox( + height: 4, + ), + Text( + storeInfo != null + ? storeInfo.address + : "", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF727272), + ), + ), + SizedBox( + height: 12, + ), + ], + ), + ), + SizedBox( + width: 18, + ), + Stack( + alignment: Alignment.center, + children: [ + Column( + children: [ + Image.asset( + "assets/image/map.png", + height: 61.h, + width: 61.w, + ), + ], + ), + Column( + children: [ + RoundButton( + width: 41.w, + height: 13, + text: "距离您11m", + textColor: Color(0xFF34A262), + fontWeight: MyFontWeight.semi_bold, + radius: 7.5, + backgroup: Colors.white, + fontSize: 7.sp, + ), + Image.asset( + "assets/image/landmark.png", + height: 24.h, + width: 24.w, + ), + ], + ), + ], + ) + ], + ), + ], + ), + ) + : Container( + width: double.infinity, + padding: EdgeInsets.only(left: 16, right: 16, top: 15), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/icon_permission_location.png", + height: 24.h, + width: 24.w, + ), + Text( + "张先生", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 15.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF4C4C4C), + ), + ), + SizedBox( + width: 13, + ), + Expanded( + child: Text( + "12309090909", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 15.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF4C4C4C), + ), + ), + ), InkWell( + onTap: () { + setState(() { + Navigator.of(context).popAndPushNamed('/router/manage_address_page'); + }); + }, + child:Icon( + Icons.keyboard_arrow_right, + size: 24, + ), + ), + ], + ), + Padding( + padding: EdgeInsets.only(top: 4, left: 25), + child: Text( + "武昌区中国铁建凯德1818蓝调步行街中北路109附33门牌号05", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF727272), + ), + ), + ), + ], + ), + ), + ], + ), + ], + ), + ); + } + + ///活动备注 + Widget activityRemarks() { + return Container( + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Color(0x0D000000), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.circular(8), + ), + height: 86.h, + margin: EdgeInsets.only( + left: 16, + right: 16, + top: 15, + ), + padding: EdgeInsets.only( + left: 16, + right: 16, + top: 16, + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + S.of(context).youhuiquan, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + ), + Text( + (settleOrderInfo?.couponList == null || settleOrderInfo.couponList.length == 0) + ? "暂无可用优惠券" : (selectedCouponIndex == -1 + ? "拥有${settleOrderInfo.couponList.length}张优惠券": + settleOrderInfo.couponList[selectedCouponIndex].promotionName), + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF32A060), + fontWeight: MyFontWeight.semi_bold, + ), + ), + InkWell( + onTap: () { + setState(() { + couponCart(); + }); + }, + child: Icon( + Icons.keyboard_arrow_right, + size: 16, + ), + ), + ], + ), + SizedBox( + height: 13, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + S.of(context).beizhu, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + ), + Text( + "口味、面包硬度等", + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xFF353535), + fontWeight: MyFontWeight.semi_bold, + ), + ), + Icon( + Icons.keyboard_arrow_right, + size: 16, + ), + ], + ), + ], + ), + ); + } + + Widget payMethod() { + return Container( + width: double.infinity, + margin: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 12.h, + bottom: 4.h, + ), + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 20.h, + bottom: 20.h, + ), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Color(0x000000).withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12.0, + ), + ], + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 16.h), + child: Text( + S.of(context).zhifufangshi, + style: TextStyle( + fontSize: 16.sp, + color: Colors.black, + fontWeight: MyFontWeight.regular, + ), + ), + ), + GestureDetector( + onTap: () { + setState(() { + checkIndex = 1; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + checkView(1), + Text( + S.of(context).pingtaiyue, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + fontWeight: MyFontWeight.semi_bold), + ), + ], + ), + ), + SizedBox( + height: 10, + ), + GestureDetector( + onTap: () { + setState(() { + checkIndex = 2; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + checkView(2), + Text( + S.of(context).dianpuyue, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], + ), + ), + SizedBox( + height: 10, + ), + GestureDetector( + onTap: () { + setState(() { + checkIndex = 3; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + checkView(3), + Spacer(), + Image.asset("assets/image/icon_we_chat.png"), + Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).weixinzhifu, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ), + ], + ), + ), + ], + ), + ); + } + + ///手机号编辑 + // showAlertDialog() { + // //显示对话框 + // showDialog( + // barrierDismissible: false, + // context: context, + // builder: (context) { + // return RenameDialog( + // contentWidget: RenameDialogContent( + // title: "请输入新的手机号码", + // okBtnTap: () { + // // print( + // // "输入框中的文字为:${_vc.text}", + // // ); + // }, + // vc: _vc, + // cancelBtnTap: () {}, + // ), + // ); + // }); + // } + + ///优惠券弹窗 + couponCart() { + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + builder: (context) { + return StatefulBuilder(builder: (context1, state) { + return Container( + alignment: Alignment.topCenter, + width: double.infinity, + height: MediaQuery.of(context).size.height / 2, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only( + top: 16, + left: 16, + right: 16, + bottom: 8, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + (settleOrderInfo?.couponList == null || settleOrderInfo.couponList.length == 0) + ? "暂无可用优惠券" : (selectedCouponIndex == -1 + ? "拥有${settleOrderInfo.couponList.length}张优惠券": + settleOrderInfo.couponList[selectedCouponIndex].promotionName), + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Image.asset( + "assets/image/cancel.png", + width: 24, + height: 24, + ), + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.only( + top: 8, + left: 16, + right: 16, + ), + child: ListView.builder( + itemCount:settleOrderInfo == null ? 0 : settleOrderInfo.couponList.length, + physics: BouncingScrollPhysics(), + itemBuilder: (context, position) { + // return shoppGoodsItem(); + return GestureDetector( + onTap: () {}, + child: couponItem(settleOrderInfo.couponList[position],position), + ); + }, + ), + ), + ), + ], + ), + ); + }); + }, + ); + } + + ///优惠券列表 + Widget couponItem(CouponListBean couponList,int index) { + return StatefulBuilder(builder: (context1, state) { + return Container( + height: 170, + width: double.infinity, + margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 14.h, bottom: 8.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + children: [ + Text( + "¥", + style: TextStyle( + fontSize: 22.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xff32A060), + ), + ), + SizedBox( + height: 4.h, + ), + Text( + couponList.discountAmount, + style: TextStyle( + fontSize: 40.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xff32A060), + ), + ), + ], + ), + ), + Text( + S.of(context).manyuankeyong(couponList.fullAmount), + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xff32A060), + ), + ), + ], + ), + flex: 1, + ), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + padding: EdgeInsets.fromLTRB(4, 2, 4, 2), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + border: Border.all( + width: 1, + color: Color(0xFFFF7A1A), + style: BorderStyle.solid, + ), + ), + child: Text( + S.of(context).shangjiaquan, + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFFFF7A1A), + ), + ), + ), + SizedBox( + width: 8.w, + ), + Expanded( + child: Text( + storeInfo.storeName, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xff353535), + ), + ), + flex: 1, + ) + ], + ), + Text( + couponList.promotionName, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff727272), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + S.of(context).quanchangtongyong, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + ), + ), + Container( + margin: EdgeInsets.only(right: 23.w), + child: GestureDetector( + onTap: () { + setState(() { + // if (!couponList.usable){ + // SmartDialog.showToast("当前优惠券不可用", alignment: Alignment.center); + // return; + // } + double toPrice = double.parse(totalPrice(false)); + double amount = double.parse(couponList.fullAmount); + if(toPrice <= amount){ + SmartDialog.showToast("当前金额不够使用优惠券", alignment: Alignment.center); + return; + } + state(() { + if(selectedCouponIndex == index) + selectedCouponIndex = -1; + else {selectedCouponIndex = index;} + }); + Navigator.of(context).pop(); + }); + }, + child: Image.asset( + selectedCouponIndex != index + ? "assets/image/icon_radio_unselected.png" + : "assets/image/icon_radio_selected.png", + width: 24, + height: 24, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + flex: (couponList?.isEx??false) ? 97 : 97, + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 23.w), + child: MySeparator( + width: 5.w, + height: 1.h, + color: Color(0xFF353535), + ), + ), + Expanded( + flex: (couponList?.isEx??false) ? 56 : 42, + child: Container( + margin: EdgeInsets.symmetric(horizontal: 23.w, vertical: 8.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).xiangqing, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 10.sp, + ), + ), + GestureDetector( + child: Icon( + (!(couponList?.isEx??false)) + ? Icons.keyboard_arrow_down + : Icons.keyboard_arrow_up, + color: Colors.black, + size: 18, + ), //点击按钮布局 + onTap: (){ + setState(() { + state((){ + this.settleOrderInfo.couponList[index].isEx = !(this.settleOrderInfo.couponList[index].isEx??false); + }); + }); + }, + ), + ], + ), + if (couponList?.isEx??false) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + S.of(context).shiyongriqi, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 10.sp, + ), + ), + Text( + (couponList.useStartTime == null && + couponList.useEndTime == null) + ? S.of(context).quantian + : "${couponList.useStartTime.replaceAll("-", ".").split(" ")[0]} - ${couponList.useEndTime.replaceAll("-", ".").split(" ")[0]}", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 10.sp, + ), + ), + ], + ), + ], + ), + ), + ), + ], + ), + ); + }); + } + + var checkIndex = 1; + + Widget checkView(var index) { + return Container( + padding: EdgeInsets.only(right: 16.w), + alignment: Alignment.center, + child: Image.asset( + checkIndex != index + ? "assets/image/icon_radio_unselected.png" + : "assets/image/icon_radio_selected.png", + width: 15.w, + height: 15.h, + ), + ); + } +} diff --git a/lib/view_widget/hot_item.dart b/lib/view_widget/hot_item.dart index 82bcbc64..3f8db488 100644 --- a/lib/view_widget/hot_item.dart +++ b/lib/view_widget/hot_item.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/article.dart'; import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; @@ -22,6 +21,8 @@ class HotArticleItem extends StatefulWidget { } class _HotArticleItem extends State { + + @override Widget build(BuildContext context) { return GestureDetector( @@ -41,7 +42,7 @@ class _HotArticleItem extends State { Widget hotItem(BuildContext context) { return Container( - padding: EdgeInsets.all((widget.isHot == null || !widget.isHot) ? 8 : 0), + padding: EdgeInsets.all((widget.isHot == null || !widget.isHot) ? 4 : 0), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -55,44 +56,122 @@ class _HotArticleItem extends State { borderRadius: BorderRadius.circular(4), ), child: (widget.isHot == null || !widget.isHot) - ? Row( - children: [ - Visibility( - visible: widget.article != null && - widget.article.coverImg != null && - widget.article.coverImg != "", - child: Stack( - alignment: Alignment.center, - children: [ - MImage( - widget.article != null ? widget.article.coverImg : "", - fit: BoxFit.cover, - radius: BorderRadius.circular(2), - aspectRatio: 1, - errorSrc: "assets/image/default_1.png", - fadeSrc: "assets/image/default_1.png", - ), - Visibility( - visible: (widget.article != null && - widget.article.coverImg != "" && - widget.article.coverImg.endsWith(".mp4")), - child: Icon( - Icons.play_circle_outline, - size: 24, - color: Colors.white, + ? Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: 44, + child: Row( + children: [ + MImage( + (widget.article != null && + widget.article.author != null) + ? widget.article.author.avatar + : "", + width: 44, + height: 44, + isCircle: true, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ), + SizedBox( + width: 8, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + (widget.article != null && + widget.article.author != null) + ? widget.article.author.name + : "", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), ), - ), - ], - ), + Text( + widget.article != null + ? (widget.article.createTime.split(" ")[0]) + : "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF808080), + ), + ), + ], + ), + ], ), - Expanded( - child: Container( - margin: EdgeInsets.only(left: 8.w), - child: articleText(context), + ), + GestureDetector( + onTap: (){ + }, + child: RoundButton( + padding: EdgeInsets.symmetric( + horizontal: 8, + vertical: 3, + ), + backgroup: Color(0xFF32A060), + textColor: Colors.white , + text: "关注", + radius: 20, + icons: Icon( + Icons.check, + color: Color(0xFF808080), + size: 14, ), ), - ], - ) + ), + ], + ), + Expanded(child:Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 12.w), + child: articleTextTow(context), + ), + ), + Visibility( + visible: widget.article != null && + widget.article.coverImg != null && + widget.article.coverImg != "", + child:Stack( + alignment: Alignment.center, + children: [ + MImage( + widget.article != null ? widget.article.coverImg : "", + fit: BoxFit.cover, + radius: BorderRadius.circular(2), + aspectRatio: 1, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ), + Visibility( + visible: (widget.article != null && + widget.article.coverImg != "" && + widget.article.coverImg.endsWith(".mp4")), + child: Icon( + Icons.play_circle_outline, + size: 24, + color: Colors.white, + ), + ), + ], + ), + ), + ], + )), + ], + ) : Column( children: articleContent(context), ), @@ -113,7 +192,7 @@ class _HotArticleItem extends State { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( - fontWeight: FontWeight.w600, + fontWeight: MyFontWeight.medium, fontSize: 14.sp, color: Colors.black, ), @@ -140,7 +219,7 @@ class _HotArticleItem extends State { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( - fontWeight: FontWeight.w600, + fontWeight: MyFontWeight.medium, fontSize: 14.sp, color: Colors.black, ), @@ -158,7 +237,7 @@ class _HotArticleItem extends State { overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 12.sp, - fontWeight: FontWeight.w400, + fontWeight: MyFontWeight.regular, color: Color(0xFF353535), ), ), @@ -174,49 +253,50 @@ class _HotArticleItem extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - S.of(context).zuozhe((widget.article != null && - widget.article.author != null) - ? widget.article.author.name - : ""), + // S.of(context).zuozhe(), + (widget.article != null && + widget.article.author != null) + ? widget.article.author.name + : "", style: TextStyle( - fontSize: 10.sp, - fontWeight: FontWeight.w400, - color: Color(0xFFB2B2B2), + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), ), ), SizedBox( - width: 12.w, + width: 14.w, ), Container( alignment: Alignment.topRight, child: Row( children: [ Image.asset( - "assets/image/icon_likes.png", + "assets/image/browse.png", width: 16.w, height: 16.h, ), Text( (widget.article != null) - ? "${widget.article.likes}" + ? "${widget.article.viewers}" : "", style: TextStyle( - fontSize: 10.sp, - color: Color(0xFFB2B2B2), + fontSize: 12.sp, + color: Color(0xFF1A1A1A), ), ), ], ), ), SizedBox( - width: 12.w, + width: 14.w, ), Container( alignment: Alignment.topRight, child: Row( children: [ Image.asset( - "assets/image/icon_views.png", + "assets/image/leaving_message.png", width: 16.w, height: 16.h, ), @@ -225,8 +305,32 @@ class _HotArticleItem extends State { ? "${widget.article.viewers}" : "", style: TextStyle( - fontSize: 10.sp, - color: Color(0xFFB2B2B2), + fontSize: 12.sp, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + SizedBox( + width: 14.w, + ), + Container( + alignment: Alignment.topRight, + child: Row( + children: [ + Image.asset( + "assets/image/follow.png", + width: 16.w, + height: 16.h, + ), + Text( + (widget.article != null) + ? "${widget.article.likes}" + : "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF1A1A1A), ), ), ], @@ -242,11 +346,11 @@ class _HotArticleItem extends State { ? (widget.article.createTime.split(" ")[0]) : "", textStyle: TextStyle( - fontSize: 10.sp, - fontWeight: FontWeight.w400, + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, color: Color(0xFFB2B2B2), ), - leftIcon: Icons.access_time_rounded, + // leftIcon: Icons.access_time_rounded, iconSize: 10, iconColor: Color(0xFFB2B2B2), ), @@ -256,6 +360,159 @@ class _HotArticleItem extends State { ); } + Widget articleTextTow(context) { + return Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (widget.isHot == null || !widget.isHot) + ? Text( + widget.article != null ? widget.article.mainTitle : "", + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Colors.black, + ), + ) + : Row( + children: [ + RoundButton( + text: "HOT", + textColor: Colors.white, + backgroup: Color(0xFFFF441A), + radius: 2, + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + padding: EdgeInsets.all(2), + ), + SizedBox( + width: 6.w, + ), + Expanded( + child: Text( + widget.article != null + ? widget.article.mainTitle + : "", + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Colors.black, + ), + ), + flex: 1, + ), + ], + ), + SizedBox( + height: 4.h, + ), + Text( + widget.article != null ? (widget.article.viceTitle ?? "") : "", + maxLines: AppUtils.textScale(context) > 1.05 ? 1 : 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF353535), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + alignment: Alignment.topRight, + child: Row( + children: [ + Image.asset( + "assets/image/browse.png", + width: 16.w, + height: 16.h, + ), + Text( + (widget.article != null) + ? "${widget.article.viewers}" + : "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + SizedBox( + width: 32.w, + ), + Container( + alignment: Alignment.topRight, + child: Row( + children: [ + Image.asset( + "assets/image/leaving_message.png", + width: 16.w, + height: 16.h, + ), + Text( + (widget.article != null) + ? "${widget.article.viewers}" + : "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + SizedBox( + width: 32.w, + ), + Container( + alignment: Alignment.topRight, + child: Row( + children: [ + Image.asset( + "assets/image/follow.png", + width: 16.w, + height: 16.h, + ), + Text( + (widget.article != null) + ? "${widget.article.likes}" + : "", + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + ], + ), + flex: 1, + ), + ], + ), + ], + ); + } + List articleContent(context) { return [ Expanded( diff --git a/pubspec.lock b/pubspec.lock index 82714253..aee75a6d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -175,7 +175,7 @@ packages: name: cli_util url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.4" + version: "0.3.5" clock: dependency: transitive description: @@ -395,7 +395,7 @@ packages: name: flutter_smart_dialog url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.6" + version: "2.3.8" flutter_spinkit: dependency: "direct main" description: @@ -409,7 +409,7 @@ packages: name: flutter_staggered_grid_view url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.0" + version: "0.4.1" flutter_svg: dependency: "direct main" description: @@ -440,7 +440,7 @@ packages: name: fluwx url: "https://pub.flutter-io.cn" source: hosted - version: "3.6.1+2" + version: "3.6.1+3" font_awesome_flutter: dependency: "direct main" description: @@ -545,7 +545,7 @@ packages: name: keframe url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2" + version: "2.0.3" like_button: dependency: "direct main" description: @@ -587,7 +587,7 @@ packages: name: mime url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.0.1" package_config: dependency: transitive description: @@ -615,7 +615,7 @@ packages: name: path_drawing url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.1" + version: "0.5.1+1" path_parsing: dependency: transitive description: