滚动小部件内的颤振滚动小部件

Posted

技术标签:

【中文标题】滚动小部件内的颤振滚动小部件【英文标题】:Flutter Scrolling widget inside a Scrolling widget 【发布时间】:2019-05-23 18:21:47 【问题描述】:

你好我正在建立这个页面https://cdn.discordapp.com/attachments/460823618805563392/526802427836366848/unknown.png

ListView.builder(
        shrinkWrap: true,
        itemCount: 1,
        itemBuilder: (BuildContext context, int index) 
          return new Column(
            children: <Widget>[
              new RopSayac(MediaQuery.of(context).size.width),
              stackvideos(),
            ],
          );
        ,
      )

这是我的第一个列表视图,堆栈视频中还有另一个列表视图。

  new CustomScrollView(
        slivers: <Widget>[
          SliverFixedExtentList(
            itemExtent: 50.0,
            delegate: SliverChildBuilderDelegate(
              (BuildContext context, int index) 
                return new VideoTile();
              ,
            ),
          ),
        ],
      ),

Video tile 是返回图像和文本的普通组件

我的完整代码

        import 'package:flutter/material.dart';
    import '../Theme.dart' as Theme;
    import '../Components/ropSayac.dart';
    import '../Components/Stackvideostile.dart';

    class Ropo extends StatelessWidget 
      Widget didvideomounted(bool asd) 
        if (asd == true) 
          return new Text("video");
         else
          return new Container(
            width: 226.0,
            height: 226.0,
            decoration: new BoxDecoration(
                shape: BoxShape.circle,
                border: new Border.all(
                    width: 5.0, color: Theme.Colors.roportajheroborder)),
          );
      

      Widget stackvideos() 
        return new Container(
          decoration: new BoxDecoration(
            color: Theme.Colors.tabbarbackground,
            borderRadius: BorderRadius.all(Radius.circular(8.0)),
          ),
          margin: EdgeInsets.only(top: 40.0, bottom: 10.0),
          width: 358.0,
          height: 343.0,
          child: Column(
            children: <Widget>[
              Container(
                // Üstteki bar
                width: 358.0,
                height: 46.0,
                decoration: new BoxDecoration(
                  color: Theme.Colors.stackvideostopbar,
                  borderRadius: BorderRadius.all(Radius.circular(8.0)),
                  boxShadow: <BoxShadow>[
                    new BoxShadow(
                      color: Colors.black12,
                      blurRadius: 3.0,
                      offset: new Offset(0.0, 7.0),
                    ),
                  ],
                ),

                child: Center(
                  child: new Text(
                    "BENCE Bİ’ ÖNCEKİLERE DE GÖZ AT",
                    style: Theme.TextStyles.stackvideotitle,
                  ),
                ),
              ), //üstteki bar bitti
              new CustomScrollView(
                slivers: <Widget>[
                  SliverFixedExtentList(
                    itemExtent: 50.0,
                    delegate: SliverChildBuilderDelegate(
                      (BuildContext context, int index) 
                        return new VideoTile();
                      ,
                    ),
                  ),
                ],
              ),
            ],
          ),
        );
      
      List<String> lists = ["asdas","adadsa"];


      @override
      Widget build(BuildContext context) 
        return Container(
          color: Theme.Colors.pagebackground,
          child: new Stack(
            children: <Widget>[
              new Container(
                margin: EdgeInsets.only(left: 30.0, top: 37.0),
                child: Image.asset(
                  "assets/k.png",
                  fit: BoxFit.cover,
                ),
              ),
              ListView.builder(
                shrinkWrap: true,
                itemCount: 1,
                itemBuilder: (BuildContext context, int index) 
                  return new Column(
                    children: <Widget>[
                      new RopSayac(MediaQuery.of(context).size.width),
                      stackvideos(),
                    ],
                  );
                ,
              )

              //new Image.asset("name"),
            ],
          ),
        );
      
    

这是错误日志

正在执行热重启... 在 2.163 毫秒内重新启动应用程序。 我/颤振(1664):══╡渲染库╞═════════════════════════════════════════════════ ═══════════════════════ I/flutter (1664):在 performResize() 期间抛出了以下断言: I/flutter (1664):垂直视口被赋予了无限的高度。 I/flutter (1664):视口在滚动方向上扩展以填充其容器。在这种情况下,垂直 I/flutter (1664):视口被赋予了无限量的垂直空间来扩展。这个情况 I/flutter (1664):通常发生在可滚动小部件嵌套在另一个可滚动小部件中时。 I/flutter (1664):如果这个小部件总是嵌套在一个可滚动的小部件中,则不需要使用视口,因为 I/flutter (1664):总会有足够的垂直空间供孩子们使用。在这种情况下,请考虑使用 Column 我/颤动(1664):相反。否则,请考虑使用“shrinkWrap”属性(或 ShrinkWrappingViewport)来调整大小 I/flutter (1664):视口的高度与其子项的高度之和。 我/颤动(1664): I/flutter (1664):当异常被抛出时,这是堆栈: 我/颤振(1664):#0 RenderViewport.performResize。 (包:flutter/src/rendering/viewport.dart:1129:15) I/flutter (1664): #1 RenderViewport.performResize (package:flutter/src/rendering/viewport.dart:1182:6) I/flutter (1664): #2 RenderObject.layout (package:flutter/src/rendering/object.dart:1619:9) I/flutter (1664): #3 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #4 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #5 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter(1664):#7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout(包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #8 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #9 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #10 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter(1664):#11 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout(包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #12 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #13 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #14 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter(1664):#15 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout(包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #17 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #18 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #19 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15) I/flutter (1664): #20 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #21 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #22 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #23 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:258:13) I/flutter (1664): #24 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #25 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11) I/flutter (1664): #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #27 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:738:15) I/flutter (1664): #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #29 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #31 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #33 RenderSliv​​erList.performLayout (package:flutter/src/rendering/sliver_list.dart:164:27) I/flutter (1664): #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter(1664):#35 RenderSliv​​erPadding.performLayout(包:flutter/src/rendering/sliver_padding.dart:182:11) I/flutter (1664): #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #37 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:405:13) I/flutter (1664): #38 RenderShrinkWrappingViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1645:12) I/flutter (1664): #39 RenderShrinkWrappingViewport.performLayout (package:flutter/src/rendering/viewport.dart:1608:20) I/flutter (1664): #40 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #41 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #42 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #43 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #44 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #45 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #46 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #47 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #48 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #49 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #50 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter(1664):#51 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout(包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #52 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #53 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (包:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #54 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #55 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #56 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #57 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15) I/flutter (1664): #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #59 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #61 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #63 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13) I/flutter (1664): #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #65 RenderSliv​​erMultiBoxAdaptor.insertAndLayoutChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:404:13) I/flutter (1664): #66 RenderSliv​​erFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:208:17) I/flutter (1664): #67 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (1664): #68 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:405:13) I/flutter (1664): #69 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1316:12) I/flutter (1664): #70 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1234:20) I/flutter (1664): #71 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7) I/flutter(1664):#72 PipelineOwner.flushLayout(包:flutter/src/rendering/object.dart:768:18) I/flutter (1664): #73 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19) I/flutter (1664): #74 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:677:13) I/flutter (1664): #75 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5) I/flutter (1664): #76 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) I/flutter (1664): #77 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) I/flutter (1664): #78 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) I/flutter (1664):#79 _invoke (dart:ui/hooks.dart:154:13) 我/颤振(1664):#80 _drawFrame(dart:ui/hooks.dart:143:3) 我/颤动(1664): I/flutter (1664):触发异常时正在处理以下 RenderObject: 我/颤振(1664):RenderViewport#cbee0需要-布局需要-油漆 I/flutter(1664):创建者:视口←_ScrollableScope←IgnorePointer-[GlobalKey#64e81]←语义←侦听器← 我/颤振(1664):_GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#cbd61] ← 我/颤振(1664):_ScrollSemantics-[GlobalKey#a720b] ← RepaintBoundary ← CustomPaint ← RepaintBoundary ← 我/颤振(1664):NotificationListener←⋯ I/flutter (1664): parentData: (可以使用大小) I/flutter (1664): 约束:BoxConstraints(0.0 ClampingScrollPhysics, IdleScrollActivity#c3243, 我/颤动(1664):ScrollDirection.idle) I/颤动(1664):锚:0.0 I/flutter (1664):这个 RenderObject 有以下子对象: 我/颤振(1664):RenderSliv​​erFixedExtentList#ca02f 需要-布局需要-油漆 我/颤振(1664):══════════════════════════════════════════════════════ ══════════════════════════════════════════════════ ═══════ I/flutter(1664):引发了另一个异常:RenderBox 未布置:RenderViewport#cbee0 NEEDS-LAYOUT NEEDS-PAINT I/flutter(1664):引发了另一个异常:RenderBox 未布置:RenderViewport#cbee0 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderIgnorePointer#4f553 relayoutBoundary=up8 NEEDS-PAINT I/flutter(1664):引发了另一个异常:未布置 RenderBox:RenderSemanticsAnnotations#d1753 relayoutBoundary=up7 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderPointerListener#b4cae relayoutBoundary=up6 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:RenderSemanticsGestureHandler#62acb relayoutBoundary=up5 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:_RenderScrollSemantics#7332f relayoutBoundary=up4 NEEDS-PAINT I/flutter (1664): 另一个异常被抛出: RenderBox 没有布局: RenderRepaintBoundary#48bf2 relayoutBoundary=up3 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:RenderCustomPaint#4a9f4 relayoutBoundary=up2 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderRepaintBoundary#15069 relayoutBoundary=up1 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:RenderFlex#98b62 NEEDS-PAINT I/flutter (1664): 另一个异常被抛出: RenderBox 没有布局: RenderDecoratedBox#0943d NEEDS-PAINT I/flutter(1664):引发了另一个异常:RenderBox 未布置:RenderConstrainedBox#8d0dc relayoutBoundary=up16 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:RenderPadding#9c2c8 relayoutBoundary=up15 NEEDS-PAINT I/flutter(1664):引发另一个异常:RenderBox 未布置:RenderFlex#362d5 relayoutBoundary=up14 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderRepaintBoundary#fcd25 relayoutBoundary=up13 NEEDS-PAINT I/flutter(1664):引发了另一个异常:'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':断言失败:第 461 行 pos 12:'child.hasSize':不正确。 I/flutter(1664):引发了另一个异常:NoSuchMethodError:在 null 上调用了 getter 'scrollOffsetCorrection'。 I/flutter(1664):引发了另一个异常:NoSuchMethodError:在 null 上调用了方法“debugAssertIsValid”。 I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderShrinkWrappingViewport#f1d5d relayoutBoundary=up9 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderIgnorePointer#80ce2 relayoutBoundary=up8 NEEDS-PAINT I/flutter(1664):引发了另一个异常:未布置 RenderBox:RenderSemanticsAnnotations#915f2 relayoutBoundary=up7 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderPointerListener#34258 relayoutBoundary=up6 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:RenderSemanticsGestureHandler#ff619 relayoutBoundary=up5 NEEDS-PAINT I/flutter (1664):引发了另一个异常:未布置 RenderBox:_RenderScrollSemantics#6b62a relayoutBoundary=up4 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderRepaintBoundary#34543 relayoutBoundary=up3 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderCustomPaint#e9b84 relayoutBoundary=up2 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderRepaintBoundary#4d7e6 relayoutBoundary=up1 NEEDS-PAINT I/flutter (1664):抛出另一个异常:RenderBox 未布置:RenderStack#59c67 NEEDS-PAINT I/flutter (1664): 另一个异常被抛出: RenderBox 没有布局: RenderDecoratedBox#6f453 NEEDS-PAINT I/flutter(1664):引发了另一个异常:未布置 RenderBox:RenderRepaintBoundary#3ecf2 NEEDS-PAINT I/flutter(1664):引发了另一个异常:'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':断言失败:第 461 行 pos 12:'child.hasSize':不正确。 I/flutter(1664):引发了另一个异常:未布置 RenderBox:RenderIndexedSemantics#54d44 NEEDS-PAINT I/flutter(1664):引发另一个异常:未布置 RenderBox:RenderRepaintBoundary#4d7e6 relayoutBoundary=up1 NEEDS-PAINT I/flutter(1664):引发了另一个异常:'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':断言失败:第 461 行 pos 12:'child.hasSize':不正确。 E/flutter(1664):[错误:flutter/shell/common/shell.cc(184)] Dart错误:未处理的异常: E/flutter(1664):无法测试没有大小的渲染框。 E/flutter (1664):在这个 RenderBox 上调用了 hitTest() 方法: E/颤振(1664):RenderIndexedSemantics#54d44 需要油漆 E/flutter ( 1664): 虽然这个节点没有标记为需要布局,但是它的大小没有设置。 RenderBox 对象必须具有明确的大小才能进行命中测试。确保有问题的 RenderBox 在布局期间设置其大小。 E/颤振(1664):#0 RenderBox.hitTest。 (包:flutter/src/rendering/box.dart:1901:9) E/flutter (1664): #1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1912:6) E/flutter (1664): #2 _RenderSliv​​erMultiBoxAdaptor&RenderSliv​​er&ContainerRenderObjectMixin&RenderSliv​​erHelpers.hitTestBoxChild (package:flutter/src/rendering/sliver.dart:1475:22) E/flutter(1664):#3 RenderSliv​​erMultiBoxAdaptor.hitTestChildren(包:flutter/src/rendering/sliver_multi_box_adaptor.dart:475:11) E/flutter (1664): #4 RenderSliv​​er.hitTest (package:flutter/src/rendering/sliver.dart:1141:11) E/flutter(1664):#5 RenderViewportBase.hitTestChildren(包:flutter/src/rendering/viewport.dart:572:43) E/flutter (1664): #6 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter(1664):#7 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren(包:flutter/src/rendering/proxy_box.dart:113:19) E/flutter (1664): #8 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter(1664):#9 RenderIgnorePointer.hitTest(包:flutter/src/rendering/proxy_box.dart:2777:37) E/flutter (1664): #10 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter(1664):#11 RenderBox.hitTest(包:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #12 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter(1664):#13 RenderProxyBoxWithHitTestBehavior.hitTest(包:flutter/src/rendering/proxy_box.dart:160:19) E/flutter (1664): #14 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter (1664): #15 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #16 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter(1664):#17 RenderBox.hitTest(包:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #18 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter (1664): #19 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #20 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter(1664):#21 RenderCustomPaint.hitTestChildren(包:flutter/src/rendering/custom_paint.dart:501:18) E/flutter (1664): #22 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #23 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter (1664): #24 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #25 _RenderCustomMultiChildLayoutBox&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (package:flutter/src/rendering/box.dart:2256:17) E/flutter (1664): #26 RenderCustomMultiChildLayoutBox.hitTestChildren (package:flutter/src/rendering/custom_layout.dart:366:12) E/flutter (1664): #27 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter (1664): #28 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:113:19) E/flutter (1664): #29 RenderBox.hitTest (package:flutter/src/rendering/box.dart:1914:11) E/flutter(1664):#30 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren(包:flutter/src/rendering/proxy_box.dart:113:19) E/flutter(1664):#31 RenderBox.hitTest(包:flutter/src/rendering/box.dart:1914:11) E/flutter(1664):#32 RenderPhysicalModel.hitTest(包:flutter/src/rendering/prox

【问题讨论】:

【参考方案1】:

您可以利用 CustomScrollView 小部件并更改布局:

改变这个:

       ListView.builder(
          shrinkWrap: true,
          itemCount: 1,
          itemBuilder: (BuildContext context, int index) 
            return new Column(
              children: <Widget>[
                new RopSayac(MediaQuery.of(context).size.width),
                stackvideos(),
              ],
            );
          ,
        )


  new CustomScrollView(
    slivers: <Widget>[
      SliverFixedExtentList(
        itemExtent: 50.0,
        delegate: SliverChildBuilderDelegate(
          (BuildContext context, int index) 
            return new VideoTile();
          ,
        ),
      ),
    ],
  ),

到这里:

   CustomScrollView(
        slivers: <Widget>[
          SliverToBoxAdapter(
            child: RopSayac(MediaQuery.of(context).size.width),
          ),
          SliverFixedExtentList(
            itemExtent: 50.0,
            delegate: SliverChildBuilderDelegate(
              (BuildContext context, int index) 
                return new VideoTile();
              ,
            ),
          ),
        ],
      )     

【讨论】:

我写的是新答案,往下看

以上是关于滚动小部件内的颤振滚动小部件的主要内容,如果未能解决你的问题,请参考以下文章

在颤振/飞镖中与图像下的小部件交互

QPlainTextEdit 内的 QGraphicsView(可滚动小部件)

颤振:单击该小部件内的按钮后如何将小部件更改为另一个小部件

堆栈小部件内的列表视图不起作用(滚动方向:Axis.vertical)

提取的小部件内的颤振滑块

如何在 Flutter 中对齐小部件内的按钮