{"id":13465592,"url":"https://github.com/Dn-a/flutter_inner_drawer","last_synced_at":"2025-03-25T16:32:38.677Z","repository":{"id":34137569,"uuid":"170314171","full_name":"Dn-a/flutter_inner_drawer","owner":"Dn-a","description":"Inner Drawer is an easy way to create an internal side section (left/right) where you can insert a list-menu or other.","archived":false,"fork":false,"pushed_at":"2024-07-10T13:36:02.000Z","size":45702,"stargazers_count":511,"open_issues_count":39,"forks_count":127,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-07-31T15:01:36.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/flutter_inner_drawer","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dn-a.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-12T12:27:49.000Z","updated_at":"2024-07-17T05:28:26.000Z","dependencies_parsed_at":"2024-01-05T21:04:15.342Z","dependency_job_id":null,"html_url":"https://github.com/Dn-a/flutter_inner_drawer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dn-a%2Fflutter_inner_drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dn-a%2Fflutter_inner_drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dn-a%2Fflutter_inner_drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dn-a%2Fflutter_inner_drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dn-a","download_url":"https://codeload.github.com/Dn-a/flutter_inner_drawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222088588,"owners_count":16928983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:00:32.302Z","updated_at":"2025-03-25T16:32:38.670Z","avatar_url":"https://github.com/Dn-a.png","language":"Dart","readme":"# flutter_inner_drawer\n[![pub package](https://img.shields.io/badge/pub-1.0.0+1-orange.svg)](https://pub.dartlang.org/packages/flutter_inner_drawer)\n[![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true\u0026style=flat-square)](https://github.com/Solido/awesome-flutter#drawers)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/dnag88)\n\n\nInner Drawer is an easy way to create an internal side section (left/right) where you can insert a list menu or other.\n\n## Installing\nAdd this to your package's pubspec.yaml file:\n```dart\ndependencies:\n  flutter_inner_drawer: \"^1.0.0+1\"\n```\n## Demo\n\u003cdiv align=\"center\"\u003e\n  \u003ctable\u003e\u003ctr\u003e\n \u003ctd style=\"text-align:center\"\u003e\n  \u003cimg width=\"250px\"  src=\"https://github.com/Dn-a/flutter_inner_drawer/raw/master/assets/img/example5.1.gif?\" /\u003e\n \u003c/td\u003e\n \u003ctd style=\"text-align:center\"\u003e\n   \u003cimg width=\"250px\"  src=\"https://github.com/Dn-a/flutter_inner_drawer/raw/master/assets/img/example5.3.gif?\" /\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\u003c/table\u003e\n\u003c/div\u003e\n\n\n### Simple usage\n```dart\nimport 'package:flutter_inner_drawer/inner_drawer.dart';\n.\n.\n.\n   \n    @override\n    Widget build(BuildContext context)\n    {\n        return InnerDrawer(\n            key: _innerDrawerKey,\n            onTapClose: true, // default false\n            swipe: true, // default true            \n            colorTransitionChild: Color.red, // default Color.black54\n            colorTransitionScaffold: Color.black54, // default Color.black54\n            \n            //When setting the vertical offset, be sure to use only top or bottom\n            offset: IDOffset.only(bottom: 0.05, right: 0.0, left: 0.0),\n            \n            scale: IDOffset.horizontal( 0.8 ), // set the offset in both directions\n            \n            proportionalChildArea : true, // default true\n            borderRadius: 50, // default 0\n            leftAnimationType: InnerDrawerAnimation.static, // default static\n            rightAnimationType: InnerDrawerAnimation.quadratic,\n            backgroundDecoration: BoxDecoration(color: Colors.red ), // default  Theme.of(context).backgroundColor\n            \n            //when a pointer that is in contact with the screen and moves to the right or left            \n            onDragUpdate: (double val, InnerDrawerDirection direction) {\n                // return values between 1 and 0\n                print(val);\n                // check if the swipe is to the right or to the left\n                print(direction==InnerDrawerDirection.start);\n            },\n            \n            innerDrawerCallback: (a) =\u003e print(a), // return  true (open) or false (close)\n            leftChild: Container(), // required if rightChild is not set\n            rightChild: Container(), // required if leftChild is not set\n            \n            //  A Scaffold is generally used but you are free to use other widgets\n            // Note: use \"automaticallyImplyLeading: false\" if you do not personalize \"leading\" of Bar\n            scaffold: Scaffold(\n                appBar: AppBar(\n                    automaticallyImplyLeading: false\n                ),\n            ) \n            /* OR\n            CupertinoPageScaffold(                \n                navigationBar: CupertinoNavigationBar(\n                    automaticallyImplyLeading: false\n                ),\n            ), \n            */\n        )\n    }\n    \n    //  Current State of InnerDrawerState\n    final GlobalKey\u003cInnerDrawerState\u003e _innerDrawerKey = GlobalKey\u003cInnerDrawerState\u003e();    \n\n    void _toggle()\n    {\n       _innerDrawerKey.currentState.toggle(\n       // direction is optional \n       // if not set, the last direction will be used\n       //InnerDrawerDirection.start OR InnerDrawerDirection.end                        \n        direction: InnerDrawerDirection.end \n       );\n    }\n    \n```\n\n### InnerDrawer Parameters\n|PropName|Description|default value|\n|:-------|:----------|:------------|\n|`scaffold`|*A Scaffold is generally used but you are free to use other widgets*|required|\n|`leftChild`|*Inner Widget*|required if rightChild is not set|\n|`rightChild`|*Inner Widget*|required if leftChild is not set|\n|`leftOffset(deprecated)`|*Offset drawer width*|0.4|\n|`rightOffset(deprecated)`|*Offset drawer width*|0.4|\n|`leftScale(deprecated)`|*Left scaffold scaling*|1|\n|`rightScale(deprecated)`|*Right scaffold scaling*|1|\n|`offset`|*Offset InnerDrawer width*|IDOffset.horizontal(0.4)|\n|`scale`|*Scaffold scaling*|IDOffset.horizontal(1)|\n|`proportionalChildArea`|*If true, dynamically sets the width based on the selected offset, otherwise it leaves the width at 100% of the screen.*|true|\n|`borderRadius`|*For scaffold border*|0|\n|`onTapClose`|*Tap on the Scaffold closes it*|false|\n|`swipe`|*activate or deactivate the swipe*|true|\n|`swipeChild`|*activate or deactivate the swipeChild*|false|\n|`duration`|*Animation Controller duration*|Duration(milliseconds: 246)|\n|`velocity`|*Allows you to set the opening and closing velocity when using the open/close methods*|1|\n|`tapScaffoldEnabled`|*Possibility to tap the scaffold even when open*|false|\n|`boxShadow`|*BoxShadow of scaffold opened*|[BoxShadow(color: Colors.black.withOpacity(0.5),blurRadius: 5)]|\n|`colorTransitionChild`|*Change background color while swiping*|Colors.black54|\n`colorTransitionScaffold`|*Change background color while swiping*|Colors.black54|\n|`leftAnimationType`|*static / linear / quadratic*|static|\n|`rightAnimationType`|*static / linear / quadratic*|static|\n|`backgroundDecoration`|*possibility to manage the main background Decoration*|BoxDecoration(color: Theme.of(context).backgroundColor)|\n|`innerDrawerCallback`|*Optional callback that is called when a InnerDrawer is opened or closed*||\n|`onDragUpdate`|*When a pointer that is in contact with the screen and moves to the right or left*||\n|`_innerDrawerKey.currentState.open`|*Current State of GlobalKey\u003cInnerDrawerState\u003e(check example) - OPEN*||\n|`_innerDrawerKey.currentState.close`|*Current State of GlobalKey\u003cInnerDrawerState\u003e(check example) - CLOSE*||\n|`_innerDrawerKey.currentState.toggle`|*Current State of GlobalKey\u003cInnerDrawerState\u003e(check example) - OPEN or CLOSE*||\n\n## Donate\nIt takes time to carry on this project. If you found it useful or learned something from the source code please consider the idea of donating 5, 20, 50 € or whatever you can to support the project. \n- [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/dnag88)\n\n## Issues\nIf you encounter problems, open an issue. Pull request are also welcome.\n","funding_links":["https://www.paypal.me/dnag88"],"categories":["Components","组件","UI [🔝](#readme)","Packages","Dart"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDn-a%2Fflutter_inner_drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDn-a%2Fflutter_inner_drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDn-a%2Fflutter_inner_drawer/lists"}