Showing
3 changed files
with
5 additions
and
2 deletions
@@ -15,7 +15,6 @@ | @@ -15,7 +15,6 @@ | ||
15 | */ | 15 | */ |
16 | 16 | ||
17 | import 'dart:async'; | 17 | import 'dart:async'; |
18 | -import 'dart:io'; | ||
19 | import 'dart:math'; | 18 | import 'dart:math'; |
20 | import 'dart:typed_data'; | 19 | import 'dart:typed_data'; |
21 | 20 | ||
@@ -24,6 +23,7 @@ import 'package:flutter/foundation.dart' | @@ -24,6 +23,7 @@ import 'package:flutter/foundation.dart' | ||
24 | import 'package:flutter/material.dart'; | 23 | import 'package:flutter/material.dart'; |
25 | import 'package:pdf/pdf.dart'; | 24 | import 'package:pdf/pdf.dart'; |
26 | 25 | ||
26 | +import '../platform_js.dart' if (dart.library.io) '../platform_os.dart'; | ||
27 | import '../printing.dart'; | 27 | import '../printing.dart'; |
28 | import '../printing_info.dart'; | 28 | import '../printing_info.dart'; |
29 | import '../raster.dart'; | 29 | import '../raster.dart'; |
@@ -74,7 +74,7 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> { | @@ -74,7 +74,7 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> { | ||
74 | } else { | 74 | } else { |
75 | final mq = MediaQuery.of(context); | 75 | final mq = MediaQuery.of(context); |
76 | final double dpr; | 76 | final double dpr; |
77 | - if (!kIsWeb && Platform.isAndroid) { | 77 | + if (isAndroid) { |
78 | if (mq.size.shortestSide * mq.devicePixelRatio < 800) { | 78 | if (mq.size.shortestSide * mq.devicePixelRatio < 800) { |
79 | dpr = 2 * mq.devicePixelRatio; | 79 | dpr = 2 * mq.devicePixelRatio; |
80 | } else { | 80 | } else { |
-
Please register or login to post a comment