dbenitez-bcn / solid_bottom_sheet

Apache License 2.0
58 stars 19 forks source link

Cant Use TextFields #3

Closed midoshawky closed 5 years ago

midoshawky commented 5 years ago

Hello im using your Bottom Sheet and actually its the best i love it so much but i found something made me feel sad .. i need to make form inside the body of the bottom sheet i already make the from but when i tap on the text field the sheet hide automatically so how i can fix it !

dbenitez-bcn commented 5 years ago

Hello midoshawky, thanks you a lot for the comment! I will take a look and try to fix it. I hope to drop a new version with this issue fixed soon.

dbenitez-bcn commented 5 years ago

Could you please share your code? I'm trying to reproduce the error but it works on my device. For the moment, wrap your form into a separated stateless widget. Maybe you are experimenting state management issues.

midoshawky commented 5 years ago

Ummmm okay i`ll give a shot , thanks for reply

midoshawky commented 5 years ago

Container( width: MediaQuery.of(context).size.width, height: 600, child: Column( children: <Widget>[ Text("First Name :",style: TextStyle( color: Colors.green, fontFamily: "Avant" ),), Padding( padding: EdgeInsets.only(left: 20,right: 20), child: TextField( decoration:InputDecoration.collapsed( hintText: "Muhammed Shawky", filled: true, fillColor: Colors.grey[300], ) , ), ) ], ) ); i having the same problem :( i wrap it with stateless widget and still .. what happen that i need to use the text field but just when i tap on it the bottom sheet closes suddenly

midoshawky commented 5 years ago

but if its working with u then the problem from me or my device i will try other device and i will text u back , btw thanks for your effort buddy and nice work :)

dbenitez-bcn commented 5 years ago

Hi Mido. I've been checking this issue with your code and effectively the bottom sheet gets hide when user taps on the textfield. I've been able to fix it just removing the container that was wrapping the column. But unfortunately, in my case, the keyboard overflows some space of the solid bottom sheet's body and I'm not able to see what is on the bottom. So, if you can, try to avoid putting textfields in the body.

In summary, put your body like this: Column( children: <Widget>[ Text( "First Name:", style: TextStyle(color: Colors.green, fontFamily: "Avant"), ), Padding( padding: EdgeInsets.only(left: 20, right: 20), child: TextField( decoration: InputDecoration.collapsed( hintText: "Muhammed Shawky", filled: true, fillColor: Colors.grey[300], ), ), ) ], ), I you see that the keyboard overflows your content, try to wrap the column into a SingleChildScrollView widget or use the maxHeight property to set a maximum height for your solid bottom sheet. I will try to fix the overflow bug as soon as I can and drop a new version.

Thanks you for your issue reported. You have helped to improve this widget! Don't forget to leave a star on the project :D

midoshawky commented 5 years ago

Thank u for helping buddy :D keep going nice work