From 9ea5a80bfb189bcb47264b4f4d6513bb683d87cc Mon Sep 17 00:00:00 2001 From: lifegpc Date: Fri, 24 May 2024 21:44:55 +0800 Subject: [PATCH] Add animation to progress bar --- lib/components/task.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/components/task.dart b/lib/components/task.dart index 30fd2ce..0312779 100644 --- a/lib/components/task.dart +++ b/lib/components/task.dart @@ -85,11 +85,14 @@ class _TaskView extends State { child: Column(children: [ _buildText(context), LinearPercentIndicator( + animation: true, + animateFromLastPercent: true, progressColor: Colors.green, lineHeight: 20.0, barRadius: const Radius.circular(10), padding: EdgeInsets.zero, - center: Text(percentText), + center: + Text(percentText, style: const TextStyle(color: Colors.black)), percent: percent, ), ]),