{"id":13548091,"url":"https://github.com/DevsOnFlutter/draggable_home","last_synced_at":"2025-04-02T20:31:39.795Z","repository":{"id":44954429,"uuid":"366206993","full_name":"DevsOnFlutter/draggable_home","owner":"DevsOnFlutter","description":"A draggable Flutter widget that makes implementing a sliding up and fully-stretchable much easier.","archived":false,"fork":false,"pushed_at":"2023-11-29T08:21:25.000Z","size":3563,"stargazers_count":163,"open_issues_count":10,"forks_count":39,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-03T16:38:07.391Z","etag":null,"topics":["appbar","draggable","flutter","hacktoberfest","hacktoberfest2021","listview","scaffold","sliver","widget"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/draggable_home","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevsOnFlutter.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-11T00:04:55.000Z","updated_at":"2024-10-28T01:52:33.000Z","dependencies_parsed_at":"2024-01-16T18:02:17.508Z","dependency_job_id":"3cc33a8d-780f-47ff-ab07-4bb42bfff4ed","html_url":"https://github.com/DevsOnFlutter/draggable_home","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/DevsOnFlutter%2Fdraggable_home","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fdraggable_home/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fdraggable_home/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Fdraggable_home/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevsOnFlutter","download_url":"https://codeload.github.com/DevsOnFlutter/draggable_home/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246888092,"owners_count":20850196,"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":["appbar","draggable","flutter","hacktoberfest","hacktoberfest2021","listview","scaffold","sliver","widget"],"created_at":"2024-08-01T12:01:05.567Z","updated_at":"2025-04-02T20:31:34.786Z","avatar_url":"https://github.com/DevsOnFlutter.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Draggable Home\n\nA draggable Flutter widget that makes implementing a Sliding up and fully-stretchable much easier! Based on the Scaffold and Sliver.\n\n\u003cbr\u003e\n\u003cp\u003e\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.hackthedeveloper.recite\"\u003e\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/8rwRBWe.gif\"/\u003e\u003c/a\u003e\n\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/lAtgU0E.gif\"/\u003e\n\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/QS7y9OU.gif\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n## Usage\n\nMake sure to check out [examples](https://github.com/4-alok/draggable_home/blob/main/example/lib/main.dart) for more details.\n\n### Installation\n\nAdd the following line to `pubspec.yaml`:\n\n```yaml\ndependencies:\n  draggable_home: ^1.0.5\n```\n\n### Basic setup\n\n*The complete example is available [here](https://github.com/4-alok/draggable_home/blob/main/example/lib/main.dart).*\n\n**DraggableHome** requires you to provide `title`, `headerWidget` and `body`:\n* `title` widget is basically for a title in the AppBar. For no title in AppBar, simply pass an empty Container.\n* `headerWidget` is the expanded widget just above the body when not fully expanded.\n* `body` is in the form of Column which requires a list of widget or a widget. Do not add any vertically scrollable widget or you may just disable the scroll.\n```dart\n  physics: const NeverScrollableScrollPhysics()\n```\n\u003cbr\u003e\n\nSample code\n```dart\nDraggableHome(\n  title: Text(\"Title\"),\n  headerWidget: headerWidget(),\n  body: [\n    Container(...),\n    (...),\n  ]\n);\n```\n\n## Arguments\nThere are several options that allow for more control:\n\n|  Properties  |   Description   |\n|--------------|-----------------|\n| `leading` | A widget to display before the toolbar's title. |\n| `action` | A list of Widgets to display in a row after the title widget. |\n| `drawer` | Drawers are typically used with the Scaffold.drawer property. |\n| `centerTitle` | Allows toggling of title from the center. By default, title is in the center.|\n| `headerExpandedHeight` | Height of the header widget. The height is a double between 0.0 and 1.0. The default value of height is 0.35 and should be less than **stretchMaxHeight** |\n| `headerWidget` | A widget to display Header above the body. |\n|`alwaysShowLeadingAndAction`| This makes Leading and Action always visible. Default value is false. |\n|`headerBottomBar`| AppBar or toolBar like widget just above the body. | \n| `backgroundColor` | The color of the Material widget that underlies the entire DraggableHome body. |\n| `physics` | The physics property determines how the scroll view responds to user input, such as how it continues to animate after the user stops dragging the scroll view. |\n| `scrollController` | Used to control the position to which this scroll view is scrolled |\n| `curvedBodyRadius` | Creates a border top-left and top-right radius of body, Default radius of the body is 20.0. For no radius simply set the value to **0**.|\n| `fullyStretchable` | Allows toggling of fully expand draggability of the DraggableHome. Set this to true to allow the user to fully expand the header. |\n| `stretchTriggerOffset` | The offset of overscroll required to fully expand the header.|\n| `expandedBody` | A widget to display when fully expanded as header or expandedBody above the body. |\n| `stretchMaxHeight` | Height of the expandedBody widget. The height is a double between 0.0 and 0.95. The default value of height is 0.9 and should be greater than **headerExpandedHeight**  |\n| `bottomSheet` | A persistent bottom sheet shows information that supplements the primary content of the app. A persistent bottom sheet remains visible even when the user interacts with other parts of the app.|\n|`bottomNavigationBarHeight`| This is required when using custom height to adjust body height. This makes no effect on **bottomNavigationBar**.|\n|`bottomNavigationBar` | Snack bars slide from underneath the bottom navigation bar while bottom sheets are stacked on top. |\n| `floatingActionButton` | A floating action button is a circular icon button that hovers over content to promote a primary action in the application. |\n| `floatingActionButtonLocation` | An object that defines a position for the FloatingActionButton based on the Scaffold's ScaffoldPrelayoutGeometry.|\n| `floatingActionButtonAnimator` | Provider of animations to move the FloatingActionButton between FloatingActionButtonLocations. |\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## Sample code for ListView.builder\n\n```dart\nDraggableHome(\n  title: Text(\"Title\"),\n  headerWidget: headerWidget(),\n  body: [\n    Container(...),\n\n    // shrinkWrap true required for ListView.builder()\n    // disable the scroll for any vertically scrollable widget\n    // provide top padding 0 to fix extra space in listView\n    ListView.builder(\n      padding: EdgeInsets.only(top: 0),\n      physics: NeverScrollableScrollPhysics(),\n      shrinkWrap: true,\n      itemCount: list.length,\n      itemBuilder: (context, index) =\u003e Card(\n        child: ListTile(\n          title: Text(\"$index\"),\n        ),\n      ),\n    ),\n\n    (...),\n  ]\n);\n```\n\u003cbr\u003e\n\n\u003cbr\u003e\n\u003cp\u003e\n\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/q6lrXad.gif\"/\u003e\n\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/zdv0jS6.png\"/\u003e\n\u003cimg width=\"205px\" alt=\"Example\" src=\"https://imgur.com/m0MXP2P.png\"/\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\n## Show some :heart: and :star: the repo\n\n[![GitHub followers](https://img.shields.io/github/followers/4-alok?style=social)](https://github.com/4-alok/)\n[![GitHub followers](https://img.shields.io/github/stars/4-alok/draggable_home?style=social)](https://github.com/4-alok/)\n\n## Contributions\n\nContributions are welcome!\n\nIf you feel that a hook is missing, feel free to open a Pull Request.\n\nFor a custom hook to be merged, you will need to do the following:\n\n- Describe the use case.\n\n-  Open an issue explaining why we need this hook, how to use it, ...\n  This is important as a hook will not get merged if the hook doesn't appeal to\n  a large number of people.\n\n-  If your hook is rejected, don't worry! A rejection doesn't mean that it won't\n  be merged later in the future if more people show an interest in it.\n  In the meantime, feel free to publish your hook as a package on https://pub.dev.\n\n-  A hook will not be merged unless fully tested, to avoid breaking it inadvertently\n  in the future.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevsOnFlutter%2Fdraggable_home","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevsOnFlutter%2Fdraggable_home","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevsOnFlutter%2Fdraggable_home/lists"}