Showing
2 changed files
with
5 additions
and
2 deletions
| @@ -142,7 +142,7 @@ class PdfGraphicState { | @@ -142,7 +142,7 @@ class PdfGraphicState { | ||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | @override | 144 | @override |
| 145 | - bool operator ==(dynamic other) { | 145 | + bool operator ==(Object other) { |
| 146 | if (other is! PdfGraphicState) { | 146 | if (other is! PdfGraphicState) { |
| 147 | return false; | 147 | return false; |
| 148 | } | 148 | } |
| @@ -88,7 +88,10 @@ mixin Printing { | @@ -88,7 +88,10 @@ mixin Printing { | ||
| 88 | return a.name.compareTo(b.name); | 88 | return a.name.compareTo(b.name); |
| 89 | }); | 89 | }); |
| 90 | 90 | ||
| 91 | - // ignore: use_build_context_synchronously | 91 | + if (!context.mounted) { |
| 92 | + return null; | ||
| 93 | + } | ||
| 94 | + | ||
| 92 | return await showDialog<Printer>( | 95 | return await showDialog<Printer>( |
| 93 | context: context, | 96 | context: context, |
| 94 | builder: (context) => SimpleDialog( | 97 | builder: (context) => SimpleDialog( |
-
Please register or login to post a comment