Flutter package for displaying and animating Scalable Vector Graphics 1.1 files. The package has been written solely in Dart Language.

Overview

Animated SVG | Flutter Package

Flutter package for displaying and animating Scalable Vector Graphics 1.1 files. The package has been written solely in Dart Language.

 

animated_svg_gif_1 animated_svg_gif_2

 

Features

A powerful and fully customizable widget. With this package, you can easily animate SVGs and make your UI look more lovely.

AnimatedSvg widget creates a smooth transition between the two SVGs you are going to assign.

 

   

 

Getting started

Let's take a look at how to implement AnimatedSvg to fastly create cool transition animation between SVGs.

First, add the following line to pubspec.yaml:

animated_svg: ^1.0.0

Second, import AnimatedSvg:

import 'package:animated_svg/animated_svg.dart';
import 'package:animated_svg/animated_svg_controller.dart';

Usage

Basic usage example:

main.dart

// Define an SvgController
late final SvgController _controller;

@override
void initState() {
    // Initialize SvgController
    _controller = AnimatedSvgController();
    super.initState();
}

@override
void dispose() {
    // Dispose SvgController
    _controller.dispose();
    super.dispose();
}

@override
Widget build(BuildContext context) {
    // Call the AnimatedSvg widget anywhere in your widget tree.
    return AnimatedSvg(
        controller: _controller,
        duration: const Duration(milliseconds: 600),
        onTap: () {},
        size: 80,
        clockwise: false,
        isActive: true,
        children: [
            SvgPicture.asset(
                'assets/play.svg',
            ),
            SvgPicture.asset(
                'assets/pause.svg',
            ),
        ],
    );
}

 

Example

More examples can be found in /example folder on GitHub.

Media Player - an example of basic implementation of AnimatedSvg. Simple project that simulates a media player. As usual, the player needs play and pause buttons. Thanks to the AnimatedSvg package, it is so easy to create a smooth transition between play and pause SVGs.

 

Additional information

This package has been written solely in Dart Language yet it has the flutter_svg as a dependency.

For more information please visit GitHub.

 

Feature requests and bugs

Please file feature requests and bugs at the issue tracker.

 

Maintainers

You might also like...

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.

supabase_flutter Flutter package for Supabase. What is Supabase Supabase is an open source Firebase alternative. We are a service to: listen to databa

Jan 7, 2023

Flutter mapbox - This Flutter plugin allows to show embedded interactive and customizable vector maps inside a Flutter widget

Flutter mapbox - This Flutter plugin allows to show embedded interactive and customizable vector maps inside a Flutter widget

Flutter Mapbox GL Please note that this project is community driven and is not a

Jan 31, 2022

Tool made in Dart that allows you to dynamically generate JSON files from data models written in Dart.

Dart JSON Generator Versión v1.1.1 Dart JSON Generator es una herramienta que permite generar archivos JSON a partir de mapas como modelos de datos en

Nov 23, 2022

Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Dec 4, 2022

Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Flutter Tutorial - Upload Files To Firebase Storage Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your devic

Dec 28, 2022

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

FIDL(Flutter Interface Definition Language) is a language for transfer objects cross platforms.

Flutter Interface Definition Language (FIDL) README in English(TODO) FIDL 即 Flutter 接口定义语言,类似于AIDL(Android Interface Definition Language)。您可以利用它定义不同平台

Dec 7, 2022

Eflashcard - Ready to learn a new language? Try this flashcards app that will help you learn the different writing systems of each language

Eflashcard - Ready to learn a new language? Try this flashcards app that will help you learn the different writing systems of each language

Language Flashcards Mobile App Ready to learn a new language? Try this mobile fl

Jan 8, 2022

Flutter template project - Simple ToDo app with scalable project structure.

Flutter template project - Simple ToDo app with scalable project structure.

Flutter Template Flutter template project - A simple TODO list app. This template provides simple UI and scalable project structure that goes beyond t

Nov 21, 2022

A modular app architecture that can be scalable as the time passes

A modular app architecture that can be scalable as the time passes

A modular app architecture that can be scalable as the time passes. I will be using the BLoC state-management package.

Dec 25, 2022
Comments
  • Improve FileMappingLoadShellcode. Remove disgraceful PAGE_EXECUTE_READWRITE in CreateFileMapping.

    Improve FileMappingLoadShellcode. Remove disgraceful PAGE_EXECUTE_READWRITE in CreateFileMapping.

    Ideally, after private namespacing, FileMappingLoadShellcode should do things in the following way (for stealth):

    1. CreateFileMapping with read & write permissions;
    2. MapViewOfFile with FILE_MAP_WRITE permissions;
    3. RtlMoveMemory our shellcode to that mapped file;
    4. UnmapViewOfFile our mapped file;
    5. MapViewOfFile with FILE_MAP_EXECUTE permissions;
    6. CreateThread with LPTHREAD_START_ROUTINE of our mapped file.

    However, I am not sure if that is possible, tried with no success.

    enhancement help wanted good first issue question 
    opened by cr7pt0pl4gu3 0
Owner
Bulent Baris Kilic
Dentist | Software Developer
Bulent Baris Kilic
A colorful TabBar Flutter library with color animating indicator where each tab has a color. (inspired by SmartNews app)

Flutter Colorful TabBar A colorful TabBar for Flutter where each tab has a color (inspired by SmartNews app). Getting Started Add this to your package

null 8 Jun 17, 2022
Hyakunin Isshu 1 Jan 11, 2022
This application displays the characters of the series Breaking Bad, has been used Cubit state and API .

breaking_bad A new Flutter project using bloc. Getting Started This project is a starting point for bloc state_management. A few resources to get you

null 1 Dec 24, 2021
Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed

Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed, i.e. after the first frame has been displayed. Maintainer: @slightfoot

Flutter Community 432 Jan 3, 2023
This is a set of small projects focused solely on the development of the graphical interface with Flutter

My Flutter Projects Flutter apps with cool design and animations Social Media Youtube Facebook Twitter Getting Started This project is a starting poin

Kevin Melendez 500 Dec 19, 2022
A simple sprite format for building 1bit styled graphics.

Mini Sprite Mini sprite is a simple, matrix based format for creating 1bit styled graphics. Project structure Mini Sprite is composed of several proje

Blue Fire 16 Dec 15, 2022
Flutter language pickers2 - Language pickers package for Dart and Flutter

language_pickers2 Notes: Original repository from github.com/gomgom, unfortunate

Charles Dyason 0 Feb 6, 2022
A vector math package for 2D and 3D applications

Introduction A Vector math library for 2D and 3D applications. Features 2D, 3D, and 4D vector and matrix types. Quaternion type for animating rotation

Google 261 Dec 21, 2022
Dartness is a progressive dart framework for building efficient and scalable server-side applications

Dartness is a framework for building efficient, scalable dart server-side applications. It provides an easy and quick way to develop modern standalone server.

Ricardo Romero 33 Dec 12, 2022
🦜 Parrot - A progressive Dart framework for building efficient, reliable and scalable server-side applications.

?? Parrot A progressive Dart framework for building efficient, reliable and scalable server-side applications. What is Parrot? Parrot is a Dart framew

Odroe 8 Nov 11, 2022