Questions tagged [flutter-animation]

Flutter animations that use tweens or physics-based animations. This also includes any use of AnimationController or implicit animations.

Flutter’s animation support makes it easy to implement a variety of animation types. Many widgets, especially Material widgets, come with the standard motion effects defined in their design spec, but it’s also possible to customize these effects.

Animation types

Animations fall into one of two categories: tween- or physics-based. The following sections explain what these terms mean, and points you to resources where you can learn more. In some cases, the best documentation we currently have is example code in the Flutter gallery.

Tween animation

Short for in-betweening. In a tween animation, the beginning and ending points are defined, as well as a timeline, and a curve that defines the timing and speed of the transition. The framework calculates how to transition from the beginning point to the end point.

Physics-based animation

In physics-based animation, motion is modeled to resemble real-world behavior. When you toss a ball, for example, where and when it lands depends on how fast it was tossed and how far it was from the ground. Similarly, dropping a ball attached to a spring falls (and bounces) differently than dropping a ball attached to a string.

Reference: https://flutter.dev/docs/development/ui/animations

2656 questions
0
votes
0 answers

How to Fade In and Fade Out animation based on user sliding or user dragging in Flutter?

How to Fade In and Fade Out animation based on user sliding or user dragging ? For example, this app called Quizlet. User can drag card and the further the card is the more clearer the changes of color of the card's border *Of course at this…
Trisk Khan
  • 25
  • 7
0
votes
0 answers

how can i put plutogrid into columns

when I put PlutoGrid into column it duplicated I have tried ListView and stack and Everytime it duplicate
0
votes
0 answers

Can't solve this error "The argument type 'Animation?' can't be assigned to the parameter type 'Animation'."

I'm following this speed code tutorial(https://www.youtube.com/watch?v=KO_PYJKHglo) and I'm facing some problems during somewhere on 6:04. I did some typing ! and ? for any null safety related problems but nothing had changed. import…
loupdaniel
  • 47
  • 1
  • 7
0
votes
1 answer

stop animation of AnimatedPositioned as soon as the widget reaches at a position?

I want to make a ball with a number written roll to the left side, and I want to make the ball stop when it reaches at the left end. I tried to find a listener but I couldn't, and I didn't manage to find any way to notify when the ball hits left…
dfassf
  • 142
  • 10
0
votes
1 answer

Flutter - PageController " ScrollController not attached to any scroll views."

Is there a way to animate to a page using PageController after awaiting an async function without causing the exception below to be thrown? Exception: _AssertionError ('package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 107…
124141251
  • 31
  • 5
0
votes
2 answers

How to declare String and List in the current version of flutter?

In the tutorial, String categoryTitle; and List displayedMeals; were working fine. In the current version of flutter it won't allow me to just declare as it is. What should I initialize them to? It would be nice to know what is the equivalent in…
0
votes
2 answers

How to make the button turn green when upon clicking it

the data is display all using the streamBuilder and I'm using the return ListView.Builder by adding the onTap button child: StreamBuilder( stream: FirebaseFirestore.instance .collection('prayers') …
0
votes
0 answers

Higher Cpu usage using Flutter Rive

I am using Rive file for login animation which requires interaction like SMIBool, SMINumber etc. But when i initialize final controller = StateMachineController.fromArtboard(artboard.artboard, 'State Machine 1'); if (controller != null)…
Hamza Malik
  • 86
  • 1
  • 7
0
votes
1 answer

How expensive are videos in Flutter?

Normally, if a widget has to rebuild many times or requires a lot of GPU resources, it is expensive. So, how about videos? For example, consider the two following scenarios: A screen with a black star shape (made of a widget like ClipPath or…
0
votes
2 answers

Active Color in Pageview builder

I want to make the centre widget border colour Basic widget should be have active colour when i slide it Silver widget will be centre so Silver widget should be active then to purple. while slider the centre widget border colour must be active…
0
votes
2 answers

while uploading image to firebase, this one error is always comes whatever i do

what went wrong? even if i replace the XFile into File, same error comes at this putFile.
0
votes
0 answers

Flutter: Debug error when import rive package

I am new. I am building my first app but there is a difficult error. I created an animation and want to use it like a button. Tap on it and the animation starts. I try to use rive but can not run the app when importing rive.dart this is my…
ManDo
  • 1
  • 1
0
votes
0 answers

Flutter Move container to 3 positions

Good afternoon! I am new to Flutter. Faced such a problem There is a scooter card. I need it to be able to move vertically across the screen between three positions - initial, top and bottom (as planned, in the bottom position, part of the card goes…
0
votes
1 answer

1:8: Error: Dart library 'dart:html' is not available on this platform, // This heppens whenever i write code rellated with firebase storage

``` your text`- - ````[tag:your text]Launching lib\main.dart on 220233L2I in debug mode... Running Gradle task 'assembleDebug'... lib/retrieve_images.dart:1:8: Error: Dart library 'dart:html' is not available on this platform. import…
0
votes
1 answer

Flutter: How can I create an animation as a button?

I am learning flutter. I created an animation (.svg file) and I want to use it like a button. (Ontap => run animation) Any key or link to resolve this? Thank a lot! I created an animation (.svg file). I am looking for a way to use it like a…
ManDo
  • 1
  • 1