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

Add a list view to the place tracker app. (#30)

* Add list view to place tracker. Note: map in listTile is not WAI in this commit.

* Remove map from list tiles. Make list tiles tappable (currently editing a place and saving will do nothing if the details screen is pushed from the list view.

* Fix text alignment in list.

* Initial implementation of using an InheritedWidget to maintain data between list and map. Map does not update correctly at this point.

* Use AppModel.update to set the AppState. Add MapConfiguration class to handle map changes based on AppState.

* Don't cache AppState - lookup directly. Extract AppState code into it's own file and add static methods. Address comments from Hans.

* Extract generic AppModel code.
This commit is contained in:
Kenzie Schmoll
2018-11-13 10:39:06 -08:00
committed by GitHub
parent e59c865884
commit 79d9d143b4
8 changed files with 631 additions and 114 deletions

View File

@@ -5,6 +5,7 @@ import 'place.dart';
class StubData {
static const List<Place> places = [
Place(
id: '1',
latLng: LatLng(45.524676, -122.681922),
name: 'Deschutes Brewery',
description:
@@ -13,6 +14,7 @@ class StubData {
starRating: 5,
),
Place(
id: '2',
latLng: LatLng(45.516887, -122.675417),
name: 'Luc Lac Vietnamese Kitchen',
description: 'Popular counter-serve offering pho, banh mi & other Vietnamese favorites in a stylish setting.',
@@ -20,6 +22,7 @@ class StubData {
starRating: 5,
),
Place(
id: '3',
latLng: LatLng(45.528952, -122.698344),
name: 'Salt & Straw',
description:
@@ -28,6 +31,7 @@ class StubData {
starRating: 5,
),
Place(
id: '4',
latLng: LatLng(45.525253, -122.684423),
name: 'TILT',
description:
@@ -36,6 +40,7 @@ class StubData {
starRating: 4,
),
Place(
id: '5',
latLng: LatLng(45.513485, -122.657982),
name: 'White Owl Social Club',
description:
@@ -44,6 +49,7 @@ class StubData {
starRating: 4,
),
Place(
id: '6',
latLng: LatLng(45.487137, -122.799940),
name: 'Buffalo Wild Wings',
description:
@@ -52,6 +58,7 @@ class StubData {
starRating: 5,
),
Place(
id: '7',
latLng: LatLng(45.416986, -122.743171),
name: 'Chevys',
description:
@@ -60,6 +67,7 @@ class StubData {
starRating: 4,
),
Place(
id: '8',
latLng: LatLng(45.430489, -122.831802),
name: 'Cinetopia',
description:
@@ -68,6 +76,7 @@ class StubData {
starRating: 4,
),
Place(
id: '9',
latLng: LatLng(45.383030, -122.758372),
name: 'Thai Cuisine',
description:
@@ -76,6 +85,7 @@ class StubData {
starRating: 4,
),
Place(
id: '10',
latLng: LatLng(45.493321, -122.669330),
name: 'The Old Spaghetti Factory',
description:
@@ -84,6 +94,7 @@ class StubData {
starRating: 4,
),
Place(
id: '11',
latLng: LatLng(45.548606, -122.675286),
name: 'Mississippi Pizza',
description:
@@ -92,6 +103,7 @@ class StubData {
starRating: 4,
),
Place(
id: '12',
latLng: LatLng(45.420226, -122.740347),
name: 'Oswego Grill',
description:
@@ -100,6 +112,7 @@ class StubData {
starRating: 4,
),
Place(
id: '13',
latLng: LatLng(45.541202, -122.676432),
name: 'The Widmer Brothers Brewery',
description:
@@ -108,6 +121,7 @@ class StubData {
starRating: 4,
),
Place(
id: '14',
latLng: LatLng(45.559783, -122.924103),
name: 'TopGolf',
description:
@@ -116,6 +130,7 @@ class StubData {
starRating: 5,
),
Place(
id: '15',
latLng: LatLng(45.485612, -122.784733),
name: 'Uwajimaya Beaverton',
description: 'Huge Asian grocery outpost stocking meats, produce & prepared foods plus gifts & home goods.',