update for get listview update
This commit is contained in:
@ -58,7 +58,6 @@ class DestinationWidget extends StatelessWidget {
|
||||
//print(element["index"]);
|
||||
int action_id = destinationController.destinations[element["index"]]["id"] as int;
|
||||
destinationController.makeOrder(action_id, (element["index"] as int) - 1, "up");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -67,7 +66,6 @@ class DestinationWidget extends StatelessWidget {
|
||||
//print(element["index"]);
|
||||
int action_id = destinationController.destinations[element["index"]]["id"] as int;
|
||||
destinationController.makeOrder(action_id, (element["index"] as int) + 1, "up");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -90,7 +88,8 @@ class DestinationWidget extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top:45.0),
|
||||
child: ListView.builder(
|
||||
itemCount: destinationController.destinations.length,
|
||||
itemCount: destinationController.destinationCount.value,
|
||||
//itemCount: destinationController.destinations.length,
|
||||
// onReorder: (int oldIndex, int newIndex){
|
||||
// int action_id = destinationController.destinations[oldIndex]["id"] as int;
|
||||
// //print(action_id);
|
||||
@ -165,13 +164,17 @@ class DestinationWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
startChild: 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())
|
||||
],
|
||||
),
|
||||
startChild:
|
||||
destinationController.matrix["rows"] != 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())
|
||||
],
|
||||
):
|
||||
Container()
|
||||
,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@ -161,14 +161,15 @@ class MapWidget extends StatelessWidget {
|
||||
print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
|
||||
return Marker(
|
||||
anchorPos: AnchorPos.align(AnchorAlign.center),
|
||||
height: 70.0,
|
||||
width: 70.0,
|
||||
height: 22.0,
|
||||
width: 22.0,
|
||||
point: LatLng(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude),
|
||||
builder: (ctx) => Icon(Icons.pin_drop),
|
||||
// builder: (ctx) => i.properties!["category"] != null ?
|
||||
// ImageIcon(
|
||||
// AssetImage("assets/images/${i.properties!["category"]}.png"),
|
||||
// color: Color(0xFF3A5A98),
|
||||
// size:12.0,
|
||||
// )
|
||||
// : Icon(Icons.pin_drop),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user