27 lines
651 B
Dart
27 lines
651 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class TestProgress extends AnimatedWidget {
|
|
TestProgress({
|
|
Key? key,
|
|
required Animation<double> animation,
|
|
}) : super(key: key, listenable: animation);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final animation = listenable as Animation<double>;
|
|
|
|
return Transform.scale(
|
|
alignment: Alignment.center,
|
|
scale: animation.value,
|
|
origin: Offset(-5, 0),
|
|
child: Container(
|
|
alignment: Alignment.center,
|
|
padding: EdgeInsets.only(left: 0),
|
|
child: Icon(
|
|
Icons.star,
|
|
color: Colors.yellow,
|
|
)),
|
|
);
|
|
}
|
|
}
|