1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Add stub reviews to the place details sheet. (#22)

* Add stub place reviews to the place details sheet. Offers a better demonstration of the map in a list view.
This commit is contained in:
Kenzie Schmoll
2018-11-01 13:15:12 -07:00
committed by GitHub
parent bfce2a44e9
commit 3ed537495a
3 changed files with 126 additions and 25 deletions

View File

@@ -4,7 +4,7 @@ import 'package:flutter/rendering.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'place.dart';
import 'place_stub_data.dart';
import 'stub_data.dart';
import 'place_details.dart';
class PlaceMap extends StatefulWidget {
@@ -57,7 +57,7 @@ class PlaceMapState extends State<PlaceMap> {
}
Future<Map<Marker, Place>> _initializeStubPlaces() async {
await Future.wait(PlaceStubData.places.map((Place place) => _initializeStubPlace(place)));
await Future.wait(StubData.places.map((Place place) => _initializeStubPlace(place)));
return _places;
}
@@ -435,7 +435,7 @@ class _MapFabs extends StatelessWidget {
child: Column(
children: <Widget>[
FloatingActionButton(
heroTag: "add_place_button",
heroTag: 'add_place_button',
onPressed: onAddPlacePressed,
materialTapTargetSize: MaterialTapTargetSize.padded,
backgroundColor: Colors.green,
@@ -443,7 +443,7 @@ class _MapFabs extends StatelessWidget {
),
SizedBox(height: 12.0),
FloatingActionButton(
heroTag: "toggle_map_type_button",
heroTag: 'toggle_map_type_button',
onPressed: onToggleMapTypePressed,
materialTapTargetSize: MaterialTapTargetSize.padded,
mini: true,
@@ -452,7 +452,6 @@ class _MapFabs extends StatelessWidget {
),
],
),
),
);
}