import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import '../../helpers/pump_app.dart'; /// Pumps [child] in a scrollable Scaffold with the app theme. Future pumpWidgetUnderTest( WidgetTester tester, Widget child, { ThemeMode themeMode = ThemeMode.light, double? textScale, Size size = const Size(400, 800), bool settle = true, }) async { tester.view.physicalSize = size; tester.view.devicePixelRatio = 1; addTearDown(tester.view.reset); await pumpApp( tester, themeMode: themeMode, textScale: textScale, settle: settle, home: Scaffold( body: SingleChildScrollView( padding: const EdgeInsets.all(16), child: child, ), ), ); } const themeModes = [ThemeMode.light, ThemeMode.dark];