cool_animation_flutter 0.0.4 copy "cool_animation_flutter: ^0.0.4" to clipboard
cool_animation_flutter: ^0.0.4 copied to clipboard

A Flutter package for easy and concise animations. Supports direction, delay, sequential animations, and visibility-based triggers.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'slide_fade_in_demo.dart';
import 'scale_bounce_demo.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Cool Animation Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
        useMaterial3: true,
      ),
      home: const MainDemoPager(),
    );
  }
}

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

  @override
  State<MainDemoPager> createState() => _MainDemoPagerState();
}

class _MainDemoPagerState extends State<MainDemoPager> {
  int _currentIndex = 0;
  final List<Widget> _demos = [
    const SlideFadeInDemo(),
    const ScaleBounceDemo(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: _demos[_currentIndex],
      bottomNavigationBar: NavigationBar(
        selectedIndex: _currentIndex,
        onDestinationSelected: (index) {
          setState(() {
            _currentIndex = index;
          });
        },
        destinations: const [
          NavigationDestination(
            icon: Icon(Icons.swipe),
            label: 'SlideFadeIn',
          ),
          NavigationDestination(
            icon: Icon(Icons.zoom_in),
            label: 'ScaleBounce',
          ),
        ],
      ),
    );
  }
}
4
likes
160
points
393
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for easy and concise animations. Supports direction, delay, sequential animations, and visibility-based triggers.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, visibility_detector

More

Packages that depend on cool_animation_flutter