Navaron Bracke

update some doc comments on iOS

... ... @@ -95,7 +95,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
}
}
/// Parses all parameters and starts the mobileScanner
/// Start the mobileScanner.
private func start(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
let torch: Bool = (call.arguments as! Dictionary<String, Any?>)["torch"] as? Bool ?? false
let facing: Int = (call.arguments as! Dictionary<String, Any?>)["facing"] as? Int ?? 1
... ... @@ -151,7 +151,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
}
}
/// Stops the mobileScanner and closes the texture
/// Stops the mobileScanner and closes the texture.
private func stop(_ result: @escaping FlutterResult) {
do {
try mobileScanner.stop()
... ... @@ -159,7 +159,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
result(nil)
}
/// Toggles the torch
/// Toggles the torch.
private func toggleTorch(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
do {
try mobileScanner.toggleTorch(call.arguments as? Int == 1 ? .on : .off)
... ... @@ -171,7 +171,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
}
}
/// Toggles the zoomScale
/// Sets the zoomScale.
private func setScale(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
let scale = call.arguments as? CGFloat
if (scale == nil) {
... ... @@ -198,7 +198,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
}
}
/// Reset the zoomScale
/// Reset the zoomScale.
private func resetScale(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
do {
try mobileScanner.resetScale()
... ... @@ -218,7 +218,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
}
}
/// Toggles the torch
/// Updates the scan window rectangle.
func updateScanWindow(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
let scanWindowData: Array? = (call.arguments as? [String: Any])?["rect"] as? [CGFloat]
MobileScannerPlugin.scanWindow = scanWindowData
... ... @@ -240,7 +240,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
return CGRect(x: minX, y: minY, width: width, height: height)
}
/// Analyzes a single image
/// Analyzes a single image.
private func analyzeImage(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
let uiImage = UIImage(contentsOfFile: call.arguments as? String ?? "")
... ...