hideable_widget 1.0.3 copy "hideable_widget: ^1.0.3" to clipboard
hideable_widget: ^1.0.3 copied to clipboard

Hideable Widget package helps to make any static widget hideable while scrolling.

Hideable Widget #

First, create a scroll controller.

final scrollController = ScrollController();
copied to clipboard

Immediately afterwards, give this scroll controller to your scrollable widget.

ListView(
    controller: scrollController,
    physics: const ClampingScrollPhysics(),
    children: [
        ...List.generate(
        50,
        (index) => ListTile(
            title: Text("List item ${index + 1}"),
        ),
        ).toList(),
        const SizedBox(height: 100),
    ],
),
copied to clipboard

After wrapping your static widget with the hideable widget, give the hideable widget this scroll controller.

HideableWidget(
    scrollController: scrollController,
    child: BottomAppBar(...)
),
copied to clipboard

That's all. Now you are ready to use the hideable widget.

Parameters are as follows. ☺️

  • child: This is the static widget you want to hide while scrolling.

  • scrollController: It should be the same as the scroll controller supplied with your scrollable widget.

  • useOpacity: Used to turn the opacity animation on and off. It is on by default.

  • duration: Use this to set the hiding time.

  • opacityDuration: Use this to set the opacity duration that runs during the hiding period.

4
likes
160
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.06 - 2025.01.18

Hideable Widget package helps to make any static widget hideable while scrolling.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hideable_widget