Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FutureBuilder<List<House>>(
- future: fetchHouseList(),
- builder: (context, snapshot) {
- if (snapshot.connectionState == ConnectionState.waiting) {
- return CircularProgressIndicator();
- }
- if (snapshot.hasError) {
- return Icon(Icons.error);
- }
- final houses = snapshot.data;
- return Stack(
- children: houses
- .map(
- (house) => Positioned(
- left: house.x,
- top: house.y,
- child: ContextMenuRegion(
- ...
- ),
- ),
- )
- .toList(),
- );
- },
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement