pdfx 2.0.0 pdfx: ^2.0.0 copied to clipboard
Flutter plugin to render & show PDF pages as images on Web, MacOS, Windows, Android and iOS.
2.0.0 #
- Provide more docs
- Fixed windows support
- Added
builders
argument forPdfViewPinch
&PdfView
. Example:
PdfViewPinch(
builders: PdfViewPinchBuilders<DefaultBuilderOptions>(
options: const DefaultBuilderOptions(
loaderSwitchDuration: const Duration(seconds: 1),
transitionBuilder: SomeWidget.transitionBuilder,
),
documentLoaderBuilder: (_) =>
const Center(child: CircularProgressIndicator()),
pageLoaderBuilder: (_) =>
const Center(child: CircularProgressIndicator()),
errorBuilder: (_, error) => Center(child: Text(error.toString())),
builder: SomeWidget.builder,
),
)
- Added widget
PdfPageNumber
for show actual page number & all pages count. Example:
PdfPageNumber(
controller: _pdfController,
// When `loadingState != PdfLoadingState.success` `pagesCount` equals null_
builder: (_, state, loadingState, pagesCount) => Container(
alignment: Alignment.center,
child: Text(
'$page/${pagesCount ?? 0}',
style: const TextStyle(fontSize: 22),
),
),
)
- Added listenable page number
pageListenable
inPdfController
&PdfControllerPinch
. Example:
ValueListenableBuilder<int>(
valueListenable: controller.pageListenable,
builder: (context, actualPageNumber, child) => Text(actualPageNumber.toString()),
)
- Added listenable loading state
loadingState
inPdfController
&PdfControllerPinch
. Example:
ValueListenableBuilder<PdfLoadingState>(
valueListenable: controller.loadingState,
builder: (context, loadingState, loadingState) => (){
switch (loadingState) {
case PdfLoadingState.loading:
return const CircularProgressIndicator();
case PdfLoadingState.error:
return const Text('Pdf load error');
case PdfLoadingState.success:
return const Text('Pdf loaded');
}
}(),
)
- Removed
documentLoader
,pageLoader
,errorBuilder
mloaderSwitchDuration
arguments fromPdfViewPinch
&PdfView
- Removed
pageSnapping
,physics
arguments fromPdfViewPinch
- Rename
PdfControllerPinch
page control methods like aPdfController
control names
1.0.1+1 #
- Updated readme
1.0.1 #
- Fixed platforms plugin
1.0.0 #
- Initial release