sooYo / svga_plugin

Flutter SVGA player implemented by Texture widget and support sound playing feature on Flutter side

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svga_plugin

This plugin copies SVGA frameworks and combine both iOS and Android codes into a single Flutter plugin. And implements the Flutter SVGA widget by external texture, also enable audio-playing feature on Flutter side additionally.

Currrently, iOS implementation is still under going and thus be unavailable temporarily.

Install

Currently, you can import this plugin to your Flutter project by altering the pubspec.yaml file, adding lines below to the dependencies entry

 svga_plugin: 
 	git:
 	   url: https://github.com/sooYo/svga_plugin.git

Usage

You can follow the example on SVGA Android or SVGA iOS to use SVGA animation on native side.

On Flutter, please use the SVGAWidget to load your SVGA source from both assets and URL, just as simple as below:

import 'package:svga_plugin/svga_plugin.dart';

SVGAWidget.network('https://cdn.jsdelivr.net/gh/svga/SVGA-Samples@master/EmptyState.svga')
SVGAWidget.asset('lib/assets/jojo_audio.svga') 

For more detail, please refer to the SVGA widget definition

About

Flutter SVGA player implemented by Texture widget and support sound playing feature on Flutter side

License:Other


Languages

Language:Kotlin 48.1%Language:Java 35.0%Language:Dart 11.6%Language:Shell 3.3%Language:Objective-C 1.2%Language:Ruby 0.8%