Showing
1 changed file
with
3 additions
and
6 deletions
@@ -122,14 +122,11 @@ mixin Printing { | @@ -122,14 +122,11 @@ mixin Printing { | ||
122 | }; | 122 | }; |
123 | 123 | ||
124 | await _channel.invokeMethod<int>('printPdf', params); | 124 | await _channel.invokeMethod<int>('printPdf', params); |
125 | - bool result = false; | ||
126 | try { | 125 | try { |
127 | - result = await job.onCompleted.future; | ||
128 | - } catch (e) { | ||
129 | - print('Document not printed: $e'); | ||
130 | - } | 126 | + return await job.onCompleted.future; |
127 | + } finally { | ||
131 | _printJobs.remove(job.index); | 128 | _printJobs.remove(job.index); |
132 | - return result; | 129 | + } |
133 | } | 130 | } |
134 | 131 | ||
135 | static Future<Map<dynamic, dynamic>> printingInfo() async { | 132 | static Future<Map<dynamic, dynamic>> printingInfo() async { |
-
Please register or login to post a comment