Flutter Progress Text Button - flutter

Looking for a widget similar to the answer by NiklasPor in this question here. The whole idea fits my needs - have a button that changes border drawn based on how long the button is held. The problem is that the CircularProgressIndicator is used here. I need on hold feature and border drawing to be compatible with the TextButton widget, for example. Basically, I want a TextButton to execute a function if it is held long enough. Any ideas how to start with this? I am thinking of also using the GestureDetector widget.

Have you tried this package: square_percent_indicator

Related

How to use SizeTransition with Text inside a Row without overflows

Problem summary
I'm building simple animation in which, simply, a panel expands to the right on a onTap event. The layout can be summarized as follows:
The panel has many tiles. Each tile has its own:
leading icon
title text
trailing icon
Each tile, when expanded, shows the three widgets above
Each tile, when shrinked, just shows the leading icon
The panel is scrollable to hold many icons such as these
At the end of the panel there's a simple icon which, when tapped, triggers the "expand" or "shrink" animation
The animation is built with an AnimatedContainer on the panel and a SizeTransition on the single tiles (via one single controller on the parent class)
The problem is simple: when the tiles shrink, their inner text overflows in the row.
Sample code
I just made this reproducible example on DartPad.
The obvious solution isn't helping me out
The most obvious solution is to simply wrap the Text inside a Flexible Widget: this advised by Flutter's docs and it makes sense, but unluckily it completely breaks my Layout.
Flexible introduces a flex factor that in this context is 100% unwanted.
I want my leading icons to be always at the end of the row, so my Spacer widget should "prevail" there.
I can't just play with flex factors there, as it would unintendedly hide text depending on its value.
Another code smell
Another thing I really don't like is the fact that I have to build a controller on the parent class, but I'm not actually using it on the parent class (I'm just exploiting it so I can give it to the children).
I'm new to animations in Flutter so I'm kinda confused on how I should orchestrate the whole thing here.
Any help will be appreciated / upvoted / accepted. Thank you!
As far as I understood you in a right way you just need set sizes for Row inside of SizeTransition instead of Container sizes
Here is your modified sample https://dartpad.dev/?id=a2408d29a1e8c6ce7a1cef8f21e7491d
I'd try an OverflowBox or a FittedBox (wrapping your text), depending on the result you want to achieve.

Please tell me name of this action in flutter (when pressing on item in tabbar)

When I tap on a item on tab bar a circle will appear and disappear, please tell me name of this animation and how could I implement it in a flutter
click for seeing sample
The effect is called a ripple. And you can get it by wrapping a widget in an Inkwell.
See more here about it here: https://docs.flutter.dev/cookbook/gestures/ripples
Hi In Scaffold BottomNavigationBar() has inbuilt properties of circle appear and disappear
You can use a widget called Gesture Detector which also has ripple effect

Floating button that overlaps in all applications

I am learning flutter, and I found myself with the task of creating a floating button, that by minimizing the application the button is visible and overlaps any application, is it possible to create this functionality in flutter?
You should use Scaffold and there's a parameter called floatingActionButton. There you can add a button and it definitely won't overlay anything. You should also search for SafeArea and Listview/SingleChildScrollView. These are great widgets for avoid overlays. Flutter has a great documentation so you can always look up a widget in google and there will be always something.

How to create hover button in flutter

Id like to create similar animation effect with press button in flutter like this
I tried to find some similar widget on https://pub.dev/ without success. Any Idea how to create it?
Use materialappbutton to get hover animation effect.
The only thing I can think of is working with a gradient which you adapt in a stateful way on hover.
See the below answer for how to make a gradient border:
Outlined transparent button with gradient border in flutter

FLUTTER | Custom Circular Progress Indicator

How can I make a custom circular progress indicator like the ones in the below image in Flutter? The out of box one does not allow adding text in the center.
Screenshot of Example
I think you have two ways.
first put CircularProgressIndicator and Text widgets into Stack and place them as you want(Text in the center and CircularProgressIndicator cover all stack space). Stack widget is key point here for you to understand...
the second way and more flexible way is to this action with CustomPaint Widget.
this link will help you to achieve the goal...
https://medium.com/#NPKompleet/creating-an-analog-clock-in-flutter-i-68def107d9f4