supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
656 stars 154 forks source link

Does Supabase Flutter `functions.invoke` support FormData input? #933

Open sapphire008 opened 1 month ago

sapphire008 commented 1 month ago

Is your feature request related to a problem? Please describe.

Does the Flutter client's functions.invoke method support FormData as input? My understanding is that it currently does not, since:

https://github.com/supabase/supabase-flutter/blob/408e816ac66442eda90db3e83900b05c10dd604f/packages/functions_client/lib/src/functions_client.dart#L87

would need to be

http.MultipartRequest

instead. I could be wrong though. If the current Flutter client already supports FormData, can someone show me an example? I am mostly considering this example on Edge Function file upload: https://github.com/orgs/supabase/discussions/11123. I can see how it is being done in JS/TS since the JS client can handle FormData.

I have been using Dio.post as a workaround, but it would be nice to keep everything within the Supabase client.

Thank you.