mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 22:38:42 +00:00
Landing beta changes in master for the new stable release (#747)
This commit is contained in:
@@ -38,7 +38,7 @@ class App extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({@required this.title});
|
||||
const HomePage({required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
@@ -49,7 +49,7 @@ class HomePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _HomePageState extends State<HomePage> {
|
||||
Stream<QuerySnapshot> _iceCreamStores;
|
||||
late Stream<QuerySnapshot> _iceCreamStores;
|
||||
final Completer<GoogleMapController> _mapController = Completer();
|
||||
|
||||
@override
|
||||
@@ -80,13 +80,13 @@ class _HomePageState extends State<HomePage> {
|
||||
return Stack(
|
||||
children: [
|
||||
StoreMap(
|
||||
documents: snapshot.data.docs,
|
||||
documents: snapshot.data!.docs,
|
||||
initialPosition: initialPosition,
|
||||
mapController: _mapController,
|
||||
),
|
||||
StoreCarousel(
|
||||
mapController: _mapController,
|
||||
documents: snapshot.data.docs,
|
||||
documents: snapshot.data!.docs,
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -98,9 +98,9 @@ class _HomePageState extends State<HomePage> {
|
||||
|
||||
class StoreCarousel extends StatelessWidget {
|
||||
const StoreCarousel({
|
||||
Key key,
|
||||
@required this.documents,
|
||||
@required this.mapController,
|
||||
Key? key,
|
||||
required this.documents,
|
||||
required this.mapController,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<DocumentSnapshot> documents;
|
||||
@@ -126,9 +126,9 @@ class StoreCarousel extends StatelessWidget {
|
||||
|
||||
class StoreCarouselList extends StatelessWidget {
|
||||
const StoreCarouselList({
|
||||
Key key,
|
||||
@required this.documents,
|
||||
@required this.mapController,
|
||||
Key? key,
|
||||
required this.documents,
|
||||
required this.mapController,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<DocumentSnapshot> documents;
|
||||
@@ -161,9 +161,9 @@ class StoreCarouselList extends StatelessWidget {
|
||||
|
||||
class StoreListTile extends StatefulWidget {
|
||||
const StoreListTile({
|
||||
Key key,
|
||||
@required this.document,
|
||||
@required this.mapController,
|
||||
Key? key,
|
||||
required this.document,
|
||||
required this.mapController,
|
||||
}) : super(key: key);
|
||||
|
||||
final DocumentSnapshot document;
|
||||
@@ -239,10 +239,10 @@ class _StoreListTileState extends State<StoreListTile> {
|
||||
|
||||
class StoreMap extends StatelessWidget {
|
||||
const StoreMap({
|
||||
Key key,
|
||||
@required this.documents,
|
||||
@required this.initialPosition,
|
||||
@required this.mapController,
|
||||
Key? key,
|
||||
required this.documents,
|
||||
required this.initialPosition,
|
||||
required this.mapController,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<DocumentSnapshot> documents;
|
||||
@@ -265,8 +265,8 @@ class StoreMap extends StatelessWidget {
|
||||
document['location'].longitude as double,
|
||||
),
|
||||
infoWindow: InfoWindow(
|
||||
title: document['name'] as String,
|
||||
snippet: document['address'] as String,
|
||||
title: document['name'] as String?,
|
||||
snippet: document['address'] as String?,
|
||||
),
|
||||
))
|
||||
.toSet(),
|
||||
|
||||
Reference in New Issue
Block a user