add toolbar to comments

This commit is contained in:
Filip Krawczyk 2022-08-21 23:09:25 +02:00
parent 1fcc95d6b9
commit 4cd8b9855c
1 changed files with 44 additions and 27 deletions

View File

@ -99,37 +99,54 @@ class WriteComment extends HookWidget {
), ),
], ],
), ),
body: ListView( body: Stack(
children: [ children: [
ConstrainedBox( ListView(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * .35),
child: SingleChildScrollView(
padding: const EdgeInsets.all(8),
child: preview,
),
),
const Divider(),
Editor(
instanceHost: post.instanceHost,
controller: controller,
autofocus: true,
fancy: showFancy.value,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
TextButton( ConstrainedBox(
onPressed: constraints: BoxConstraints(
delayed.pending ? () {} : loggedInAction(handleSubmit), maxHeight: MediaQuery.of(context).size.height * .35),
child: delayed.loading child: SingleChildScrollView(
? const CircularProgressIndicator.adaptive() padding: const EdgeInsets.all(8),
: Text(_isEdit child: preview,
? L10n.of(context).edit ),
: L10n.of(context).post), ),
) const Divider(),
Editor(
instanceHost: post.instanceHost,
controller: controller,
autofocus: true,
fancy: showFancy.value,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
onPressed:
delayed.pending ? () {} : loggedInAction(handleSubmit),
child: delayed.loading
? const CircularProgressIndicator.adaptive()
: Text(_isEdit
? L10n.of(context).edit
: L10n.of(context).post),
)
],
),
Toolbar.safeArea,
], ],
), ),
SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Spacer(),
Toolbar(
controller: controller,
instanceHost: post.instanceHost,
),
],
),
),
], ],
), ),
); );