change modes
This commit is contained in:
@ -38,18 +38,18 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
}
|
||||
|
||||
Image getImage(int index){
|
||||
if(destinationController.destinations[index]["location"]["properties"]["photos"] == null || destinationController.destinations[index]["location"]["properties"]["photos"] == ""){
|
||||
if(destinationController.destinations[index].photos == null || destinationController.destinations[index].photos == ""){
|
||||
return Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
}
|
||||
else{
|
||||
return Image(image: NetworkImage(destinationController.destinations[index]["location"]["properties"]["photos"]));
|
||||
return Image(image: NetworkImage(destinationController.destinations[index].photos!));
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
destinationController.context = context;
|
||||
destinationController.PopulateDestinations();
|
||||
//destinationController.context = context;
|
||||
//destinationController.PopulateDestinations();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@ -71,12 +71,7 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
Expanded(child: IconButton(icon: const Icon(Icons.camera_enhance), onPressed: (){},),),
|
||||
const Expanded(child: Text('')),
|
||||
Expanded(child: IconButton(icon: const Icon(Icons.travel_explore), onPressed: (){
|
||||
if(indexController.currentUser.isNotEmpty){
|
||||
Get.toNamed(AppPages.TRAVEL);
|
||||
}
|
||||
else{
|
||||
Get.toNamed(AppPages.LOGIN);
|
||||
}
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
}),),
|
||||
],
|
||||
),
|
||||
@ -92,13 +87,8 @@ class _DestinationPageState extends State<DestinationPage> {
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
appBar:AppBar(
|
||||
title: Text("Iternery"),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
onPressed: (){
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
},
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text("app_title".tr),
|
||||
actions: [
|
||||
ToggleButtons(
|
||||
disabledColor: Colors.grey.shade200,
|
||||
|
||||
Reference in New Issue
Block a user