diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 00000000..a62b783a --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_plugin_pdf_viewer","dependencies":["path_provider"]},{"name":"path_provider","dependencies":[]},{"name":"sqflite","dependencies":[]}]} \ No newline at end of file diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 00000000..5ef5a93a --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/bezzo/Mobile/flutter-sdk" +export "FLUTTER_APPLICATION_PATH=/Users/bezzo/Mobile/Product/Flutter/flutter_plugin_pdf_viewer/example" +export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "FLUTTER_FRAMEWORK_DIR=/Users/bezzo/Mobile/flutter-sdk/bin/cache/artifacts/engine/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" diff --git a/example/pubspec.lock b/example/pubspec.lock index 13d20a01..90f25037 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: @@ -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,14 +136,14 @@ 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: @@ -136,7 +157,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" path_drawing: dependency: transitive description: @@ -164,21 +185,21 @@ packages: 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" 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: @@ -225,7 +246,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 +267,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 +295,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" + dart: ">=2.4.0 <3.0.0" flutter: ">=1.6.0 <2.0.0" diff --git a/lib/src/viewer.dart b/lib/src/viewer.dart index 9326a223..28c0eced 100644 --- a/lib/src/viewer.dart +++ b/lib/src/viewer.dart @@ -14,6 +14,10 @@ class PDFViewer extends StatefulWidget { final bool showPicker; final bool showNavigation; final PDFViewerTooltip tooltip; + final Color backgroundNavigation; + final Color iconNavigation; + final Color backgorundPickPage; + final Color iconPickPage; PDFViewer( {Key key, @@ -24,7 +28,11 @@ class PDFViewer extends StatefulWidget { this.showPicker = true, this.showNavigation = true, this.tooltip = const PDFViewerTooltip(), - this.indicatorPosition = IndicatorPosition.topRight}) + this.indicatorPosition = IndicatorPosition.topRight, + this.backgroundNavigation = Colors.white, + this.iconNavigation = Colors.black, + this.backgorundPickPage, + this.iconPickPage}) : super(key: key); _PDFViewerState createState() => _PDFViewerState(); @@ -131,9 +139,10 @@ class _PDFViewerState extends State { ), floatingActionButton: widget.showPicker ? FloatingActionButton( + backgroundColor: (widget.backgorundPickPage != null) ? widget.backgorundPickPage : Theme.of(context).primaryColor, elevation: 4.0, tooltip: widget.tooltip.jump, - child: Icon(Icons.view_carousel), + child: Icon(Icons.view_carousel, color: (widget.iconPickPage != null) ? widget.iconPickPage : Colors.white), onPressed: () { _pickPage(); }, @@ -142,12 +151,13 @@ class _PDFViewerState extends State { floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, bottomNavigationBar: (widget.showNavigation || widget.document.count > 1) ? BottomAppBar( + color: widget.backgroundNavigation, child: new Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: IconButton( - icon: Icon(Icons.first_page), + icon: Icon(Icons.first_page, color: widget.iconNavigation), tooltip: widget.tooltip.first, onPressed: () { _pageNumber = 1; @@ -157,7 +167,7 @@ class _PDFViewerState extends State { ), Expanded( child: IconButton( - icon: Icon(Icons.chevron_left), + icon: Icon(Icons.chevron_left, color: widget.iconNavigation), tooltip: widget.tooltip.previous, onPressed: () { _pageNumber--; @@ -173,7 +183,7 @@ class _PDFViewerState extends State { : SizedBox(width: 1), Expanded( child: IconButton( - icon: Icon(Icons.chevron_right), + icon: Icon(Icons.chevron_right, color: widget.iconNavigation), tooltip: widget.tooltip.next, onPressed: () { _pageNumber++; @@ -186,7 +196,7 @@ class _PDFViewerState extends State { ), Expanded( child: IconButton( - icon: Icon(Icons.last_page), + icon: Icon(Icons.last_page, color: widget.iconNavigation), tooltip: widget.tooltip.last, onPressed: () { _pageNumber = widget.document.count; diff --git a/pubspec.lock b/pubspec.lock index 3a13e9c4..a7c6d65a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -89,7 +89,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" numberpicker: dependency: "direct main" description: