update for release1

This commit is contained in:
Mohamed Nouffer
2022-09-27 17:52:54 +05:30
parent 904dd358f7
commit 0ca322e278
4 changed files with 101 additions and 51 deletions

View File

@ -21,18 +21,31 @@ class BottomSheetNew extends GetView<BottomSheetController> {
Image getImage(){
if(indexController.rog_mode == 1){
//print("----- rogaining mode 1");
if(indexController.currentDestinationFeature.length <= 0 || indexController.currentDestinationFeature[0].photos! == ""){
return Image(image: AssetImage('assets/images/empty_image.png'));
}
else{
//print("@@@@@@@@@@@@@ rog mode -------------------- ${indexController.currentDestinationFeature[0].photos} @@@@@@@@@@@");
return Image(image: NetworkImage(
indexController.currentDestinationFeature[0].photos!,
),
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
return Image.asset("assets/images/empty_image.png");
},
//print("@@@@@@@@@@@@@ rog mode -------------------- ${indexController.currentDestinationFeature[0].photos} @@@@@@@@@@@");
String _photo = indexController.currentDestinationFeature[0].photos!;
if(_photo.contains('http')){
return Image(image: NetworkImage(
indexController.currentDestinationFeature[0].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/' + indexController.currentDestinationFeature[0].photos!,
),
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
return Image.asset("assets/images/empty_image.png");
},
);
}
}
}
else{
@ -41,13 +54,25 @@ class BottomSheetNew extends GetView<BottomSheetController> {
return Image(image: AssetImage('assets/images/empty_image.png'));
}
else{
return Image(image: NetworkImage(
gf.properties!["photos"],
),
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
return Image.asset("assets/images/empty_image.png");
},
);
String _photo = gf!.properties!["photos"];
if(_photo.contains('http')){
return Image(image: NetworkImage(
gf.properties!["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/' + gf.properties!["photos"],
),
errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
return Image.asset("assets/images/empty_image.png");
},
);
}
}
}
@ -275,16 +300,16 @@ class BottomSheetNew extends GetView<BottomSheetController> {
],
),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(Icons.thumb_up_alt_sharp, color: Colors.blue,),
SizedBox(width: 10.0,),
Text("Like"),
],
),
),
// Expanded(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Icon(Icons.thumb_up_alt_sharp, color: Colors.blue,),
// SizedBox(width: 10.0,),
// Text("Like"),
// ],
// ),
// ),
],
),
SizedBox(height: 8.0,),
@ -340,7 +365,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
],
),
),
Text(indexController.currentFeature[0].properties!["cp"].toString()),
Text('id: ${indexController.currentFeature[0].properties!["location_id"].toString()}, cp : ${indexController.currentFeature[0].properties!["cp"].toString()}'),
],
),
)
@ -351,8 +376,16 @@ class BottomSheetNew extends GetView<BottomSheetController> {
);
}
Future<Widget> wantToGo(BuildContext context)async {
bool _selected = false;
print('---target-- ${indexController.currentFeature[0].properties!["location_id"]}----');
for(Destination d in destinationController.destinations){
print('---- ${d.location_id.toString()} ----');
if(d.location_id == indexController.currentFeature[0].properties!["location_id"]){
_selected = true;
break;
}
}
DatabaseHelper db = DatabaseHelper.instance;
return
@ -364,9 +397,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
children: [
indexController.rog_mode == 0 ?
IconButton(
icon: Icon(Icons.pin_drop_sharp, size: 32, color: Colors.blue,),
icon: Icon(Icons.pin_drop_sharp, size: 32, color: _selected == true ? Colors.amber : Colors.blue,),
onPressed: (){
if(_selected){return;}
Get.defaultDialog(
title: "この場所を登録してもよろしいですか",
middleText: "ロケーションがロガニング リストに追加されます",