
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
- Direct Upgrade from Appwrite v1.5.11 to ...
I'm on Appwrite v1.5.11. Can I upgrade directly to v1.6.2?
- PKCE, Etsy, OIDC, External OAuth provide...
first, thanks for creating and maintaining this software. I'm almost glad i couldn't convince my (wise and wonderful) senior devs to try pocketbase on productio...
- Still an issue? On user deletion, target...
This has been mentioned here: https://discord.com/channels/564160730845151244/1295830646039515146 and as a Github issue here: https://github.com/appwrite/appwri...
