颤音:定位多个小部件或图像
I am relatively new to flutter and I am learning as I go. I want to achieve exactly as the image below. All the components in the image, such as the car, the outlined city and the background shape are in seperate png files. I will have to combine them all to get the result.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实现这一目标的最方便方法之一是使用堆栈小部件。
将您的PNG-S作为资产导入PubSpec文件(在此处提供有关此信息 htttps> https:htttps:htttps: //docs.flutter.dev/development/ui/assets-and-images ),
然后用图像填充堆栈并将其放置
类似于此示例。
有关stack的更多详细信息( https://api.flutter.dev/flutter.dev/flutter.dev/flutter/widgetsss /stack-class.html )
One of the most convenient way to achive this in flutter is to use the Stack widget.
Import your png-s as assets to your pubspec file (more about this here https://docs.flutter.dev/development/ui/assets-and-images),
then fill up your stack with your images and position them
similar to this example.
More details about Stack(https://api.flutter.dev/flutter/widgets/Stack-class.html)