In my app, I've noticed some widgets generate overflow exception in a particular situation: when there are increased font sizes preempted by the user via Accessibility options in the iOS/Android.
I would like to widget test these widgets, by passing a parameter to increase the font size like OS selected, and check if there are any overflows.
This kind of test would be similar to widget test in different screen sizes, in which is possible to set the physical size like below:
import 'package:flutter_test/flutter_test.dart';
(...)
testWidgets('test overflow on iPhone SE 1 gen', (tester) async {
tester.binding.window.physicalSizeTestValue = Size(320.0, 568.0);
(...)
}
Are there any recommended practices over widget testing with highly increased font sizes as an accessibility option in Flutter?