Showing
3 changed files
with
4 additions
and
2 deletions
@@ -187,7 +187,6 @@ class PdfXrefTable extends PdfDataType { | @@ -187,7 +187,6 @@ class PdfXrefTable extends PdfDataType { | ||
187 | } | 187 | } |
188 | 188 | ||
189 | final bytes = ((math.log(offset) / math.ln2).ceil() / 8).ceil(); | 189 | final bytes = ((math.log(offset) / math.ln2).ceil() / 8).ceil(); |
190 | - print(bytes); | ||
191 | final w = [1, bytes, 1]; | 190 | final w = [1, bytes, 1]; |
192 | params['/W'] = PdfArray.fromNum(w); | 191 | params['/W'] = PdfArray.fromNum(w); |
193 | final wl = w.reduce((a, b) => a + b); | 192 | final wl = w.reduce((a, b) => a + b); |
@@ -67,7 +67,9 @@ class PdfPreviewData extends ChangeNotifier { | @@ -67,7 +67,9 @@ class PdfPreviewData extends ChangeNotifier { | ||
67 | PdfPageFormat get actualPageFormat => _onComputeActualPageFormat(); | 67 | PdfPageFormat get actualPageFormat => _onComputeActualPageFormat(); |
68 | 68 | ||
69 | String get localPageFormat { | 69 | String get localPageFormat { |
70 | - final locale = WidgetsBinding.instance!.window.locale; | 70 | + // Flutter 3 workaround |
71 | + final WidgetsBinding? wbi = WidgetsBinding.instance; | ||
72 | + final locale = wbi!.window.locale; | ||
71 | // ignore: unnecessary_cast | 73 | // ignore: unnecessary_cast |
72 | final cc = (locale as Locale?)?.countryCode ?? 'US'; | 74 | final cc = (locale as Locale?)?.countryCode ?? 'US'; |
73 | 75 |
-
Please register or login to post a comment