From cc2abcea09a54dd04712fb3ee08f566307f25c2b Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 16:27:20 +0300 Subject: [PATCH] key from env --- flutter_google_places_sdk/example/lib/constants.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter_google_places_sdk/example/lib/constants.dart b/flutter_google_places_sdk/example/lib/constants.dart index d8c2d50..1e3949f 100644 --- a/flutter_google_places_sdk/example/lib/constants.dart +++ b/flutter_google_places_sdk/example/lib/constants.dart @@ -2,9 +2,9 @@ library constants; import 'package:flutter/material.dart'; -/// note: do NOT store your api key in here or in the code at all. -/// use an external source such as file or firebase remote config -const INITIAL_API_KEY = ''; +/// Define your api in run args, such as +/// --dart-define API_KEY="" +const INITIAL_API_KEY = String.fromEnvironment('API_KEY'); /// Initial value that is used for the locale const INITIAL_LOCALE = Locale('en'); \ No newline at end of file