Showing
1 changed file
with
3 additions
and
3 deletions
@@ -35,15 +35,15 @@ public class SwiftPrintingPlugin: NSObject, FlutterPlugin, UIPrintInteractionCon | @@ -35,15 +35,15 @@ public class SwiftPrintingPlugin: NSObject, FlutterPlugin, UIPrintInteractionCon | ||
35 | 35 | ||
36 | public func handle(_ call: FlutterMethodCall, result: FlutterResult) { | 36 | public func handle(_ call: FlutterMethodCall, result: FlutterResult) { |
37 | let args = call.arguments! as! [String: Any] | 37 | let args = call.arguments! as! [String: Any] |
38 | - if "printPdf" == call.method { | 38 | + if call.method == "printPdf" { |
39 | printPdf(args["name"] as? String ?? "") | 39 | printPdf(args["name"] as? String ?? "") |
40 | result(NSNumber(value: 1)) | 40 | result(NSNumber(value: 1)) |
41 | - } else if "writePdf" == call.method { | 41 | + } else if call.method == "writePdf" { |
42 | if let object = args["doc"] as? FlutterStandardTypedData { | 42 | if let object = args["doc"] as? FlutterStandardTypedData { |
43 | writePdf(object) | 43 | writePdf(object) |
44 | } | 44 | } |
45 | result(NSNumber(value: 1)) | 45 | result(NSNumber(value: 1)) |
46 | - } else if "sharePdf" == call.method { | 46 | + } else if call.method == "sharePdf" { |
47 | if let object = args["doc"] as? FlutterStandardTypedData { | 47 | if let object = args["doc"] as? FlutterStandardTypedData { |
48 | sharePdf( | 48 | sharePdf( |
49 | object, | 49 | object, |
-
Please register or login to post a comment