Showing
1 changed file
with
6 additions
and
12 deletions
| @@ -244,9 +244,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | @@ -244,9 +244,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | ||
| 244 | updatePosition = scrollController.position.pixels; | 244 | updatePosition = scrollController.position.pixels; |
| 245 | preview = index; | 245 | preview = index; |
| 246 | transformationController.value.setIdentity(); | 246 | transformationController.value.setIdentity(); |
| 247 | - if (kIsWeb) { | ||
| 248 | - _updateCursor(SystemMouseCursors.grab); | ||
| 249 | - } | 247 | + _updateCursor(SystemMouseCursors.grab); |
| 250 | }); | 248 | }); |
| 251 | _zoomChanged(); | 249 | _zoomChanged(); |
| 252 | }, | 250 | }, |
| @@ -288,9 +286,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | @@ -288,9 +286,7 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | ||
| 288 | onDoubleTap: () { | 286 | onDoubleTap: () { |
| 289 | setState(() { | 287 | setState(() { |
| 290 | preview = null; | 288 | preview = null; |
| 291 | - if (kIsWeb) { | ||
| 292 | - _updateCursor(MouseCursor.defer); | ||
| 293 | - } | 289 | + _updateCursor(MouseCursor.defer); |
| 294 | }); | 290 | }); |
| 295 | _zoomChanged(); | 291 | _zoomChanged(); |
| 296 | }, | 292 | }, |
| @@ -312,12 +308,10 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | @@ -312,12 +308,10 @@ class PdfPreviewCustomState extends State<PdfPreviewCustom> | ||
| 312 | ), | 308 | ), |
| 313 | ), | 309 | ), |
| 314 | ); | 310 | ); |
| 315 | - return kIsWeb | ||
| 316 | - ? MouseRegion( | ||
| 317 | - cursor: _mouseCursor, | ||
| 318 | - child: zoomPreview, | ||
| 319 | - ) | ||
| 320 | - : zoomPreview; | 311 | + return MouseRegion( |
| 312 | + cursor: _mouseCursor, | ||
| 313 | + child: zoomPreview, | ||
| 314 | + ); | ||
| 321 | } | 315 | } |
| 322 | 316 | ||
| 323 | void _zoomChanged() => widget.onZoomChanged?.call(preview != null); | 317 | void _zoomChanged() => widget.onZoomChanged?.call(preview != null); |
-
Please register or login to post a comment