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

@ -95,7 +95,7 @@ class DrawerPage extends StatelessWidget {
leading: const Icon(Icons.featured_video),
title: Text("rog_web".tr),
onTap: (){
_launchURL("https://www.gifuai.net/?page_id=4425");
_launchURL("https://www.gifuai.net/?page_id=17397");
},
) :
Container(width: 0, height: 0,),

View File

@ -5,9 +5,9 @@ class ConstValues{
static const server_uri = "http://container.intranet.sumasen.net:8100";
static const dev_server = "http://localhost:8100";
static const dev_ip_server = "http://192.168.8.100:8100";
static const dev_home_ip_server = "http://192.168.1.10:8100";
static const dev_home_ip_server = "http://172.20.10.9:8100";
static String currentServer(){
return server_uri;
return dev_home_ip_server;
}
}

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: "ロケーションがロガニング リストに追加されます",

View File

@ -20,6 +20,42 @@ class MapWidget extends StatelessWidget {
StreamSubscription? subscription;
Widget getMarkerShape(GeoJsonFeature i){
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 32,
width: 32,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.transparent,
border: Border.all(
color: i.properties!['buy_point'] > 0 ? Colors.blue : Colors.red,
width: 3,
style: BorderStyle.solid
)
),
child: Stack(
alignment: Alignment.center,
children: [
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,)):
Container(color: Colors.transparent,),
],
)
),
Container(color: Colors.white, child: Text(i.properties!['cp'] > 0 ? "${i.properties!['cp'].toString().replaceAll(regex, '')}{${i.properties!['checkin_point'].toString()}}" : "", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
],
);
}
@override
Widget build(BuildContext context) {
@ -142,26 +178,7 @@ class MapWidget extends StatelessWidget {
// )
// : Icon(Icons.pin_drop),
builder: (ctx){
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 32,
width: 32,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.transparent,
border: Border.all(
color: Colors.red,
width: 3,
style: BorderStyle.solid
)
),
child: Icon(Icons.circle,size: 6.0,)
),
Container(color: Colors.white, child: Text(i.properties!['cp'] > 0 ? "${i.properties!['cp'].toString().replaceAll(regex, '')}{${i.properties!['checkin_point'].toString()}}" : "", style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color:Colors.red,))),
],
);
return getMarkerShape(i);
},
);
}).toList(),