Ga naar hoofdinhoud
Logo Appt Light

Text truncation on Flutter

Text should never get truncated in your app, even when users have enlarged their font size. Instead, apps should adapt the interface to the available space.

In Flutter, you can avoid text truncation by removing all instances of maxLines from your app. You should also set overflow to TextOverflow.visible where needed. Lastly, avoid using fixed values for any heights or widths.

Text(
    'Avoid text truncation',
    maxLines: REMOVE,
    overflow: TextOverflow.visible
)
Bijdragen

Feedback?

Laat 't ons weten!