Open MaxYablochkin opened 1 year ago
I think it makes sense to have a such widget that meets the M3 specs. Also, I see there are some packages already implemented that you may try using: carousel_slider, flutter_carousel_widget.
Labeling this issue for more opinions. May be similar: https://github.com/flutter/flutter/issues/25074.
An M3 compliant carousel would be a welcome contribution as a separate package. Looks like a fun project.
A question for @HansMuller it would seem that MD3 Carousel is or should be a refactor of say carousel slider since is uses PageView underneath to allow the transforms to be applied to both the current index and current index-1 and current index+1 which then would give the correct animation and other effects implied in the spec of the MD3 Carousel.
Have I got the gist of it as it would be fun from the transforms part especially if one allowed to some other transforms as well...
I will take a shot later this week to implement one re-using carousel slider code, should be some fun indeed.
Is this work already in progress?
The Framework team at Google isn't working on it however @fredgrott might be
Please can someone ping me an the example of how this can be implemented right now until the Google team answers there :)
Who interested I've created a small snipped but it not looks so cool: https://gist.github.com/followthemoney1/a38ec5928fba4899700b9815c6be7fdc
https://github.com/flutter/flutter/assets/8526612/9d35b3b9-65f0-4415-adf5-8bb8a6efc060
Okay here is what I know...
Normal page view will not work as the builder above the viewport builder is the wrong builder...What is needed is a new page view that has the right layout builder above the viewport builder.
There are already some carousels that take the approach of redoing page view with the right layout builder. That combined with the right breakpoints and the scrolling recipe from the cookbook example than gives a full MD3 carousel.
Good job @paadevelopments
This issue is assigned to @QuncCccccc but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
According to the Material Carousel homepage (https://m3.material.io/components/carousel/overview) the component is in the "Planned" state. Is it possible to know when developments will begin? Alternatively, can the Flutter team recommend a package to consider as 'official' while waiting for it to be developed internally?
There are 2 PRs for it. Part 1 was merged recently and Part 2 one should be available soon. It was featured in the Notable Commits
Also you don't have to wait until it's available on stable. In the meanwhile you can copy the widget code (just one file) into your project and use it. here's the example from second PR.
Proposal
Part of: #91605
Adding a new Carousel component widget according to Material 3 specifications
Use case
https://user-images.githubusercontent.com/102767277/235958580-c5db0309-b173-4d64-9f00-4ac4ed1ad838.mp4