update to 3.13

This commit is contained in:
Mohamed Nouffer
2023-09-03 23:37:41 +05:30
parent c41dde4c33
commit 56e9861c7a
60 changed files with 3111 additions and 2705 deletions

View File

@ -1,4 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart';
@ -13,9 +12,11 @@ class BottomSheetWidget extends StatelessWidget {
final IndexController indexController = Get.find<IndexController>();
BottomSheetWidget({Key? key}) : super(key: key);
Image getImage(GeoJsonFeature? gf){
if(gf!.properties!["photos"] == null || gf.properties!["photos"] == ""){
return Image(image: AssetImage('assets/images/empty_image.png'));
return const Image(image: AssetImage('assets/images/empty_image.png'));
}
else{
return Image(image: NetworkImage(
@ -37,7 +38,7 @@ class BottomSheetWidget extends StatelessWidget {
return SingleChildScrollView(
child: Column(
children: [
SizedBox(height: 5.0,),
const SizedBox(height: 5.0,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -47,18 +48,18 @@ class BottomSheetWidget extends StatelessWidget {
},
color: Colors.blue,
textColor: Colors.white,
child: Icon(
padding: const EdgeInsets.all(14),
shape: const CircleBorder(),
child: const Icon(
Icons.arrow_back_ios,
size: 14,
),
padding: EdgeInsets.all(14),
shape: CircleBorder(),
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Obx(() =>
Text(indexController.currentFeature[0].properties!["location_name"], style: TextStyle(
Text(indexController.currentFeature[0].properties!["location_name"], style: const TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
@ -72,12 +73,12 @@ class BottomSheetWidget extends StatelessWidget {
},
color: Colors.blue,
textColor: Colors.white,
child: Icon(
padding: const EdgeInsets.all(14),
shape: const CircleBorder(),
child: const Icon(
Icons.arrow_forward_ios,
size: 14,
),
padding: EdgeInsets.all(14),
shape: CircleBorder(),
),
],
),
@ -105,59 +106,59 @@ class BottomSheetWidget extends StatelessWidget {
Expanded(
child: Container(
alignment: Alignment.topRight,
child: Text("address".tr, style: TextStyle(fontWeight: FontWeight.bold),)),
child: Text("address".tr, style: const TextStyle(fontWeight: FontWeight.bold),)),
),
SizedBox(width: 12.0,),
const SizedBox(width: 12.0,),
Expanded(
child: Container(
alignment: Alignment.topLeft,
child: Obx(() => Text(indexController.currentFeature[0].properties!["address"] ?? '',
style: TextStyle(color: Colors.blue,),
style: const TextStyle(color: Colors.blue,),
softWrap: true,
overflow: TextOverflow.ellipsis,)
),
),
)
],
): Container(width: 0.0, height: 0,),
): const SizedBox(width: 0.0, height: 0,),
indexController.currentFeature[0].properties!["phone"] != null ?
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: Container(
alignment: Alignment.topRight,
child: Text("telephone".tr, style: TextStyle(fontWeight: FontWeight.bold),))),
SizedBox(width: 12.0,),
child: Text("telephone".tr, style: const TextStyle(fontWeight: FontWeight.bold),))),
const SizedBox(width: 12.0,),
Expanded(
child: Container(
alignment: Alignment.topLeft,
child: Obx(() => Text(indexController.currentFeature[0].properties!["phone"] ?? '',
style: TextStyle(color: Colors.blue,),
style: const TextStyle(color: Colors.blue,),
overflow: TextOverflow.ellipsis,)
),
),
)
],
): Container(width: 0, height: 0,),
): const SizedBox(width: 0, height: 0,),
indexController.currentFeature[0].properties!["email"] != null ?
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: Container(
alignment: Alignment.topRight,
child: Text("email".tr, style: TextStyle(fontWeight: FontWeight.bold),))),
SizedBox(width: 12.0,),
child: Text("email".tr, style: const TextStyle(fontWeight: FontWeight.bold),))),
const SizedBox(width: 12.0,),
Expanded(
child: Container(
alignment: Alignment.topLeft,
child: Obx(() => Text(indexController.currentFeature[0].properties!["email"] ?? '',
style: TextStyle(color: Colors.blue,),
style: const TextStyle(color: Colors.blue,),
overflow: TextOverflow.ellipsis,)
),
),
)
],
): Container(width: 0, height: 0,),
): const SizedBox(width: 0, height: 0,),
indexController.currentFeature[0].properties!["webcontents"] != null ?
Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -165,8 +166,8 @@ class BottomSheetWidget extends StatelessWidget {
Expanded(child: Container(
alignment: Alignment.topRight,
child: Text(
"web".tr, style: TextStyle(fontWeight: FontWeight.bold)))),
SizedBox(width: 12.0,),
"web".tr, style: const TextStyle(fontWeight: FontWeight.bold)))),
const SizedBox(width: 12.0,),
Expanded(
child: Container(
alignment: Alignment.topLeft,
@ -175,40 +176,40 @@ class BottomSheetWidget extends StatelessWidget {
_launchURL(indexController.currentFeature[0].properties!["webcontents"]);
},
child: Text(indexController.currentFeature[0].properties!["webcontents"] ?? '',
style: TextStyle(color: Colors.blue,),
style: const TextStyle(color: Colors.blue,),
softWrap: false,
overflow: TextOverflow.fade,),
)),
),
)
],
): Container(width: 0.0, height: 0.0,),
): const SizedBox(width: 0.0, height: 0.0,),
indexController.currentFeature[0].properties!["videos"] != null ?
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: Container(
alignment: Alignment.topRight,
child: Text("video".tr, style: TextStyle(fontWeight: FontWeight.bold)))),
SizedBox(width: 12.0,),
child: Text("video".tr, style: const TextStyle(fontWeight: FontWeight.bold)))),
const SizedBox(width: 12.0,),
Expanded(
child: Container(
alignment: Alignment.topLeft,
child: Obx(() => Text(indexController.currentFeature[0].properties!["videos"] ?? '',
style: TextStyle(color: Colors.blue,),
style: const TextStyle(color: Colors.blue,),
overflow: TextOverflow.ellipsis,)
),
),
)
],
): Container(width: 0.0, height: 0.0,),
): const SizedBox(width: 0.0, height: 0.0,),
],
),
),
),
],
),
SizedBox(height: 20.0,),
const SizedBox(height: 20.0,),
Obx(() =>
indexController.currentAction.isNotEmpty ?
Row(
@ -232,7 +233,7 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["wanttogo"] = true;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
@ -246,7 +247,7 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["wanttogo"] = false;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
@ -267,7 +268,7 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["like"] = true;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
@ -281,7 +282,7 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["like"] = false;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
@ -302,7 +303,7 @@ class BottomSheetWidget extends StatelessWidget {
:
Container(width: 0, height: 0,),
const SizedBox(width: 0, height: 0,),
indexController.rog_mode.value == 1 ?
indexController.currentAction[0][0]["checkin"] == false ?
Column(
@ -311,9 +312,9 @@ class BottomSheetWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.max,
children: [
ElevatedButton(
child: Text("Image"), onPressed: (){
final ImagePicker _picker = ImagePicker();
_picker.pickImage(source: ImageSource.camera).then((value){
child: const Text("Image"), onPressed: (){
final ImagePicker picker = ImagePicker();
picker.pickImage(source: ImageSource.camera).then((value){
print("----- image---- ${value!.path}");
});
},
@ -327,7 +328,7 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["checkin"] = true;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
@ -344,18 +345,18 @@ class BottomSheetWidget extends StatelessWidget {
indexController.currentAction[0][0]["checkin"] = false;
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
indexController.currentAction.clear();
print("---temp---${temp}");
print("---temp---$temp");
indexController.currentAction.add([temp]);
}
indexController.makeAction(context);
},
child: Icon(
child: const Icon(
Icons.favorite, color: Colors.red)
,
):
Container(width: 0, height: 0,),
const SizedBox(width: 0, height: 0,),
],
): Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -364,11 +365,11 @@ class BottomSheetWidget extends StatelessWidget {
onPressed: (){
Get.toNamed(AppPages.LOGIN);
},
child: Flexible(child: Text("その他のオプションについてはログインしてください")))
child: const Flexible(child: Text("その他のオプションについてはログインしてください")))
],
),
),
Row(
const Row(
children: [
SizedBox(height: 60.0,),
],