Skip to content

Add textScale(r) value to Flutter context #1832

Closed
@kuhnroyal

Description

@kuhnroyal

Problem Statement

Text scale changes currently only lead to breadcrumbs but especially with screenshots it would be helpful to see the current "global" text scale in Sentry.

In Flutter the text scale can be different for different widgets but in most cases, the system provided scale is enough.

Solution Brainstorm

I would suggest something like MediaQuery.maybeTextScalerOf(context)?.toString() to be added to the context.
The output would be:

  @override
  String toString() => textScaleFactor == 1.0 ? 'no scaling' : 'linear (${textScaleFactor}x)';

This feature requires a context/widget so I would suggest to let the screenshot widget handle this.

Are you willing to submit a PR?

None

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions