akshathjain / sliding_up_panel

A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!
https://pub.dartlang.org/packages/sliding_up_panel
Other
1.36k stars 379 forks source link

`panel` widget gets rendered even when `renderPanelSheet` is false #284

Open ashwinkey04 opened 2 years ago

ashwinkey04 commented 2 years ago

Describe the bug I want different widgets to be displayed when the panel is collapsed and expanded. According to the README, renderPanelSheet should be set to false to achieve the expected behavior. Yet, it renders both panel widget and collapsed on top of one another.

To Reproduce Can use a code similar to the one below. Click here for complete code.

     return SlidingUpPanel(
      collapsed: CollapsedControls(),
      renderPanelSheet: false,
      controller: panelController,
      minHeight: MediaQuery.of(context).size.height * 0.2,
      maxHeight: MediaQuery.of(context).size.height * 0.9,

      panel: ClipRRect(
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(20),
          topRight: Radius.circular(20),
        ),
        child: Container(
          decoration: BoxDecoration(
            color: Theme.of(context).backgroundColor.withOpacity(0.65),
          ),
          child: BackdropFilter(
            filter: new ImageFilter.blur(sigmaX: 20.0, sigmaY: 20.0),
            child: Column(
              children: [
                Container(
                  color: Colors.red,
                  height: 100,
                  width: 100,
                )
              ],
            ),
          ),
        ),
      ),
    );

Expected behavior The red square should appear only when the panel is opened.

Screenshots image

Smartphone

danishkhawaja98 commented 1 year ago

I am also getting the same issue. Have you got into any solution??