8000 进入页面,某些特殊情况会报异常 · Issue #392 · peng8350/flutter_pulltorefresh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

进入页面,某些特殊情况会报异常 #392

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

Closed
s-fei opened this issue Nov 13, 2020 · 2 comments
Closed

进入页面,某些特殊情况会报异常 #392

s-fei opened this issue Nov 13, 2020 · 2 comment 8000 s
Labels
need details need more information

Comments

@s-fei
Copy link
s-fei commented Nov 13, 2020

异常堆栈:
Invalid argument(s): 0.0
#0 _Double.clamp (dart:core-patch/double.dart:184)
#1 BoxConstraints.constrainHeight (package:flutter/src/rendering/box.dart:264)
#2 BoxConstraints.constrain (package:flutter/src/rendering/box.dart:284)
#3 RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:395)
#4 RenderObject.layout (package:flutter/src/rendering/object.dart:1767)
#5 RenderSliverRefreshBody.performLayout (package:pull_to_refresh/src/internals/slivers.dart:545)

异常分析:
internals/slivers中
if (childExtent == 11111) {
child.layout(
constraints.asBoxConstraints(
maxExtent: constraints.viewportMainAxisExtent - 0.1),
parentUsesSize: true);
}
某些特殊情况viewportMainAxisExtent = 0 会造成height.clamp(minHeight, maxHeight)中的maxHeight为-0.1 小于minHeight 导致flutter异常 麻烦作者尽快修复
顺便问下大神,为什么要减0.1呢😄

@peng8350
Copy link
Owner

那重现代码呢? -0.1是为了让它不满一个屏幕

@peng8350 peng8350 added the need details need more information label Nov 24, 2020
@peng8350
Copy link
Owner
peng8350 commented May 7, 2021

2.0.0应该修复了,改变成提高而不是减0.1

@peng8350 peng8350 closed this as completed May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need details need more information
Projects
None yet
Development

No branches or pull requests

2 participants
0