diff --git a/lib/constants/layout.dart b/lib/constants/layout.dart index be38330a..ba7f7210 100644 --- a/lib/constants/layout.dart +++ b/lib/constants/layout.dart @@ -13,6 +13,7 @@ const edgeInsetsL10T10R10 = EdgeInsets.only(left: 10, top: 10, right: 10); const edgeInsetsL10R10B10 = EdgeInsets.only(left: 10, right: 10, bottom: 10); const edgeInsetsL10R10B20 = EdgeInsets.only(left: 10, right: 10, bottom: 20); const edgeInsetsL15R15B10 = EdgeInsets.only(left: 15, right: 15, bottom: 10); +const edgeInsetsL20R20 = EdgeInsets.only(left: 20, right: 20); const edgeInsetsL20R20B10 = EdgeInsets.only(left: 20, right: 20, bottom: 10); const edgeInsetsL10T5R5B5 = EdgeInsets.only(left: 10, top: 5, right: 5, bottom: 5); diff --git a/lib/widgets/reply_bar.dart b/lib/widgets/reply_bar.dart index 44b8c257..25c1d685 100644 --- a/lib/widgets/reply_bar.dart +++ b/lib/widgets/reply_bar.dart @@ -232,6 +232,26 @@ class _ReplyBarState extends ConsumerState { child: Column( mainAxisSize: isExpanded ? MainAxisSize.max : MainAxisSize.min, children: [ + if (_hintText != null) + Padding( + padding: edgeInsetsL20R20, + child: Row( + children: [ + Text( + _hintText!, + style: Theme.of(context).textTheme.labelLarge, + ), + Expanded(child: Container()), + IconButton( + icon: const Icon(Icons.clear_outlined), + onPressed: () { + setState(() { + _hintText = null; + }); + }), + ], + ), + ), Flexible( fit: isExpanded ? FlexFit.tight : FlexFit.loose, child: Padding( @@ -253,8 +273,7 @@ class _ReplyBarState extends ConsumerState { maxLines: isExpanded ? null : 10, minLines: isExpanded ? null : 1, decoration: InputDecoration( - hintText: - _hintText ?? context.t.threadPage.sendReplyHint, + hintText: context.t.threadPage.sendReplyHint, ), ), ),