animated method

Niku animated({
  1. required Widget builder(
    1. BuildContext context,
    2. Widget child
    ),
  2. required AnimationController animation,
})

Wrap widget in animated builder

Example usage

Niku()
  .animatedBuilder(
    animation: animation,
    builder: (context, child) => Container(
      child: child,
      margin: EdgeInsets.all(animation.value)
    )
  })
  .build()

Implementation

Niku animated({
  required Widget Function(BuildContext context, Widget child) builder,
  required AnimationController animation,
}) =>
    Niku(
      AnimatedBuilder(
        animation: animation,
        builder: (context, child) {
          return builder(context, this._widget);
        },
        child: this._widget,
      ),
    );