Adding a New Image and it changes all images at front page - Flutter - flutter

I am making demo application for experience.
So, the problem is that I am adding list as described in images(Screenshots). But when I add another new list with image so, it automatically changes images at front page in the last and new list both. So, can you guys suggest, how we can get new image in list only once and last list stay the same as we added before.
The code is below.
Thanks in advance.

The problem is you are using the list to add images to the list. As the list is callByReference it will change the value inside the list when the value of the listOfImage is changed.
To fix the issue you can change the addition method to map like
allData.add(Model(listOfImage:List.from(list)));
hope it will work for you if not let me know.

Related

Get the previous route name in Flutter

I understand that Flutter routes works like a stack, so I want to know the previous route name which I came from.
I'm using a preview page to show a picture, but this picture can come from the camera or the gallery, I'd like to show a dialog only if it came from gallery.
I read I have to use an observer, but I think there is an easy way to do that.
Thanks in advance.
You can use getx pack to get previous Route
Get.previousRoute;
get current Route
Get.currentRoute;
Well, upon further investigation, there is no way to know the previous page.
I fixed this sending an argument previousPage with the route name value.
You can also use a NavigatorObserver.

File Upload not working after moving form field

I have a large form with a image upload field working ok.
Field is defined in model as:
$this->add('filestore/Field_Image','thumbnail_id');
Then I created two tabs inside form:
$tabs=$form->add('Tabs');
$main=$tabs->addTab('General');
$design=$tabs->addTab('Design');
And moved image field to design tab:
$design->add($form->getElement('thumbnail_id'));
Now I can't upload files. When I try I get the following javascript error
Error: cannot call methods on atk4_form prior to initialization; attempted to call method 'submitPlain
Is there any other way to move the field or have upload working again after moving it?
I was trying to use the same method ($design->add($form->getElement('my_element'));) to move a slider into another place on the page. That didn't work - I think it was because the slider input field is not placed on the page the same way as other input fields.
So I tried with the jQuery appendTo-method (I found the hint in a comment from romanish in a documentation page). That worked. But then I experienced the same problem as you - and in the end I gave up and solved the problem by editing the slider-class page.
So I can't help you, sorry, but I guess this points out that there is a general problem related to getting input from moved form elements.

Single Product Image not showing

I have added multiple products in my zen cart store. The problem is when i click on a specific product, the image wont show. It remains blank.
http://www.fmchase.com/
Above is the url of the site. When we go to a single product, i image of that product is not displayed, though it is displayed on the category.
The image it's looking for doesn't exist.
e.g http://www.fmchase.com/images/large/Aquafresh%20little%20Teeth%20toothbrush_LRG.jpg
returns a 404 (not found) error.
edit: The category page is using a different image http://www.fmchase.com/images/Aquafresh%20little%20Teeth%20toothbrush.jpg
The problem is in your new template. Go to includes/templates/your_template/templates/tpl_modules_main_product_image.php and change all variables matching $products_image_medium to $products_image
This should fix your problem.
I removed
Content-Security-Policy module from .htaccess
and I got my listing images back

overriding setResponsePage() to build breadcrumb

I 'm trying to build my own simple breadcrumb component that pushes a PageRefence onto a List for each and every Link in the application.
Unfortunately, setResponsePage() is final (I use wicket 6).
The only other option that comes to my mind is to add a parameter to my base page constructor. But this would require me to change every link in the app..
Are there any other options?
Since you already have a base page, it's easier to override onBeforeRender() in your base page to update the breadcrumbs list that you'd store in your Session object.
Or am I missing something?
To answer my own question:
In the end I realized, that I do not want to have the breadcrumb updated on each new page.
Therefore I created an object that holds a List of Pagereferences. When I navigate to a new Page, I take the list of the current page, make a copy of it an add the current page. The resulting list is pased onto the new page.
All this is handeld in the base page.
Keeping it in the page, avoids problems with multiple tabs / windows.
Thanks for the help.

iOS: Settings w/ expandable list

Settings for Mail allows one to add items to a list (the list of accounts) by choosing the "Add Account..." entry at the bottom of the list; info gets entered on a separate screen, and now the list has a new entry.
Is there a way for someone other than Apple to accomplish this & still get into the App store?
Is there a way for someone other than Apple to accomplish this & still get into the App store?
No. There is no public API to do something like that.
If you're asking can someone modify the add new account list under mail settings programmatically, the answer is no. Even if there was a private API I doubt it would get through the apple review.
Yes, it is possible to create a similar UI-functionality in your app as the one described.
Simply add a list element in the end of your TableView to act as a list footer with desired functionality.
Once clicked, swap to a another view. In this view you change the data source of your TableView so it contains a new element. Once you go back to the TableView, the new element can be drawn into the list.