flutter_adaptive_drawer (0.0.1)

Published 2025-02-13 19:46:44 +01:00 by freek

Installation

dart pub add flutter_adaptive_drawer:0.0.1 --hosted-url=

About this package

A new Flutter package project.

style: effective dart

Adaptive drawer package, uses a collapsable menu on bigger screens and the default drawer on smaller screens.

Setup

Add the package to the pubspec:

flutter_adaptive_drawer: ^LATEST_VERSION

How to use

AdaptiveDrawerScaffold(
    scaffoldBuilder: (
        context, {
        required child,
        required drawer,
        required isSmallScreen,
    }) =>
        Scaffold(
            drawer: drawer,
            appBar: isSmallScreen ? AppBar() : null,
            body: child,
        ),
        drawer: AdaptiveDrawer(
        mainChildren: [],
    ),
    child: const Placeholder(),
);

Use approach above for the easiest version, this ensures [AdaptiveDrawerService] is injected into the widget tree. [AdaptiveDrawer] can be used without [AdaptiveDrawerScaffold], make sure to place the [AdaptiveDrawerService] inherited widget somewhere in your tree.

Issues

Please file any issues, bugs or feature request as an issue on our GitHub page. Commercial support is available if you need help with integration with your app or services. You can contact us at support@iconica.nl.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author

This flutter_adaptive_drawer for Flutter is developed by Iconica. You can contact us at support@iconica.nl

Details
Pub
2025-02-13 19:46:44 +01:00
3
9.1 KiB
Assets (1)
0.0.1.tar.gz 9.1 KiB
Versions (1) View all
0.0.1 2025-02-13