[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9369":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},9369,"sliding_up_panel","akshathjain\u002Fsliding_up_panel","akshathjain","A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!","https:\u002F\u002Fpub.dartlang.org\u002Fpackages\u002Fsliding_up_panel",null,"Dart",1396,384,20,149,0,55.76,"Other",false,"master",true,[23,24,25],"dart","flutter","plugin","2026-06-12 04:00:44","# sliding_up_panel\n[![pub package](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fsliding_up_panel.svg)](https:\u002F\u002Fpub.dartlang.org\u002Fpackages\u002Fsliding_up_panel)\n[![GitHub Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fakshathjain\u002Fsliding_up_panel.svg?logo=github)](https:\u002F\u002Fgithub.com\u002Fakshathjain\u002Fsliding_up_panel)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-android%20|%20ios-green.svg)](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-Android%20%7C%20iOS-green.svg)\n\nA draggable Flutter widget that makes implementing a SlidingUpPanel much easier! Based on the Material Design bottom sheet component, this widget works on both Android & iOS.\n\n\u003Cp>\n  \u003Cimg width=\"205px\" alt=\"Example\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fexample.gif\"\u002F>\n  \u003Cimg width=\"220px\" alt=\"Example App Closed\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fexampleclosed.png\"\u002F>\n  \u003Cimg width=\"220px\" alt=\"Example App Open\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fexampleopen.png\" \u002F>\n\u003C\u002Fp>\n\n\u003Cbr>\n\n## Installing\nAdd the following to your `pubspec.yaml` file:\n```yaml\ndependencies:\n  sliding_up_panel: ^2.0.0+1\n```\nNote that `v1.0.0` introduced some breaking changes outlined [below](#breaking-changes).\n\n\u003Cbr>\n\n### Maintaining sliding_up_panel\nThank you everyone for the support surrounding this project! `sliding_up_panel` has grown far larger than I could have ever imagined, so parsing through all the feature requests and new issues has taken me more time than I'd like. If you're interested in helping maintain this project, please send me an email at arjain@andrew.cmu.edu. As a sidenote, I'll always try to make sure that this project is compatible with the latest version of Flutter.\n\n\u003Cbr>\n\n## Simple Usage\nThere are two ways which the `SlidingUpPanel` can easily be added to your project.\n1. Using the `SlidingUpPanel` as the root widget for the body (recommended).\n2. Nesting the `SlidingUpPanel`\n\n\u003Cbr>\n\n#### `SlidingUpPanel` as the Root (recommended)\nThis method is recommended as it allows for the least interference with the behavior of other UI elements. For example:\n```dart\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      panel: Center(\n        child: Text(\"This is the sliding Widget\"),\n      ),\n      body: Center(\n        child: Text(\"This is the Widget behind the sliding panel\"),\n      ),\n    ),\n  );\n}\n```\n\u003Cbr>\n\n#### Nesting the `SlidingUpPanel`\nThis method isn't recommended but can still be used. Only use this to avoid refactoring large chunks of code or to implement custom scrolling behavior. For example, the `SlidingUpPanel` can be nested inside of a `Stack` (note that there are many other possible implementations that vary on a case-by-case basis).\n```dart\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: Stack(\n      children: \u003CWidget>[\n        Center(child: Text(\"This is the Widget behind the sliding panel\"),),\n\n        SlidingUpPanel(\n          panel: Center(child: Text(\"This is the sliding Widget\"),),\n        )\n      ],\n    )\n  );\n}\n```\n\u003Cbr>\n\n#### Screenshots\nBoth methods produce the same result:\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fsimpleusageclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fsimpleusagemidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fsimpleusageopen.png\">\n\u003C\u002Fp>\n\n\u003Cbr>\n\u003Cbr>\n\u003Cbr>\n\n## Custom Usage\nThere are several options that allow for more control:\n\n|  Properties  |   Description   |\n|--------------|-----------------|\n| `panel` | The Widget that slides into view. When the `panel` is collapsed and if `collapsed` is null, then top portion of this Widget will be displayed; otherwise, `collapsed` will be displayed overtop of this Widget. |\n|`panelBuilder` [beta]| NOTE: This feature is still in beta and may have some problems. Please open an issue on [GitHub](https:\u002F\u002Fgithub.com\u002Fakshathjain\u002Fsliding_up_panel) if you encounter something unexpected. \u003Cbr>\u003Cbr> Provides a `ScrollController` to attach to a scrollable object in the panel that links the panel position with the scroll position. Useful for implementing an infinite scroll behavior. If `panel` and `panelBuilder` are both non-null, `panel` will be used. |\n| `collapsed` | The Widget displayed overtop the `panel` when collapsed. This fades out as the `panel` is opened. |\n| `body` | The Widget that lies underneath the sliding panel. This Widget automatically sizes itself to fill the screen. |\n| `header` | Optional persistent widget that floats above the `panel` and attaches to the top of the `panel`. Content at the top of the panel will be covered by this widget. Add padding to the top of the `panel` to avoid coverage. |\n| `footer` | Optional persistent widget that floats above the `panel` and attaches to the bottom of the `panel`. Content at the bottom of the panel will be covered by this widget. Add padding to the bottom of the `panel` to avoid coverage. |\n| `minHeight` | The height of the sliding panel when fully collapsed. |\n| `maxHeight` | The height of the sliding panel when fully open. |\n| `snapPoint` [beta] | NOTE: This feature is still in beta and may have some problems. Please open an issue on [GitHub](https:\u002F\u002Fgithub.com\u002Fakshathjain\u002Fsliding_up_panel) if you encounter something unexpected. \u003Cbr>\u003Cbr> A point between `minHeight` and `maxHeight` that the panel snaps to while animating. A fast swipe on the panel will disregard this point and go directly to the open\u002Fclose position. This value is represented as a percentage of the total animation distance (`maxHeight` - `minHeight`), so it must be between 0.0 and 1.0, exclusive. |\n| `border` | A border to draw around the sliding panel sheet. |\n| `borderRadius` | If non-null, the corners of the sliding panel sheet are rounded by this. |\n| `boxShadow` | A list of shadows cast behind the sliding panel sheet. |\n| `color` | The color to fill the background of the sliding panel sheet. |\n| `padding` | The amount to inset the children of the sliding panel sheet. |\n| `margin` | Empty space surrounding the sliding panel sheet. |\n| `renderPanelSheet` | Set to false to not to render the sheet the `panel` sits upon. This means that only `body`, `collapsed`, and the `panel` Widgets will be rendered. Set this to false if you want to achieve a floating effect or want more customization over how the sliding panel looks like. |\n| `panelSnapping` | Set to false to disable the panel from snapping open or closed. |\n| `backdropEnabled` | If non-null, shows a darkening shadow over the `body` as the panel slides open. |\n| `backdropColor` | Shows a darkening shadow of this Color over the `body` as the panel slides open. |\n| `backdropOpacity` | The opacity of the backdrop when the panel is fully open. This value can range from 0.0 to 1.0 where 0.0 is completely transparent and 1.0 is completely opaque. |\n| `backdropTapClosesPanel` | Flag that indicates whether or not tapping the backdrop closes the panel. Defaults to true. |\n| `controller` | If non-null, this can be used to control the state of the panel. |\n| `onPanelSlide` | If non-null, this callback is called as the panel slides around with the current position of the panel. The position is a double between 0.0 and 1.0 where 0.0 is fully collapsed and 1.0 is fully open. |\n| `onPanelOpened` | If non-null, this callback is called when the panel is fully opened. |\n| `onPanelClosed` | If non-null, this callback is called when the panel is fully collapsed. |\n| `parallaxEnabled` | If non-null and true, the SlidingUpPanel exhibits a parallax effect as the panel slides up. Essentially, the body slides up as the panel slides up. |\n| `parallaxOffset` | Allows for specifying the extent of the parallax effect in terms of the percentage the panel has slid up\u002Fdown. Recommended values are within 0.0 and 1.0 where 0.0 is no parallax and 1.0 mimics a one-to-one scrolling effect. Defaults to a 10% parallax. |\n| `isDraggable` | Allows toggling of draggability of the SlidingUpPanel. Set this to false to prevent the user from being able to drag the panel up and down. Defaults to true. |\n| `slideDirection` | Either `SlideDirection.UP` or `SlideDirection.DOWN`. Indicates which way the panel should slide. Defaults to `UP`. If set to `DOWN`, the panel attaches itself to the top of the screen and is fully opened when the user swipes down on the panel. |\n| `defaultPanelState` | The default state of the panel; either PanelState.OPEN or `PanelState.CLOSED`. This value defaults to `PanelState.CLOSED` which indicates that the panel is in the closed position and must be opened. `PanelState.OPEN` indicates that by default the Panel is open and must be swiped closed by the user. |\n\n\u003Cbr>\n\u003Cbr>\n\n### Darkening the Body as the Panel Opens\nIf desired, the `body` can be darkened as the panel is opened by setting `backdropEnabled` to `true`. You can also customize the `backdropColor`, `backdropOpacity`, and `backdropTapClosesPanel`. For example:\n\n```dart\n@override\nWidget build(BuildContext context){\n  return Material(\n    child: SlidingUpPanel(\n      backdropEnabled: true,\n      panel: Center(\n        child: Text(\"This is the sliding Widget\"),\n      ),\n      body: Scaffold(\n        appBar: AppBar(\n          title: Text(\"SlidingUpPanelExample\"),\n        ),\n        body:  Center(\n          child: Text(\"This is the Widget behind the sliding panel\"),\n        ),\n      ),\n    ),\n  );\n}\n```\nNotice how the `Scaffold` is nested inside of the `SlidingUpPanel`. This because the backdrop is rendered only over the `body` of the `SlidingUpPanel`. As a result, if we want the `backdrop` to appear over the `AppBar`, then we *must* nest the `Scaffold` this way.\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fbackdropclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fbackdropmidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fbackdropopen.png\">\n\u003C\u002Fp>\n\n\u003Cbr>\n\u003Cbr>\n\n### Displaying a Different Child When the Panel is Closed\nBy assigning a non-null Widget to the `collapsed` property, you can add a Widget that displays overtop the `panel` when collapsed. As the `panel` is opened, this Widget will fade out to display the `panel` underneath. For example:\n\n```dart\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      panel: Center(\n        child: Text(\"This is the sliding Widget\"),\n      ),\n      collapsed: Container(\n        color: Colors.blueGrey,\n        child: Center(\n          child: Text(\n            \"This is the collapsed Widget\",\n            style: TextStyle(color: Colors.white),\n          ),\n        ),\n      ),\n      body: Center(\n        child: Text(\"This is the Widget behind the sliding panel\"),\n      ),\n    ),\n  );\n}\n```\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fcollapsedpanelclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fcollapsedpanelmidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fcollapsedpanelopen.png\">\n\u003C\u002Fp>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Cbr>\n\u003Cbr>\n\n### Rounding the Borders\nModern design principles (especially in the Material Design Refresh) emphasize rounded borders. A similar effect can be easily achieved by providing a non-null `BorderRadiusGeometry` to the `borderRadius` property. Note that this only curves the border on the underlying panel sheet: any children passed to `panel` or `collapsed` must also have their borders curved separately in order to achieve a uniform effect. For example:\n\n\n```dart\n@override\nWidget build(BuildContext context) {\n  BorderRadiusGeometry radius = BorderRadius.only(\n    topLeft: Radius.circular(24.0),\n    topRight: Radius.circular(24.0),\n  );\n\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      panel: Center(\n        child: Text(\"This is the sliding Widget\"),\n      ),\n\n      collapsed: Container(\n        decoration: BoxDecoration(\n          color: Colors.blueGrey,\n          borderRadius: radius\n        ),\n        child: Center(\n          child: Text(\n            \"This is the collapsed Widget\",\n            style: TextStyle(color: Colors.white),\n          ),\n        ),\n      ),\n\n      body: Center(\n        child: Text(\"This is the Widget behind the sliding panel\"),\n      ),\n\n      borderRadius: radius,\n    ),\n  );\n}\n```\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fborderclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fbordermidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fborderopen.png\">\n\u003C\u002Fp>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Cbr>\n\u003Cbr>\n\n### Creating A Floating Effect\nTo create a fully custom effect, the default panel sheet can be completely hidden and only the children rendered (i.e. only `body`, `panel`, and `collapsed` are rendered). To do this, set the `renderPanelSheet` property to `false`. For example, to create a floating effect:\n\n```dart\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      renderPanelSheet: false,\n      panel: _floatingPanel(),\n      collapsed: _floatingCollapsed(),\n      body: Center(\n        child: Text(\"This is the Widget behind the sliding panel\"),\n      ),\n    ),\n  );\n}\n\nWidget _floatingCollapsed(){\n  return Container(\n    decoration: BoxDecoration(\n      color: Colors.blueGrey,\n      borderRadius: BorderRadius.only(topLeft: Radius.circular(24.0), topRight: Radius.circular(24.0)),\n    ),\n    margin: const EdgeInsets.fromLTRB(24.0, 24.0, 24.0, 0.0),\n    child: Center(\n      child: Text(\n        \"This is the collapsed Widget\",\n        style: TextStyle(color: Colors.white),\n      ),\n    ),\n  );\n}\n\nWidget _floatingPanel(){\n  return Container(\n    decoration: BoxDecoration(\n      color: Colors.white,\n      borderRadius: BorderRadius.all(Radius.circular(24.0)),\n      boxShadow: [\n        BoxShadow(\n          blurRadius: 20.0,\n          color: Colors.grey,\n        ),\n      ]\n    ),\n    margin: const EdgeInsets.all(24.0),\n    child: Center(\n      child: Text(\"This is the SlidingUpPanel when open\"),\n    ),\n  );\n}\n```\n\nNote that a similar effect can be created by simply adding a `margin` to the `SlidingUpPanel`.\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Ffloatingclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Ffloatingmidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Ffloatingopen.png\">\n\u003C\u002Fp>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Cbr>\n\u003Cbr>\n\n### Adding Scrollable Elements to the Sliding Panel\nThe `panel` itself can contain Scrollable elements. As of `v1.0.0`, you can link the scroll position of the Scrollable elements with the position of the sliding up panel by using the `panelBuilder`. For example:\n\n```dart\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      panelBuilder: (ScrollController sc) => _scrollingList(sc),\n      body: Center(\n        child: Text(\"This is the Widget behind the sliding panel\"),\n      ),\n    ),\n  );\n}\n\nWidget _scrollingList(ScrollController sc){\n  return ListView.builder(\n    controller: sc,\n    itemCount: 50,\n    itemBuilder: (BuildContext context, int i){\n      return Container(\n        padding: const EdgeInsets.all(12.0),\n        child: Text(\"$i\"),\n      );\n    },\n  );\n}\n```\n\n\u003Cp float=\"left\">\n  \u003Cimg alt=\"Panel Closed\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fscrollclosed.png\">\n  \u003Cimg alt=\"Panel Midway\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fscrollmidway.png\">\n  \u003Cimg alt=\"Panel Open\" width=\"217px\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fakshathjain\u002Fsliding_up_panel\u002Fmaster\u002Fscreenshots\u002Fscrollopen.png\">\n\u003C\u002Fp>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Cbr>\n\u003Cbr>\n\n### Using the `PanelController`\nAt times, it can be useful to manually change the state of the `SlidingUpPanel`. This can be easily achieved by using a `PanelController` and attaching it to an instance of the `SlidingUpPanel`. Note that since the `PanelController` modifies the state of a `SlidingUpPanel`, these methods can *only* be called after the `SlidingUpPanel` has been rendered.\n\n\u003C!-- Get the panel position (returns a value between 0.0 and 1.0) and set the panel position (without animation). The value assigned must between 0.0 and 1.0 where 0.0 is fully collapsed and 1.0 is completely open. -->\n|  Properties  | Data Type | Permissions | Description |\n|--------------|-----------|-------------|-------------|\n|`panelPosition`| `double` | Read \u002F Write | Evaluates to the current panel position (a value between 0.0 and 1.0) where 0.0 is closed and 1.0 is open. Any value assigned to this property must be between 0.0 and 1.0, inclusive. |\n| `isAttached` | `bool` | Read | Determine if the panelController is attached to an instance of the SlidingUpPanel (this property must be true before any other `PanelController` functions can be used) |\n|`isPanelAnimating`| `bool` | Read | Returns whether or not the panel is currently animating. |\n|`isPanelOpen`| `bool` | Read | Returns whether or not the panel is open. |\n|`isPanelClosed`| `bool` | Read | Returns whether or not the panel is collapsed.|\n|`isPanelShown`| `bool` | Read | Returns whether or not the panel is shown\u002Fhidden.|\n\n\u003Cbr>\n\n|  Methods  | Return Type | Description |\n|-----------|-------------|-------------|\n|`open()`| `Future\u003Cvoid>` | Opens the sliding panel fully (i.e. to the  `maxHeight`) |\n|`close()`| `Future\u003Cvoid>` | Closes the sliding panel to its collapsed state (i.e. to the  `minHeight`) |\n|`hide()`| `Future\u003Cvoid>` | Hides the sliding panel (i.e. is invisible) |\n|`show()`| `Future\u003Cvoid>` | Shows the sliding panel in its collapsed state (i.e. \"un-hide\" the sliding panel) |\n|`animatePanelToPosition(double value, {Duration duration, Curve curve = Curves.linear})`| `Future\u003Cvoid>` | Animates the panel position to the value. The value must between 0.0 and 1.0 where 0.0 is fully collapsed and 1.0 is completely open. (optional) `duration` specifies the time for the animation to complete. (optional) `curve` specifies the easing behavior of the animation. |\n|`animatePanelToSnapPoint(double value, {Duration duration, Curve curve = Curves.linear})` [beta]| `Future\u003Cvoid>` | NOTE: This feature is still in beta and may have some problems. Please open an issue on [GitHub](https:\u002F\u002Fgithub.com\u002Fakshathjain\u002Fsliding_up_panel) if you encounter something unexpected. \u003Cbr>\u003Cbr> Animates the panel position to the snap point. Requires that the SlidingUpPanel `snapPoint` property is not null. (optional) `duration` specifies the time for the animation to complete. (optional) `curve` specifies the easing behavior of the animation. |\n\n\n```dart\nPanelController _pc = new PanelController();\n\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    appBar: AppBar(\n      title: Text(\"SlidingUpPanelExample\"),\n    ),\n    body: SlidingUpPanel(\n      controller: _pc,\n      panel: Center(\n        child: Text(\"This is the sliding Widget\"),\n      ),\n      body: _body(),\n    ),\n  );\n}\n\nWidget _body(){\n  return Container(\n    child: Column(\n      children: \u003CWidget>[\n        RaisedButton(\n          child: Text(\"Open\"),\n          onPressed: () => _pc.open(),\n        ),\n        RaisedButton(\n          child: Text(\"Close\"),\n          onPressed: () => _pc.close(),\n        ),\n        RaisedButton(\n          child: Text(\"Show\"),\n          onPressed: () => _pc.show(),\n        ),\n        RaisedButton(\n          child: Text(\"Hide\"),\n          onPressed: () => _pc.hide(),\n        ),\n      ],\n    ),\n  );\n}\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Cbr>\n\u003Cbr>\n\n## Breaking Changes\n`v1.0.0` introduced some breaking changes to the `PanelController` to better adhere to Dart language conventions. The changes are outlined below.\n\nThe following `PanelController` methods now return `Future\u003Cvoid>` instead of `void`:\n- `close()`\n- `open()`\n- `hide()`\n- `show()`\n- `animatePanelToPosition(double value)`\n\nThe following `PanelController` methods have changed to Dart properties to better reflect Dart language conventions:\n- `setPanelPosition()` -> `panelPosition` [as a setter]\n- `getPanelPosition()` -> `panelPosition` [as a getter]\n- `isPanelAnimating()` -> `isPanelAnimating`\n- `isPanelOpen()` -> `isPanelOpen`\n- `isPanelClosed()` -> `isPanelClosed`\n- `isPanelShown()` -> `isPanelShown`\n\n\nFor example, here's how you would have previously used `setPanelPosition()` and `getPanelPosition()` vs. how you would now use the `panelPosition` property:\n```dart\n\u002F\u002F OLD, no longer supported\nprint(pc.getPanelPosition()); \u002F\u002F print a value between 0.0 and 1.0\npc.setPanelPosition(0.5);     \u002F\u002F sets the panelPosition to 0.5\n```\n\n```dart\n\u002F\u002F NEW\nprint(pc.panelPosition); \u002F\u002F print a value between 0.0 and 1.0\npc.panelPosition = 0.5;  \u002F\u002F sets the panelPosition to 0.5\n```\n\nAnd here's how you would have previously called `isPanelAnimating()` vs. how you would now call `isPanelAnimating`.\n```dart\npanelController.isPanelAnimating(); \u002F\u002F OLD, no longer supported\n```\n```dart\npanelController.isPanelAnimating; \u002F\u002F NEW\n```\n","sliding_up_panel 是一个可拖动的 Flutter 组件，简化了滑动面板的实现。基于 Material Design 的底部工作表组件设计，该插件支持 Android 和 iOS 平台，提供了流畅的滑动体验和自定义选项，如设置面板高度、背景颜色等。适用于需要在应用中添加可展开收缩内容区域的场景，例如显示更多详情信息或扩展功能菜单。通过简单的配置即可集成到现有项目中，同时官方文档提供了详尽的使用说明和示例代码，便于开发者快速上手。",2,"2026-06-11 03:22:22","top_language"]