flutter_fadein 1.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 91

Flutter Fade-In pub package #

Simple Flutter widget to fade-in your widgets once they are mounted.

Supports Material & Cupertino widgets.

Pub - API Docs - GitHub

Install #

Add this as a dependency in your pubspec.yaml:

dependencies:
  flutter_fadein: ^1.1.1

Usage #

import 'package:flutter_fadein/flutter_fadein.dart';

FadeIn(
  child: Text("This will be faded-in!"),
  // Optional paramaters
  duration: Duration(milliseconds: 250),
  curve: Curves.easeIn,
)

With Controller #

If you need more control over the animation timing, you can use FadeInController:

final controller = FadeInController();

// ...

FadeIn(
  child: Text("This will be faded-in with a controller"),
  controller: controller,
)

// ...

controller.fadeIn();
controller.fadeOut();

Using a controller with not automatically start. You can make it automatically start using FadeInController(autoStart: true).

1.1.1 - 2019-06-18 #

  • Forgot to bump README version

1.1.0 - 2019-06-18 #

  • Add FadeInController
  • Add instance actions

1.0.1 - 2019-05-12 #

  • Update README with links, badge, and import
  • Fix example location

1.0.0 - 2019-05-12 #

  • Initial release.

example/lib/main.dart

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

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

class FadeInDemo extends StatefulWidget {
  @override
  _FadeInDemoState createState() => _FadeInDemoState();
}

class _FadeInDemoState extends State<FadeInDemo> {
  final _controller = FadeInController();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ListView(
          padding: const EdgeInsets.all(64),
          children: <Widget>[
            FadeIn(
              child: Text(
                "This will be faded-in!",
                textAlign: TextAlign.center,
              ),
            ),
            SizedBox(height: 32),
            FadeIn(
              child: Text(
                "This will be faded-in slowly!",
                textAlign: TextAlign.center,
              ),
              duration: Duration(seconds: 2),
            ),
            SizedBox(height: 32),
            FadeIn(
              controller: _controller,
              child: Text(
                "This will be faded-in with a controller!",
                textAlign: TextAlign.center,
              ),
              duration: Duration(milliseconds: 500),
            ),
            SizedBox(height: 8),
            FlatButton(
              child: Text("Fade-In"),
              onPressed: () => _controller.fadeIn(),
            ),
            FlatButton(
              child: Text("Fade-Out"),
              onPressed: () => _controller.fadeOut(),
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_fadein: ^1.1.1

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:flutter_fadein/flutter_fadein.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
96
Overall:
Weighted score of the above. [more]
91
Learn more about scoring.

We analyzed this package on Jul 2, 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 [flutter_fadein] that is in a package requiring null.

Maintenance suggestions

Package is getting outdated. (-3.84 points)

The package was last published 54 weeks ago.

Dependencies

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