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

@@ -1,24 +1,7 @@
import 'package:flutter/material.dart';
import 'place_map.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class _Home extends StatelessWidget {
const _Home({ Key key }) : super(key: key);
@override
Widget build(BuildContext context) {
return PlaceMap(
center: const LatLng(45.521563, -122.677433),
);
}
}
import 'place_tracker_app.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Place Tracker',
home: _Home(),
)
);
runApp(PlaceTrackerApp());
}