-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38Found to occur in 3.38frameworkflutter/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 onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform team
Description
Steps to reproduce
- Set your Chrome > settings > appearance > font size to Large.
flutter create test_web_font_scaling --platforms=web- Copy example: https://api.flutter.dev/flutter/widgets/WidgetsBindingObserver/didChangeTextScaleFactor.html
- Fix late init error in example.
flutter run --release- Copy the URL in your chrome a few times in a new tab until the "Current scale factor" is not updated.
Expected results
Should show "Current scale factor: 1.25"
Actual results
Shows "Current scale factor: 1"
Code sample
Reproducible sample
import 'package:flutter/material.dart';
void main() {
return runApp(const MaterialApp(home: TextScaleFactorReactor()));
}
class TextScaleFactorReactor extends StatefulWidget {
const TextScaleFactorReactor({super.key});
@override
State<TextScaleFactorReactor> createState() => _TextScaleFactorReactorState();
}
class _TextScaleFactorReactorState extends State<TextScaleFactorReactor>
with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
double _lastTextScaleFactor =
WidgetsBinding.instance.platformDispatcher.textScaleFactor;
@override
void didChangeTextScaleFactor() {
setState(() {
_lastTextScaleFactor =
WidgetsBinding.instance.platformDispatcher.textScaleFactor;
});
}
@override
Widget build(BuildContext context) {
return Text('Current scale factor: $_lastTextScaleFactor');
}
}Screenshots or Video
Screenshots
1. Update font size to Large:
Open new tab in normal chrome until the text scale is not updated:

Logs
Flutter Doctor output
Doctor output
flutter doctor -v
[✓] Flutter (Channel stable, 3.35.7, on Ubuntu 25.10 6.17.0-6-generic, locale en_US.UTF-8) [42ms]
• Flutter version 3.35.7 on channel stable at /A/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision adc9010625 (3 weeks ago), 2025-10-21 14:16:03 -0400
• Engine revision 035316565a
• Dart version 3.9.2
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, no-enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
[✓] Chrome - develop for the web [13ms]
• Chrome at google-chrome
[✓] Connected device (3 available) [212ms]
• Chrome (web) • chrome • web-javascript • Google Chrome 142.0.7444.134
[✓] Network resources [334ms]
• All expected network resources are available.
• No issues found!ksokolovskyi and asaarnak
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38Found to occur in 3.38frameworkflutter/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 onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform team
Type
Projects
Status
Done (PR merged)
