首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Singlechildscrollview中的pageview

Singlechildscrollview中的pageview
EN

Stack Overflow用户
提问于 2021-02-04 23:54:10
回答 1查看 408关注 0票数 0

我试图把一个页面视图放在一个由可拖拽的scroll返回的单个singlechildscrollview中,这样它就可以从屏幕的一半开始滚动,可以从屏幕的底部滚动到屏幕的顶部,也可以通过pageview水平滚动。代码如下:

代码语言:javascript
复制
DraggableScrollableSheet(
        initialChildSize: 0.4,
          minChildSize: 0.399,
          builder: (context,scrollcontroller) {
            return SingleChildScrollView(
            controller: scrollcontroller,
              scrollDirection: Axis.vertical,
              child: PageView(
                    scrollDirection: Axis.horizontal,
                            children:[
                                Container(
                                  padding: EdgeInsets.only(top:MediaQuery.of(context).size.height/2),
                                  decoration: BoxDecoration(
                                      borderRadius: const BorderRadius.only(
                                        bottomLeft: Radius.circular(80.0),
                                        topRight: Radius.circular(80.0),
                                      ),
                                      color: Colors.red
                                  ),
                                  height: MediaQuery.of(context).size.height,
                                  width:  MediaQuery.of(context).size.width,
                                ),
                                Container(
                                  decoration: BoxDecoration(
                                      borderRadius: const BorderRadius.only(
                                        bottomLeft: Radius.circular(80.0),
                                        topRight: Radius.circular(80.0),
                                      ),
                                      color: Colors.deepOrange
                                  ),
                                  height: MediaQuery.of(context).size.height,
                                  width:  MediaQuery.of(context).size.width,
                                ),
                                Container(
                                  decoration: BoxDecoration(
                                      borderRadius: const BorderRadius.only(
                                        bottomLeft: Radius.circular(80.0),
                                        topRight: Radius.circular(80.0),
                                      ),
                                      color: Colors.black
                                  ),
                                  height: MediaQuery.of(context).size.height,
                                  width:  MediaQuery.of(context).size.width,
                                ),
                          ]
                          )
            );
        }
      )

但出现以下错误:

代码语言:javascript
复制
======== Exception caught by rendering library =====================================================
The following NoSuchMethodError was thrown during performLayout():
The method 'toStringAsFixed' was called on null.
Receiver: null
Tried calling: toStringAsFixed(1)

The relevant error-causing widget was: 
  PageView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:97:26
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      ViewportOffset.debugFillDescription (package:flutter/src/rendering/viewport_offset.dart:248:39)
#2      ScrollPosition.debugFillDescription (package:flutter/src/widgets/scroll_position.dart:896:11)
#3      ScrollPositionWithSingleContext.debugFillDescription (package:flutter/src/widgets/scroll_position_with_single_context.dart:261:11)
#4      ViewportOffset.toString (package:flutter/src/rendering/viewport_offset.dart:233:5)
...
The following RenderObject was being processed when the exception was fired: RenderPointerListener#bea84 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
...  size: MISSING
...  behavior: deferToChild
...  listeners: signal
RenderObject: RenderPointerListener#bea84 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
  size: MISSING
  behavior: deferToChild
  listeners: signal
...  child: RenderSemanticsGestureHandler#081a5 relayoutBoundary=up6 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
...    size: MISSING
...    gestures: <none>
...    child: RenderPointerListener#489ba relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
...      size: MISSING
...      behavior: opaque
...      listeners: down
...      child: RenderSemanticsAnnotations#21d33 relayoutBoundary=up8 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
...        size: MISSING
...        child: RenderIgnorePointer#10f37 relayoutBoundary=up9 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
...          size: MISSING
...          ignoring: false
...          ignoringSemantics: false
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderPointerListener#bea84 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  PageView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:97:26
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: _RenderScrollSemantics#99f96 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  PageView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:97:26
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderRepaintBoundary#7030a relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  PageView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:97:26
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderCustomPaint#adaca relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  PageView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:97:26
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderRepaintBoundary#40087 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: _RenderSingleChildViewport#15c06 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderIgnorePointer#004d6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderSemanticsAnnotations#601ea NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderPointerListener#a0a1e NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderSemanticsGestureHandler#bd3e8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderPointerListener#065b1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: _RenderScrollSemantics#0a2c3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderRepaintBoundary#b15d6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderCustomPaint#6f5f2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SingleChildScrollView file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:94:24
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderRepaintBoundary#6449d NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderFractionallySizedOverflowBox#727c4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderConstrainedBox#58dfa relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: _RenderLayoutBuilder#31659 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  Stack file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:29:16
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderStack#ad16a relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  SafeArea file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:28:12
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderPadding#20d61 relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  Scaffold file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:24:12
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: _RenderLayoutBuilder#ac8ab relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  Scaffold file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:24:12
====================================================================================================

======== Exception caught by Flutter framework =====================================================
The method 'toStringAsFixed' was called on null.
Receiver: null
Tried calling: toStringAsFixed(1)
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
RenderBox was not laid out: RenderRepaintBoundary#6449d NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1785:12)
#3      RenderBox.paintBounds (package:flutter/src/rendering/box.dart:2389:41)
#4      PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:139:59)
#5      PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#6      PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:206:7)
...
The following RenderObject was being processed when the exception was fired: RenderFractionallySizedOverflowBox#727c4
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=411.4, h=771.4)
...  size: MISSING
...  alignment: bottomCenter
...  textDirection: ltr
...  widthFactor: pass-through
...  heightFactor: 0.4
RenderObject: RenderFractionallySizedOverflowBox#727c4
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=411.4, h=771.4)
  size: MISSING
  alignment: bottomCenter
  textDirection: ltr
  widthFactor: pass-through
  heightFactor: 0.4
...  child: RenderRepaintBoundary#6449d NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0) (can use size)
...    constraints: BoxConstraints(w=411.4, h=308.6)
...    layer: OffsetLayer#d683d DETACHED
...      engine layer: Null#007db
...      offset: Offset(0.0, 0.0)
...    size: MISSING
...    metrics: 0.0% useful (1 bad vs 0 good)
...    diagnosis: insufficient data to draw conclusion (less than five repaints)
...    child: RenderCustomPaint#6f5f2 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=411.4, h=308.6)
...      size: MISSING
...      child: RenderRepaintBoundary#b15d6 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(w=411.4, h=308.6)
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#0a2c3 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=411.4, h=308.6)
...          semantic boundary
...          size: MISSING
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
RenderBox was not laid out: RenderRepaintBoundary#6449d NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1785:12)
#3      RenderBox.paintBounds (package:flutter/src/rendering/box.dart:2389:41)
#4      PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:139:59)
#5      PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#6      PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:206:7)
...
The following RenderObject was being processed when the exception was fired: RenderFractionallySizedOverflowBox#727c4
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=411.4, h=771.4)
...  size: MISSING
...  alignment: bottomCenter
...  textDirection: ltr
...  widthFactor: pass-through
...  heightFactor: 0.4
RenderObject: RenderFractionallySizedOverflowBox#727c4
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=411.4, h=771.4)
  size: MISSING
  alignment: bottomCenter
  textDirection: ltr
  widthFactor: pass-through
  heightFactor: 0.4
...  child: RenderRepaintBoundary#6449d NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0) (can use size)
...    constraints: BoxConstraints(w=411.4, h=308.6)
...    layer: OffsetLayer#d683d DETACHED
...      engine layer: Null#007db
...      offset: Offset(0.0, 0.0)
...    size: MISSING
...    metrics: 0.0% useful (2 bad vs 0 good)
...    diagnosis: insufficient data to draw conclusion (less than five repaints)
...    child: RenderCustomPaint#6f5f2 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=411.4, h=308.6)
...      size: MISSING
...      child: RenderRepaintBoundary#b15d6 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)

...        constraints: BoxConstraints(w=411.4, h=308.6)
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#0a2c3 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=411.4, h=308.6)
...          semantic boundary
...          size: MISSING
====================================================================================================

======== Exception caught by rendering library =====================================================
RenderBox was not laid out: RenderRepaintBoundary#6449d NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'
The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
RenderBox was not laid out: RenderRepaintBoundary#6449d NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1785 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: 
  DraggableScrollableSheet file:///C:/Users/georg/AndroidStudioProjects/flutter_app/lib/UI/welcome.dart:89:11
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1785:12)
#3      RenderBox.paintBounds (package:flutter/src/rendering/box.dart:2389:41)
#4      PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:139:59)
#5      PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#6      PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:206:7)
...
The following RenderObject was being processed when the exception was fired: RenderFractionallySizedOverflowBox#727c4
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=411.4, h=771.4)
...  size: MISSING
...  alignment: bottomCenter
...  textDirection: ltr
...  widthFactor: pass-through
...  heightFactor: 0.4
RenderObject: RenderFractionallySizedOverflowBox#727c4
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=411.4, h=771.4)
  size: MISSING
  alignment: bottomCenter
  textDirection: ltr
  widthFactor: pass-through
  heightFactor: 0.4
...  child: RenderRepaintBoundary#6449d NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0) (can use size)
...    constraints: BoxConstraints(w=411.4, h=308.6)
...    layer: OffsetLayer#d683d DETACHED
...      engine layer: Null#007db
...      offset: Offset(0.0, 0.0)
...    size: MISSING
...    metrics: 0.0% useful (4 bad vs 0 good)
...    diagnosis: insufficient data to draw conclusion (less than five repaints)
...    child: RenderCustomPaint#6f5f2 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=411.4, h=308.6)
...      size: MISSING
...      child: RenderRepaintBoundary#b15d6 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(w=411.4, h=308.6)
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#0a2c3 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=411.4, h=308.6)
...          semantic boundary
...          size: MISSING
===========================================================

enter image description here

EN

回答 1

Stack Overflow用户

发布于 2021-02-05 19:58:54

谢谢你,我只需要把页面视图包装在一个固定高度的容器里就行了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66049137

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档