From 1f97fe90aab9500f882eddff68ac0b92c1aeb631 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Thu, 5 Mar 2020 15:20:44 -0800 Subject: [PATCH 1/2] Upgrade dependencies --- example/pubspec.lock | 89 +++++++++++++++++++++++++++++++++---------- lib/src/document.dart | 3 +- pubspec.lock | 48 ++++++++++++++++++----- pubspec.yaml | 10 ++--- 4 files changed, 113 insertions(+), 37 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 13d20a0..891bff8 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,20 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.4.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -42,7 +56,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.3" cupertino_icons: dependency: "direct main" description: @@ -61,14 +75,14 @@ packages: name: flutter_advanced_networkimage url: "https://pub.dartlang.org" source: hosted - version: "0.5.0" + version: "0.7.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.3" flutter_plugin_pdf_viewer: dependency: "direct dev" description: @@ -82,7 +96,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.13.1" + version: "0.17.2" flutter_test: dependency: "direct dev" description: flutter @@ -102,6 +116,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" infinite_listview: dependency: transitive description: @@ -115,28 +136,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" numberpicker: dependency: transitive description: name: numberpicker url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" path_drawing: dependency: transitive description: @@ -157,35 +178,63 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.6.5" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0+1" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.4.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" rxdart: dependency: transitive description: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.21.0" + version: "0.23.1" sky_engine: dependency: transitive description: flutter @@ -225,7 +274,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" synchronized: dependency: transitive description: @@ -246,7 +295,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.11" typed_data: dependency: transitive description: @@ -274,7 +323,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.3.1" + version: "3.5.0" sdks: - dart: ">=2.2.2 <3.0.0" - flutter: ">=1.6.0 <2.0.0" + dart: ">=2.6.0 <3.0.0" + flutter: ">=1.10.0 <2.0.0" diff --git a/lib/src/document.dart b/lib/src/document.dart index 4844297..62df6c0 100644 --- a/lib/src/document.dart +++ b/lib/src/document.dart @@ -5,7 +5,6 @@ import 'package:flutter/services.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter_plugin_pdf_viewer/src/page.dart'; import 'package:path_provider/path_provider.dart'; -import 'package:rxdart/rxdart.dart'; class PDFDocument { static const MethodChannel _channel = @@ -86,7 +85,7 @@ class PDFDocument { } // Stream all pages - Observable getAll() { + Stream getAll() { return Future.forEach(List(count), (i) async { print(i); final data = await _channel diff --git a/pubspec.lock b/pubspec.lock index 3a13e9c..6b34cc6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -47,21 +47,21 @@ packages: name: flutter_advanced_networkimage url: "https://pub.dartlang.org" source: hosted - version: "0.5.0" + version: "0.7.0" flutter_cache_manager: dependency: "direct main" description: name: flutter_cache_manager url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.3" flutter_svg: dependency: transitive description: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.13.1" + version: "0.17.2" http: dependency: transitive description: @@ -89,21 +89,21 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" numberpicker: dependency: "direct main" description: name: numberpicker url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" path_drawing: dependency: transitive description: @@ -124,7 +124,21 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.6.5" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" pedantic: dependency: transitive description: @@ -139,13 +153,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" rxdart: dependency: "direct main" description: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.21.0" + version: "0.23.1" sky_engine: dependency: transitive description: flutter @@ -215,5 +243,5 @@ packages: source: hosted version: "3.5.0" sdks: - dart: ">=2.4.0 <3.0.0" - flutter: ">=1.6.0 <2.0.0" + dart: ">=2.6.0 <3.0.0" + flutter: ">=1.10.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3b97efd..a1b66ae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,11 +10,11 @@ environment: dependencies: flutter: sdk: flutter - flutter_cache_manager: ^1.0.0 - path_provider: ^1.1.0 - rxdart: ^0.21.0 - numberpicker: ^1.0.0 - flutter_advanced_networkimage: ^0.5.0 + flutter_cache_manager: ^1.1.3 + path_provider: ^1.6.5 + rxdart: ^0.23.1 + numberpicker: ^1.2.0 + flutter_advanced_networkimage: ^0.7.0 flutter: plugin: From 7697f1fd99a18b3478c82c2451eaf6b361e8d1a5 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Thu, 5 Mar 2020 15:59:30 -0800 Subject: [PATCH 2/2] Hide number picker if single page PDF --- lib/src/viewer.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/viewer.dart b/lib/src/viewer.dart index 9326a22..e48c446 100644 --- a/lib/src/viewer.dart +++ b/lib/src/viewer.dart @@ -129,7 +129,7 @@ class _PDFViewerState extends State { : Container(), ], ), - floatingActionButton: widget.showPicker + floatingActionButton: (widget.showPicker && widget.document.count > 1) ? FloatingActionButton( elevation: 4.0, tooltip: widget.tooltip.jump,