From 67a49d0fefa906b0645646b81b53125b93070183 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 13 Aug 2024 14:25:37 +0800 Subject: [PATCH] =?UTF-8?q?ios=20pdf=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/order/invoices_manage/pdf_screen.dart | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 52a55458..4db48b27 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -602,7 +602,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -806,7 +806,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -896,7 +896,7 @@ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index 2e165377..d488a2c3 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -74,7 +74,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { if (total > 0) { print('page change: $page/$total'); setState(() { - currentPage = page + 1; + currentPage = page; pageTotal = total; }); } else { @@ -98,7 +98,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { width: MediaQuery.of(context).size.width, bottom: 45, child: Center( - child: Text("${currentPage}/${pageTotal}", + child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}", style: TextStyle(color: Colors.white, fontSize: 16)), ), ), @@ -147,7 +147,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { if (total > 0) { print('page change: $page/$total'); setState(() { - currentPage = page + 1; + currentPage = page; pageTotal = total; }); } else { @@ -169,7 +169,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { bottom: 45, width: MediaQuery.of(context).size.width, child: Center( - child: Text("${currentPage}/${pageTotal}", + child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}", style: TextStyle(color: Colors.black, fontSize: 16)), ), ),