update for chech in
This commit is contained in:
@ -24,6 +24,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
return Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
}
|
||||
else{
|
||||
print("------- image is ${destinationController.destinations[index].photos!}------");
|
||||
return Image(image: NetworkImage(
|
||||
destinationController.destinations[index].photos!),
|
||||
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
|
||||
@ -115,12 +116,11 @@ class DestinationWidget extends StatelessWidget {
|
||||
child: ListTile(
|
||||
onTap: () async {
|
||||
{
|
||||
double lat = destinationController.destinations[index].lat as double;
|
||||
double lon = destinationController.destinations[index].lon as double;
|
||||
Destination? fs = await destinationController.getDEstinationForLatLong(lat, lon);
|
||||
Destination? fs = destinationController.destinations[index];
|
||||
print("----fsf-----${fs}");
|
||||
if(fs != null){
|
||||
if(indexController.currentFeature.length > 0) {
|
||||
|
||||
if(indexController.currentDestinationFeature.length > 0) {
|
||||
indexController.currentDestinationFeature.clear();
|
||||
}
|
||||
indexController.currentDestinationFeature.add(fs);
|
||||
@ -153,7 +153,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
|
||||
},
|
||||
selectedTileColor: Colors.amberAccent,
|
||||
selected:destinationController.destinations[index].selected,
|
||||
selected:destinationController.destinations[index].selected!,
|
||||
leading: getImage(index),
|
||||
title: Text(destinationController.destinations[index].name!),
|
||||
subtitle: Text(destinationController.destinations[index].category!),
|
||||
@ -161,12 +161,12 @@ class DestinationWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
startChild:
|
||||
destinationController.matrix["rows"] != null ?
|
||||
destinationController.matrix["rows"][0]["elements"] != null ?
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(destinationController.matrix["rows"][0]["elements"][index]["distance"]["text"].toString()),
|
||||
Text(destinationController.matrix["rows"][0]["elements"][index]["duration"]["text"].toString())
|
||||
//Text(destinationController.matrix["rows"][0]["elements"][index]["distance"]["text"].toString()),
|
||||
//Text(destinationController.matrix["rows"][0]["elements"][index]["duration"]["text"].toString())
|
||||
],
|
||||
):
|
||||
Container()
|
||||
|
||||
Reference in New Issue
Block a user