update
This commit is contained in:
@ -22,6 +22,20 @@ class BottomSheetWidget extends StatelessWidget {
|
||||
if (!await launch(url)) throw 'Could not launch $url';
|
||||
}
|
||||
|
||||
// Widget getAttrib(String name){
|
||||
// print("calling ...");
|
||||
// if(homeController.currentFeature[0].properties!["phone"] == null || homeController.currentFeature[0].properties!["phone"] == ""){
|
||||
// return Container(height: 0, width: 0,);
|
||||
// }
|
||||
// else {
|
||||
// return Obx(() =>
|
||||
// Text(homeController.currentFeature[0].properties!["phone"] ?? '',
|
||||
// style: TextStyle(color: Colors.blue,),
|
||||
// overflow: TextOverflow.ellipsis,)
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
@ -84,69 +98,116 @@ class BottomSheetWidget extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
homeController.currentFeature[0].properties!["address"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("address".tr, style: TextStyle(fontWeight: FontWeight.bold),),
|
||||
SizedBox(width: 12.0,),
|
||||
Obx(() => Text(homeController.currentFeature[0].properties!["address"],
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
))
|
||||
],
|
||||
): Container(width: 0.0, height: 0,),
|
||||
homeController.currentFeature[0].properties!["phone"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("telephone".tr, style: TextStyle(fontWeight: FontWeight.bold),),
|
||||
SizedBox(width: 12.0,),
|
||||
Obx(() => Text(homeController.currentFeature[0].properties!["phone"],
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
))
|
||||
],
|
||||
): Container(width: 0, height: 0,),
|
||||
homeController.currentFeature[0].properties!["email"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("email".tr, style: TextStyle(fontWeight: FontWeight.bold),),
|
||||
SizedBox(width: 12.0,),
|
||||
Obx(() => Text(homeController.currentFeature[0].properties!["email"],
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
))
|
||||
],
|
||||
): Container(width: 0, height: 0,),
|
||||
homeController.currentFeature[0].properties!["webcontents"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("web".tr, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(width: 12.0,),
|
||||
Obx(() => InkWell(
|
||||
onTap: (){
|
||||
_launchURL(homeController.currentFeature[0].properties!["webcontents"]);
|
||||
},
|
||||
child: Text(homeController.currentFeature[0].properties!["webcontents"],
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
children: [
|
||||
homeController.currentFeature[0].properties!["address"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topRight,
|
||||
child: Text("address".tr, style: TextStyle(fontWeight: FontWeight.bold),)),
|
||||
),
|
||||
))
|
||||
],
|
||||
): Container(width: 0.0, height: 0.0,),
|
||||
homeController.currentFeature[0].properties!["videos"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("video".tr, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(width: 12.0,),
|
||||
Obx(() => Text(homeController.currentFeature[0].properties!["videos"],
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
))
|
||||
],
|
||||
): Container(width: 0.0, height: 0.0,),
|
||||
],
|
||||
SizedBox(width: 12.0,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() => Text(homeController.currentFeature[0].properties!["address"] ?? '',
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
softWrap: true,
|
||||
overflow: TextOverflow.ellipsis,)
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
): Container(width: 0.0, height: 0,),
|
||||
homeController.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,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() => Text(homeController.currentFeature[0].properties!["phone"] ?? '',
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
overflow: TextOverflow.ellipsis,)
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
): Container(width: 0, height: 0,),
|
||||
homeController.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,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() => Text(homeController.currentFeature[0].properties!["email"] ?? '',
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
overflow: TextOverflow.ellipsis,)
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
): Container(width: 0, height: 0,),
|
||||
homeController.currentFeature[0].properties!["webcontents"] != null ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(child: Container(
|
||||
alignment: Alignment.topRight,
|
||||
child: Text(
|
||||
"web".tr, style: TextStyle(fontWeight: FontWeight.bold)))),
|
||||
SizedBox(width: 12.0,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() => InkWell(
|
||||
onTap: (){
|
||||
_launchURL(homeController.currentFeature[0].properties!["webcontents"]);
|
||||
},
|
||||
child: Text(homeController.currentFeature[0].properties!["webcontents"] ?? '',
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,),
|
||||
)),
|
||||
),
|
||||
)
|
||||
],
|
||||
): Container(width: 0.0, height: 0.0,),
|
||||
homeController.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,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() => Text(homeController.currentFeature[0].properties!["videos"] ?? '',
|
||||
style: TextStyle(color: Colors.blue,),
|
||||
overflow: TextOverflow.ellipsis,)
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
): Container(width: 0.0, height: 0.0,),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user