animated_headline 1.1.1 copy "animated_headline: ^1.1.1" to clipboard
animated_headline: ^1.1.1 copied to clipboard

outdated

A simple animated headline for your app. This package is a Flutter widget.

example/example.dart

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int _currentIndex = 0;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'AnimatedHeadline usage example',
      home: Scaffold(
        appBar: AppBar(
          /// Here is the [AnimatedHeadline] widget.
          /// You can use it like this (in an app bar) but you can use it also wherever you want!
          title: AnimatedHeadline(
            texts: ['School', 'Business'],
            colors: [Colors.blue, Colors.red],
            index: _currentIndex,
          ),
        ),
        bottomNavigationBar: BottomNavigationBar(
          currentIndex: _currentIndex,
          onTap: (index) => setState(() => _currentIndex = index),
          items: [
            BottomNavigationBarItem(
              icon: Icon(Icons.school),
              title: Text('School'),
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.business),
              title: Text('Business'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
40
points
53
downloads

Publisher

unverified uploader

Weekly Downloads

A simple animated headline for your app. This package is a Flutter widget.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on animated_headline