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

display: silver 渲染异常 #75

Closed
temper357 opened this issue Mar 19, 2021 · 0 comments · Fixed by #444
Closed

display: silver 渲染异常 #75

temper357 opened this issue Mar 19, 2021 · 0 comments · Fixed by #444
Assignees
Labels
bug Something isn't working
Milestone

Comments

@temper357
Copy link
Contributor

temper357 commented Mar 19, 2021

Demo project:

/** @jsx createElement */
import { createElement } from 'rax';
import './index.css';

export default function App({ location }) {
  return (
    <div className="container">
      {
        new Array(100).fill(1).map((item, index) => (
          <div className="item" key={index}>
            <img className="item-img" src="https://gw.alicdn.com/tfs/TB1K8ZEtRBh1e4jSZFhXXcC9VXa-641-571.png" />
            <p className="item-content">
            《哆啦A梦》为日本漫画家藤子·F·不二雄笔下著名的儿童、科幻漫画作品,自1969年12月开始连载,共发行单行本45册、原著大长篇漫画17本,至今已成为日本国民级长寿动漫。
            </p>
            <span className="tag">{index}</span>
          </div>
        ))
      }
    </div>
  );
}
.container {
  width: 750rpx;
  height: 100vh;
  display: sliver;
}

.item {
  position: relative;
  padding: 0 24rpx;
  height: 250rpx;
  line-height: 250rpx;
  background-color: #eee;
  margin-bottom: 10rpx;
  flex-direction: row;
  display: flex;
  align-items: center;
}

.item-img {
  width: 224rpx;
  height: 200rpx;
  margin-right: 18rpx;
}

.item-content {
  flex: 1;
  color: #666;
  font-size: 26rpx;
  line-height: 1.2;
}

.tag {
  position: absolute;
  top: 0;
  right: 0;
  color: #333;
  font-weight: bold;
  font-size: 40rpx;
  line-height: 1;
}
════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following _CastError was thrown during performLayout():
Null check operator used on a null value

When the exception was thrown, this was the stack: 
#0      RenderSliverMultiBoxAdaptor.childMainAxisPosition (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:568:36)
#1      RenderSliverHelpers.applyPaintTransformForBoxChild (package:flutter/src/rendering/sliver.dart:1687:20)
#2      RenderSliverMultiBoxAdaptor.applyPaintTransform (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:588:7)
#3      RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:2392:24)
#4      RenderBox.localToGlobal (package:flutter/src/rendering/box.dart:2372:39)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants