Delete picked images one by one from gallery - flutter - flutter

I can able to pick the images from gallery and show it up in the UI. I have to delete the one by image after selecting. I done the UI, by showing the red cancel button for each image . But i am unable to delete and show it up un the UI. Please help.
this is my code.

Extract the Bottom Sheet Widget to Separate Stateful Widget and it should work.
setstate won't work inside that particular Bottom Sheet until it's separated to a Stateful Widget. Give it a try.

I Done by myself. The issue is i am using bottom sheet to add the images. To delete the images i called removeAtIndex. it works fine. The problem is the bottom sheet does not know the state of the context, so added statefull builder for the bottom sheet. Now it works fine.

Related

Sending ListView Builder data to Next Screen

I have a ListView in Flutter and want to send Multiple data into Next widget, but when I add a checkout button, it's showing 3 times because I have 3 items in my cart List so I can't add button in my ListView but when I have tried this button in bottomNavigationBar but I can't access Listing view data. Below is the Screenshot.
I am not able to understand your question, can you phrase it more clearly, try short sentences. Also make sure to add your code, if it is too large then add your GitHub, or any other public repo link so we can see the code. Final thing, I can't see any screenshots.

How to show a container / dialog next to an icon when the icon is tapped?

Hi I'm trying to create a screen that have bunch of container with a child of row that have a text and a Icon (the red one - can be seen on the image). So when I click the icon I want to show a dialog right next to the icon. I tried using aligned_dialog but the positioning is really hard to do, I want it to be instantly next to the icon just like the image.
Is there any package or widget that I can use to achieve this ?
You can check this package: https://pub.dev/packages/just_the_tooltip
It allow to specify a child of type Widget, so you can add what you want.

Dart/Flutter: change content of container on tab in ListView

I am currently trying to create something like a TabBar. I created a horizontal ListView which should work as the TabBar and I my goal is, that one row fills itself with a list that contains the cards for the Tab I clicked on and refreshes when I click on another one. Is there a way to do that? It should look like this:
Reference Picture
Did you look at Work with tabs, an introduction to TabBar, TabBarView and DefaultTabController?
You could also create it from scratch using a ListView with a Card wrapped in a GestureDetector or a ListTile, and detect taps on onTap, which would set the selected data and update state using setState.

I want to make a container under app bar which works like a secondary App Bar where I can put my back icon button and title in the center in flutter

I have tried everything. But I can't find a permanent solution How to put the title in the center while my back icon button on the left side. I want to use this secondary app bar on every screen of my app.
Please check the image below for a better understanding.
This is the problem that I am facing
Take a ListView Widget at body of Scaffold and in its children put first widget as a ListTile that comes under AppBar. So that there will be a leading icon and title in center. After that take a Column and add your needed widgets for every page.

Flutter overlay is moving

I'm asking how to disable Overlays to move when a Scaffold.of(context).showSnackBar is called like on my video below.
The same thing is happening when the keyboard appear. Sometime the blue floattingButton (+) don't come back to it's original position :-(
Thx in advance.
Problem animation
The FloatingActionButton going up when the Scaffold is displayed is something common to all default implementations.
Give a look to the "Bootom app bar" demo in the Gallery app. Press on the search button and you will see it coming up. Or just add a Scaffold to the app that is built with flutter create command.
This happens because of the way the FAB button is placed on the screen and the effect of displaying the Snackbar by the Scaffold.
The FAB button is displayed at the bottom of the content area of the Scaffold content. When the content area is shrinked to include the BottomAppBar, the FAB goes up with it. It has nothing to do with Overlay.
You have two options:
Either you create your own versiĆ³n of the FAB which is not
controlled by the Scaffold.
Or you hack the Scaffold so the size of the SnackBar is not taken
into account.
For this second option you can try the following:
Go to the file /lib/src/material/scaffold.dart in your flutter installation and look for the line with the code snackBarSize: snackBarSize, inside the _ScaffoldLayout class.
Replace it with snackBarSize: Size(0.0, 0.0),
You will see that the FAB stays in its place.