mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() This makes it possible to substitute 'flutter run' for 'flutter test' and actually watch a test run on a device. For any test that depends on flutter_test: 1. Remove any import of 'package:test/test.dart'. 2. Replace `testWidgets('...', (WidgetTester tester) {` with `testWidgets('...', (WidgetTester tester) async {` 3. Add an "await" in front of calls to any of the following: * tap() * tapAt() * fling() * flingFrom() * scroll() * scrollAt() * pump() * pumpWidget() 4. Replace any calls to `tester.flushMicrotasks()` with calls to `await tester.idle()`. There's a guarding API that you can use, if you have particularly complicated tests, to get better error messages. Search for TestAsyncUtils. |
||
---|---|---|
.. | ||
all.dart | ||
buttons_demo.dart | ||
cards_demo.dart | ||
chip_demo.dart | ||
colors_demo.dart | ||
data_table_demo.dart | ||
date_picker_demo.dart | ||
dialog_demo.dart | ||
drawing_demo.dart | ||
drop_down_demo.dart | ||
fail.dart | ||
fitness_demo.dart | ||
flexible_space_demo.dart | ||
full_screen_dialog_demo.dart | ||
grid_list_demo.dart | ||
icons_demo.dart | ||
leave_behind_demo.dart | ||
list_demo.dart | ||
menu_demo.dart | ||
modal_bottom_sheet_demo.dart | ||
overscroll_demo.dart | ||
page_selector_demo.dart | ||
persistent_bottom_sheet_demo.dart | ||
progress_indicator_demo.dart | ||
scrollable_tabs_demo.dart | ||
scrolling_techniques_demo.dart | ||
selection_controls_demo.dart | ||
slider_demo.dart | ||
snack_bar_demo.dart | ||
tabs_demo.dart | ||
tabs_fab_demo.dart | ||
text_field_demo.dart | ||
time_picker_demo.dart | ||
tooltip_demo.dart | ||
two_level_list_demo.dart | ||
typography_demo.dart | ||
weather_demo.dart |