Merge pull request #75 from krawieck/create-post-list-view

This commit is contained in:
Marcin Wojnarowski 2020-10-25 11:37:22 +00:00 committed by GitHub
commit 8224f6292e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 26 deletions

View File

@ -190,8 +190,9 @@ class CreatePost extends HookWidget {
children: [ children: [
TextField( TextField(
controller: bodyController, controller: bodyController,
expands: true, keyboardType: TextInputType.multiline,
maxLines: null, maxLines: null,
minLines: 5,
textAlignVertical: TextAlignVertical.top, textAlignVertical: TextAlignVertical.top,
decoration: decoration:
InputDecoration(border: OutlineInputBorder(), labelText: 'Body'), InputDecoration(border: OutlineInputBorder(), labelText: 'Body'),
@ -202,7 +203,7 @@ class CreatePost extends HookWidget {
bodyController.text, bodyController.text,
instanceUrl: selectedInstance.value, instanceUrl: selectedInstance.value,
), ),
) ),
], ],
); );
@ -252,13 +253,14 @@ class CreatePost extends HookWidget {
], ],
), ),
body: SafeArea( body: SafeArea(
child: Column( child: ListView(
children: spaced(6, [ padding: EdgeInsets.all(5),
children: spaced(5, [
instanceDropdown, instanceDropdown,
communitiesDropdown, communitiesDropdown,
url, url,
title, title,
Expanded(child: body), body,
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

View File

@ -89,7 +89,7 @@ class WriteComment extends HookWidget {
), ),
], ],
), ),
body: Column( body: ListView(
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
@ -100,14 +100,13 @@ class WriteComment extends HookWidget {
), ),
), ),
Divider(), Divider(),
Expanded( IndexedStack(
child: IndexedStack(
index: showFancy.value ? 1 : 0, index: showFancy.value ? 1 : 0,
children: [ children: [
TextField( TextField(
controller: controller, controller: controller,
autofocus: true, autofocus: true,
expands: true, minLines: 5,
maxLines: null, maxLines: null,
textAlignVertical: TextAlignVertical.top, textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(border: OutlineInputBorder()), decoration: InputDecoration(border: OutlineInputBorder()),
@ -121,7 +120,6 @@ class WriteComment extends HookWidget {
) )
], ],
), ),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [