get_hooks 0.0.1 copy "get_hooks: ^0.0.1" to clipboard
get_hooks: ^0.0.1 copied to clipboard

A new GetView widget but with flutter_hooks

get_hooks #

Get Hooks is a simple package that adds a widget definition for a version of the GetView widget but with the capabilities of a HookWidget.

class AnimatedHookWidget extends GetHookView<HomeController> {
  const AnimatedHookWidget({super.key});

  @override
  Widget build(BuildContext context) {
    final animationController = useAnimationController(
      duration: const Duration(seconds: 5),
    );

    final animation = useAnimation(animationController);

    animationController.repeat(min: 0, max: 1);

    return Transform.rotate(
      angle: pi * animation * 2,
      child: const FlutterLogo(
        size: 100,
      ),
    );
  }
}
2
likes
120
pub points
0%
popularity

Publisher

verified publisherdanjoemybro.dev

A new GetView widget but with flutter_hooks

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_hooks, get

More

Packages that depend on get_hooks