Back

How can I find out the function id run time in Flutter client?

  • 0
  • Flutter
  • Web
Pappapa
8 Jan, 2024, 16:30

I am wondering if the function Id (as well as database Id and collection Id) needs to be a build-time configuration parameter, or it can be found out run-time? What is the best approach?

TL;DR
The user is asking if the function Id in a Flutter client can be found out at run time or if it needs to be a build-time configuration parameter. Another user suggests using a remote config service or a public collection to serve that information. A suggestion is made to use a cloud function to return the Ids, but it is noted that the project Id and function Id will still need to be hard-coded. There is no direct solution mentioned in the thread.
Drake
8 Jan, 2024, 16:56

It's typically build-time. However, you can use a remote config service or a public collection to serve that info

Pappapa
8 Jan, 2024, 19:34

Thanks @Steven, I was thinking similarly, namely to deploy a cloud function that returns the Ids, but nevertheless, the project Id and that function id shall be 'hard-coded'.

Drake
8 Jan, 2024, 19:44

i don't think i'd use an Appwrite function for this if it's the same value for everyone.

Regardless of whatever approach you use. there will be something hardcoded in the app

Pappapa
8 Jan, 2024, 21:08

Agree, I was wondering if such an approach would ease new deployments. Thanks!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more