PdfViewer.uri constructor
PdfViewer.uri(
- Uri uri, {
- PdfPasswordProvider? passwordProvider,
- bool firstAttemptByEmptyPassword = true,
- Key? key,
- PdfViewerController? controller,
- PdfViewerParams params = const PdfViewerParams(),
- int initialPageNumber = 1,
- bool preferRangeAccess = false,
- Map<
String, String> ? headers,
Create PdfViewer from a URI.
uri
is the URI.
passwordProvider
is used to provide password for encrypted PDF. See PdfPasswordProvider for more info.
firstAttemptByEmptyPassword
is used to determine whether the first attempt to open the PDF is by empty password
or not. For more info, see PdfPasswordProvider.
controller is the controller to control the viewer.
params is the parameters to customize the viewer.
initialPageNumber is the page number to show initially.
preferRangeAccess
to prefer range access to download the PDF. The default is false.
headers
is used to specify additional HTTP headers especially for authentication/authorization.
Implementation
PdfViewer.uri(
Uri uri, {
PdfPasswordProvider? passwordProvider,
bool firstAttemptByEmptyPassword = true,
super.key,
this.controller,
this.params = const PdfViewerParams(),
this.initialPageNumber = 1,
bool preferRangeAccess = false,
Map<String, String>? headers,
}) : documentRef = PdfDocumentRefUri(
uri,
passwordProvider: passwordProvider,
firstAttemptByEmptyPassword: firstAttemptByEmptyPassword,
preferRangeAccess: preferRangeAccess,
headers: headers,
);