v2.0.0animated_text_lerp
Pequenos widgets para animar entre números ou texto em string. Útil para animações de aumento/redução de número, animação de valor monetário ou animação de mudança de conteúdo de string.
Pacote para texto animado no Flutter. Útil para animação de aumento/diminuição de valor de moeda ou animação de interpolação de conteúdo de texto.
{"sdk":"flutter"}{"sdk":"flutter"}^3.0.0Texto original em inglês. Visite o GitHub para a versão atual.
Simple widgets to animate between number or string text. Useful for number increase/decrease animation, currency value animation or string content changing animation.
import 'package:animated_text_lerp/animated_text_lerp.dart';
The widget support lerping between number values. Just setState with the current value and the widget will start animating to it.
AnimatedNumberText(
value, // int or double
curve: Curves.easeIn,
duration: const Duration(seconds: 1),
style: const TextStyle(fontSize: 30),
formatter: (value) {
final formatted =
intl.NumberFormat.currency(locale: "en").format(value);
return formatted;
},
)
The widget support lerping between string values. Just setState with the current value and the widget will start animating to it. Each character will lerp to the new corresponding one respectively.
AnimatedStringText(
value, // string
curve: Curves.easeIn,
duration: const Duration(seconds: 1),
style: const TextStyle(fontSize: 30),
)