flutterdartazure-functionsazure-http-trigger

How to trigger Azure function with flutter


I created an azure function in c # and set up an HTTP trigger. I'm interested in how to call this function from the flutter application. I don't need to transfer any special data because everything is already in the link I use to call the function.I’ve created a simplified view of the function to demonstrate what I want.

https://functionapp220220124204147.azurewebsites.net/api/Quercus?status=Off

When it calls this function all it needs to do is change the value of the variable from on to off

I know this is not the correct way to make a function and I should not have such variables, but this is just a simplified version


Solution

  • Here is a workaround given by Vikash Kumar in the Medium article regarding How to call Azure Functions API through Flutter App Code:

    The deployed function app API will be in this format: https://wordle-api.azurewebsites.net/api/CheckWord?word=

    Also created the flutter in the composition of the word_field component which creates an input widget that accepts a 5 letter word in 5 boxes (1 each) which is similar to the OTP field.

    var uri = Uri.https('wordle-api.azurewebsites.net', '/api/CheckWord', params);

    For Complete Code, Please refer this article.