diff --git a/contact/pubspec.lock b/contact/pubspec.lock index a3f209a444..522f39ce84 100644 --- a/contact/pubspec.lock +++ b/contact/pubspec.lock @@ -836,26 +836,26 @@ packages: dependency: transitive description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -916,10 +916,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "2.1.8" pointer_interceptor: dependency: transitive description: @@ -1162,26 +1162,26 @@ packages: dependency: transitive description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.2" url_launcher_linux: dependency: transitive description: @@ -1202,10 +1202,10 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: @@ -1319,5 +1319,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.20.0-7.0.pre.48" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/core/pubspec.lock b/core/pubspec.lock index 5f3cc38111..ea844f9b31 100644 --- a/core/pubspec.lock +++ b/core/pubspec.lock @@ -797,26 +797,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -1099,26 +1099,26 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.2" url_launcher_linux: dependency: transitive description: @@ -1139,10 +1139,10 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: @@ -1257,4 +1257,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.4.0 <4.0.0" - flutter: ">=3.20.0-7.0.pre.48" + flutter: ">=3.22.0" diff --git a/core/pubspec.yaml b/core/pubspec.yaml index 4502549f20..968d9c38d1 100644 --- a/core/pubspec.yaml +++ b/core/pubspec.yaml @@ -64,7 +64,7 @@ dependencies: flutter_inappwebview: 6.0.0 - url_launcher: 6.1.10 + url_launcher: 6.3.1 universal_html: 2.2.4 @@ -80,7 +80,7 @@ dependencies: http_parser: 4.0.2 - path_provider: 2.1.1 + path_provider: 2.1.5 collection: 1.18.0 diff --git a/lib/features/email/presentation/widgets/pdf_viewer/pagination_pdf_viewer.dart b/lib/features/email/presentation/widgets/pdf_viewer/pagination_pdf_viewer.dart index 4c7afbef39..c60d86a485 100644 --- a/lib/features/email/presentation/widgets/pdf_viewer/pagination_pdf_viewer.dart +++ b/lib/features/email/presentation/widgets/pdf_viewer/pagination_pdf_viewer.dart @@ -1,6 +1,6 @@ import 'package:core/utils/app_logger.dart'; import 'package:flutter/material.dart'; -import 'package:pdf_render/pdf_render_widgets.dart'; +import 'package:pdfrx/pdfrx.dart'; import 'package:tmail_ui_user/main/localizations/app_localizations.dart'; enum ZoomState { @@ -160,7 +160,7 @@ class _PaginationPDFViewerState extends State { } void _pageChanged({String? property}) { - _pageCurrentNotifier.value = widget.pdfViewerController?.currentPageNumber ?? 1; + _pageCurrentNotifier.value = widget.pdfViewerController?.pageNumber ?? 1; _updateZoomState(); } @@ -182,7 +182,10 @@ class _PaginationPDFViewerState extends State { _zoomLevel = 4.0; } _updateZoomState(); - widget.pdfViewerController?.setZoomRatio(zoomRatio: _zoomLevel); + widget.pdfViewerController?.setZoom( + widget.pdfViewerController!.centerPosition, + _zoomLevel, + ); } } @@ -204,12 +207,15 @@ class _PaginationPDFViewerState extends State { _zoomLevel = 3.5; } _updateZoomState(); - widget.pdfViewerController?.setZoomRatio(zoomRatio: _zoomLevel); + widget.pdfViewerController?.setZoom( + widget.pdfViewerController!.centerPosition, + _zoomLevel, + ); } } void _updateZoomState() { - final zoomLevel = widget.pdfViewerController?.zoomRatio ?? 1.0; + final zoomLevel = widget.pdfViewerController?.currentZoom ?? 1.0; log('_PaginationPDFViewerState::_updateZoomState:zoomLevel = $zoomLevel'); if (zoomLevel <= _maxZoomLevelDefault && zoomLevel > _minZoomLevelDefault) { _zoomOutPageNotifier.value = ZoomState.activate; diff --git a/lib/features/email/presentation/widgets/pdf_viewer/pdf_viewer.dart b/lib/features/email/presentation/widgets/pdf_viewer/pdf_viewer.dart index ec93093bc2..a3a08ae31b 100644 --- a/lib/features/email/presentation/widgets/pdf_viewer/pdf_viewer.dart +++ b/lib/features/email/presentation/widgets/pdf_viewer/pdf_viewer.dart @@ -4,7 +4,6 @@ import 'dart:math'; import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -import 'package:core/utils/app_logger.dart'; import 'package:dartz/dartz.dart' as dartz; import 'package:device_info_plus/device_info_plus.dart'; import 'package:dio/dio.dart'; @@ -14,7 +13,7 @@ import 'package:get/get.dart'; import 'package:jmap_dart_client/jmap/account_id.dart'; import 'package:model/download/download_task_id.dart'; import 'package:model/email/attachment.dart'; -import 'package:pdf_render/pdf_render_widgets.dart'; +import 'package:pdfrx/pdfrx.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:tmail_ui_user/features/base/widget/circle_loading_widget.dart'; import 'package:tmail_ui_user/features/email/domain/exceptions/download_attachment_exceptions.dart'; @@ -61,6 +60,10 @@ class _PDFViewerState extends State { final DeviceInfoPlugin _deviceInfoPlugin = Get.find(); final FocusNode _keyboardFocusNode = FocusNode(); + final _showPagination = ValueNotifier(false); + static const double _scrollbarWidth = 10; + static const double _minScale = 1; + static const double _maxScale = 4; @override void initState() { @@ -110,7 +113,6 @@ class _PDFViewerState extends State { @override void dispose() { - _pdfViewerController.dispose(); _pdfViewStateNotifier.dispose(); _downloadAttachmentStreamSubscription.cancel(); _downloadAttachmentStreamController.close(); @@ -137,36 +139,76 @@ class _PDFViewerState extends State { valueListenable: _pdfViewStateNotifier, builder: (context, viewState, widget) { if (viewState is DownloadAttachmentForWebSuccess) { - return PdfViewer.openData( + return PdfViewer.data( viewState.bytes, - viewerController: _pdfViewerController, - onError: (error) { - logError('_PDFViewerState::build:openData:onError:: $error'); - _pdfViewStateNotifier.value = DownloadAttachmentForWebFailure(exception: error); - }, + sourceName: this.widget.attachment.generateFileName(), + controller: _pdfViewerController, params: PdfViewerParams( panAxis: PanAxis.vertical, scrollByMouseWheel: 0.5, - layoutPages: (viewSize, pages) { - List rect = []; - final viewWidth = viewSize.width; - final viewHeight = viewSize.height; - final maxHeight = pages.fold(0.0, (maxHeight, page) => max(maxHeight, page.height)); - final maxWidth = pages.fold(0.0, (maxWidth, page) => max(maxWidth, page.width)); - final ratio = viewHeight / max(maxHeight, maxWidth); - log('_PDFViewerState::build: viewWidth = $viewWidth | viewHeight = $viewHeight | maxHeight = $maxHeight | ratio = $ratio'); - var top = 0.0; - double padding = 16.0; - for (var page in pages) { - final width = page.width * ratio; - final height = page.height * ratio; - final left = viewWidth > viewHeight ? (viewWidth / 2) - (width / 2) : 0.0; - rect.add(Rect.fromLTWH(left, top, width, height)); - top += height + padding; + backgroundColor: Colors.transparent, + onViewerReady: (_, __) { + _pdfViewerController.setZoom( + _pdfViewerController.centerPosition, + 1); + _showPagination.value = true; + }, + calculateCurrentPageNumber: _calculateCurrentPageNumber, + minScale: _minScale, + maxScale: _maxScale, + boundaryMargin: const EdgeInsets.all(double.infinity), + onInteractionEnd: (details) { + if (_pdfViewerController.currentZoom < _minScale) { + _pdfViewerController.setZoom( + _pdfViewerController.centerPosition, + _minScale, + ); + } else if (_pdfViewerController.currentZoom > _maxScale) { + _pdfViewerController.setZoom( + _pdfViewerController.centerPosition, + _maxScale, + ); } - return rect; }, - onClickOutSidePageViewer: _closeView + layoutPages: (pages, params) => _layoutPdf( + context, + pages, + params, + ), + viewerOverlayBuilder: (_, __, ___) => [ + Positioned( + left: 0, + height: _pdfViewerController.documentSize.height, + width: _tapOutSideZoneWidth, + child: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: _closeView, + child: const IgnorePointer( + child: SizedBox.expand(), + ), + ), + ), + Positioned( + right: _scrollbarWidth, + height: _pdfViewerController.documentSize.height, + width: _tapOutSideZoneWidth - _scrollbarWidth, + child: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: _closeView, + child: const IgnorePointer( + child: SizedBox.expand(), + ), + ), + ), + PdfViewerScrollThumb( + controller: _pdfViewerController, + orientation: ScrollbarOrientation.right, + thumbSize: const Size(_scrollbarWidth, 100), + thumbBuilder: (_, __, ___, ____) => const ColoredBox( + color: Colors.white, + ), + ), + ], ), ); } else if (viewState is DownloadingAttachmentForWeb) { @@ -237,42 +279,22 @@ class _PDFViewerState extends State { }, child: TopBarPDFViewer( attachment: widget.attachment, - closeAction: () { - _downloadAttachmentCancelToken?.cancel(); - Navigator.maybeOf(context)?.pop(); - }, + closeAction: _closeView, ), ), ), ValueListenableBuilder( - valueListenable: _pdfViewerController, - builder: (_, __, ___) { - if (_pdfViewerController.isReady) { - return Align( - alignment: AlignmentDirectional.bottomCenter, - child: PaginationPDFViewer( - pdfViewerController: _pdfViewerController, - ), - ); - } else { + valueListenable: _showPagination, + builder: (context, showPagination, child) { + if (!showPagination) { return const SizedBox.shrink(); } - } - ), - ValueListenableBuilder( - valueListenable: _pdfViewerController, - builder: (context, m, child) { - if (!_pdfViewerController.isReady) return Container(); - final v = _pdfViewerController.viewRect; - final all = _pdfViewerController.fullSize; - final top = v.top / all.height * v.height; - final height = v.height / all.height * v.height; - return Positioned( - right: 0, - top: top, - height: height, - width: 8, - child: Container(color: AppColor.colorTextBody), + + return Align( + alignment: AlignmentDirectional.bottomCenter, + child: PaginationPDFViewer( + pdfViewerController: _pdfViewerController, + ), ); }, ), @@ -282,6 +304,38 @@ class _PDFViewerState extends State { ); } + int? _calculateCurrentPageNumber( + Rect visibleRect, + List pageRects, + PdfViewerController controller, + ) { + if (pageRects.isEmpty) { + return null; + } + + if (pageRects.first.top == visibleRect.top) { + return 1; // view at top + } + + if (pageRects.last.bottom == visibleRect.bottom) { + return pageRects.length; // view at bottom + } + + final intersectRatios = []; + for (var i = 0; i < pageRects.length; i++) { + final intersect = pageRects[i].intersect(visibleRect); + if (intersect.isEmpty) { + intersectRatios.add(0); + continue; + } + + final intersectRatio = (intersect.width * intersect.height) / (pageRects[i].width * pageRects[i].height); + intersectRatios.add(intersectRatio); + } + final maxIntersectRatio = intersectRatios.reduce(max); + return intersectRatios.indexOf(maxIntersectRatio) + 1; + } + void _closeView() { _downloadAttachmentCancelToken?.cancel(); Navigator.maybeOf(context)?.pop(); @@ -292,4 +346,47 @@ class _PDFViewerState extends State { _closeView(); } } + + double get _tapOutSideZoneWidth { + final documentWidth = _pdfViewerController.documentSize.width + - _pdfViewerController.params.margin * 2; + final documentRenderWidth = documentWidth * _pdfViewerController.currentZoom; + final viewSizeWidth = _pdfViewerController.viewSize.width; + + return viewSizeWidth > documentRenderWidth + ? (viewSizeWidth - documentRenderWidth) / 2 + : 0; + } + + PdfPageLayout _layoutPdf( + BuildContext context, + List pages, + PdfViewerParams params, + ) { + final viewWidth = MediaQuery.sizeOf(context).width; + final viewHeight = MediaQuery.sizeOf(context).height; + final width = pages.fold( + 0.0, + (prev, page) => max(prev, page.width)) + params.margin * 2; + final pageLayouts = []; + double top = params.margin; + for (final page in pages) { + pageLayouts.add( + Rect.fromLTWH( + viewWidth > viewHeight + ? (width - page.width) / 2 + : 0, + top, + page.width, + page.height, + ), + ); + top += page.height + params.margin; + } + + return PdfPageLayout( + pageLayouts: pageLayouts, + documentSize: Size(width, top), + ); + } } diff --git a/model/pubspec.lock b/model/pubspec.lock index 02e72ad737..e3cd7b48f1 100644 --- a/model/pubspec.lock +++ b/model/pubspec.lock @@ -813,26 +813,26 @@ packages: dependency: transitive description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -893,10 +893,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "2.1.8" pointer_interceptor: dependency: transitive description: @@ -1139,26 +1139,26 @@ packages: dependency: transitive description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.2" url_launcher_linux: dependency: transitive description: @@ -1179,10 +1179,10 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: @@ -1296,5 +1296,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.20.0-7.0.pre.48" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/pubspec.lock b/pubspec.lock index 3e18616358..61c89fc1ac 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -316,18 +316,18 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" csslib: dependency: transitive description: @@ -564,10 +564,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: @@ -1235,10 +1235,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.2" http_mock_adapter: dependency: "direct dev" description: @@ -1525,26 +1525,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -1601,15 +1601,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.10.8" - pdf_render: - dependency: "direct main" - description: - path: "." - ref: main - resolved-ref: "5ee423463cbeee302400d5e7fdae1a83c7fe1720" - url: "https://github.com/linagora/flutter_pdf_render.git" - source: git - version: "2.0.0" pdf_widget_wrapper: dependency: transitive description: @@ -1618,6 +1609,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + pdfrx: + dependency: "direct main" + description: + name: pdfrx + sha256: "29c7b03d27d647c80da8cc08bd1256c74df90e5640fdd676646e4bd04f90553a" + url: "https://pub.dev" + source: hosted + version: "1.0.94" percent_indicator: dependency: "direct main" description: @@ -1734,10 +1733,10 @@ packages: dependency: transitive description: name: pointer_interceptor_web - sha256: "9386e064097fd16419e935c23f08f35b58e6aaec155dd39bd6a003b88f9c14b4" + sha256: "7a7087782110f8c1827170660b09f8aa893e0e9a61431dbbe2ac3fc482e8c044" url: "https://pub.dev" source: hosted - version: "0.10.1+2" + version: "0.10.2+1" pointycastle: dependency: transitive description: @@ -2032,6 +2031,14 @@ packages: url: "https://pub.dev" source: hosted version: "26.1.40" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -2124,26 +2131,26 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.9" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.2" url_launcher_linux: dependency: transitive description: @@ -2164,10 +2171,10 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: @@ -2260,18 +2267,18 @@ packages: dependency: transitive description: name: web - sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.5.1" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.4.4" win32: dependency: transitive description: @@ -2329,5 +2336,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 78b5717ad3..b8e65f978f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -97,12 +97,7 @@ dependencies: url: https://github.com/linagora/dns_client.git ref: twake-supported - # TODO: We will change it when the PR in upstream repository will be merged - # https://github.com/espresso3389/flutter_pdf_render/pull/148 - pdf_render: - git: - url: https://github.com/linagora/flutter_pdf_render.git - ref: main + pdfrx: 1.0.94 # TODO: We will change it when the PR in upstream repository will be merged # https://github.com/solid-software/languagetool_textfield/pull/83 @@ -151,7 +146,7 @@ dependencies: external_path: 1.0.3 - path_provider: 2.1.1 + path_provider: 2.1.5 device_info_plus: 8.1.0 @@ -193,7 +188,7 @@ dependencies: json_annotation: 4.8.0 - url_launcher: 6.1.10 + url_launcher: 6.3.1 firebase_core: 2.7.0 @@ -253,7 +248,7 @@ dependencies: app_settings: 5.1.1 - web_socket_channel: 2.4.3 + web_socket_channel: 2.4.4 flutter_web_auth_2: 3.1.1