【发布时间】:2020-10-08 10:33:19
【问题描述】:
我在 Flutter 中创建了一个 FloatingActionButton 来共享用户个人资料。每当用户单击该按钮时,我想显示一个小的耀斑动画。我正在使用此代码,但正在显示动画。动画文件为 Congratulations.flr
Tooltip(
message: "Share with friends",
child: new FloatingActionButton(
heroTag: null,
backgroundColor: primaryColor,
child: Icon(Icons.share),
onPressed: () {
FlareActor(
'assets/videos/Congratulations.flr',
alignment: Alignment.center,
fit: BoxFit.contain,
animation: 'animate',
);
shareUserProfile();
},
),
),
【问题讨论】: