import UIKit import Flutter import GoogleMaps @main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { // load the key from env let key = ProcessInfo.processInfo.environment["GOOGLE_MAPS_API_KEY"]! GMSServices.provideAPIKey(key) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } }