update for chech in

This commit is contained in:
Mohamed Nouffer
2022-07-14 23:10:24 +05:30
parent 264cd828f4
commit 42accf9f3a
10 changed files with 532 additions and 311 deletions

View File

@ -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()