Skip to content

Flutter web Text Widget overflow not working as intended #36043

@icatalud

Description

@icatalud

The Text overflow in flutter web does not work for multiple lines.

For example by placing the following widget in the body of the Scaffold from the initial web project:

Container(
  width: 150,
  child: Text(
    'Hello, World! super length textbox why does it not go beyond 1 lines? It beats me, what is going on, it doesn't work, it's not my fault. But why? why is it? I cannot understand',
    overflow: TextOverflow.ellipsis,
    maxLines: 2,
  ),
),

It does not show the ellipsis (...), however by changing maxLines to 1 it works. By using the exact same code on regular Flutter, it works as intended. It's a Flutter Web issue.

I tried different placements for the Text Widget and in every use case I got the same behavior, maxLines > 1 breaks the overflow logic.

Metadata

Metadata

Assignees

Labels

a: typographyText rendering, possibly libtxtplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions