Style - Rename 'latlng' Place propterty to 'latLng' to conform to style guide.

pull/20/head
kenzieschmoll 8 years ago
parent f540affb7b
commit 381fbd92bb

@ -9,24 +9,24 @@ enum PlaceCategory {
class Place {
Place(
{@required this.latlng,
{@required this.latLng,
@required this.name,
@required this.category,
this.description,
this.starRating = 0});
final LatLng latlng;
final LatLng latLng;
String name;
PlaceCategory category;
String description;
int starRating;
double get latitude => latlng.latitude;
double get longitude => latlng.longitude;
double get latitude => latLng.latitude;
double get longitude => latLng.longitude;
Place copy() {
return new Place(
latlng: latlng,
latLng: latLng,
name: name,
category: category,
description: description,

@ -26,7 +26,7 @@ class PlaceDetailsState extends State<PlaceDetails> {
void onMapCreated(GoogleMapController controller) async {
mapController = controller;
mapController.addMarker(MarkerOptions(position: _place.latlng));
mapController.addMarker(MarkerOptions(position: _place.latLng));
}
Widget _starBar() {
@ -114,7 +114,7 @@ class PlaceDetailsState extends State<PlaceDetails> {
onMapCreated: onMapCreated,
options: GoogleMapOptions(
cameraPosition: CameraPosition(
target: _place.latlng,
target: _place.latLng,
zoom: 16.0,
),
zoomGesturesEnabled: false,

@ -79,7 +79,7 @@ class PlaceMapState extends State<PlaceMap> {
Future<void> _initializeStubPlace(Place place) async {
Marker marker = await mapController.addMarker(
MarkerOptions(
position: place.latlng,
position: place.latLng,
icon: PlaceUtil.getPlaceMarkerIcon(place.category),
infoWindowText: InfoWindowText(
place.name, '${place.starRating.toString()} Star Rating'),
@ -243,7 +243,7 @@ class PlaceMapState extends State<PlaceMap> {
setState(() {
// Create a new Place and map it to the marker we just added.
_places[_pendingMarker] = Place(
latlng: _pendingMarker.options.position,
latLng: _pendingMarker.options.position,
name: _pendingMarker.options.infoWindowText.title,
category: _selectedPlaceCategory);
_pendingMarker = null;

@ -5,91 +5,91 @@ import 'place.dart';
class PlaceStubData {
static List<Place> places = [
Place(
latlng: LatLng(45.524676, -122.681922),
latLng: LatLng(45.524676, -122.681922),
name: "Deschutes Brewery",
description:
"Beers brewed on-site & gourmet pub grub in a converted auto-body shop with a fireplace & wood beams.",
category: PlaceCategory.FAVORITE,
starRating: 4),
Place(
latlng: LatLng(45.525253, -122.684423),
latLng: LatLng(45.525253, -122.684423),
name: "TILT",
description:
"This stylish American eatery offers unfussy breakfast fare, cocktails & burgers in industrial-themed digs.",
category: PlaceCategory.FAVORITE,
starRating: 5),
Place(
latlng: LatLng(45.528952, -122.698344),
latLng: LatLng(45.528952, -122.698344),
name: "Salt & Straw",
description:
"Quirky flavors & handmade waffle cones draw crowds to this artisinal ice cream maker's 3 parlors.",
category: PlaceCategory.FAVORITE,
starRating: 5),
Place(
latlng: LatLng(45.513485, -122.657982),
latLng: LatLng(45.513485, -122.657982),
name: "White Owl Social Club",
description:
"Chill haunt with local beers, burgers & vegan eats, plus live music & an airy patio with a fire pit.",
category: PlaceCategory.FAVORITE,
starRating: 4),
Place(
latlng: LatLng(45.383030, -122.758372),
latLng: LatLng(45.383030, -122.758372),
name: "Thai Cuisine",
description:
"Informal restaurant offering Thai standards in a modest setting, plus takeout & delivery.",
category: PlaceCategory.VISITED,
starRating: 4),
Place(
latlng: LatLng(45.416986, -122.743171),
latLng: LatLng(45.416986, -122.743171),
name: "Chevys",
description:
"Lively, informal Mexican chain with a colorful, family-friendly setting plus tequilas & margaritas.",
category: PlaceCategory.VISITED,
starRating: 4),
Place(
latlng: LatLng(45.430489, -122.831802),
latLng: LatLng(45.430489, -122.831802),
name: "Cinetopia",
description:
"Moviegoers can take food from the on-site eatery to their seats, with table service in 21+ theaters.",
category: PlaceCategory.VISITED,
starRating: 4),
Place(
latlng: LatLng(45.487137, -122.799940),
latLng: LatLng(45.487137, -122.799940),
name: "Buffalo Wild Wings",
description:
"Lively sports-bar chain dishing up wings & other American pub grub amid lots of large-screen TVs.",
category: PlaceCategory.VISITED,
starRating: 5),
Place(
latlng: LatLng(45.493321, -122.669330),
latLng: LatLng(45.493321, -122.669330),
name: "The Old Spaghetti Factory",
description:
"Family-friendly chain eatery featuring traditional Italian entrees amid turn-of-the-century decor.",
category: PlaceCategory.VISITED,
starRating: 4),
Place(
latlng: LatLng(45.548606, -122.675286),
latLng: LatLng(45.548606, -122.675286),
name: "Mississippi Pizza",
description:
"Music, trivia & other all-ages events featured at pizzeria with lounge & vegan & gluten-free pies.",
category: PlaceCategory.WANT_TO_GO,
starRating: 4),
Place(
latlng: LatLng(45.559783, -122.924103),
latLng: LatLng(45.559783, -122.924103),
name: "TopGolf",
description:
"Sprawling entertainment venue with a high-tech driving range & swanky lounge with drinks & games.",
category: PlaceCategory.WANT_TO_GO,
starRating: 5),
Place(
latlng: LatLng(45.420226, -122.740347),
latLng: LatLng(45.420226, -122.740347),
name: "Oswego Grill",
description:
"Wood-grilled steakhouse favorites served in a casual, romantic restaurant with a popular happy hour.",
category: PlaceCategory.WANT_TO_GO,
starRating: 4),
Place(
latlng: LatLng(45.541202, -122.676432),
latLng: LatLng(45.541202, -122.676432),
name: "The Widmer Brothers Brewery",
description:
"Popular, enduring gastropub serving craft beers, sandwiches & eclectic entrees in a laid-back space.",

Loading…
Cancel
Save