animated_headline 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • new60

Animated Headline #

A simple animated headline for your app.

Getting Started #

This project is a Flutter package. To learn more about how to develop a Flutter package read the documentation.

This package is in fact a Flutter widget. See the lib/example/example.dart file to have an example of a correct usage of it.

[0.0.1] - 2020-06-19 #

  • Implement the AnimatedHeadline

[1.0.0] - 2020-06-19 #

  • No changes have been made to the widget. However, modifications have been applied to the organization of the source code. In short: it's clearer!

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'),
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  animated_headline: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:animated_headline/animated_headline.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Jul 6, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [animated_headline] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test