diff --git a/assets/image/2x/icon_gold_blessing.png b/assets/image/2x/icon_gold_blessing.png index 535287c4..b0947643 100644 Binary files a/assets/image/2x/icon_gold_blessing.png and b/assets/image/2x/icon_gold_blessing.png differ diff --git a/assets/image/2x/icon_gold_coin.png b/assets/image/2x/icon_gold_coin.png index 63844cae..91ee0ba8 100644 Binary files a/assets/image/2x/icon_gold_coin.png and b/assets/image/2x/icon_gold_coin.png differ diff --git a/assets/image/2x/icon_integral_order.png b/assets/image/2x/icon_integral_order.png index cf84755c..a69632a5 100644 Binary files a/assets/image/2x/icon_integral_order.png and b/assets/image/2x/icon_integral_order.png differ diff --git a/assets/image/2x/icon_integral_share.png b/assets/image/2x/icon_integral_share.png index d78fc654..63b52af4 100644 Binary files a/assets/image/2x/icon_integral_share.png and b/assets/image/2x/icon_integral_share.png differ diff --git a/assets/image/2x/icon_integral_sign.png b/assets/image/2x/icon_integral_sign.png index e6ed76a4..8d467061 100644 Binary files a/assets/image/2x/icon_integral_sign.png and b/assets/image/2x/icon_integral_sign.png differ diff --git a/assets/image/2x/qr_share_bg.png b/assets/image/2x/qr_share_bg.png new file mode 100644 index 00000000..6e65c2eb Binary files /dev/null and b/assets/image/2x/qr_share_bg.png differ diff --git a/assets/image/2x/qr_share_info_bg.png b/assets/image/2x/qr_share_info_bg.png new file mode 100644 index 00000000..bf2374b1 Binary files /dev/null and b/assets/image/2x/qr_share_info_bg.png differ diff --git a/assets/image/2x/share_image_bg.png b/assets/image/2x/share_image_bg.png new file mode 100644 index 00000000..06158b21 Binary files /dev/null and b/assets/image/2x/share_image_bg.png differ diff --git a/assets/image/3x/icon_gold_blessing.png b/assets/image/3x/icon_gold_blessing.png index 37bb3394..0630aa88 100644 Binary files a/assets/image/3x/icon_gold_blessing.png and b/assets/image/3x/icon_gold_blessing.png differ diff --git a/assets/image/3x/icon_gold_coin.png b/assets/image/3x/icon_gold_coin.png index a344d2b1..d238dc15 100644 Binary files a/assets/image/3x/icon_gold_coin.png and b/assets/image/3x/icon_gold_coin.png differ diff --git a/assets/image/3x/icon_integral_order.png b/assets/image/3x/icon_integral_order.png index 61f44509..54489155 100644 Binary files a/assets/image/3x/icon_integral_order.png and b/assets/image/3x/icon_integral_order.png differ diff --git a/assets/image/3x/icon_integral_share.png b/assets/image/3x/icon_integral_share.png index 1912565b..e240995a 100644 Binary files a/assets/image/3x/icon_integral_share.png and b/assets/image/3x/icon_integral_share.png differ diff --git a/assets/image/3x/icon_integral_sign.png b/assets/image/3x/icon_integral_sign.png index 7f2d8fbc..18ab1809 100644 Binary files a/assets/image/3x/icon_integral_sign.png and b/assets/image/3x/icon_integral_sign.png differ diff --git a/assets/image/3x/qr_share_bg.png b/assets/image/3x/qr_share_bg.png new file mode 100644 index 00000000..69a46b61 Binary files /dev/null and b/assets/image/3x/qr_share_bg.png differ diff --git a/assets/image/3x/qr_share_info_bg.png b/assets/image/3x/qr_share_info_bg.png new file mode 100644 index 00000000..935ff8ea Binary files /dev/null and b/assets/image/3x/qr_share_info_bg.png differ diff --git a/assets/image/3x/share_image_bg.png b/assets/image/3x/share_image_bg.png new file mode 100644 index 00000000..58665fed Binary files /dev/null and b/assets/image/3x/share_image_bg.png differ diff --git a/assets/image/icon_gold_blessing.png b/assets/image/icon_gold_blessing.png index 8b384e63..a8e9aa7b 100644 Binary files a/assets/image/icon_gold_blessing.png and b/assets/image/icon_gold_blessing.png differ diff --git a/assets/image/icon_gold_coin.png b/assets/image/icon_gold_coin.png index d5d3a9be..8a840475 100644 Binary files a/assets/image/icon_gold_coin.png and b/assets/image/icon_gold_coin.png differ diff --git a/assets/image/icon_integral_order.png b/assets/image/icon_integral_order.png index 34eebfdb..be7627ca 100644 Binary files a/assets/image/icon_integral_order.png and b/assets/image/icon_integral_order.png differ diff --git a/assets/image/icon_integral_share.png b/assets/image/icon_integral_share.png index e9e56cc0..018fae54 100644 Binary files a/assets/image/icon_integral_share.png and b/assets/image/icon_integral_share.png differ diff --git a/assets/image/icon_integral_sign.png b/assets/image/icon_integral_sign.png index 1444239d..45c18a88 100644 Binary files a/assets/image/icon_integral_sign.png and b/assets/image/icon_integral_sign.png differ diff --git a/assets/image/qr_share_bg.png b/assets/image/qr_share_bg.png new file mode 100644 index 00000000..ba7e0acf Binary files /dev/null and b/assets/image/qr_share_bg.png differ diff --git a/assets/image/qr_share_info_bg.png b/assets/image/qr_share_info_bg.png new file mode 100644 index 00000000..60a5bb0e Binary files /dev/null and b/assets/image/qr_share_info_bg.png differ diff --git a/assets/image/share_image_bg.png b/assets/image/share_image_bg.png new file mode 100644 index 00000000..bd744c27 Binary files /dev/null and b/assets/image/share_image_bg.png differ diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index f78b2228..93ec325a 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -93,4 +93,5 @@ class _HomeBanner extends State { break; } } + } diff --git a/lib/home/huixiang_view/huixiang_banner.dart b/lib/home/huixiang_view/huixiang_banner.dart index 961f7144..13c03321 100644 --- a/lib/home/huixiang_view/huixiang_banner.dart +++ b/lib/home/huixiang_view/huixiang_banner.dart @@ -63,9 +63,9 @@ class _HuiXiangBanner extends State { /// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章) bannerClick(BannerData bannerData) async { switch (bannerData.contentType) { - // case 0: - // Navigator.of(context).pushNamed('/router/qr_share'); - // break; + case 0: + Navigator.of(context).pushNamed('/router/qr_share'); + break; case 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index f76a60ff..4f7b4d1c 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -71,45 +71,53 @@ class _IntegralPage extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: MyAppBar( - background: Color(0xFF3A405A), - leadingColor: Colors.white, - title: S.of(context).jifenxiangqing, - titleColor: Colors.white, - titleSize: 16.sp, - brightness: Brightness.dark, - action: Container( - alignment: Alignment.center, - margin: EdgeInsets.only(right: 16.w), - child: GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/integral_detailed_page'); - }, - child: Text( - S.of(context).mingxi, - style: TextStyle( - color: Colors.white, - fontSize: 18.sp, - fontWeight: FontWeight.bold, + return Stack( + children: [ + Positioned( + child: Container( + height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top, + decoration: BoxDecoration( + gradient: RadialGradient( + center: Alignment.center, + colors: [Color(0xFF36426E), Color(0xFF2D3247)], + focal: Alignment.center, + radius: 1, ), ), ), + top: 0, + left: 0, + right: 0, ), - ), - body: Container( - child: Stack( - children: [ - Positioned( - child: Container( - height: 122.h, - color: Color(0xFF3A405A), + Scaffold( + backgroundColor: Colors.transparent, + appBar: MyAppBar( + background: Colors.transparent, + leadingColor: Colors.white, + title: "", + titleColor: Colors.white, + titleSize: 16.sp, + brightness: Brightness.dark, + action: Container( + alignment: Alignment.center, + margin: EdgeInsets.only(right: 16.w), + child: GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/integral_detailed_page'); + }, + child: Text( + S.of(context).mingxi, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: FontWeight.bold, + ), + ), ), - top: 0, - left: 0, - right: 0, ), - SingleChildScrollView( + ), + body: Container( + child: SingleChildScrollView( physics: BouncingScrollPhysics(), child: FutureBuilder( future: querySignInfo(), @@ -129,9 +137,9 @@ class _IntegralPage extends State { }, ), ), - ], + ), ), - ), + ], ); } diff --git a/lib/integral/intergra_view/in_for_points.dart b/lib/integral/intergra_view/in_for_points.dart index 931728ce..316c4640 100644 --- a/lib/integral/intergra_view/in_for_points.dart +++ b/lib/integral/intergra_view/in_for_points.dart @@ -38,7 +38,7 @@ class _InForPoints extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], ), child: Column( @@ -87,19 +87,21 @@ class _InForPoints extends State { child: Container( alignment: Alignment.center, child: RoundButton( - width: 106.w, + width: 166.w, height: 34.h, text: (widget.signInfo != null && widget.signInfo.todayHasSignin) ? S.of(context).yiqiandao : S.of(context).lijiqiandao, - textColor: Colors.white, + textColor: (widget.signInfo != null && widget.signInfo.todayHasSignin) + ? Color(0xFF808080) + : Colors.white, backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin) - ? Colors.grey + ? Color(0xFFF5F6FA) : Color(0xFF32A060), fontSize: 16.sp, fontWeight: MyFontWeight.regular, padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), - radius: 4.w, + radius: 20.w, ), ), ), @@ -114,7 +116,7 @@ class _InForPoints extends State { return Container( padding: EdgeInsets.all(4), decoration: BoxDecoration( - color: Color(0xFFF0F0F2), + color: Color(0xFFF5F6FA), borderRadius: BorderRadius.circular(4), ), child: Row( @@ -177,7 +179,7 @@ class _InForPoints extends State { widget.signInfo.signInList != null && widget.signInfo.signInList.length > position) ? Color(0xFF32A060) - : Color(0xFFF0F0F2), + : Color(0xFFF5F6FA), borderRadius: BorderRadius.circular(4), ), child: Column( diff --git a/lib/integral/intergra_view/integral_task.dart b/lib/integral/intergra_view/integral_task.dart index b6169f1e..554fd739 100644 --- a/lib/integral/intergra_view/integral_task.dart +++ b/lib/integral/intergra_view/integral_task.dart @@ -24,7 +24,7 @@ class _IntegralTask extends State { Widget build(BuildContext context) { return Container( width: MediaQuery.of(context).size.width - 32, - height: 300.h, + height: 320.h, margin: EdgeInsets.all(16), padding: EdgeInsets.symmetric( horizontal: 10.w, @@ -39,7 +39,7 @@ class _IntegralTask extends State { offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, - ) + ), ], ), child: Column( @@ -59,32 +59,28 @@ class _IntegralTask extends State { ), Expanded( child: Container( - child: Swiper( - loop: false, - physics: BouncingScrollPhysics(), - pagination: SwiperPagination( - alignment: Alignment.bottomCenter, - builder: DotSwiperPaginationBuilder( - size: 8, - activeSize: 8, - space: 5, - activeColor: Colors.black, - color: Colors.black.withAlpha(76), - ), - ), + child: ListView.builder( + padding: EdgeInsets.only(left: 10.w, top: 20.h), + physics: NeverScrollableScrollPhysics(), + // loop: false, + // pagination: SwiperPagination( + // alignment: Alignment.bottomCenter, + // builder: DotSwiperPaginationBuilder( + // size: 8, + // activeSize: 8, + // space: 5, + // activeColor: Colors.black, + // color: Colors.black.withAlpha(76), + // ), + // ), itemBuilder: (context, position) { - return taskPage(position); + return taskItem(widget.signInfo.taskList[position]); }, itemCount: (widget.signInfo != null && widget.signInfo.taskList != null && widget.signInfo.taskList.length > 0) - ? (widget.signInfo.taskList.length < 3 - ? 1 - : (widget.signInfo.taskList.length ~/ 3 + - (widget.signInfo.taskList.length % 3 > 0 - ? 1 - : 0))) - : 1), + ? widget.signInfo.taskList.length : 0 + ), ), flex: 1, ) @@ -113,6 +109,9 @@ class _IntegralTask extends State { taskImg(String taskType) { switch (taskType) { case "bill_type_point_login": + return "assets/image/icon_integral_login.png"; + break; + case "bill_type_point_share": return "assets/image/icon_integral_share.png"; break; case "bill_type_point_order": @@ -131,17 +130,11 @@ class _IntegralTask extends State { alignment: Alignment.center, child: Row( children: [ - (task.type == "bill_type_point_login") - ? SvgPicture.asset( - "assets/svg/svg_login.svg", - width: 24.w, - height: 24.h, - ) - : Image.asset( - taskImg(task.type), - width: 24.w, - height: 24.h, - ), + Image.asset( + taskImg(task.type), + width: 24.w, + height: 24.h, + ), SizedBox( width: 21.w, ), @@ -193,13 +186,15 @@ class _IntegralTask extends State { text: task.limitDay == (task.complateNum ?? task.conplateNum) ? S.of(context).yiwancheng : S.of(context).quwancheng, - textColor: Colors.white, + textColor: task.limitDay == (task.complateNum ?? task.conplateNum) + ? Color(0xFF808080) + : Colors.white, backgroup: task.limitDay == (task.complateNum ?? task.conplateNum) - ? Color(0xFFA0A0A0) + ? Color(0xFFF5F6FA) : Color(0xFF32A060), radius: 12.w, - fontSize: 14.sp, - fontWeight: FontWeight.bold, + fontSize: 12.sp, + fontWeight: MyFontWeight.semi_bold, padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 12.w), ), ], diff --git a/lib/integral/intergra_view/integral_vip.dart b/lib/integral/intergra_view/integral_vip.dart index 3336d2b6..451e0ef7 100644 --- a/lib/integral/intergra_view/integral_vip.dart +++ b/lib/integral/intergra_view/integral_vip.dart @@ -64,61 +64,43 @@ class _IntegralVip extends State { ), Expanded( flex: 1, - child: InkWell( - onTap: () { - SharedPreferences.getInstance().then((value) { - if (value.getString("token") != null && - value.getString("token") != "") { - Navigator.of(context) - .pushNamed('/router/mine_vip_level_page', arguments: { - "rankLevel": widget.rankLevel, - "createTime": - (widget.userinfo != null) ? "${widget.userinfo.createTime}" : "", - "points": (widget.userinfo != null) - ? int.tryParse(widget.userinfo.points) - : 0, - }); - } - }); - }, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - (widget.signInfo != null && widget.signInfo.rank != null) - ? "${widget.signInfo.rank.rankName.replaceAll("会员", "")}" - : "", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 21.sp, - color: Colors.white, - ), - ), - SizedBox( - height: 6.h, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + (widget.signInfo != null && widget.signInfo.rank != null) + ? "${widget.signInfo.rank.rankName.replaceAll("会员", "")}" + : "", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 21.sp, + color: Colors.white, ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).wodehuiyuandengji, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFF2F2F2), - ), - ), - Icon( - Icons.keyboard_arrow_right, - color: Colors.white, - size: 15, + ), + SizedBox( + height: 6.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).wodehuiyuandengji, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFF2F2F2), ), - ], - ), - ], - ), + ), + // Icon( + // Icons.keyboard_arrow_right, + // color: Colors.white, + // size: 15, + // ), + ], + ), + ], ), ), ], diff --git a/lib/qr/qr_share.dart b/lib/qr/qr_share.dart index da9466cc..b63599a7 100644 --- a/lib/qr/qr_share.dart +++ b/lib/qr/qr_share.dart @@ -37,8 +37,8 @@ class _QrSharePage extends State { @override void dispose() { - super.dispose(); SmartDialog.dismiss(); + super.dispose(); } @override @@ -56,16 +56,17 @@ class _QrSharePage extends State { margin: EdgeInsets.only(right: 16.w), child: InkWell( onTap: () { + if (phone == null || phone == "") return; SmartDialog.show( - widget: QrShareImagePage("15827991714"),); + widget: QrShareImagePage(phone), + clickBgDismissTemp: true, + isPenetrateTemp: false, + ); }, - child: Text( - "分享", - style: TextStyle( - color: Colors.black, - fontSize: 18.sp, - fontWeight: FontWeight.bold, - ), + child: Icon( + Icons.share, + color: Colors.black, + size: 24.w, ), ), ), @@ -126,10 +127,13 @@ class _QrSharePage extends State { height: 152.w, decoration: BoxDecoration( border: Border.all( - color: Color(0xFF2E3552), width: 1), + color: Color(0xFF2E3552), + width: 1, + ), ), child: QrImage( - data: phone ?? "", + data: + "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${phone ?? ""}", version: QrVersions.auto, size: 200.w, gapless: true, @@ -182,7 +186,10 @@ class _QrSharePage extends State { alignment: Alignment.center, decoration: BoxDecoration( color: Color(0xFFFFC93B), - border: Border.all(color: Color(0xFF2E3552), width: 1), + border: Border.all( + color: Color(0xFF2E3552), + width: 1, + ), ), ); } diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart index 7bb61214..97d148bf 100644 --- a/lib/qr/qr_share_image.dart +++ b/lib/qr/qr_share_image.dart @@ -1,11 +1,16 @@ +import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'dart:ui' as ui; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:qr_flutter/qr_flutter.dart'; +import 'package:sharesdk_plugin/sharesdk_plugin.dart'; class QrShareImagePage extends StatefulWidget { - String mobile; QrShareImagePage(this.mobile); @@ -14,19 +19,138 @@ class QrShareImagePage extends StatefulWidget { State createState() { return _QrShareImagePage(); } - } class _QrShareImagePage extends State { - @override Widget build(BuildContext context) { - widgetToImage(); - return Container( - width: 200, - height: 300, - color: Colors.white.withAlpha(123), - child: Text(widget.mobile), + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + RepaintBoundary( + key: globalKey, + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + height: (MediaQuery.of(context).size.width * 0.8) * 1.36, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.w), + ), + child: Column( + children: [ + Image.asset( + "assets/image/share_image_bg.png", + height: (MediaQuery.of(context).size.width * 0.8) * 0.47, + width: (MediaQuery.of(context).size.width * 0.8), + ), + Expanded( + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(10.w), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 206.w, + height: 30.h, + child: Text( + "邀请人手机号:${widget.mobile.substring(0, 3)}****${widget.mobile.substring(7, 11)}", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 12.sp, + color: Color(0xFF2E3552), + ), + ), + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFFFC93B), + border: Border.all( + color: Color(0xFF2E3552), + width: 1, + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 68.w), + decoration: BoxDecoration( + border: Border.all( + color: Color(0xFF2E3552), + width: 1, + ), + ), + child: AspectRatio( + aspectRatio: 1, + child: QrImage( + data: "http://mp.hx.lotus-wallet.com/pages/invite/index?mobile=${widget.mobile ?? ""}", + version: QrVersions.auto, + size: 200.w, + gapless: true, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 16.w, right: 24.w), + child: Text( + "扫码识别,关注公众号", + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF2E3552), + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + ), + ), + ), + ], + ), + ), + flex: 1, + ), + ], + ), + ), + ), + SizedBox( + height: 15, + ), + TextButton( + onPressed: () { + widgetToImage(); + }, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all( + Color(0xFFFFC93B), + ), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + side: BorderSide( + color: Color(0xFF2E3552), + width: 1, + ), + borderRadius: BorderRadius.circular(5), + ), + ), + elevation: MaterialStateProperty.all(3), + shadowColor: MaterialStateProperty.all(Colors.amber), + padding: MaterialStateProperty.all( + EdgeInsets.symmetric( + vertical: 5.h, + horizontal: 20.w, + ), + ), + ), + child: Text( + "分享至微信", + style: TextStyle( + color: Color(0xFF2E3552), + fontSize: 18.sp, + fontWeight: MyFontWeight.semi_bold), + ), + ), + ], ); } @@ -36,10 +160,49 @@ class _QrShareImagePage extends State { BuildContext buildContext = globalKey.currentContext; if (null != buildContext) { RenderRepaintBoundary boundary = buildContext.findRenderObject(); - ui.Image image = await boundary.toImage(); - ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png); - // byteData.buffer.asUint16List() + ui.Image image = await boundary.toImage(pixelRatio: 3); + ByteData byteData = + await image.toByteData(format: ui.ImageByteFormat.png); + + String filePath = ""; + if (Platform.isAndroid) { + filePath = (await getExternalStorageDirectory()).path; + } else { + filePath = (await getApplicationDocumentsDirectory()).path; + } + filePath = "$filePath/${DateTime.now().millisecondsSinceEpoch}.png"; + + File file = File(filePath); + if (!file.existsSync()) { + file.createSync(); + print("object: ${file.path}"); + } + file.writeAsBytesSync(byteData.buffer.asUint8List()); + + SSDKMap params = SSDKMap() + ..setGeneral( + "", + "", + [ + file.path, + ], + "", + file.path, + "", + "", + "", + "", + "", + SSDKContentTypes.image, + ); + + SharesdkPlugin.share(ShareSDKPlatforms.wechatSession, params, + (state, userData, contentEntity, error) { + print("share state !$state"); + print("share userData !$userData"); + print("share contentEntity !$contentEntity"); + print("share error !$error"); + }); } } - -} \ No newline at end of file +} diff --git a/lib/view_widget/share_dialog.dart b/lib/view_widget/share_dialog.dart index d823c9f7..73dc0eaa 100644 --- a/lib/view_widget/share_dialog.dart +++ b/lib/view_widget/share_dialog.dart @@ -40,9 +40,9 @@ class _ShareDialog extends State { height: 200.h, decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.vertical(top: Radius.circular(8)), + borderRadius: BorderRadius.vertical(top: Radius.circular(8),), ), - padding: EdgeInsets.only(top: 16.h, bottom: 66.h), + padding: EdgeInsets.only(top: 16.h, bottom: 66.h,), child: Column( mainAxisSize: MainAxisSize.max, children: [ diff --git a/pubspec.yaml b/pubspec.yaml index f8520017..6d3d1331 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -85,7 +85,7 @@ dependencies: flutter_svg: ^0.20.0-nullsafety.3 font_awesome_flutter: ^9.1.0 # flutter_bugly: ^0.3.3 - +# bitmap: ^0.1.2 dev_dependencies: flutter_test: