
And i added as main terget lib/main.dart as mentioned in starter-function readme

btw, you should upgrade to 1.4.2

so your function starter has folder structure like this? with lib/main.dart? https://github.com/appwrite/functions-starter/tree/v3/dart-3.0

Yes exactly but i picked the dart 2.17

oh i forgot to mention it. I am already using the 1.4.2

the local instance as well as the instance in my NAS

are you using some storage provider?

and how did you deploy your function?

no i am not using any storage provider.

now i am able to deploy my function

what i did was i just updated my dart in .env file of appwrite so i used dart-3.0 instead dart-2.17 and then recreated the appwrite instance with docker compose up -d
and then deploayd the starter-function with dart 3 runtime and now i am able to execute it.

i think i need to migrate then my old functions to the new function syntax as well. Its a bit diffderent now.

the problem with functions i have now is that i am getting null when trying to access the environment variables with Platform.environment['api_key']
i setted the environment variable in my function setting and tryed to access it in dart but i am getting null what could be the cause? Or is it something i am doing wrong to get the environment variable.

please create a new post since this is a different topic

Yes i solved the problem by naming the environment variables with underscore instead minus so instead api-key => api_key. I wish this could be mention in somewhere. But is it like something that the environment variables must be named by underscore that i should new about it or what?

weirrd..i didn't think that would be a problem..

i just tested with a dash and it works for me 🧐

Oh really interesting i changed it from dash to underscore it worked. I thought this could be the case but. What could be then the cause i am curius now.

maybe function wasn't redeployed the first time?

i dont know i tryed again right now with dash its not working. Maybe i am doing something else not correct. I will then figure this out what i did wrong later.

but have a question how do i send secrets for example passwords for resetting or some other secrets to the function from client sdk (flutter).

right now i am sending it to the body

please create a new post

Ok of course thank you for your support.

[SOLVED] migration error on appwrite 1.4.1
Recommended threads
- CSV Import not working
I am running 1.7.4, trying the sample book csv import. I get a pop up saying import started and then a quick follow up saying completed. Nothing ever appears ...
- CRUD Operations don't work
Hey all, Create, update, and delete is not working for the Appwrite database. The database seems down. When will it be solved? As I can see from the other suppo...
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
