Expanded(
child: TextField(
controller: _controller
)
)
import 'package:flutter/material.dart';
void main() { runApp( MaterialApp(
home: Scaffold( body: Example() ) ) );}
class Example extends StatefulWidget { @override State<StatefulWidget> createState() { return _ExampleState(); }}
class _ExampleState extends State<Example> { @override Widget build(BuildContext context) { return MaterialApp( home: Row( children: [Column( children: [ Text('Foo'), Expanded( child: TextField() ) ] )] ) ); }}
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/23303375-ec2f-4dcb-b85d-58c35ff9fc14%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAAqLy93Mr%2BmSJkt5YrxPD6zk%3Dy4j0YdSVnaXn%2B_oAtUa_qZ3hQ%40mail.gmail.com.
A SizedBox with a fixed width works, but is not suitable. I want it to be the width of the column containing it. My best reading of the docs is that Expanded should do this but it doesn’t work.How do I get a fixed height and the same width as the parent. Ideally, I would like an explanation also of why Expanded doesn’t do that.On Jan 13, 2020, at 10:25 , Guyren Howe <guy...@gmail.com> wrote:I’m creating a UI like Slack. A list of users in the left column. The right column is a timeline, below which is a text entry box, and below that a set of buttons for adding pictures and such to the timeline.
On Jan 13, 2020, 08:53 -0800, Justin McCandless <jmcca...@google.com>, wrote:
I think the exact solution for you will depend on what you're trying to do with the layout. Wrapping the TextField in a SizedBox will stop the error if you want to specify a pixel size for the TextField. How do you want the layout to look exactly?
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f65ec2f8-fbe4-4e83-9f48-153655bf4ecf%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f65ec2f8-fbe4-4e83-9f48-153655bf4ecf%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.