update to routing
This commit is contained in:
@ -111,7 +111,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
children: [
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
destinationController.makePrevious(indexController.currentDestinationFeature[0]);
|
||||
Get.back();
|
||||
//destinationController.makePrevious(indexController.currentDestinationFeature[0]);
|
||||
},
|
||||
color: Colors.blue,
|
||||
textColor: Colors.white,
|
||||
@ -134,19 +135,19 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
),
|
||||
),
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
destinationController.makeNext(indexController.currentDestinationFeature[0]);
|
||||
},
|
||||
color: Colors.blue,
|
||||
textColor: Colors.white,
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 14,
|
||||
),
|
||||
padding: EdgeInsets.all(16),
|
||||
shape: CircleBorder(),
|
||||
),
|
||||
// MaterialButton(
|
||||
// onPressed: () {
|
||||
// destinationController.makeNext(indexController.currentDestinationFeature[0]);
|
||||
// },
|
||||
// color: Colors.blue,
|
||||
// textColor: Colors.white,
|
||||
// child: Icon(
|
||||
// Icons.arrow_forward_ios,
|
||||
// size: 14,
|
||||
// ),
|
||||
// padding: EdgeInsets.all(16),
|
||||
// shape: CircleBorder(),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -223,7 +224,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
children: [
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
indexController.makePrevious(indexController.currentFeature[0]);
|
||||
Get.back();
|
||||
//indexController.makePrevious(indexController.currentFeature[0]);
|
||||
},
|
||||
color: Colors.blue,
|
||||
textColor: Colors.white,
|
||||
@ -246,20 +248,20 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
),
|
||||
),
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
//print("----- next is ${indexController.currentFeature[0]} ------");
|
||||
indexController.makeNext(indexController.currentFeature[0]);
|
||||
},
|
||||
color: Colors.blue,
|
||||
textColor: Colors.white,
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 14,
|
||||
),
|
||||
padding: EdgeInsets.all(16),
|
||||
shape: CircleBorder(),
|
||||
),
|
||||
// MaterialButton(
|
||||
// onPressed: () {
|
||||
// //print("----- next is ${indexController.currentFeature[0]} ------");
|
||||
// indexController.makeNext(indexController.currentFeature[0]);
|
||||
// },
|
||||
// color: Colors.blue,
|
||||
// textColor: Colors.white,
|
||||
// child: Icon(
|
||||
// Icons.arrow_forward_ios,
|
||||
// size: 14,
|
||||
// ),
|
||||
// padding: EdgeInsets.all(16),
|
||||
// shape: CircleBorder(),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -365,7 +367,19 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Text('id: ${indexController.currentFeature[0].properties!["location_id"].toString()}, cp : ${indexController.currentFeature[0].properties!["cp"].toString()}'),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 8.0,),
|
||||
indexController.currentFeature[0].properties!["remark"] != null && (indexController.currentFeature[0].properties!["remark"] as String).isNotEmpty ?
|
||||
getDetails(context, "remarks".tr, indexController.currentFeature[0].properties!["remark"] ?? '', isurl: false)
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text('${indexController.currentFeature[0].properties!["cp"].toString()} - id: ${indexController.currentFeature[0].properties!["checkin_point"].toString()}'),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@ -26,12 +26,24 @@ class DestinationWidget extends StatelessWidget {
|
||||
}
|
||||
else{
|
||||
print("------- image is ${destinationController.destinations[index].photos!}------");
|
||||
return Image(image: NetworkImage(
|
||||
destinationController.destinations[index].photos!),
|
||||
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
|
||||
return Image.asset("assets/images/empty_image.png");
|
||||
},
|
||||
);
|
||||
String _photo = destinationController.destinations[index].photos!;
|
||||
if(_photo.contains('http')){
|
||||
return Image(image: NetworkImage(
|
||||
destinationController.destinations[index].photos!),
|
||||
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
|
||||
return Image.asset("assets/images/empty_image.png");
|
||||
},
|
||||
);
|
||||
}
|
||||
else {
|
||||
return Image(image: NetworkImage(
|
||||
'http://container.intranet.sumasen.net:8100/media/' + destinationController.destinations[index].photos!),
|
||||
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
|
||||
return Image.asset("assets/images/empty_image.png");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,12 +233,12 @@ class DestinationWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
startChild:
|
||||
destinationController.matrix["rows"][0]["elements"] != null ?
|
||||
index > 0 && destinationController.matrix["routes"][0]["legs"] != null ?
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(destinationController.matrix["rows"][0]["elements"][index]["distance"] != null ? destinationController.matrix["rows"][0]["elements"][index]["distance"]["text"].toString(): ''),
|
||||
Text(destinationController.matrix["rows"][0]["elements"][index]["distance"] != null ? destinationController.matrix["rows"][0]["elements"][index]["duration"]["text"].toString() : '')
|
||||
Text(destinationController.matrix["routes"][0]["legs"][index -1]["distance"] != null ? destinationController.matrix["routes"][0]["legs"][index-1]["distance"]["text"].toString(): ''),
|
||||
Text(destinationController.matrix["routes"][0]["legs"][index -1]["duration"] != null ? destinationController.matrix["routes"][0]["legs"][index-1]["duration"]["text"].toString() : '')
|
||||
],
|
||||
):
|
||||
Container()
|
||||
|
||||
@ -43,10 +43,10 @@ class MapWidget extends StatelessWidget {
|
||||
Icon(Icons.circle,size: 6.0,),
|
||||
i.properties!['cp'] == -1 ?
|
||||
Transform.rotate(
|
||||
alignment: Alignment.center,
|
||||
origin: Offset.fromDirection(0, 6),
|
||||
angle: 90 * pi / 180,
|
||||
child: Icon(Icons.play_arrow_outlined, color: Colors.red, size: 40,)):
|
||||
alignment: Alignment.centerLeft,
|
||||
origin: Offset.fromDirection(1, 26),
|
||||
angle: 270 * pi / 180,
|
||||
child: Icon(Icons.play_arrow_outlined, color: Colors.red, size: 70,)):
|
||||
Container(color: Colors.transparent,),
|
||||
],
|
||||
)
|
||||
|
||||
@ -60,7 +60,6 @@ class _PerfectureWidgetState extends State<PerfectureWidget> {
|
||||
child: Text(currency["adm2_ja"].toString()),
|
||||
value: currency["id"].toString(),
|
||||
);
|
||||
|
||||
dropDownItems.add(newDropdown);
|
||||
}
|
||||
}
|
||||
@ -76,8 +75,8 @@ class _PerfectureWidgetState extends State<PerfectureWidget> {
|
||||
child: Text(currency["area_nm"].toString()),
|
||||
value: currency["id"].toString(),
|
||||
);
|
||||
|
||||
dropDownItems.add(newDropdown);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user