1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-04 13:56:37 +00:00

dart migrate place_tracker (#831)

This commit is contained in:
Brett Morgan
2021-06-08 09:23:48 +10:00
committed by GitHub
parent b1a49c0afb
commit 0850579bc8
8 changed files with 122 additions and 164 deletions

View File

@@ -17,7 +17,7 @@ enum PlaceTrackerViewType {
}
class PlaceTrackerApp extends StatelessWidget {
const PlaceTrackerApp({Key key}) : super(key: key);
const PlaceTrackerApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -28,7 +28,7 @@ class PlaceTrackerApp extends StatelessWidget {
}
class _PlaceTrackerHomePage extends StatelessWidget {
const _PlaceTrackerHomePage({Key key}) : super(key: key);
const _PlaceTrackerHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -83,8 +83,7 @@ class AppState extends ChangeNotifier {
this.places = StubData.places,
this.selectedCategory = PlaceCategory.favorite,
this.viewType = PlaceTrackerViewType.map,
}) : assert(places != null),
assert(selectedCategory != null);
});
List<Place> places;
PlaceCategory selectedCategory;