widget_fader

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

widget fader

widget_fader #
Cross-fades widgets in both directions.
Supports:

Infinite cross-fading in both directions
Swipe to fade
Fading via the functions next() and previous()

Example #

Installation #
Add widget_fader: ^0.1.0 in your pubspec.yaml dependencies. And import it:
import 'package:widget_fader/widget_fader.dart';
copied to clipboard
How to use #
List<Widget> _buildWidgetFaderChildren() {
var assetPath = "assets/widgetFader";

return List.generate(
3,
(i) => Container(
child: Image.asset(
assetPath + i.toString() + ".jpg",
fit: BoxFit.cover,
),
)
);
}

WidgetFader _buildWidgetFader() => WidgetFader(
children: _buildWidgetFaderChildren(),
fadeDuration: 750,
pauseDuration: 750,
cover: Column(
children: <Widget>[
Expanded(child: Container()),
Container(
height: 150,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/widgetFaderCover.jpg"),
fit: BoxFit.cover
)
),
)
],
),
);
copied to clipboard
Future functionality #

Got any ideas? Make a feature request at the repo or contact me.
Rotation
Scaling

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.