optimized
This commit is contained in:
@ -23,10 +23,10 @@ class DestinationWidget extends StatelessWidget {
|
||||
destinationController.destinations[index].photos == "") {
|
||||
return const Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
} else {
|
||||
print(
|
||||
"------- image is ${destinationController.destinations[index].photos!}------");
|
||||
String _photo = destinationController.destinations[index].photos!;
|
||||
if (_photo.contains('http')) {
|
||||
// print(
|
||||
// "------- image is ${destinationController.destinations[index].photos!}------");
|
||||
String photo = destinationController.destinations[index].photos!;
|
||||
if (photo.contains('http')) {
|
||||
return Image(
|
||||
image:
|
||||
NetworkImage(destinationController.destinations[index].photos!),
|
||||
@ -39,8 +39,8 @@ class DestinationWidget extends StatelessWidget {
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
//print("==== photo is ${server_url + '/media/compressed/' + destinationController.destinations[index].photos!} ===");
|
||||
return Image(
|
||||
image: NetworkImage('$serverUrl/media/compressed/' +
|
||||
destinationController.destinations[index].photos!),
|
||||
image: NetworkImage(
|
||||
'$serverUrl/media/compressed/${destinationController.destinations[index].photos!}'),
|
||||
errorBuilder:
|
||||
(BuildContext context, Object exception, StackTrace? stackTrace) {
|
||||
return Image.asset("assets/images/empty_image.png");
|
||||
@ -84,7 +84,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
if (d != null) {
|
||||
print("--- selected destination is ${d.list_order}");
|
||||
//print("--- selected destination is ${d.list_order}");
|
||||
destinationController.makeOrder(d, -1);
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
if (d != null) {
|
||||
print("--- selected destination is ${d.list_order}");
|
||||
//print("--- selected destination is ${d.list_order}");
|
||||
destinationController.makeOrder(d, 1);
|
||||
}
|
||||
}
|
||||
@ -145,8 +145,8 @@ class DestinationWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print(
|
||||
"------ destination widget------ ${destinationController.destinationCount.value} ----------");
|
||||
//print(
|
||||
// "------ destination widget------ ${destinationController.destinationCount.value} ----------");
|
||||
|
||||
return Obx(() => Stack(
|
||||
children: [
|
||||
@ -161,12 +161,12 @@ class DestinationWidget extends StatelessWidget {
|
||||
isFirst: index == 0 ? true : false,
|
||||
indicatorStyle: IndicatorStyle(
|
||||
indicator: CircleAvatar(
|
||||
backgroundColor: Colors.red,
|
||||
child: Text(
|
||||
destinationController.destinations[index].list_order
|
||||
.toString(),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
),
|
||||
key: Key(index.toString()),
|
||||
@ -180,7 +180,7 @@ class DestinationWidget extends StatelessWidget {
|
||||
{
|
||||
Destination? fs =
|
||||
destinationController.destinations[index];
|
||||
print("----fsf-----$index");
|
||||
//print("----fsf-----$index");
|
||||
if (indexController
|
||||
.currentDestinationFeature.isNotEmpty) {
|
||||
indexController.currentDestinationFeature
|
||||
@ -188,8 +188,8 @@ class DestinationWidget extends StatelessWidget {
|
||||
}
|
||||
indexController.currentDestinationFeature
|
||||
.add(fs);
|
||||
print(
|
||||
"--- ndexController.currentDestinationFeature ----- ${indexController.currentDestinationFeature[0].name} ----");
|
||||
// print(
|
||||
// "--- ndexController.currentDestinationFeature ----- ${indexController.currentDestinationFeature[0].name} ----");
|
||||
//indexController.getAction();
|
||||
|
||||
showModalBottomSheet(
|
||||
@ -198,7 +198,9 @@ class DestinationWidget extends StatelessWidget {
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
//builder:((context) => BottomSheetWidget())
|
||||
builder: ((context) => BottomSheetNew(destination: fs,)));
|
||||
builder: ((context) => BottomSheetNew(
|
||||
destination: fs,
|
||||
)));
|
||||
}
|
||||
},
|
||||
onLongPress: () {
|
||||
|
||||
Reference in New Issue
Block a user