简体   繁体   中英

Flutter - How can I add a Google Map but inside a Card/Container Widget?

I have read a whole lot about this topic on Google and forums but I can't really understand how to use the Google Maps API.

[TL;DR] I want to create a Google Maps Widget that fits inside a Card so when the user taps the Card it gets bigger and easier to use. [TL;DR]

I'm new into Flutter and I don't really know how to use certain Widgets. I'd be happy if anyone just helps me solving this, but I'd also like to understand how to create certain Widget for calling it later in the main class of the app.

Thanks!

Desired UI: 标题栏、卡片轮播、地图卡片

You can put GoogleMap inside a SizedBox . Just make sure you have fixed height and width for the map's parent widget.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM