crcanimation 0.0.3 copy "crcanimation: ^0.0.3" to clipboard
crcanimation: ^0.0.3 copied to clipboard

A Flutter package for CRC animation. Subscribe to Code Red Clan!

example/lib/main.dart

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

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

// Calling My App
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'CRC Animation',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.green),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'CRC Animation Example'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            CRCAnimation.applyAnimation(
                child: const Text(
                  'Youtube: Code Red Clan',
                ),
                type: AnimationType.bounce,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.amber,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.fadeIn,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.greenAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.flip,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.pinkAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.grow,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.orange,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.rotate,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.blueAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.scale,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.tealAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.slideIn,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.cyanAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.slideAndFade,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
            CRCAnimation.applyAnimation(
                child: Container(
                  decoration: BoxDecoration(
                      color: Colors.lightBlueAccent,
                      borderRadius: BorderRadius.circular(12)),
                  child: const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      'Youtube: Code Red Clan',
                    ),
                  ),
                ),
                type: AnimationType.easeQuint,
                context: context,
                //Duration is optional
                duration: const Duration(seconds: 1)),
          ],
        ),
      ),
    );
  }
}
8
likes
160
pub points
40%
popularity

Publisher

unverified uploader

A Flutter package for CRC animation. Subscribe to Code Red Clan!

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on crcanimation