diff --git a/ios/Classes/QRView.swift b/ios/Classes/QRView.swift index 7eff009..376cec1 100644 --- a/ios/Classes/QRView.swift +++ b/ios/Classes/QRView.swift @@ -44,7 +44,7 @@ public class QRView:NSObject,FlutterPlatformView { [weak self] (call: FlutterMethodCall, result: FlutterResult) -> Void in switch(call.method){ case "setDimensions": - var arguments = call.arguments as! Dictionary + let arguments = call.arguments as! Dictionary self?.setDimensions(width: arguments["width"] ?? 0,height: arguments["height"] ?? 0) case "flipCamera": self?.flipCamera() diff --git a/ios/Classes/QRViewFactory.swift b/ios/Classes/QRViewFactory.swift index 35442de..fff745b 100644 --- a/ios/Classes/QRViewFactory.swift +++ b/ios/Classes/QRViewFactory.swift @@ -17,7 +17,7 @@ public class QRViewFactory: NSObject, FlutterPlatformViewFactory { } public func create(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?) -> FlutterPlatformView { - var dictionary = args as! Dictionary + let dictionary = args as! Dictionary return QRView(withFrame: CGRect(x: 0, y: 0, width: dictionary["width"] ?? 0, height: dictionary["height"] ?? 0), withRegistrar: registrar!,withId: viewId) }