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
- Custom Domains
Hi All, Should be a quick config issue. I'm setting up custom domains on the hosted version. I have verified the domain with the CNAME but appwrite isn't gene...
- Unauthorized Charge After Appwrite Pro F...
I was using Appwrite Pro credits worth $100, which were valid until November. During this period, I was exploring Appwrite's services. However, I recently notic...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...