From f9556beea0b6d230cbbe387aa1e3aeab18472d4f Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Fri, 19 Jan 2024 05:00:41 +0000 Subject: [PATCH] Fix Dart environment variable syntax --- src/routes/docs/products/functions/examples/+page.markdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/docs/products/functions/examples/+page.markdoc b/src/routes/docs/products/functions/examples/+page.markdoc index 25b390ad9c..508a302927 100644 --- a/src/routes/docs/products/functions/examples/+page.markdoc +++ b/src/routes/docs/products/functions/examples/+page.markdoc @@ -411,8 +411,8 @@ Future main(final context) async { final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID) - .setKey(process.env.APPWRITE_API_KEY); + .setProject(Platform.environment['APPWRITE_FUNCTION_PROJECT_ID']) + .setKey(Platform.environment['APPWRITE_API_KEY']); final database = Database(client); @@ -757,8 +757,8 @@ Future main(final context) async { final client = Client() .setEndpoint('https://cloud.appwrite.io/v1') - .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID) - .setKey(process.env.APPWRITE_API_KEY); + .setProject(Platform.environment['APPWRITE_FUNCTION_PROJECT_ID']) + .setKey(Platform.environment['APPWRITE_API_KEY']); final databases = Database(client); final document = await databases.createDocument('[DATABASE_ID]', '[MESSAGES_COLLECTION_ID]', ID.unique(), message);