kraken_animation_player 2.3.0 copy "kraken_animation_player: ^2.3.0" to clipboard
kraken_animation_player: ^2.3.0 copied to clipboard

A kraken plugin which provide `<animation-player />` tags to play animation format files.

kraken_animation_player #

A kraken plugin which provide <animation-player /> tags to play animation format files.

Support format:

  1. Flare

Installation #

First, add kraken_animation_player as a dependency in your pubspec.yaml file.

Second, add the following code before calling runApp():

import 'package:kraken_animation_player/kraken_animation_player.dart';

void main() {
  KrakenAnimationPlayer.initialize();
  runApp(MyApp());
}

Example #

const ASSET = 'https://kraken.oss-cn-hangzhou.aliyuncs.com/data/Teddy.flr';
const animationPlayer = document.createElement('animation-player');
animationPlayer.setAttribute('type', 'flare');
animationPlayer.setAttribute('src', ASSET);
Object.assign(animationPlayer.style, {
  width: '360px',
  height: '640px',
  objectFit: 'contain',
});

document.body.appendChild(animationPlayer);
document.body.onclick = () => animationPlayer.play('hands_up');
0
likes
110
pub points
0%
popularity

Publisher

verified publisheropenkraken.com

A kraken plugin which provide `<animation-player />` tags to play animation format files.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flare_flutter, flutter, kraken

More

Packages that depend on kraken_animation_player