rive_animated_icon 2.0.5 copy "rive_animated_icon: ^2.0.5" to clipboard
rive_animated_icon: ^2.0.5 copied to clipboard

This package provides rive animated icons that can be customized to suit your preference.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:rive_animated_icon/rive_animated_icon.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Rive Animated Icons',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    super.key,
  });

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: SafeArea(
          child: SingleChildScrollView(
        child: Center(
          child: Wrap(
              alignment: WrapAlignment.start,
              children: RiveIcon.values
                  .map((RiveIcon e) => Padding(
                        padding: const EdgeInsets.all(5.0),
                        child: Column(
                          children: [
                            const SizedBox(
                              height: 10,
                            ),
                            RiveAnimatedIcon(
                              riveIcon: e,
                              width: 40,
                              height: 40,
                              strokeWidth: 3,
                              loopAnimation: false,
                              onTap: () {
                                debugPrint('tapped');
                              },
                              onHover: (value) {
                                debugPrint('value is $value');
                              },
                              color: Colors.green,
                            ),
                          ],
                        ),
                      ))
                  .toList()),
        ),
      )),
    );
  }
}
236
likes
150
points
1.21k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

This package provides rive animated icons that can be customized to suit your preference.

Repository (GitHub)
View/report issues
Contributing

Topics

#icons #animation

License

MIT (license)

Dependencies

flutter, rive

More

Packages that depend on rive_animated_icon