{"id":16179296,"url":"https://github.com/jonashackt/google_maps_in_flutter","last_synced_at":"2025-08-12T06:13:37.938Z","repository":{"id":147269846,"uuid":"491458894","full_name":"jonashackt/google_maps_in_flutter","owner":"jonashackt","description":"Implementing https://codelabs.developers.google.com/codelabs/google-maps-in-flutter#0","archived":false,"fork":false,"pushed_at":"2022-05-12T14:10:02.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T11:47:16.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonashackt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T10:02:27.000Z","updated_at":"2022-05-12T10:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"4cafb749-db84-4f8a-b4ea-ec85554fc081","html_url":"https://github.com/jonashackt/google_maps_in_flutter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonashackt/google_maps_in_flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fgoogle_maps_in_flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fgoogle_maps_in_flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fgoogle_maps_in_flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fgoogle_maps_in_flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonashackt","download_url":"https://codeload.github.com/jonashackt/google_maps_in_flutter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fgoogle_maps_in_flutter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270011191,"owners_count":24511902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T05:26:39.854Z","updated_at":"2025-08-12T06:13:37.909Z","avatar_url":"https://github.com/jonashackt.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google_maps_in_flutter\n[![Build Status](https://github.com/jonashackt/google_maps_in_flutter/workflows/flutter-build/badge.svg)](https://github.com/jonashackt/google_maps_in_flutter/actions)\n[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/jonashackt/how-to-flutter/blob/master/LICENSE)\n[![renovateenabled](https://img.shields.io/badge/renovate-enabled-yellow)](https://renovatebot.com)\n\nJust doing the codelab https://codelabs.developers.google.com/codelabs/google-maps-in-flutter#3\n\nFor me my flutter SDK complains about the code in https://codelabs.developers.google.com/codelabs/google-maps-in-flutter#3\n\n`type 'MyApp' is not a subtype of type 'StatelessWidget' in type cast`:\n\n```\n======== Exception caught by widgets library =======================================================\nThe following _CastError was thrown building MyApp(dirty):\ntype 'MyApp' is not a subtype of type 'StatelessWidget' in type cast\n\nWhen the exception was thrown, this was the stack: \n#0      StatelessElement.widget (package:flutter/src/widgets/framework.dart:4824:46)\n#1      StatelessElement.build (package:flutter/src/widgets/framework.dart:4827:21)\n#2      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4754:15)\n#3      Element.rebuild (package:flutter/src/widgets/framework.dart:4477:5)\n#4      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2659:19)\n#5      WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:882:21)\n#6      RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)\n#7      SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)\n#8      SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1081:9)\n#9      SchedulerBinding.scheduleWarmUpFrame.\u003canonymous closure\u003e (package:flutter/src/scheduler/binding.dart:862:7)\n(elided 4 frames from class _RawReceivePortImpl, class _Timer, and dart:async-patch)\n====================================================================================================\n```\n\nso I rebuild the code to:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:google_maps_flutter/google_maps_flutter.dart';\n\nvoid main() =\u003e runApp(const MyApp());\n\nclass MyApp extends StatelessWidget {\n  const MyApp({Key? key}) : super(key: key);\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Maps Sample App',\n      theme: ThemeData(\n          appBarTheme: const AppBarTheme(backgroundColor: Colors.green)),\n      home: const MapsView(),\n    );\n  }\n}\n\nclass MapsView extends StatefulWidget {\n  const MapsView({Key? key}) : super(key: key);\n\n  @override\n  State\u003cMapsView\u003e createState() =\u003e _MapsViewState();\n}\n\nclass _MapsViewState extends State\u003cMapsView\u003e {\n  late GoogleMapController mapController;\n\n  final LatLng _center = const LatLng(45.521563, -122.677433);\n\n  void _onMapCreated(GoogleMapController controller) {\n    mapController = controller;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return GoogleMap(\n      onMapCreated: _onMapCreated,\n      initialCameraPosition: CameraPosition(\n        target: _center,\n        zoom: 11.0,\n      ),\n    );\n  }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fgoogle_maps_in_flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonashackt%2Fgoogle_maps_in_flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fgoogle_maps_in_flutter/lists"}