Skip to content

Commit

Permalink
update welcome rive anim
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Sep 6, 2023
1 parent 0586b4a commit 3d71298
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/page/welcome_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _WelcomePageState extends State<WelcomePage> {
fontSize = 60;
});
});
new Future.delayed(const Duration(seconds: 2, milliseconds: 500), () {
new Future.delayed(const Duration(seconds: 3, milliseconds: 500), () {
UserDao.initUserInfo(store).then((res) {
if (res != null && res.result) {
NavigatorUtils.goHome(context);
Expand Down Expand Up @@ -98,7 +98,17 @@ class _WelcomePageState extends State<WelcomePage> {
child: new Container(
width: size,
height: size,
child: RiveAnimation.asset('static/file/launch.riv'),
child: RiveAnimation.asset(
'static/file/launch.riv',
animations: ["lookUp"],
onInit: (arb) {
var controller =
StateMachineController.fromArtboard(arb, "birb");
var smi = controller?.findInput<bool>("dance");
arb.addController(controller!);
smi?.value == true;
},
),
),
)
],
Expand Down

0 comments on commit 3d71298

Please sign in to comment.