dbenitez-bcn / solid_bottom_sheet

Apache License 2.0
58 stars 19 forks source link

How to hide at first? #21

Closed fireknight closed 4 years ago

fireknight commented 4 years ago

I have runed the example ,but the header showing in the ViewPort, how to hide it at first untile I called by controller ?

dbenitez-bcn commented 4 years ago

By default the Solid Bottom Sheet's body is hidden, but you can control it by using showOnAppear property. But if you wanna hide the header, sadly I have to tell you that you can't. If you want to make something as the third example (the green one on the showcase) you have to pass the header widget as null so that you don't see header nor body when the Solid Bottom Sheet is loaded. The only responsibility of the header (from a Solid Bottom Sheet perspective) is to change the body's visibility using gestures. You can create a widget holding both body and header and pass it throw the body property and yours behaviour shouldn't change.

fireknight commented 4 years ago

thanks, I found if I use header ,the bottom will overFlow , and if I set header height is 1 , the bottom fill will overFlow by 1.0px

fireknight commented 4 years ago

I've tryed to do like this ,and it works:

` FlutterShine( config: Config(shadowColor: Color(0xFF3498D8),blur:4,blurPow:2,offset:0.5 ), light: Light(intensity: 0.3,position:Point(0,-100)), builder: (BuildContext context, ShineShadow shineShadow) { return shineShadow==null?CircularProgressIndicator():Container( width: double.infinity, height: 188.h, decoration: BoxDecoration( color: Colors.white, boxShadow: shineShadow.boxShadows, border: Border(bottom:BorderSide(width: 1,color: Color(0xffc1f1ff)) )

      ),`