auto_animated 2.1.0

Flutter Android iOS web

Widgets starting auto play animation when mounted. It is already possible to animate the list and icons.

example/lib/main.dart

import 'package:auto_animated_example/screens/animate_if_visible.dart';
import 'package:auto_animated_example/screens/grid.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:auto_animated_example/screens/icon_button.dart';
import 'package:auto_animated_example/screens/list.dart';
import 'package:auto_animated_example/screens/sliver.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  MyApp({Key key}) : super(key: key) {
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      statusBarBrightness: Brightness.light,
      statusBarIconBrightness: Brightness.dark,
      systemNavigationBarColor: Colors.white,
      systemNavigationBarIconBrightness: Brightness.dark,
    ));
  }

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int _selectedIndex = 0;
  final List<Widget> _children = [
    LiveListExample(),
    LiveGridExample(),
    SliverExample(),
    AnimateIfVisibleExample(),
    LiveIconButtonExample(),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) => MaterialApp(
        theme: ThemeData(
          backgroundColor: Colors.grey[100],
          scaffoldBackgroundColor: Colors.grey[200],
        ),
        home: Scaffold(
          body: _children[_selectedIndex],
          bottomNavigationBar: BottomNavigationBar(
            selectedItemColor: Colors.blue,
            unselectedItemColor: Colors.grey,
            backgroundColor: Colors.white,
            items: const <BottomNavigationBarItem>[
              BottomNavigationBarItem(
                icon: Icon(Icons.list),
                backgroundColor: Colors.white,
                title: Text('List'),
              ),
              BottomNavigationBarItem(
                icon: Icon(Icons.grid_on),
                backgroundColor: Colors.white,
                title: Text('Grid'),
              ),
              BottomNavigationBarItem(
                icon: Icon(Icons.view_day),
                backgroundColor: Colors.white,
                title: Text('Sliver'),
              ),
              BottomNavigationBarItem(
                icon: Icon(Icons.remove_red_eye),
                backgroundColor: Colors.white,
                title: Text('On visibility'),
              ),
              BottomNavigationBarItem(
                icon: Icon(Icons.check_circle),
                backgroundColor: Colors.white,
                title: Text('IconButton'),
              ),
            ],
            currentIndex: _selectedIndex,
            // selectedItemColor: Colors.amber[800],
            onTap: _onItemTapped,
          ),
        ),
      );
}
136
likes
110
pub points
91%
popularity

Publisher

serge.software

Widgets starting auto play animation when mounted. It is already possible to animate the list and icons.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, visibility_detector

More

Packages that depend on auto_animated