How to make carousel/slider/image switcher with fading effect in Flutter - flutter

I found many online slider libraries like the one here: https://github.com/GeekyAnts/flutter-carousel
But none of them supports fading effect between images (image transition between slides to be fading).
I found also an example of fading animated widgets in the documentation here: https://api.flutter.dev/flutter/widgets/AnimatedCrossFade-class.html
and
https://api.flutter.dev/flutter/widgets/AnimatedSwitcher-class.html
I'm thinking about make placeholder widget and using a timer to switch between image using the suggested approach in the documentation. Is this the best approach to achieve that? Are there any other ready-made libraries or easier way to do it?

You probably already solved this based on how long this had no answers, but today I had to help a friend with a problem similar to yours and came up with your same solution: using AnimatedSwitcher + FadeTransition + Timer.periodic. It's not a list of images in this example, but you can easily change the list to List<String> and also the widget to Image.network instead of Icon.
Here's the runnable solution + code: https://dartpad.dev/c1332cc136c96fa5980c3e05c7faeb4b

Related

Flutter widget to display moving (marquee) text

I am hoping to display a string of text in a widget such that the text appears to automatically scroll or move from left to right, similar to what is shown in many media players (such as OBS). In web development, this appears to be known as a marquee effect.
I've looked at animated_text_kit but it doesn't provide this scrolling animation.
I've also tried any_widget_marquee as described in this similar SO post but the package doesn't support sound null safety.
Can anyone provide any recommendations or describe how to achieve this effect?
There is an aptly named package marquee that does exactly this.
The ticker text Flutter package provides this functionality.

Paging by item Flutter

i would like to achieve pagination with flutter like this: every swipe gesture there i only one page swipped, and it is being centered in the screen. on the edges of the screen you can see parts of the next and previous items i.e the item is NOT THE SIZE OF THE SCREEN. this requirement is important. i can't set the item to be the size of the screen, also it should have padding between the items. for a better understanding i have a gif attached.
Thank you.
https://gfycat.com/soreheartfeltguernseycow
You can achieve the goal easily using PageView widget.
Ive found a class carousel_slider which is easily making that functionallity under the hood using PageView as suggested above.
For anyone who will need such behaviour as in the gif, see https://pub.dev/packages/carousel_slider

Pageview.builder overlapping effect

I'm coding a quiz app. I want to achieve this. Everything is okay but the overlapping effect doesnt. I'm using pageview.builder to navigate between pages. How can i achieve this ?
I think you wish to have a carousel effect for your question cards.
A simple solution would be using ListView horizontally, also there are some packages that you would like to check, for example;
flutter_swiper
carousel_slider

How to produce this menu effect in flutter?<image attached>

This effect
I couldn't find any ways to produce this type of home screen card slide menu effect or any combination of widgets to reproduce this, sure could use some help.
This type of custom Drawer done with Stack, AnimatedBuilder and Transform. Most difficult part there is gesture behavior, that could be copied from original Drawer flutter source code.
Marcin SzaƂek represented this implementation, alongside with few other features on Flutter Europe.
At this video he describes how he done it.
And this is link to his github with this feature code implemented.

Flutter: How to make a scrollable menu of the screen?

I am working on a project but, I came across something I have never used before. When I searched about it I got confused with two ways backdrop and bottom sheet.
I want to know what is the exact way to do like the following pictures that I designed.
Use DraggableScrollableSheet widget