-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: typographyText rendering, possibly libtxtText rendering, possibly libtxtc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levelfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11Found to occur in 2.11frameworkflutter/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 onr: solvedIssue is closed as solvedIssue is closed as solved
Description
Steps to Reproduce
- Execute
flutter run
on the code sample
Expected results: Text rendered correctly whether overflowing or not
Actual results: Text cut above when overflowing:
Code sample
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(
title: 'Flutter Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
const TextStyle textStyle = TextStyle(
fontSize: 18.0,
color: Colors.black,
);
const StrutStyle strutStyle = StrutStyle(forceStrutHeight: true, height: 1.0);
final List<String> texts = <String>[
'BGBGBGj first line',
'BGBGBGj second line is a bit longer',
'BGBGBGj third line is a bit longer and has ellipsis',
'BGBGBGj fourth line is normal',
'Lorem ipsum 1',
'Lorem ipsum 2',
'Lorem ipsum 3',
'Lorem ipsum 4',
'Lorem ipsum 5',
'Lorem ipsum 6',
'Lorem ipsum 7',
'Lorem ipsum 8',
'Lorem ipsum 9',
'Lorem ipsum 10',
'Lorem ipsum 11',
];
final List<Widget> tiles = texts.map((String text) {
return ListTile(
title: Text(
text,
style: textStyle,
strutStyle: strutStyle,
maxLines: 1,
softWrap: false,
overflow: TextOverflow.fade,
),
);
}).toList();
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: Center(
child: SizedBox(
width: 400.0,
child: Scrollbar(
child: ListView(children: tiles),
),
),
),
);
}
}
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: typographyText rendering, possibly libtxtText rendering, possibly libtxtc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering levelfound in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.11Found to occur in 2.11Found to occur in 2.11frameworkflutter/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 onr: solvedIssue is closed as solvedIssue is closed as solved