feat: Integrate dotenv for environment variable management and update .gitignore
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:geolocator/geolocator.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
class MapContent extends StatefulWidget {
|
||||
const MapContent({super.key});
|
||||
@@ -25,7 +26,7 @@ class _MapContentState extends State<MapContent> {
|
||||
|
||||
List<PlaceSuggestion> _suggestions = [];
|
||||
|
||||
static const String _apiKey = 'AIzaSyBPxanjGyrWVjI4-hZmi086VdQFSEYT_2U';
|
||||
static final String _apiKey = dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
Reference in New Issue
Block a user