diff --git a/lib/pages/create_post.dart b/lib/pages/create_post.dart index c2c6d4b..3dde101 100644 --- a/lib/pages/create_post.dart +++ b/lib/pages/create_post.dart @@ -190,8 +190,9 @@ class CreatePost extends HookWidget { children: [ TextField( controller: bodyController, - expands: true, + keyboardType: TextInputType.multiline, maxLines: null, + minLines: 5, textAlignVertical: TextAlignVertical.top, decoration: InputDecoration(border: OutlineInputBorder(), labelText: 'Body'), @@ -202,7 +203,7 @@ class CreatePost extends HookWidget { bodyController.text, instanceUrl: selectedInstance.value, ), - ) + ), ], ); @@ -252,13 +253,14 @@ class CreatePost extends HookWidget { ], ), body: SafeArea( - child: Column( - children: spaced(6, [ + child: ListView( + padding: EdgeInsets.all(5), + children: spaced(5, [ instanceDropdown, communitiesDropdown, url, title, - Expanded(child: body), + body, Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/widgets/write_comment.dart b/lib/widgets/write_comment.dart index ca81640..7b87332 100644 --- a/lib/widgets/write_comment.dart +++ b/lib/widgets/write_comment.dart @@ -89,7 +89,7 @@ class WriteComment extends HookWidget { ), ], ), - body: Column( + body: ListView( children: [ ConstrainedBox( constraints: BoxConstraints( @@ -100,27 +100,25 @@ class WriteComment extends HookWidget { ), ), Divider(), - Expanded( - child: IndexedStack( - index: showFancy.value ? 1 : 0, - children: [ - TextField( - controller: controller, - autofocus: true, - expands: true, - maxLines: null, - textAlignVertical: TextAlignVertical.top, - decoration: InputDecoration(border: OutlineInputBorder()), + IndexedStack( + index: showFancy.value ? 1 : 0, + children: [ + TextField( + controller: controller, + autofocus: true, + minLines: 5, + maxLines: null, + textAlignVertical: TextAlignVertical.top, + decoration: InputDecoration(border: OutlineInputBorder()), + ), + Padding( + padding: const EdgeInsets.all(16), + child: MarkdownText( + controller.text, + instanceUrl: instanceUrl, ), - Padding( - padding: const EdgeInsets.all(16), - child: MarkdownText( - controller.text, - instanceUrl: instanceUrl, - ), - ) - ], - ), + ) + ], ), Row( mainAxisAlignment: MainAxisAlignment.end,