Skip to content

LicensePage() in landscape mode throws Renderflex overflow error #82169

@mysticeti

Description

@mysticeti

Steps to Reproduce

Call the following to show the default license page in the app.

LicensePage(
          applicationIcon: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Container(
                width: MediaQuery.of(context).size.width * 0.5,
                child:
                    Image(image: AssetImage('assets/logo/my_logo.png'))),
          ),
          applicationVersion: '0.0.1',
        );

Expected results: No issues just like in the portrait orientation.
Actual results: Only in landscape orientation there is RenderFlex overflow error due to CircularProgressIndicator() widget.

Logs ``` The following assertion was thrown during layout: A RenderFlex overflowed by 43 pixels on the bottom.

The relevant error-causing widget was:
LicensePage file:///D:/Geovation/flutter_sandbox/lib/sandbox_license/sandbox_license_page.dart:28:16
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.

Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.

The specific RenderFlex in question is: RenderFlex#2861e relayoutBoundary=up4 OVERFLOWING
... parentData: (can use size)
... constraints: BoxConstraints(0.0<=w<=748.9, 0.0<=h<=215.4)
... size: Size(748.9, 215.4)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: max
... crossAxisAlignment: center
... verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤

<!-- Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.964], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.55.2)
[√] Connected device (3 available)

• No issues found! -->

Metadata

Metadata

Assignees

Labels

a: layoutSystemChrome and Framework's Layout Issuesa: qualityA truly polished experiencef: material designflutter/packages/flutter/material repository.found in release: 2.3Found to occur in 2.3frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Issue closed with comment

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions