testing library
Testing utilities for flutter_adaptive_design.
Constants
-
kAdaptivePlatforms
→ const List<
TargetPlatform> - The two platforms every adaptive widget branches on.
- kCupertinoMinTouchTarget → const double
- Minimum touch target per Apple Human Interface Guidelines: 44x44 pt.
- kMaterialMinTouchTarget → const double
- Minimum touch target per Material 3 accessibility guidance: 48x48 dp.
Functions
-
testAdaptiveWidget(
String description, Future< void> body(WidgetTester tester, TargetPlatform platform), {List<TargetPlatform> platforms = kAdaptivePlatforms, bool overrideFrameworkPlatform = true}) → void -
Runs
bodyonce per entry inplatforms, with the platform forced. -
wrapAdaptiveTestWidget(
Widget child, {TextScaler textScaler = TextScaler.noScaling, ThemeData? materialTheme, CupertinoThemeData? cupertinoTheme}) → Widget - Helper to wrap a widget inside the appropriate native shell (CupertinoApp / MaterialApp).