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: [
ConstrainedBox(
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,
ListView(
children: [
TextButton(
onPressed:
delayed.pending ? () {} : loggedInAction(handleSubmit),
child: delayed.loading
? const CircularProgressIndicator.adaptive()
: Text(_isEdit
? L10n.of(context).edit
: L10n.of(context).post),
)
ConstrainedBox(
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: [
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,
),
],
),
),
],
),
);