forui_hooks 0.8.0 copy "forui_hooks: ^0.8.0" to clipboard
forui_hooks: ^0.8.0 copied to clipboard

Companion hooks for Forui, a set of beautifully designed, minimalistic widgets for desktop & touch devices.

Forui Hooks #

Forui provides first class integration with Flutter Hooks. All controllers are exposed as hooks in the companion forui_hooks package.

Installation #

From your Flutter project directory, run the following command to install flutter_hooks and forui_hooks.

flutter pub add flutter_hooks
flutter pub add forui_hooks

Usage #

To use Forui hooks in your Flutter app, import the forui_hooks package and initialize a hook inside a HookWidget.

import 'package:flutter/widgets.dart';
import 'package:flutter_hooks/flutter_hooks.dart';

import 'package:forui/forui.dart';
import 'package:forui_hooks/forui_hooks.dart';

class Example extends HookWidget {
  @override
  Widget build(BuildContext context) {
    final controller = useFAccordionController();
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        FAccordion(
          controller: controller,
          items: [
            FAccordionItem(
              title: const Text('Is it accessible?'),
              child: const Text('Yes. It adheres to the WAI-ARIA design pattern.'),
            ),
            FAccordionItem(
              initiallyExpanded: true,
              title: const Text('Is it Styled?'),
              child: const Text("Yes. It comes with default styles that matches the other components' aesthetics"),
            ),
            FAccordionItem(
              title: const Text('Is it Animated?'),
              child: const Text('Yes. It is animated by default, but you can disable it if you prefer'),
            ),
          ],
        ),
      ],
    );
  }
}

Documentation #

Visit forui.dev/docs to view the documentation.

Contributing #

Please read the contributing guide.

License #

Licensed under the MIT License.

0
likes
140
points
160
downloads

Publisher

verified publisherforuslabs.com

Weekly Downloads

Companion hooks for Forui, a set of beautifully designed, minimalistic widgets for desktop & touch devices.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, flutter_hooks, forui

More

Packages that depend on forui_hooks