Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级插件后第一行无法长按选中,flutter已升级到1.12稳定版 #49

Closed
jogben opened this issue Dec 31, 2019 · 7 comments
Closed

Comments

@jogben
Copy link

jogben commented Dec 31, 2019

I/flutter (29711): The following assertion was thrown during paint():
I/flutter (29711): 'dart:ui/text.dart': Failed assertion: line 1372: '': is not true.
I/flutter (29711):
I/flutter (29711): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (29711): more information in this error message to help you determine and fix the underlying cause.
I/flutter (29711): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (29711): https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (29711):
I/flutter (29711): The relevant error-causing widget was:
I/flutter (29711):
I/flutter (29711): When the exception was thrown, this was the stack:
I/flutter (29711): #2 new TextPosition (dart:ui/text.dart:1372:15)
I/flutter (29711): #3 ExtendedRenderEditable._updateSelectionExtentsVisibility (package:extended_text_field/src/extended_render_editable.dart:323:7)
I/flutter (29711): #4 ExtendedRenderEditable._paintContents (package:extended_text_field/src/extended_render_editable.dart:1826:7)
I/flutter (29711): #5 ExtendedRenderEditable.paint (package:extended_text_field/src/extended_render_editable.dart:1876:7)
I/flutter (29711): #6 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #7 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #8 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #9 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #10 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #11 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #12 PaintingContext.pushLayer (package:flutter/src/rendering/object.dart:384:12)
I/flutter (29711): #13 RenderLeaderLayer.paint (package:flutter/src/rendering/proxy_box.dart:4796:13)
I/flutter (29711): #14 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #15 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #16 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #17 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #18 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #19 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #22 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #25 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #28 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #29 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #30 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:135:11)
I/flutter (29711): #31 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:95:5)
I/flutter (29711): #32 PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:201:7)
I/flutter (29711): #33 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:182:7)
I/flutter (29711): #34 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #35 RenderCustomPaint.paint (package:flutter/src/rendering/custom_paint.dart:575:11)
I/flutter (29711): #36 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #37 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #38 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #39 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #40 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:135:11)
I/flutter (29711): #41 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:95:5)
I/flutter (29711): #42 PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:201:7)
I/flutter (29711): #43 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:182:7)
I/flutter (29711): #44 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #45 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #46 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:135:11)
I/flutter (29711): #47 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:95:5)
I/flutter (29711): #48 PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:201:7)
I/flutter (29711): #49 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:182:7)
I/flutter (29711): #50 _RenderDecoration.paint.doPaint (package:flutter/src/material/input_decorator.dart:1404:17)
I/flutter (29711): #51 _RenderDecoration.paint (package:flutter/src/material/input_decorator.dart:1439:12)
I/flutter (29711): #52 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #53 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #54 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #55 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #56 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #57 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #58 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #59 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #60 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #61 RenderMouseRegion.paint (package:flutter/src/rendering/proxy_box.dart:2787:13)
I/flutter (29711): #62 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #63 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #64 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #65 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #66 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #67 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:70:15)
I/flutter (29711): #68 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #69 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #70 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2508:15)
I/flutter (29711): #71 RenderFlex.paint (package:flutter/src/rendering/flex.dart:948:7)
I/flutter (29711): #72 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #73 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #74 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #75 RenderDecoratedBox.paint (package:flutter/src/rendering/proxy_box.dart:1995:11)
I/flutter (29711): #76 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #77 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #78 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #79 RenderDecoratedBox.paint (package:flutter/src/rendering/proxy_box.dart:1995:11)
I/flutter (29711): #80 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #81 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #82 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2508:15)
I/flutter (29711): #83 RenderFlex.paint (package:flutter/src/rendering/flex.dart:948:7)
I/flutter (29711): #84 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #85 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #86 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:70:15)
I/flutter (29711): #87 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #88 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #89 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2508:15)
I/flutter (29711): #90 RenderStack.paintStack (package:flutter/src/rendering/stack.dart:589:5)
I/flutter (29711): #91 RenderStack.paint (package:flutter/src/rendering/stack.dart:597:7)
I/flutter (29711): #92 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #93 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #94 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2508:15)
I/flutter (29711): #95 RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:396:5)
I/flutter (29711): #96 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #97 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #98 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #99 _RenderInkFeatures.paint (package:flutter/src/material/material.dart:530:11)
I/flutter (29711): #100 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #101 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #102 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #103 PaintingContext.pushLayer (package:flutter/src/rendering/object.dart:384:12)
I/flutter (29711): #104 RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:1755:15)
I/flutter (29711): #105 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #106 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #107 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #108 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #109 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #110 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #111 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #112 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #113 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #114 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #115 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
I/flutter (29711): #116 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123:15)
I/flutter (29711): #117 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2219:7)
I/flutter (29711): #118 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:135:11)
I/flutter (29711): #119 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:95:5)
I/flutter (29711): #120 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:937:29)
I/flutter (29711): #121 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:346:19)
I/flutter (29711): #122 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:774:13)
I/flutter (29711): #123 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
I/flutter (29711): #124 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)
I/flutter (29711): #125 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)
I/flutter (29711): #126 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:850:7)
I/flutter (29711): #128 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:384:19)
I/flutter (29711): #129 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:418:5)
I/flutter (29711): #130 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
I/flutter (29711): (elided 3 frames from class _AssertionError and package dart:async-patch)
I/flutter (29711):
I/flutter (29711): The following RenderObject was being processed when the exception was fired: ExtendedRenderEditable#bc8cd relayoutBoundary=up23:
I/flutter (29711): creator: _Editable-[GlobalKey#8991b] ← Semantics ← CompositedTransformTarget ←
I/flutter (29711): IgnorePointer-[GlobalKey#fa1a2] ← Semantics ← _PointerListener ← Listener ←
I/flutter (29711): RawGestureDetector-[LabeledGlobalKey#ded2a] ← _PointerListener ← Listener
I/flutter (29711): ← _ScrollableScope ← RepaintBoundary ← ?
I/flutter (29711): parentData: (can use size)
I/flutter (29711): constraints: BoxConstraints(w=219.0, 0.0<=h<=Infinity)
I/flutter (29711): size: Size(219.0, 34.0)
I/flutter (29711): cursorColor: Color(0x00009688)
I/flutter (29711): showCursor: ValueNotifier#e7b82(true)
I/flutter (29711): maxLines: 5
I/flutter (29711): minLines: 1
I/flutter (29711): selectionColor: Color(0xff90caf9)
I/flutter (29711): textScaleFactor: 1.0
I/flutter (29711): locale: zh_CH
I/flutter (29711): selection: TextSelection(baseOffset: 25, extentOffset: 25, affinity: null, isDirectional: false)
I/flutter (29711): offset: ScrollPositionWithSingleContext#54f2d(offset: 0.0, range: 0.0..0.0, viewport: 34.0,
I/flutter (29711): ScrollableState, ClampingScrollPhysics, IdleScrollActivity#694bf, ScrollDirection.idle)
I/flutter (29711): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (29711): text: TextSpan
I/flutter (29711): TextSpan

@jogben
Copy link
Author

jogben commented Dec 31, 2019

测试多次后,发现是由于加了style属性,例如style: TextStyle(fontSize: 14,height: 1.2),可以在插件示例代码中复现

@jogben
Copy link
Author

jogben commented Jan 2, 2020

style属性去掉 height,首行可以出现光标,也可以选中,但是输入框高度无法控制,另外maxLine属性设置后无效了,控制台一直在报错,Another exception was thrown: 'dart:ui/text.dart': Failed assertion: line 1372: '': is not true

@zmtzawqlp
Copy link
Member

但是输入框高度无法控制=>不太明白这个意思

另外maxLine属性设置后无效了=》这个控制的是,可视区域的行数,不是一共可以输入多少行。

最好是提供一个最简单的demo

@jogben
Copy link
Author

jogben commented Jan 3, 2020

但是输入框高度无法控制=>不太明白这个意思

另外maxLine属性设置后无效了=》这个控制的是,可视区域的行数,不是一共可以输入多少行。

最好是提供一个最简单的demo

输入框高度无法控制是说,早前版本如果设置
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0.0)
)
输入框高度就是文字高度,但是升级后好像有最小高度,即便设置contentPadding为0

@oyh819
Copy link

oyh819 commented Mar 28, 2020

我现在也发现输入框的高度貌似有个最小的高度,我用一个container将控件包裹住,不给container高度,然后这个输入框就会有很高了

@onewkl
Copy link

onewkl commented May 21, 2020

我现在也发现输入框的高度貌似有个最小的高度,我用一个container将控件包裹住,不给container高度,然后这个输入框就会有很高了

设置isDense:true

@oyh819
Copy link

oyh819 commented May 22, 2020

我现在也发现输入框的高度貌似有个最小的高度,我用一个container将控件包裹住,不给container高度,然后这个输入框就会有很高了

设置isDense:true

没有这个属性啊,我现在的版本是0.5.0,我看了pub上面的最新版本也是这个

zmtzawqlp added a commit that referenced this issue Jul 1, 2020
* Fix issue that text is clipped when maxLine is 1 and width is more than maxWidth.(#67,#76)
* Fix issue that handles are not shown when the height of TextStyle is big than 1.0.(#49)
@zmtzawqlp zmtzawqlp mentioned this issue Jul 1, 2020
zmtzawqlp added a commit that referenced this issue Jul 1, 2020
…than maxWidth.(#67,#76)

* Fix issue that handles are not shown when the height of TextStyle is big than 1.0.(#49)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants