|
@@ -56,36 +56,31 @@ class _QuotedTextNodeWidgetState extends State<QuotedTextNodeWidget>
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return SizedBox(
|
|
|
- width: defaultMaxTextNodeWidth,
|
|
|
- child: Padding(
|
|
|
- padding: EdgeInsets.only(bottom: defaultLinePadding),
|
|
|
- child: IntrinsicHeight(
|
|
|
- child: Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
- children: [
|
|
|
- FlowySvg(
|
|
|
- key: iconKey,
|
|
|
- width: _iconWidth,
|
|
|
- padding: EdgeInsets.only(right: _iconRightPadding),
|
|
|
- name: 'quote',
|
|
|
+ width: defaultMaxTextNodeWidth,
|
|
|
+ child: Padding(
|
|
|
+ padding: EdgeInsets.only(bottom: defaultLinePadding),
|
|
|
+ child: IntrinsicHeight(
|
|
|
+ child: Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
+ children: [
|
|
|
+ FlowySvg(
|
|
|
+ key: iconKey,
|
|
|
+ width: _iconWidth,
|
|
|
+ padding: EdgeInsets.only(right: _iconRightPadding),
|
|
|
+ name: 'quote',
|
|
|
+ ),
|
|
|
+ Expanded(
|
|
|
+ child: FlowyRichText(
|
|
|
+ key: _richTextKey,
|
|
|
+ placeholderText: 'Quote',
|
|
|
+ textNode: widget.textNode,
|
|
|
+ editorState: widget.editorState,
|
|
|
),
|
|
|
- Expanded(
|
|
|
- child: FlowyRichText(
|
|
|
- key: _richTextKey,
|
|
|
- placeholderText: 'Quote',
|
|
|
- textNode: widget.textNode,
|
|
|
- editorState: widget.editorState,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
- ));
|
|
|
- }
|
|
|
-
|
|
|
- double get _quoteHeight {
|
|
|
- final lines =
|
|
|
- widget.textNode.toRawString().characters.where((c) => c == '\n').length;
|
|
|
- return (lines + 1) * _iconWidth;
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
}
|
|
|
}
|