flutter-layout

how to push all content up when open keyboard

◇◆丶佛笑我妖孽 提交于 2020-01-23 22:07:08
问题 Is it possible to push all content up when open keyboard? (not only textField area, whole page push up) showModalBottomSheet( context: context, builder: (BuildContext context) { return BottomSheet(); }, isScrollControlled: true); BottomSheet class class BottomSheet extends StatefulWidget { @override _BottomSheetState createState() => _BottomSheetState(); } class _BottomSheetState extends State<BottomSheet> { @override Widget build(BuildContext context) { return SingleChildScrollView( padding:

how to push all content up when open keyboard

家住魔仙堡 提交于 2020-01-23 22:06:48
问题 Is it possible to push all content up when open keyboard? (not only textField area, whole page push up) showModalBottomSheet( context: context, builder: (BuildContext context) { return BottomSheet(); }, isScrollControlled: true); BottomSheet class class BottomSheet extends StatefulWidget { @override _BottomSheetState createState() => _BottomSheetState(); } class _BottomSheetState extends State<BottomSheet> { @override Widget build(BuildContext context) { return SingleChildScrollView( padding:

how to push all content up when open keyboard

僤鯓⒐⒋嵵緔 提交于 2020-01-23 22:06:08
问题 Is it possible to push all content up when open keyboard? (not only textField area, whole page push up) showModalBottomSheet( context: context, builder: (BuildContext context) { return BottomSheet(); }, isScrollControlled: true); BottomSheet class class BottomSheet extends StatefulWidget { @override _BottomSheetState createState() => _BottomSheetState(); } class _BottomSheetState extends State<BottomSheet> { @override Widget build(BuildContext context) { return SingleChildScrollView( padding:

in flutter page textfield hidden by keyboard

余生颓废 提交于 2020-01-23 11:53:11
问题 I'm using flutter to make a page that someone can comment.And the page is shown by showModalBottomSheet. but the textfield is hidden by the keyboard when the keyboard showing in the front. flutter doctor output: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14 18A391, locale zh-Hans-CN) [!] Android toolchain - develop for Android devices (Android SDK 28.0.3) ✗ Android license status unknown. [✓] iOS toolchain - develop for iOS

Flutter How to alway hide keyboard when click on TextField but keep focus(Keep show cursor)

大城市里の小女人 提交于 2020-01-23 02:53:39
问题 I can't control keyboard show or hide, In my project I need to always hide keyboard but keep focused to display my custom keyboard(a widget). Need Help!!! This is I want And this is my problem 回答1: Insert NoKeyboardEditableText instead your TextField class NoKeyboardEditableText extends EditableText { NoKeyboardEditableText({ @required TextEditingController controller, TextStyle style = const TextStyle(), Color cursorColor = Colors.black, bool autofocus = false, Color selectionColor }):super(

How do I remove content padding from TextField?

拜拜、爱过 提交于 2020-01-22 09:33:28
问题 I am new to flutter and I am creating login form, for that I have used TextField and added prefix icon but I am getting some extra spaces in between textfields (user id and pin) and before the prefix icon. I have also tried InputDecorationTheme but it didn't work. Please let me know how can I remove or reduce the space.?? Below is my code: TextField( maxLength: 8, keyboardType: TextInputType.number, decoration: InputDecoration( hintText: hint, hintStyle: TextStyle(fontSize: 12.0), prefixIcon:

Flutter how to add margin or padding in BottomNavigationBar

倾然丶 夕夏残阳落幕 提交于 2020-01-22 02:20:22
问题 I am trying to make bottom navigation bar, but with padding left and right on the screen. Right now I wrap the BottomNavigationBar with container and add padding there. The problem is the BottomNavigationBar default background still wrap all the layer, so could we remove the background color there? Goal Current result bottomNavigationBar: Container( margin: EdgeInsets.only(left: 16, right: 16), decoration: BoxDecoration( color: Colors.black, borderRadius: BorderRadius.only( topLeft: Radius

i use margin for text to go a little bit up but container its taking a lot of space on screen,why container is taking a lot os spaces on screen

╄→尐↘猪︶ㄣ 提交于 2020-01-22 02:14:29
问题 Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( margin: EdgeInsets.only(bottom: 200.0), child: Center( child: Padding( padding: EdgeInsets.symmetric(horizontal: 10.0), child: Text( _text, style: TextStyle(color: Colors.white), ), ), ), ), 回答1: reduce margin , margin takes much of space Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( margin: EdgeInsets.only(bottom: 15.0), child: Center( child: Padding( padding: EdgeInsets.symmetric

Display Custom Data from Firebase Cloud Messaging console to Flutter app?

≯℡__Kan透↙ 提交于 2020-01-16 12:27:49
问题 Hi is there any way to use the key and value that I've set in my Firebase Cloud Messaging console, Additional Options for push notification to DISPLAY inside my Flutter app? I'm having a hard time making this work tbh, Example, I've used a url for key and a link for my value in my FCM console. What I exactly want is like this: When I send a push notification, it display to a custom screen/url_launcher/widget within my app and that screen/url_launcher/widget shows the data I've inputted in FCM

Flutter show and hide container on scrolling ListView

倾然丶 夕夏残阳落幕 提交于 2020-01-16 09:02:13
问题 How can I show a Container with animation on scrolling ListView down and hide it when scrolling up. The video I am attaching is not exact implementation I want but it is just to give you an idea. Sample video https://imgur.com/a/auEzJQk Edit: Every time I scroll down, I need to show the Container and every time I scroll up, I want to hide it. It shouldn't depend on the index of the ListView . 回答1: Not sure if I got your question properly, is this what you are trying to achieve? Screenshot: