https://github.com/cretezy/flutter_fadein
Simple Flutter widget to fade-in your widgets once they are mounted
https://github.com/cretezy/flutter_fadein
fadein flutter
Last synced: 12 months ago
JSON representation
Simple Flutter widget to fade-in your widgets once they are mounted
- Host: GitHub
- URL: https://github.com/cretezy/flutter_fadein
- Owner: Cretezy
- License: mit
- Created: 2019-05-12T22:06:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T03:39:28.000Z (over 1 year ago)
- Last Synced: 2025-04-15T06:47:05.540Z (about 1 year ago)
- Topics: fadein, flutter
- Language: Dart
- Size: 56.6 KB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter Fade-In [](https://pub.dartlang.org/packages/flutter_fadein)
Simple Flutter widget to fade-in your widgets once they are mounted.
Supports Material & Cupertino widgets.
Required Dart >=2.12 (has null-safety support).
[Pub](https://pub.dartlang.org/packages/flutter_fadein) - [API Docs](https://pub.dartlang.org/documentation/flutter_fadein/latest/) - [GitHub](https://github.com/Cretezy/flutter_fadein)
## Install
Add this as a dependency in your `pubspec.yaml`:
```yaml
dependencies:
flutter_fadein: ^2.0.0
```
## Usage
```dart
import 'package:flutter_fadein/flutter_fadein.dart';
FadeIn(
child: Text("This will be faded-in!"),
// Optional paramaters
duration: Duration(milliseconds: 250),
delay: Duration(milliseconds: 250)
curve: Curves.easeIn,
)
```
### With Controller
If you need more control over the animation timing, you can use `FadeInController`:
```dart
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)`.
Note that the `delay` parameter does not work while using a controller, and will therefore raise an exception.