From 95bfa088211dc6b9fd7812a439b8a538e8bd2e2e Mon Sep 17 00:00:00 2001 From: fmk Date: Fri, 10 Sep 2021 17:29:58 +0800 Subject: [PATCH] safety --- lib/home/home_view/home_banner.dart | 9 +- lib/home/huixiang_view/huixiang_banner.dart | 3 + lib/home/main_home_page.dart | 2 +- .../points_mall_view/points_mall_banner.dart | 3 + lib/integral/intergra_view/integral_task.dart | 8 +- lib/main.dart | 7 +- lib/mine/coupons_page.dart | 6 +- lib/mine/mine_page.dart | 7 +- lib/mine/mine_view/mine_view.dart | 66 ++++-- lib/qr/qr_code_scan.dart | 153 +++++++++++++ lib/qr/qr_share.dart | 202 ++++++++++++++++++ lib/qr/qr_share_image.dart | 45 ++++ lib/union/union_details_page.dart | 5 - lib/view_widget/tips_dialog.dart | 1 + lib/web/web_view/web_content.dart | 1 + pubspec.lock | 29 ++- pubspec.yaml | 4 +- 17 files changed, 499 insertions(+), 52 deletions(-) create mode 100644 lib/qr/qr_code_scan.dart create mode 100644 lib/qr/qr_share.dart create mode 100644 lib/qr/qr_share_image.dart diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index 062d732b..6a966b31 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -72,19 +72,20 @@ class _HomeBanner 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 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); break; case 2: - Navigator.of(context) - .pushNamed('/router/web_page', arguments: { + Navigator.of(context).pushNamed('/router/web_page', arguments: { "activityId": bannerData.content, }); break; case 3: - Navigator.of(context) - .pushNamed('/router/web_page', arguments: { + Navigator.of(context).pushNamed('/router/web_page', arguments: { "articleId": bannerData.content, }); break; diff --git a/lib/home/huixiang_view/huixiang_banner.dart b/lib/home/huixiang_view/huixiang_banner.dart index c535ac38..df2ca872 100644 --- a/lib/home/huixiang_view/huixiang_banner.dart +++ b/lib/home/huixiang_view/huixiang_banner.dart @@ -64,6 +64,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 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); diff --git a/lib/home/main_home_page.dart b/lib/home/main_home_page.dart index c37cbc6c..ef8e4821 100644 --- a/lib/home/main_home_page.dart +++ b/lib/home/main_home_page.dart @@ -57,7 +57,7 @@ class _MainHomePage extends State leading: false, brightness: Brightness.light, action: Container( - margin: EdgeInsets.only(right: 17.w), + margin: EdgeInsets.only(right: 8.w), child: GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/system_msg_page'); diff --git a/lib/home/points_mall_view/points_mall_banner.dart b/lib/home/points_mall_view/points_mall_banner.dart index cf8492ea..4e2d4730 100644 --- a/lib/home/points_mall_view/points_mall_banner.dart +++ b/lib/home/points_mall_view/points_mall_banner.dart @@ -70,6 +70,9 @@ class _PointMallBanner 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 1: Navigator.of(context).pushNamed('/router/integral_store_page', arguments: {"goodsId": bannerData.content}); diff --git a/lib/integral/intergra_view/integral_task.dart b/lib/integral/intergra_view/integral_task.dart index 30f7ead2..b6169f1e 100644 --- a/lib/integral/intergra_view/integral_task.dart +++ b/lib/integral/intergra_view/integral_task.dart @@ -100,11 +100,11 @@ class _IntegralTask extends State { margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 16.h), child: Column( children: [ - tashItem(widget.signInfo.taskList[position * 3 + 0]), + taskItem(widget.signInfo.taskList[position * 3 + 0]), if (widget.signInfo.taskList.length > (position * 3 + 1)) - tashItem(widget.signInfo.taskList[position * 3 + 1]), + taskItem(widget.signInfo.taskList[position * 3 + 1]), if (widget.signInfo.taskList.length > (position * 3 + 2)) - tashItem(widget.signInfo.taskList[position * 3 + 2]), + taskItem(widget.signInfo.taskList[position * 3 + 2]), ], ), ); @@ -125,7 +125,7 @@ class _IntegralTask extends State { return "assets/image/icon_integral_share.png"; } - Widget tashItem(Task task) { + Widget taskItem(Task task) { return Container( margin: EdgeInsets.only(top: 8.h, bottom: 8.h), alignment: Alignment.center, diff --git a/lib/main.dart b/lib/main.dart index 5bbbfa8b..bb0e8cbd 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -45,6 +45,8 @@ import 'package:huixiang/order/order_history_page.dart'; import 'package:huixiang/order/store_selector_page.dart'; import 'package:huixiang/order/write_off_page.dart'; import 'package:huixiang/order/write_off_success_page.dart'; +import 'package:huixiang/qr/qr_code_scan.dart'; +import 'package:huixiang/qr/qr_share.dart'; import 'package:huixiang/setting/about_page.dart'; import 'package:huixiang/setting/help_feedback_page.dart'; import 'package:huixiang/setting/permission_setting_page.dart'; @@ -271,8 +273,9 @@ Map routers = { '/router/roll_center_page': (context, {arguments}) => RollCenterPage(), '/router/edit_remarks_page': (context, {arguments}) => EditRemarksPage(), '/router/edit_name': (context, {arguments}) => EditName(arguments: arguments), - '/router/location_map': (context, {arguments}) => - LocationMap(arguments: arguments), + '/router/location_map': (context, {arguments}) => LocationMap(arguments: arguments), + '/router/qr_scan': (context, {arguments}) => QrCodeScanPage(), + '/router/qr_share': (context, {arguments}) => QrSharePage(), // '/router/hot_article_details_page': (context, {arguments}) => HotArticleDetailsPage(), // '/router/ui_test': (context, {arguments}) => UITest(), }; diff --git a/lib/mine/coupons_page.dart b/lib/mine/coupons_page.dart index 1db1c705..8f275736 100644 --- a/lib/mine/coupons_page.dart +++ b/lib/mine/coupons_page.dart @@ -96,9 +96,9 @@ class _CouponsPage extends State { height: 26.h, alignment: Alignment.center, margin: EdgeInsets.only( - left: 16.w, right: 12.w, top: 10.h, bottom: 14.h), + left: 16.w, right: 12.w, top: 10.h, bottom: 14.h,), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(2)), + borderRadius: BorderRadius.circular(2), color: state == 1 ? Colors.white : Color(0xffE5E5E5), ), child: GestureDetector( @@ -125,7 +125,7 @@ class _CouponsPage extends State { alignment: Alignment.center, margin: EdgeInsets.only(left: 16.w, top: 10.h, bottom: 14.h), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(2)), + borderRadius: BorderRadius.circular(2), color: state == 3 ? Colors.white : Color(0xffE5E5E5), ), child: GestureDetector( diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 6b555edb..26bd9efc 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -100,7 +100,6 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { if (baseDate != null && baseDate.isSuccess) { userInfo = baseDate.data; - SharedPreferences.getInstance().then( (value) => { value.setString('user', jsonEncode(baseDate.data)), @@ -120,7 +119,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { backgroundColor: Color(0xFFF7F7F7), body: Container( padding: EdgeInsets.only(bottom: 76.h), - margin: EdgeInsets.only(top: 40.h), + // margin: EdgeInsets.only(top: 40.h), child: SmartRefresher( controller: _refreshController, enablePullDown: true, @@ -128,7 +127,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { header: MyHeader(), physics: BouncingScrollPhysics(), onRefresh: () { - setState(() {}); + setState((){}); }, child: SingleChildScrollView( child: Container( @@ -140,6 +139,8 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { builder: (context, snapshot) { return Column( children: [ + SizedBox(height: 36,), + ///我的 用户信息 MineView( userInfo, diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 3747182b..28a83ced 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -1,11 +1,13 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; -import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; +import 'package:huixiang/view_widget/request_permission.dart'; +import 'package:permission_handler/permission_handler.dart'; class MineView extends StatefulWidget { final UserInfo userInfo; @@ -26,24 +28,27 @@ class _MineView extends State { return Column( children: [ Container( - margin: EdgeInsets.only(right: 16.w), + // margin: EdgeInsets.only(right: 16.w), alignment: Alignment.centerRight, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - InkWell( - onTap: () {}, - child: Container( - margin: EdgeInsets.all(8.h), - child: Image.asset( - "assets/image/icon_scan_qr_code.png", - width: 24.w, - height: 24.h, - ), - ), - ), - ], - ), + height: 20, + // child: Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // InkWell( + // onTap: (){ + // toScan(); + // }, + // child: Container( + // margin: EdgeInsets.all(8.h), + // child: Image.asset( + // "assets/image/icon_scan_qr_code.png", + // width: 24.w, + // height: 24.h, + // ), + // ), + // ), + // ], + // ), ), InkWell( onTap: (){ @@ -58,6 +63,31 @@ class _MineView extends State { ); } + toScan() async { + if (await Permission.camera.isPermanentlyDenied) { + showCupertinoDialog( + context: context, + builder: (context) { + return RequestPermission( + "assets/image/icon_camera_permission_tips.png", + "您未开启相机权限,请点击开启", + "为了您可以在使用过程中更换头像,请您开启相机使用权限", + S.of(context).kaiqiquanxian, + (result) async { + if (result) { + await openAppSettings(); + } + }, + heightRatioWithWidth: 0.82, + ); + }); + } else if (await Permission.camera.isGranted) { + Navigator.of(context).pushNamed('/router/qr_scan'); + } else { + await Permission.camera.request(); + } + } + ///我的信息部分 Widget mineView() { return Container( diff --git a/lib/qr/qr_code_scan.dart b/lib/qr/qr_code_scan.dart new file mode 100644 index 00000000..9b3e40fb --- /dev/null +++ b/lib/qr/qr_code_scan.dart @@ -0,0 +1,153 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_qr_reader/flutter_qr_reader.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/view_widget/tips_dialog.dart'; +import 'package:image_picker_gallery_camera/image_picker_gallery_camera.dart'; +import 'package:permission_handler/permission_handler.dart'; + +class QrCodeScanPage extends StatefulWidget { + @override + State createState() { + return _QrCodeScanPage(); + } +} + +class _QrCodeScanPage extends State { + GlobalKey<_QrCodeScanPage> qrViewKey = GlobalKey(); + + QrReaderViewController viewController; + + @override + void initState() { + super.initState(); + + readerHeight = MediaQuery.of(context).size.height; + Future.delayed(Duration(seconds: 1), () { + buildReaderView(); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + child: Stack( + children: [ + Positioned( + child: qrReaderView != null + ? Column( + children: [ + Expanded(child: qrReaderView, flex: readerHeight.toInt(),), + // Expanded(child: qrReaderView, flex: readerHeight,), + + ], + ) + : Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + ), + top: 0, + bottom: 0, + left: 0, + right: 0, + ), + Positioned( + child: MyAppBar( + title: "扫码", + titleColor: Colors.white, + leadingColor: Colors.white, + brightness: Brightness.dark, + background: Colors.transparent, + action: Container( + alignment: Alignment.center, + margin: EdgeInsets.only(right: 16.w), + child: GestureDetector( + onTap: () { + openStorage(); + }, + child: Text( + S.of(context).xiangce, + style: TextStyle( + color: Colors.white, + fontSize: 18.sp, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + top: 0, + left: 0, + right: 0, + ), + ], + ), + ), + ); + } + + QrReaderView qrReaderView; + double readerHeight ; + + buildReaderView() async { + double screenWidth = MediaQuery.of(context).size.width; + + readerHeight = 1920.0 / 1080.0 * screenWidth; + print("object: $readerHeight"); + qrReaderView = await QrReaderView( + key: qrViewKey, + callback: onScan, + width: MediaQuery.of(context).size.width, + height: readerHeight, + ); + setState(() {}); + } + + ///打开相册 + openStorage() async { + if (await Permission.storage.isGranted) { + var image = await ImagePickerGC.pickImage( + context: context, source: ImgSource.Gallery); + String filePath = image.path; + final String data = await FlutterQrReader.imgScan(filePath); + showData(data); + } else { + await Permission.storage.request(); + openStorage(); + } + } + + startCameraResult(String data, List offset) async { + showData(data); + this.viewController.stopCamera(); + } + + Future onScan(QrReaderViewController viewController) async { + this.viewController = viewController; + await this.viewController.startCamera(startCameraResult); + } + + showData(String data) { + SmartDialog.show( + widget: Tips( + () {}, + text: "$data", + ), + onDismiss: () { + Future.delayed(Duration(seconds: 1), () { + this.viewController.startCamera(startCameraResult); + }); + }); + } + + @override + void dispose() { + if (this.viewController != null) { + this.viewController.stopCamera(); + } + super.dispose(); + } +} diff --git a/lib/qr/qr_share.dart b/lib/qr/qr_share.dart new file mode 100644 index 00000000..da9466cc --- /dev/null +++ b/lib/qr/qr_share.dart @@ -0,0 +1,202 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/qr/qr_share_image.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:qr_flutter/qr_flutter.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class QrSharePage extends StatefulWidget { + @override + State createState() { + return _QrSharePage(); + } +} + +class _QrSharePage extends State { + String phone = ""; + + @override + void initState() { + super.initState(); + + SharedPreferences.getInstance().then((value) { + if (value.getString('user') != null && value.getString('user') != "") { + phone = UserInfo.fromJson(jsonDecode(value.getString('user'))).phone; + setState(() {}); + } + }); + + buildImageInfo(); + } + + @override + void dispose() { + super.dispose(); + SmartDialog.dismiss(); + } + + @override + Widget build(BuildContext context) { + if (height == null || height == 0) + height = MediaQuery.of(context).size.height; + return Scaffold( + appBar: MyAppBar( + title: "", + titleColor: Colors.black, + background: Color(0xFFF7F7F7), + leadingColor: Colors.black, + action: Container( + alignment: Alignment.center, + margin: EdgeInsets.only(right: 16.w), + child: InkWell( + onTap: () { + SmartDialog.show( + widget: QrShareImagePage("15827991714"),); + }, + child: Text( + "分享", + style: TextStyle( + color: Colors.black, + fontSize: 18.sp, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + body: SingleChildScrollView( + child: Container( + height: height, + child: Stack( + children: [ + // if (image != null) + Positioned( + child: Image.asset( + "assets/image/qr_share_bg.png", + fit: BoxFit.fill, + ), + top: 0, + left: 0, + bottom: 0, + right: 0, + ), + Positioned( + child: Container( + width: MediaQuery.of(context).size.width, + height: height * 0.635, + padding: + EdgeInsets.symmetric(vertical: 28.h, horizontal: 19.w), + child: Stack( + children: [ + Positioned( + child: Image.asset( + "assets/image/qr_share_info_bg.png", + fit: BoxFit.fill, + ), + top: 0, + left: 0, + bottom: 0, + right: 0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + shareTypeTitle("方式一"), + Container( + margin: EdgeInsets.only(left: 16.w, right: 24.w), + child: Text( + "截屏保存下方二维码,邀请他人微信扫一扫识别,长按关注后,完成小游戏,领取优惠券后,即邀请成功哦!", + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF2E3552), + fontSize: 16.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + Container( + width: 152.w, + height: 152.w, + decoration: BoxDecoration( + border: Border.all( + color: Color(0xFF2E3552), width: 1), + ), + child: QrImage( + data: phone ?? "", + version: QrVersions.auto, + size: 200.w, + gapless: true, + ), + ), + shareTypeTitle("方式二"), + Container( + margin: EdgeInsets.only(left: 16.w, right: 24.w), + child: Text( + "也可以直接点击右上方的分享给到你想要邀请的人。", + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xFF2E3552), + fontSize: 16.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ), + SizedBox( + height: 1.h, + ), + ], + ), + ], + ), + ), + left: 0, + bottom: 0, + right: 0, + ), + ], + ), + ), + ), + ); + } + + Widget shareTypeTitle(typeText) { + return Container( + width: 90.w, + height: 30.h, + child: Text( + typeText, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFF2E3552), + ), + ), + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFFFC93B), + border: Border.all(color: Color(0xFF2E3552), width: 1), + ), + ); + } + + Image image; + double height; + + buildImageInfo() async { + image = Image.asset("assets/image/qr_share_bg.png"); + image.image + .resolve(ImageConfiguration()) + .addListener(ImageStreamListener((ImageInfo info, bool _) { + height = info.image.height.toDouble(); + setState(() {}); + })); + } +} diff --git a/lib/qr/qr_share_image.dart b/lib/qr/qr_share_image.dart new file mode 100644 index 00000000..7bb61214 --- /dev/null +++ b/lib/qr/qr_share_image.dart @@ -0,0 +1,45 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/services.dart'; +import 'dart:ui' as ui; + +class QrShareImagePage extends StatefulWidget { + + String mobile; + + QrShareImagePage(this.mobile); + + @override + 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), + ); + } + + GlobalKey globalKey = GlobalKey(); + + widgetToImage() async { + 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() + } + } + +} \ No newline at end of file diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index d5b3cc1e..34fb568f 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -7,7 +7,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -22,12 +21,8 @@ import 'package:huixiang/union/union_view/vip.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/classic_header.dart'; -import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/item_title.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/receive_success.dart'; -import 'package:huixiang/view_widget/round_button.dart'; -import 'package:huixiang/view_widget/separator.dart'; import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/view_widget/tips_dialog.dart b/lib/view_widget/tips_dialog.dart index e12b05c9..069a4003 100644 --- a/lib/view_widget/tips_dialog.dart +++ b/lib/view_widget/tips_dialog.dart @@ -34,6 +34,7 @@ class _Tips extends State { width: double.infinity, height: 90.h, alignment: Alignment.center, + padding: EdgeInsets.all(10), child: Text( widget.text ?? S.of(context).querenyaoshanchudangqianpinglunma, style: TextStyle( diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart index b50ce1e7..c4532193 100644 --- a/lib/web/web_view/web_content.dart +++ b/lib/web/web_view/web_content.dart @@ -26,6 +26,7 @@ class WebContent extends StatefulWidget { } class _WebContent extends State { + @override Widget build(BuildContext context) { return Html( diff --git a/pubspec.lock b/pubspec.lock index 00203e6d..4d5df657 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,7 +28,7 @@ packages: name: args url: "https://pub.flutter-io.cn" source: hosted - version: "1.6.0" + version: "2.2.0" async: dependency: transitive description: @@ -334,7 +334,7 @@ packages: name: flutter_easyloading url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.0" + version: "3.0.3" flutter_html: dependency: "direct main" description: @@ -368,6 +368,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.11" + flutter_qr_reader: + dependency: "direct main" + description: + name: flutter_qr_reader + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.5" flutter_screenutil: dependency: "direct main" description: @@ -381,14 +388,14 @@ packages: name: flutter_smart_dialog url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "2.1.8" flutter_spinkit: dependency: "direct main" description: name: flutter_spinkit url: "https://pub.flutter-io.cn" source: hosted - version: "5.0.0" + version: "5.1.0" flutter_staggered_grid_view: dependency: "direct main" description: @@ -426,7 +433,7 @@ packages: name: fluwx url: "https://pub.flutter-io.cn" source: hosted - version: "3.5.1" + version: "3.6.1+1" font_awesome_flutter: dependency: "direct main" description: @@ -566,7 +573,7 @@ packages: name: logger url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.1.0" logging: dependency: transitive description: @@ -797,7 +804,7 @@ packages: name: shared_preferences url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.6" + version: "2.0.7" shared_preferences_linux: dependency: transitive description: @@ -986,14 +993,14 @@ packages: name: url_launcher_linux url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "2.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "2.0.2" url_launcher_platform_interface: dependency: transitive description: @@ -1098,7 +1105,7 @@ packages: name: win32 url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.5" + version: "2.2.9" xdg_directories: dependency: transitive description: @@ -1119,7 +1126,7 @@ packages: name: yaml url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.1" + version: "3.1.0" sdks: dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index b48eb6bb..f8520017 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,7 +24,6 @@ dependencies: # tpns_flutter_plugin: ^1.1.0 like_button: ^2.0.2 - barcode_widget: ^2.0.1 cupertino_icons: ^1.0.2 # flutter_swiper_null_safety: ^1.0.2 flutter_swiper: ^1.1.6 @@ -54,6 +53,8 @@ dependencies: shared_preferences: ^2.0.6 flutter_smart_dialog: ^2.1.6 + barcode_widget: ^2.0.1 + flutter_qr_reader: ^1.0.5 qr_flutter: ^4.0.0 url_launcher: ^6.0.5 @@ -67,6 +68,7 @@ dependencies: webview_flutter: ^1.0.7 chewie_audio: ^1.1.2 +# camera: ^0.5.8+17 photo_view: ^0.11.1 video_player: ^1.0.1