preloadPages method
Implementation
Future<void> preloadPages({
final Function(double)? onZoomChanged,
final int? zoomSteps,
final double? minScale,
final double? maxScale,
final double? panLimit,
}) async {
int countvar = 1;
for (final _ in List.filled(count, null)) {
final data = kIsWeb ? await getPageWeb(countvar,filePathPublic!) : await _channel.invokeMethod(
'getPage', {'filePath': filePathPublic, 'pageNumber': countvar});
_pages.add(PDFPage(
data as String?,
countvar,
onZoomChanged: onZoomChanged,
zoomSteps: zoomSteps ?? 3,
minScale: minScale ?? 1.0,
maxScale: maxScale ?? 5.0,
panLimit: panLimit ?? 1.0,
));
countvar++;
}
_preloaded = true;
}