Repository: flutter
Issue: SliverGrid throws assertion while screen is locked
Labels: framework,f: scrolling,a: error message,has reproducible steps,P2,found in release: 3.10,found in release: 3.12,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

I am sorry if this was already reported somewhere, I couldn't find a similar issue nor was it already fixed on master.

1. Lock your device (e.g. Press power button)
2. Run and deploy the attached code without unlocking your device!
3. A few seconds after launching, you should be able to observe the `'crossAxisExtent > 0.0': is not true` assertion in the console

This only happens on the first build, where every element still has 0 height and 0 width.
As long as the screen is locked, Hot Reload and Hot Restart are producing the same assertion again.
But as soon as the screen was unlocked once, there are no more any assertions happening, even when re-locking the device and using Hot Restart.

This was tested with the latest stable and latest master (Flutter 3.12.0-14.0.pre.48) on a Xiaomi device and a Pixel 4 emulator.

### Expected results

SliverGrid should probably not assert while running fine with the screen unlocked.

### Actual results

SliverGrid asserts with `'crossAxisExtent > 0.0': is not true` while the screen is locked.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("'crossAxisExtent > 0.0' Demo")),
      body: CustomScrollView(
        slivers: [
          SliverGrid(
            gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
              maxCrossAxisExtent: 200, // any number should work.
            ),
            delegate: SliverChildBuilderDelegate(
              childCount: 3, // again arbitrary number.
              (context, index) => const Placeholder(),
            ),
          ),
        ],
      ),
    );
  }
}

```

</details>

### Logs

<details><summary>Logs</summary>

```console
======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
'package:flutter/src/rendering/sliver_grid.dart': Failed assertion: line 456 pos 12: 'crossAxisExtent > 0.0': is not true.


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=2_bug.yml

The relevant error-causing widget was: 
  SliverGrid SliverGrid:file:///mnt/Daten/entwicklung/bug/lib/sliver_grid_extent.dart:32:11
When the exception was thrown, this was the stack: 
#2      SliverGridDelegateWithMaxCrossAxisExtent._debugAssertIsValid (package:flutter/src/rendering/sliver_grid.dart:456:12)
#3      SliverGridDelegateWithMaxCrossAxisExtent.getLayout (package:flutter/src/rendering/sliver_grid.dart:466:12)
#4      RenderSliverGrid.performLayout (package:flutter/src/rendering/sliver_grid.dart:572:51)
#5      RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#6      RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:534:13)
#7      RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1512:12)
#8      RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1421:20)
#9      RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#10     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#11     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#12     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#13     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#14     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#15     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#16     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#17     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#18     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#19     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#20     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#21     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#22     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#23     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#24     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#25     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#26     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#27     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#28     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#29     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#30     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#31     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#32     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#33     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1431:11)
#34     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#35     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#36     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173:12)
#37     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1056:7)
#38     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:237:7)
#39     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:405:14)
#40     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#41     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#42     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#43     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#44     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#45     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#46     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1431:11)
#47     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#48     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#49     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#50     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#51     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#52     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#53     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#54     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#55     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#56     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#57     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#58     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#59     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#60     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#61     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#62     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#63     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#64     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#65     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#66     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#67     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#68     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#69     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#70     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#71     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#72     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#73     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#74     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#75     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#76     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#77     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3732:13)
#78     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#79     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#80     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#81     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#82     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#83     _RenderTheaterMixin.performLayout (package:flutter/src/widgets/overlay.dart:838:15)
#84     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#85     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#86     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#87     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#88     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#89     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#90     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#91     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#92     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#93     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#94     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#95     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#96     RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:554:11)
#97     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#98     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#99     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#100    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#101    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#102    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#103    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#104    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#105    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#106    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#107    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#108    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#109    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#110    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#111    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#112    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#113    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#114    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#115    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#116    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#117    RenderView.performLayout (package:flutter/src/rendering/view.dart:178:14)
#118    RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2332:7)
#119    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1013:18)
#120    RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:494:19)
#121    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:918:13)
#122    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
#123    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#124    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#125    SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:952:7)
#129    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 5 frames from class _AssertionError, class _Timer, and dart:async-patch)
The following RenderObject was being processed when the exception was fired: RenderSliverGrid#512e3 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT
...  parentData: paintOffset=Offset(0.0, 0.0) (can use size)
...  constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 0.0, remainingCacheExtent: 250.0, cacheOrigin: 0.0)
...  geometry: null
...  no children current live
RenderObject: RenderSliverGrid#512e3 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT
  parentData: paintOffset=Offset(0.0, 0.0) (can use size)
  constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 0.0, remainingCacheExtent: 250.0, cacheOrigin: 0.0)
  geometry: null
  no children current live
====================================================================================================

======== 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: 
  CustomScrollView CustomScrollView:file:///mnt/Daten/entwicklung/bug/lib/sliver_grid_extent.dart:30:13
When the exception was thrown, this was the stack: 
#0      RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:549:64)
#1      RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1512:12)
#2      RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1421:20)
#3      RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#4      RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#7      RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#8      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#9      RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#10     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#11     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#12     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#13     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#14     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#15     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#16     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#17     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#18     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#19     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#20     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#21     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#22     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#23     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#24     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#25     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#26     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#27     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1431:11)
#28     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#29     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#30     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173:12)
#31     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1056:7)
#32     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:237:7)
#33     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:405:14)
#34     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#35     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#36     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#37     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#38     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#39     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#40     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1431:11)
#41     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#42     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#43     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#44     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#45     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#46     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#47     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#48     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#49     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#50     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#51     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#52     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#53     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#54     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#55     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#56     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#57     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#58     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#59     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#60     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#61     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#62     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#63     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#64     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#65     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#66     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#67     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#68     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#69     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#70     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#71     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3732:13)
#72     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#73     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#74     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#75     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#76     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#77     _RenderTheaterMixin.performLayout (package:flutter/src/widgets/overlay.dart:838:15)
#78     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#79     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#80     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#81     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#82     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#83     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#84     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#85     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#86     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#87     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#88     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#89     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#90     RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:554:11)
#91     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#92     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#93     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#94     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#95     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#96     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#97     RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#98     RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#99     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#100    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#101    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#102    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#103    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#104    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#105    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#106    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#107    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#108    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#109    RenderObject.layout (package:flutter/src/rendering/object.dart:2493:7)
#110    RenderBox.layout (package:flutter/src/rendering/box.dart:2382:11)
#111    RenderView.performLayout (package:flutter/src/rendering/view.dart:178:14)
#112    RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2332:7)
#113    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1013:18)
#114    RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:494:19)
#115    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:918:13)
#116    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
#117    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#118    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#119    SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:952:7)
#123    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 3 frames from class _Timer and dart:async-patch)
The following RenderObject was being processed when the exception was fired: RenderViewport#4ba7a NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=0.0, h=0.0)
...  size: Size(0.0, 0.0)
...  axisDirection: down
...  crossAxisDirection: right
...  offset: ScrollPositionWithSingleContext#e3f81(offset: 0.0, range: null..null, viewport: 0.0, ScrollableState, AlwaysScrollableScrollPhysics -> ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#c6818, ScrollDirection.idle)
...  anchor: 0.0
  center child: RenderSliverGrid#512e3 relayoutBoundary=up1 NEEDS-PAINT
    parentData: paintOffset=Offset(0.0, 0.0) (can use size)
    constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 0.0, remainingCacheExtent: 250.0, cacheOrigin: 0.0)
    geometry: null
    no children current live
RenderObject: RenderViewport#4ba7a NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=0.0, h=0.0)
  size: Size(0.0, 0.0)
  axisDirection: down
  crossAxisDirection: right
  offset: ScrollPositionWithSingleContext#e3f81(offset: 0.0, range: null..null, viewport: 0.0, ScrollableState, AlwaysScrollableScrollPhysics -> ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#c6818, ScrollDirection.idle)
  anchor: 0.0
  center child: RenderSliverGrid#512e3 relayoutBoundary=up1 NEEDS-PAINT
    parentData: paintOffset=Offset(0.0, 0.0) (can use size)
    constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 0.0, remainingCacheExtent: 250.0, cacheOrigin: 0.0)
    geometry: null
    no children current live
====================================================================================================
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.10.5, on Manjaro Linux 6.3.5-2-MANJARO, locale de_AT.UTF-8)
    • Flutter version 3.10.5 on channel stable at /home/<user>/tools/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (vor 3 Wochen), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /mnt/Daten/tools/Android/Sdk
    • Platform android-33-ext5, build-tools 33.0.2
    • Java binary at: /home/<user>/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-1/223.8836.35.2231.10320515/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/chromium

[✗] Linux toolchain - develop for Linux desktop
    • clang version 15.0.7
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
    • pkg-config version 1.8.1

[✓] Android Studio (version 2022.3)
    • Android Studio at /home/<user>/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-1/223.8836.35.2231.10320515
    • Flutter plugin version 74.0.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Connected device (5 available)
    • SM T500 (mobile)             • R9AR800H8RK      • android-arm64  • Android 12 (API 31)
    • M2103K19PG (mobile)          • xwcm955djrrslnpj • android-arm64  • Android 13 (API 33)
    • sdk gphone64 x86 64 (mobile) • emulator-5554    • android-x64    • Android 13 (API 33) (emulator)
    • Linux (desktop)              • linux            • linux-x64      • Manjaro Linux 6.3.5-2-MANJARO
    • Chrome (web)                 • chrome           • web-javascript • Chromium 114.0.5735.198 Arch Linux

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>