import "package:web/web.dart";
import "service.dart";

class GoogleMapsService extends Service {
  @override
  Future<void> init() async {
    const key = String.fromEnvironment("GOOGLE_MAPS_API_KEY");
    final script = document.createElement("script") as HTMLScriptElement;
    script.src = "https://maps.googleapis.com/maps/api/js?key=$key";
    document.head?.appendChild(script);
  }
}
