I would like achieve the corners for the progress indicator as per above image.
Adding rounded border to the LinearProgressIndicator can be done easily but it's not the same with CircularProgressIndicator as there is no support given in the flutter library yet.
This has been raised here and the solution given by the flutter team is here.
So here we can have a clean and custom solution for this issue i.e just add the ..strokeCap = StrokeCap.round to the default CircularProgressIndicator class.
Copy the source code for classes CircularProgressIndicator and ProgressIndicator to a separate file into your code repository and add the strokeCap value as per your requirement in _CircularProgressIndicatorPainter.
There you go. you have the indicator as expected in the above image.
There r some packages but if u wanna do it manually. Take a look this drive-link. I did it manually. U can change it as u want to. [here's]
You can make use of this curved_progress_bar package. Or if you want to design it manually then you can look into the source code of the package here curved_progress_bar - GitHub
Related
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
I'm trying to make a carousel-like view here using SingleChildScrollView, I want the item to snap in the middle of the screen when scrolling, one item at a time.
I would personally recommend using the carousel_slider package, which provides a lot of flexibility: You can use custom widgets and views, and create both horizontal and vertical carousels.
Pub link: https://pub.dev/packages/carousel_slider
Alternatively, if you'd want to create it yourself, I think you'd have to try around working with custom ScrollControllers. Maybe take a look at the source code of the aforementioned package for some pointers.
I am trying to change de splashRadius of a BottomNavigationBarItem in Flutter as if it was an IconButton but there isn't a variable that woks as splashRadius. Any help?
You have some styling options in the bar itself, but I don't think it has an option for what I think is a splashRadius. If not, you'll probably have to create a bottom navigationbar yourself. (You can take a look at different packages to see how they do it)
How do I create Vertical tabBar in Flutter? Unlike TabBar where tabs are displayed in a horizontal row, I want to place them vertically in a Column. see this example
For your use case, it would be easier to use NavigationRail instead of trying to rotate everything.
The solution was simple. Here what I did. I wrapped the TabBar in a RotatedBox after decorating & styling it. And finally, wrapped everything inside PreferredSize and done.
Update on 30 Oct 2021: Use navigation Rail instead or something else from pub.dev.
Check out Drawer example in flutter gallery, they have the use case defined, and it provides many samples
I'm trying to implement a dial widget in flutter and I need to make a circle RaisedButton to go around center of the parent widget. I can use Center to position a button at the center of the parent container, then transform it. But that makes the button unresponsible. Is it possible to do without using CustomSingleChildLayout? That looks a bit complex
I don't know if I'm understanding your requirement correctly, but a package similar to this called flutter_radial_menu is available, while the implementation can be seen in this Git repository.
The codes are available for your reference, if your goal is similar to this one.
I hope this helps.
After some digging in flutter_radial_menu, I realized the way to do it is to use CustomSingleChildLayout. I need to implement a delegate for it. In the delegates getPositionForChild method, we have both the size of the parent and size of the child. We only need to return the position of the child.
I put the code in this gist https://gist.github.com/gliheng/2cc5f97922d456052713fd0803a7efdc