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

Null error when scrolling back to the top #345

Open
MominRaza opened this issue May 4, 2024 · 0 comments
Open

Null error when scrolling back to the top #345

MominRaza opened this issue May 4, 2024 · 0 comments

Comments

@MominRaza
Copy link

MominRaza commented May 4, 2024

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following _TypeError was thrown during performLayout():
Null check operator used on a null value

The relevant error-causing widget was:
  SliverMasonryGrid
  SliverMasonryGrid:file:///X:/AndroidStudioProjects/apnapan/lib/feed/components/posts_list.dart:102:31

When the exception was thrown, this was the stack:
#0      RenderSliverMasonryGrid.performLayout
(package:flutter_staggered_grid_view/src/rendering/sliver_masonry_grid.dart:489:51)
#1      RenderObject.layout (package:flutter/src/rendering/object.dart:2577:7)
#2      RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:601:13)
#3      RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1516:12)
#4      RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1427:20)
#5      RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2416:7)
#6      PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1051:18)
#7      PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1064:15)
#8      RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:577:23)
#9      WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1138:13)
#10     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:443:5)
#11     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1392:15)
#12     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1313:9)
#13     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1171:5)
#14     _invoke (dart:ui/hooks.dart:312:13)
#15     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#16     _drawFrame (dart:ui/hooks.dart:283:31)

The following RenderObject was being processed when the exception was fired: RenderSliverMasonryGrid#bffdf
relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE:
  needs compositing
  creator: SliverMasonryGrid ← Viewport ← IgnorePointer-[GlobalKey#50b7e] ← Semantics ← Listener ←
    _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#fd6c9] ←
    Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#6a384] ←
    NotificationListener<ScrollMetricsNotification> ← Transform ← ⋯
  parentData: paintOffset=Offset(0.0, 0.0) (can use size)
  constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle,
    scrollOffset: 225.7, precedingScrollExtent: 4.0, remainingPaintExtent: 914.3, crossAxisExtent:
    403.4, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 914.3,
    remainingCacheExtent: 1390.0, cacheOrigin: -225.7)
  geometry: SliverGeometry(scrollExtent: 3316.6, paintExtent: 914.3, maxPaintExtent: 3316.6,
    hasVisualOverflow: true, cacheExtent: 1414.3)
  currently live children: 0 to 11
This RenderObject had the following descendants (showing up to depth 5):
    child with index 0: RenderIndexedSemantics#35b58 relayoutBoundary=up2 NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderRepaintBoundary#9c93e relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#78b24 relayoutBoundary=up4 NEEDS-PAINT
    child with index 1: RenderIndexedSemantics#898b5 relayoutBoundary=up2 NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderRepaintBoundary#49a75 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#c2cdc relayoutBoundary=up4 NEEDS-PAINT
    child with index 2: RenderIndexedSemantics#f301f relayoutBoundary=up2 NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderRepaintBoundary#c7319 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#da06f relayoutBoundary=up4 NEEDS-PAINT
    child with index 3: RenderIndexedSemantics#4535c relayoutBoundary=up2 NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderRepaintBoundary#d4123 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#e2327 relayoutBoundary=up4 NEEDS-PAINT
    child with index 4: RenderIndexedSemantics#4b89e relayoutBoundary=up2
      child: RenderRepaintBoundary#de96e relayoutBoundary=up3
        child: RenderFlex#4aba9 relayoutBoundary=up4
          child 1: RenderSemanticsAnnotations#80468 relayoutBoundary=up5
            child: RenderPadding#4ebe6 relayoutBoundary=up6
    child with index 5: RenderIndexedSemantics#a9a31 relayoutBoundary=up2
      child: RenderRepaintBoundary#05f4e relayoutBoundary=up3
        child: RenderConstrainedBox#dc7eb relayoutBoundary=up4
    child with index 6: RenderIndexedSemantics#05a86 relayoutBoundary=up2
      child: RenderRepaintBoundary#29eaa relayoutBoundary=up3
        child: RenderConstrainedBox#bf917 relayoutBoundary=up4
    child with index 7: RenderIndexedSemantics#a8280 relayoutBoundary=up2
      child: RenderRepaintBoundary#c744d relayoutBoundary=up3
        child: RenderConstrainedBox#2d657 relayoutBoundary=up4
════════════════════════════════════════════════════════════════════════════════════════════════════
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

1 participant