We have a screen with listItems. Each item can be longPressed to open a popupMenu. Now requirement is to blur the screen except the selected listItem on long press. (check screenshot)
How can this be achieved?
I think you are looking for something like this one.
https://pub.dev/packages/focused_menu
Using this library you can show the popup menu by making the background blurry without the tapped item.
Related
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.
I have to make flutter page where at top there is a drag down button or slider so we can view name of the user and in main screen there is a simple button.
If anyone can give me a sample code that how to make a slide down menu in flutter.it will be really useful for me.
I am using SliverAppBar widget with some background image behind it. Since the image I will load will be dynamic, sometimes it can have light colors and can cause the back button (or any other action button) to be hardly visible.
As you can see in the screenshot below, I gave a little shadow to the app bar title using TextStyle & Shadow widgets, so it is much more visible than the back button.
You can try use "elevation" here is the Flutter link for more clarification: https://www.google.com/url?sa=t&source=web&rct=j&url=https://api.flutter.dev/flutter/material/SliverAppBar/elevation.html&ved=2ahUKEwiEpfiIn4TwAhWUH7cAHY9ECIwQFjACegQIBRAC&usg=AOvVaw0wCdyaVv3EA8ulVXXvaVMu
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.
During inspecting scaffold Flutter project (without any modification) with Flutter Inspector in some cases of toggling widgets in left bottom corner magnifying glass button appear.
Where is it come from and what is its purpose?
Attached screenshots show that this button exists only on Render Tree tab.
This button appears only after you turned on "Select Widget Mode" in Flutter Inspector and selected a first widget to inspect. In order to inspect another widget you first need to tap the magnifier FAB.