Closed tj-noor closed 4 years ago
I was adding a quick check to see if the iOS device had a torch and ran into an error.
torch
if (await TorchCompat.hasTorch == false) { print('no flash'); return; }
Error:
flutter: error trying to get flash status - MissingPluginException(No implementation found for method hasTorch on channel g123k/torch_compat)
Looking through the swift code, the issue was evident and is a quick & simple fix - SwiftTorchCompatPlugin.swift#L27
} else if (call.method == "hasTorch") { result(hasTorch())
I was adding a quick check to see if the iOS device had a
torch
and ran into an error.Error:
Looking through the swift code, the issue was evident and is a quick & simple fix - SwiftTorchCompatPlugin.swift#L27