David PHAM-VAN

Add Flutter 3 warning workaround

@@ -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);
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 # 5.9.1 3 # 5.9.1
4 4
5 - iOS: Set cutLength to be currentSize.height [Liam Downey] 5 - iOS: Set cutLength to be currentSize.height [Liam Downey]
  6 +- Add Flutter 3 warning workaround
6 7
7 ## 5.9.0 8 ## 5.9.0
8 9
@@ -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