Last updated:
0 purchases
flutter fader
flutter_fader #
A widget for Flutter that allows you to fade in and out a child widget.
When a widget is faded out it is no longer in the view tree. Meaning that it can't be used or interacted with. Handy for hiding buttons.
Getting started #
In your Flutter project, add the package to your dependencies
dependencies:
...
flutter_fader: ^2.0.0
copied to clipboard
Usage example #
Examples of how to use the widget, and that can also be ran on your device, can be found in the example directory
Import the fader package
import 'package:flutter_fader/flutter_fader.dart';
copied to clipboard
Create a fader controller, this allows you to control when the Fader fades in or out
FaderController faderController = new FaderController();
copied to clipboard
Create a fader widget, and pass it the fader controller
Fader(
controller: faderController,
duration: const Duration(milliseconds: 50),
child: Text("Hello, world!"),
)
copied to clipboard
Now you can fade the child widget in and out at will
faderController.fadeOut();
faderController.fadeIn();
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.