Unable to process parameter .

Custom Code

I need to use google ml kit to my project in flutter flow , I have created a custom action to process the text recognition from google ml kit and it works except that flutterflow doesn’t have a File variable in the other hand flutter does not have a Uploadedfile variable . So how can I process the variables form flutter to flutterFlow ?

This is my action

Future<String?> imageRecognitionAction(FileImage? imagePath) async { 
final textRecognizer = TextRecognizer(
script: TextRecognitionScript.latin, );
final InputImage inputImage = InputImage.fromFile(imagePath); 
final RecognizedText recognizedText = await textRecognizer.processImage(inputImage); 
String text = recognizedText.text; textRecognizer.close(); 
return text; }

I need to process imagePath variable in flutterflow .

What have you tried so far?

i have tried to change the variable to String

Did you check FlutterFlow's Documentation for this topic?
No
1
4 replies