use .env for key instead of hardcoding (and rotate key)

This commit is contained in:
2025-04-20 20:52:38 -07:00
parent dd9d1a67ab
commit 5413e47a8e
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
import 'dart:async';
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
class Debouncer {
final int milliseconds;
@@ -17,3 +19,7 @@ class Debouncer {
_timer?.cancel();
}
}
String getGooglePlacesApiKey() {
return dotenv.env['GMS_API_KEY'] ?? Platform.environment['GMS_API_KEY'] ?? "";
}