-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
f: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryfound in release: 3.0Found to occur in 3.0Found to occur in 3.0frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
Description
Note: I had already commented on the original PR about this issue, see #78732 (comment).
Steps to Reproduce
- Use the code sample on a device with a small enough screen so that the text content takes up more space than available on one line.
Expected results:
Text content should have wrapped across multiple lines.
Actual results:
Text content overflows.
Code sample
import 'package:cupertinolisttileerrordemo/cupertino_list_tile.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Column(
children: [
const Text('Expected behavior (like ListTile):'),
ListTile(
title: Text('Veeeeeeeeeeeeeeeeeeeeeeeeeeeeeery long text' * 5),
onTap: () {
// TODO
},
),
const Text('Actual behavior:'),
CupertinoListTile.notched(
title: Text('Veeeeeeeeeeeeeeeeeeeeeeeeeeeeeery long text' * 5),
onTap: () {
// TODO
},
),
],
),
),
),
);
}
}Logs
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 1276 pixels on the right.
The relevant error-causing widget was:
Row
Row:file:///C:/Users/Alex%20Sandri/Desktop/cupertinolisttileerrordemo/lib/cupertino_list_tile.dart:351:16
The overflowing RenderFlex has an orientation of Axis.horizontal.
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#28534 relayoutBoundary=up7 OVERFLOWING:
creator: Row ← Padding ← ConstrainedBox ← Container ← Listener ← _GestureSemantics ←
RawGestureDetector ← GestureDetector ← CupertinoListTile ← Column ← Center ← _BodyBuilder ← ⋯
parentData: offset=Offset(28.0, 10.0) (can use size)
constraints: BoxConstraints(w=458.0, 30.0<=h<=Infinity)
size: Size(458.0, 30.0)
direction: horizontal
mainAxisAlignment: start
mainAxisSize: max
crossAxisAlignment: center
textDirection: ltr
verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════
Analyzing cupertinolisttileerrordemo...
No issues found! (ran in 3.3s)
[✓] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Versione 10.0.19044.1865], locale it-IT)
• Flutter version 3.0.5 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Android\Sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_SDK_ROOT = C:\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32526.322
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[✓] VS Code (version 1.69.2)
• VS Code at C:\Users\Alex Sandri\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.46.0
[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versione 10.0.19044.1865]
• Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.81
• Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.37
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Metadata
Metadata
Assignees
Labels
f: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryfound in release: 3.0Found to occur in 3.0Found to occur in 3.0frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
